The canvas draws an impossible cable exactly like a working one #1305
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1305
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#1304 gave every state payload a verdict per cable (
state.verdicts, one verdict per cable, filed under thecable that caused it) and taught the cable inspector to print it. The canvas is the last surface still drawing on
its own opinion: an impossible cable — copper terminated in a fibre cage, an optic the port cannot seat — comes
out as the same 2 px line as a good one. In a diagram the broken thing has to be the thing you see.
link-downalready exists for a cut cable, and it is not the same fault: a cut is a state, an impossible cable isup and simply cannot be what it claims. They need different fixes, so they need different pictures.
What the drawing must say
link-invalidlink-caveatstate: down(a cut cable)link-down— unchangeddata-link-valid="true"data-link-valid(true/warn/false/unchecked),data-link-issue(thecode) and
data-link-issue-text(the sentence), plus a<title>so the message is there on hover without aclick;
uncheckedmeans the payload carried no verdict — the drawing claims nothing rather than implying the cable isfine (the same rule as #1299 and #1301);
try/catchwould swallow the throw anda refused cable would vanish from the canvas entirely — worse than drawing it as good;
might send.