diff --git a/static/style.css b/static/style.css index 65d5662..04dcfbf 100644 --- a/static/style.css +++ b/static/style.css @@ -356,6 +356,66 @@ a:hover { text-decoration: underline; text-shadow: var(--glow-amber); } .topo-status-dot { width:7px; height:7px; border:1px solid var(--text-muted); background:transparent; position:absolute; top:5px; right:5px; } +/* Topology subtitle text */ +.topo-node-sub { + font-size: .58em; + color: var(--text-muted); + letter-spacing: .02em; + font-weight: normal; +} + +.topo-badge-unknown { color:var(--text-muted); border-color:var(--border); } + +/* Switch tier: two switches with horizontal connector */ +.topo-switch-tier { + display: flex; + align-items: center; + gap: 0; +} + +.topo-h-link { + display: flex; + flex-direction: column; + align-items: center; + padding: 0 8px; +} + +.topo-h-link-line { + width: 70px; + height: 1px; + background: var(--amber); + opacity: .5; +} + +.topo-h-link-label { + font-size: .52em; + color: var(--amber); + opacity: .7; + margin-top: 3px; + letter-spacing: .04em; +} + +/* Host tier: two groups side by side */ +.topo-host-tier { + display: flex; + justify-content: center; + align-items: flex-start; + gap: 40px; + margin-top: 0; +} + +.topo-host-group { flex-shrink: 0; } + +/* PoE host group: offset right to sit below PoE switch */ +.topo-poe-hosts { + padding-top: 0; +} + +/* Off-rack node (dashed border) */ +.topo-host-table { + border-style: dashed; +} + /* ── Host cards ───────────────────────────────────────────────────── */ .host-grid { display: grid; diff --git a/templates/index.html b/templates/index.html index 49d9eb1..b9dccfb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -29,56 +29,103 @@
-
+ + +
Internet
-
+
+ +
-
+
UDM-Pro - + Dream Machine Pro · RU24
+ +
-
- - Agg Switch - +
+
+ + USW-Agg + 8×10G SFP+ · RU22 +
+ +
+ + Pro 24 PoE + 24×1G PoE · RU23 +
-
-
-
-
-
- - PoE Switch - + + +
+ + +
+
+
+
+
+
+
+
+
+ + {%- set topo_h = snapshot.hosts if snapshot.hosts else {} -%} + {%- set agg_defs = [ + ('compute-storage-gpu-01', 'csg-01', 'RU4–12 · 10G'), + ('compute-storage-01', 'cs-01', 'RU14–17 · 10G'), + ('storage-01', 'storage-01','10G SFP+'), + ('monitor-01', 'monitor-01','ZimaBoard · 10G'), + ('monitor-02', 'monitor-02','ZimaBoard · 10G'), + ] -%} + {%- for hname, hlabel, hsub in agg_defs -%} + {%- set st = topo_h[hname].status if hname in topo_h else 'unknown' -%} +
+ + {{ hlabel }} + {{ hsub }} + {{ st if st != 'unknown' else '–' }} +
+ {%- endfor -%} + +
-
-
- {% for name in snapshot.hosts %} -
- {% endfor %} -
-
- {% for name, host in snapshot.hosts.items() %} -
- - {{ name }} - {{ host.status }} + + +
+
+
+
+
+ {%- set topo_h = snapshot.hosts if snapshot.hosts else {} -%} + {%- set lst = topo_h['large1'].status if 'large1' in topo_h else 'unknown' -%} +
+ + large1 + on table · 1G + {{ lst if lst != 'unknown' else '–' }} +
+
- {% endfor %} -
+ +