Add cutsheets: planned cabling checked against discovery
Lint / JS (eslint) (push) Successful in 7s
Lint / Python (flake8) (push) Successful in 1m36s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Security / Python Security (bandit) (push) Successful in 1m40s
Lint / Python (flake8) (pull_request) Successful in 52s
Test / Python Tests (pytest) (push) Successful in 1m4s
Lint / JS (eslint) (pull_request) Successful in 7s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 1m13s
Test / Python Tests (pytest) (pull_request) Successful in 1m15s

A new Cutsheet page records where every cable is meant to go and compares
it with what Gandalf discovers.

- Inventory for what discovery can't see: patch panels, wall jacks,
  shelves and rack positions. Panels and jacks pass through front to rear.
- Cables with two endpoints, ID, type, length, color, status (planned,
  installed, dark, retired) and notes; the far end may be unterminated.
- Each cable's full run is traced through panels and jacks, and runs
  ending on a switch port are checked against its discovered neighbor
  (LLDP, client table, or a DAC serial seen at both ends): matches,
  wrong neighbor, no link, missing port, port conflict, unverified, idle.
- Undocumented links: live switch ports no cable mentions, one click to
  add with what Gandalf already knows. Port panels show the planned cable.
- Labels to make: cable IDs and panel-port labels not yet applied, with a
  print view, for a handheld label maker.
- CSV export, and all-or-nothing import that upserts by cable ID.
- Cables, panels and jacks appear in the dashboard search.

Editing needs the admin group and a JSON request body. Every change is
written to cutsheet_history in the same transaction. Tables are created
on first use.

Refs #12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-10 16:05:08 -05:00
1 parent afc7aae580
commit b9412ff6ba
13 files changed
+2468 -5

No files matched your search

+72
View File
@@ -1313,3 +1313,75 @@ polygon.fp-led-off { fill: #6b6c71; }
.fp-fan-strut { fill: none; stroke: #c9c9cc; stroke-width: 5; }
.fp-epo { fill: #1c1c1f; }
.fp-bracket { fill: none; stroke: #55565c; stroke-width: 1; }
/* ── Cutsheet ─────────────────────────────────────────────────────────── */
.cutsheet-check { font-size: 12px; padding: 2px 0; overflow-wrap: anywhere; }
.cutsheet-path { font-size: 11px; color: var(--text-muted, #8aa); padding: 2px 0 8px; overflow-wrap: anywhere; }
.cs-more { margin-top: 8px; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.cs-chip { padding: 5px 10px; border: 1px solid var(--border-color, #234); border-radius: 3px; font-size: .82rem;
color: inherit; text-decoration: none; }
.cs-chip b { font-size: .95rem; }
.cs-chip-ok b { color: var(--status-ok, #2ecc71); }
.cs-chip-bad { border-color: var(--status-critical, #e0312b); }
.cs-chip-bad b { color: var(--status-critical, #e0312b); }
.cs-chip-warn b { color: var(--accent-amber, #f0a020); }
.cs-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.cs-filters .lt-input { flex: 1 1 240px; min-width: 0; }
.cs-filters .lt-select { flex: 0 1 180px; }
.cs-check { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; cursor: pointer; }
.cs-hint { font-size: .82rem; color: var(--text-muted, #8aa); margin: 0 0 10px; max-width: 75ch; }
.cs-table td { vertical-align: top; }
.cs-id { font-weight: 700; white-space: nowrap; }
.cs-port, .cs-side-tag { font-size: .8rem; color: var(--text-muted, #8aa); }
.cs-side-tag { text-transform: uppercase; letter-spacing: .04em; }
.cs-path, .cs-detail { font-size: .76rem; color: var(--text-muted, #8aa); margin-top: 3px; }
.cs-tag { font-size: .68rem; padding: 1px 5px; border: 1px solid var(--accent-amber, #f0a020); color: var(--accent-amber, #f0a020);
border-radius: 2px; white-space: nowrap; }
.cs-row-problem td:first-child { box-shadow: inset 3px 0 0 var(--status-critical, #e0312b); }
.cs-flash { animation: cs-flash 2.4s ease-out 1; }
@keyframes cs-flash { from { background: rgba(240,160,32,.28); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .cs-flash { animation: none; outline: 2px solid var(--accent-amber, #f0a020); } }
.cs-panel { margin-bottom: 16px; }
.cs-link-btn { background: none; border: 0; padding: 0 0 0 6px; color: var(--accent-cyan, #3cc); cursor: pointer;
font: inherit; font-size: .78rem; text-decoration: underline; }
.cs-label-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.cs-label-card { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center;
padding: 8px 10px; border: 1px dashed var(--border-color, #234); border-radius: 3px; }
.cs-label-text { font-family: var(--font-mono, monospace); font-size: 1.05rem; font-weight: 700; letter-spacing: .05em; }
.cs-label-copies { font-size: .8rem; color: var(--text-muted, #8aa); }
.cs-label-where { grid-column: 1 / -1; font-size: .74rem; color: var(--text-muted, #8aa); }
.cs-rack { display: flex; flex-direction: column; gap: 3px; max-width: 560px; }
.cs-rack-unit { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center;
min-height: calc(var(--u, 1) * 26px); padding: 4px 10px; border: 1px solid var(--border-color, #234);
border-radius: 2px; background: rgba(255,255,255,.02); }
.cs-rack-u { font-family: var(--font-mono, monospace); font-size: .78rem; color: var(--text-muted, #8aa); }
.cs-rack-kind { font-size: .74rem; color: var(--text-muted, #8aa); }
.cs-end { border: 1px solid var(--border-color, #234); border-radius: 3px; padding: 4px 12px 0; margin: 0 0 12px; }
.cs-end legend { font-size: .78rem; padding: 0 6px; color: var(--text-muted, #8aa); text-transform: uppercase; }
.cs-side[hidden] { display: none; }
.cs-modal-wide { max-width: 720px; width: calc(100vw - 32px); }
.cs-mono { font-family: var(--font-mono, monospace); font-size: .8rem; }
.cs-errors ul { margin: 6px 0 0 18px; font-size: .8rem; }
@media (max-width: 640px) {
/* Cables become cards: one labeled field per line */
.cs-table thead { display: none; }
.cs-table, .cs-table tbody, .cs-table tr, .cs-table td { display: block; width: 100%; }
.cs-table tr { border: 1px solid var(--border-color, #234); border-radius: 3px; margin-bottom: 10px; padding: 6px 10px; }
.cs-table td { border: 0 !important; padding: 3px 0 !important; overflow-wrap: anywhere; }
.cs-table td[data-label]::before { content: attr(data-label); display: block; font-size: .68rem;
text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted, #8aa); }
.cs-table td.cs-id { font-size: 1rem; }
.cs-row-problem { box-shadow: inset 3px 0 0 var(--status-critical, #e0312b); }
.cs-row-problem td:first-child { box-shadow: none; }
.cs-rack-unit { grid-template-columns: 56px 1fr; }
.cs-rack-kind { display: none; }
}
@media print {
.no-print, .lt-header, .lt-nav-drawer, .lt-nav-drawer-overlay { display: none !important; }
body.cs-print-labels .g-section:not(#cs-labels-section),
body.cs-print-labels .lt-page-header, body.cs-print-labels .cs-summary { display: none !important; }
.cs-label-card { break-inside: avoid; border-color: #000; color: #000; }
.lt-table, .lt-table td, .lt-table th { color: #000 !important; }
}