Topology: power map, what each outlet feeds
Lint / JS (eslint) (push) Successful in 21s
Lint / Python (flake8) (push) Successful in 2m36s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Test / Python Tests (pytest) (push) Successful in 2m46s
Lint / JS (eslint) (pull_request) Successful in 15s
Lint / Python (flake8) (pull_request) Successful in 2m14s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (push) Successful in 1m33s
Security / Python Security (bandit) (pull_request) Successful in 54s
Test / Python Tests (pytest) (pull_request) Successful in 1m3s
Lint / JS (eslint) (push) Successful in 21s
Lint / Python (flake8) (push) Successful in 2m36s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Test / Python Tests (pytest) (push) Successful in 2m46s
Lint / JS (eslint) (pull_request) Successful in 15s
Lint / Python (flake8) (pull_request) Successful in 2m14s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (push) Successful in 1m33s
Security / Python Security (bandit) (pull_request) Successful in 54s
Test / Python Tests (pytest) (pull_request) Successful in 1m3s
- Each PDU, UPS and power strip card lists its outlets that feed something, draw power or are off, with live watts. Each device fed gets a power badge with what it draws. Hovering a power card or a device draws its feeds as dotted lines and keeps both ends lit. - What an outlet feeds: a saved assignment, else the outlet's UniFi name when it names a device (or the modem), else a MAC in its name that belongs to a host NIC (the monitor's host_macs) or UniFi device. - Admins click an outlet to set what it feeds, nothing, or automatic. Saved in a new power_feeds table (created with the cutsheet tables); PUT /api/topology/power/<device>/<outlet>, admin and JSON only, with the device, outlet and target checked. UniFi is never changed. - An outlet that is off but feeds something is listed under "to look at". - Power gear is shown by default again, now that it has something to say. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1636,3 +1636,30 @@ body.fp-marks-off .fp-svg .fp-mark { display: none; }
|
||||
.tp-chip-bad { color: var(--red); border-color: var(--red); background: var(--red-dim); }
|
||||
.tp-chip-warn { color: var(--amber); border-color: var(--amber); background: var(--amber-dim); }
|
||||
.tp-problem-chip:hover, .tp-problem-chip:focus-visible { filter: brightness(1.25); outline: none; }
|
||||
|
||||
/* Power: outlet lists on power cards, badges on what they feed, feed lines on hover */
|
||||
.tp-outlet-hit { fill: transparent; }
|
||||
.tp-outlet-row:hover .tp-outlet-hit, .tp-outlet-row:focus-visible .tp-outlet-hit { fill: rgba(255,179,0,.12); }
|
||||
.tp-outlet-row[role="button"] { cursor: pointer; outline: none; }
|
||||
.tp-outlet-idx { font-family: var(--font); font-size: 24px; fill: var(--text-muted); }
|
||||
.tp-outlet-target { font-family: var(--font); font-size: 26px; fill: var(--text); }
|
||||
.tp-outlet-watts { font-family: var(--font); font-size: 24px; fill: #e0a400; }
|
||||
.tp-outlet-free .tp-outlet-target { fill: var(--text-muted); font-style: italic; }
|
||||
.tp-outlet-off .tp-outlet-watts, .tp-outlet-off .tp-outlet-target { fill: #ff6b5e; }
|
||||
.tp-power-badge { font-family: var(--font); font-size: 26px; font-weight: 700; fill: #e0a400; }
|
||||
.tp-power-off { fill: #ff6b5e; }
|
||||
.tp-feeds { pointer-events: none; }
|
||||
.tp-feed path { fill: none; stroke: #ffb300; stroke-width: 6; stroke-dasharray: 2 14; stroke-linecap: round; }
|
||||
.tp-feed circle { fill: #ffb300; }
|
||||
.tp-feed-off path { stroke: #e0312b; }
|
||||
.tp-feed-off circle { fill: #e0312b; }
|
||||
.tp-feed-tag rect { stroke: #ffb300; }
|
||||
.tp-pop { position: absolute; z-index: 3; width: 280px; padding: 10px 12px; font-size: .8em;
|
||||
background: var(--bg-primary); border: 1px solid var(--amber); box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: auto; }
|
||||
.tp-pop[hidden] { display: none; }
|
||||
.tp-pop-title { font-weight: 700; color: var(--amber); }
|
||||
.tp-pop-sub { color: var(--text-muted); margin: 2px 0 8px; overflow-wrap: anywhere; }
|
||||
.tp-pop-label { display: block; color: var(--text-dim); margin-bottom: 3px; }
|
||||
.tp-pop select { width: 100%; }
|
||||
.tp-pop-hint { color: var(--text-muted); font-size: .9em; margin: 6px 0 8px; }
|
||||
.tp-pop-actions { display: flex; justify-content: flex-end; gap: 6px; }
|
||||
|
||||
Reference in New Issue
Block a user