Map every InfiniBand fabric, draw it, and place replicas by it
The control plane asks one node on each physical fabric to run
ibnetdiscover every five minutes and parses the text itself, so a
format the parser has not met is a control plane upgrade, not one on
every node. From the map it works out the switch tiers (leaf, spine,
core, by distance from the adapters), which adapter is which node's,
which cables trained below the rate the rest of their kind run at, and
whether the rails line up: every node's Nth adapter on its own leaf.
A page per fabric (/admin/fabrics) draws it: switches in their tiers,
adapters fanned out under their leaves, cables coloured by rate and
bundled, degraded ones marching red with a marker, and the cluster's
own adapters live - down ports glowing red, and particles running each
cable as fast as its adapter is sending and receiving, from the
counters. It zooms, pans, fades what a hovered switch or adapter does
not touch, opens a panel of detail on a click, colours by rail, finds a
node, and refreshes every fifteen seconds. The data is also at
/api/v1/fabrics/{id}/topology.
Placement reads the map: a replica spanning nodes takes nodes of one
leaf together when it can, and nodes whose cable trained short last.
Static assets are named by their content, as the stylesheet already
was.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
23648fa19a
commit
5bbc619a31
23 files changed
+2171
-83
No files matched your search
@@ -551,3 +551,129 @@ table.held tr.model-version > td:first-child { padding-left: 1.4rem; }
|
||||
ul.fabric-problems { list-style: none; padding: 0; margin: .25rem 0 .75rem; font-size: .88rem; }
|
||||
ul.fabric-problems li { margin: .25rem 0; }
|
||||
ul.fabric-problems li.info { color: var(--muted); }
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
The fabric map. A dark surface in both themes: it is a picture of light
|
||||
moving through cables, and glows and flows read on dark the way a
|
||||
network operations wall does.
|
||||
--------------------------------------------------------------------- */
|
||||
.wrap.wide { max-width: 1400px; }
|
||||
.fabric-head h2 { margin: .75rem 0 .1rem; }
|
||||
.fabric-map {
|
||||
--fm-bg: #0b1020; --fm-bg2: #111a33; --fm-fg: #dbe4ff; --fm-dim: #7c89ad; --fm-line: #1e2a4a;
|
||||
--fm-xdr: #f472b6; --fm-ndr: #a78bfa; --fm-hdr: #38bdf8; --fm-edr: #34d399; --fm-slow: #fbbf24; --fm-bad: #fb7185;
|
||||
position: relative; margin: .75rem 0 1.5rem; border-radius: 14px; overflow: hidden;
|
||||
background: radial-gradient(1200px 500px at 50% -10%, #1b2a55 0%, var(--fm-bg) 55%) , var(--fm-bg);
|
||||
border: 1px solid #1c2747; box-shadow: 0 20px 60px -30px rgba(40, 80, 200, .45), inset 0 1px 0 rgba(255,255,255,.04);
|
||||
color: var(--fm-fg);
|
||||
}
|
||||
.fm-bar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; justify-content: space-between; align-items: center;
|
||||
padding: .8rem 1rem; border-bottom: 1px solid var(--fm-line); background: rgba(10, 16, 36, .55); backdrop-filter: blur(6px); }
|
||||
.fm-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
|
||||
.fm-stat { display: flex; flex-direction: column; line-height: 1.1; }
|
||||
.fm-stat b { font-size: 1.15rem; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 18px rgba(120, 160, 255, .35); }
|
||||
.fm-stat span { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fm-dim); }
|
||||
.fm-stat.bad b { color: var(--fm-bad); text-shadow: 0 0 16px rgba(251, 113, 133, .55); }
|
||||
.fm-stat.ok b { color: var(--fm-edr); }
|
||||
.fm-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
|
||||
.fm-tools .pills { margin: 0; }
|
||||
.fm-tools button, .fm-tools .pills button {
|
||||
font: inherit; font-size: .78rem; font-weight: 600; color: var(--fm-dim); background: transparent; cursor: pointer;
|
||||
border: 1px solid var(--fm-line); border-radius: 999px; padding: .28rem .75rem; }
|
||||
.fm-tools button:hover { color: var(--fm-fg); border-color: #2f3f6e; }
|
||||
.fm-tools button.on { color: #fff; background: linear-gradient(180deg, #2a3b73, #1d2a55); border-color: #3b4f8f;
|
||||
box-shadow: 0 0 14px rgba(100, 140, 255, .35); }
|
||||
.fabric-map input.fm-search { display: inline-block; width: 11rem; font: inherit; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; margin: 0;
|
||||
color: var(--fm-fg); background: rgba(255,255,255,.04); border: 1px solid var(--fm-line); }
|
||||
.fm-stage { position: relative; }
|
||||
.fm-canvas { min-height: 22rem; }
|
||||
.fm-empty { padding: 4rem 2rem; text-align: center; color: var(--fm-dim); }
|
||||
.fm-svg { display: block; width: 100%; cursor: grab; user-select: none; }
|
||||
.fm-svg.dragging { cursor: grabbing; }
|
||||
.fm-gridline { stroke: rgba(120, 150, 255, .06); stroke-width: 1; }
|
||||
.fm-tier { fill: var(--fm-dim); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .75; text-anchor: middle; }
|
||||
|
||||
/* Cables, coloured by what they trained at. */
|
||||
.fm-link { fill: none; stroke-linecap: round; opacity: .72; transition: opacity .2s, stroke-width .2s; }
|
||||
.fm-link.sp-xdr { stroke: var(--fm-xdr); } .fm-link.sp-ndr { stroke: var(--fm-ndr); }
|
||||
.fm-link.sp-hdr { stroke: var(--fm-hdr); } .fm-link.sp-edr { stroke: var(--fm-edr); } .fm-link.sp-slow { stroke: var(--fm-slow); }
|
||||
.fm-link.host { opacity: .55; }
|
||||
.mode-rails .fm-link.host { stroke: var(--rail); opacity: .8; }
|
||||
.mode-rails .fm-link:not(.host) { stroke: #3a4670; opacity: .5; }
|
||||
.fm-link.degraded { stroke: var(--fm-bad) !important; stroke-dasharray: 5 5; opacity: 1; filter: url(#fm-glow);
|
||||
animation: fm-march 1s linear infinite, fm-pulse 1.6s ease-in-out infinite; }
|
||||
@keyframes fm-march { to { stroke-dashoffset: -20; } }
|
||||
@keyframes fm-pulse { 50% { stroke-opacity: .35; } }
|
||||
.fm-warn circle { fill: #3b0d1a; stroke: var(--fm-bad); stroke-width: 1.5; filter: url(#fm-glow); }
|
||||
.fm-warn text { fill: var(--fm-bad); font-size: 10px; font-weight: 800; text-anchor: middle; }
|
||||
.fm-warn { cursor: help; }
|
||||
|
||||
/* Traffic: particles running the cables, up for sent, down for received. */
|
||||
.fm-particle { filter: url(#fm-glow); pointer-events: none; }
|
||||
.fm-particle.up { fill: #7dd3fc; } .fm-particle.down { fill: #c4b5fd; }
|
||||
|
||||
/* Switches. */
|
||||
.fm-switch { cursor: pointer; }
|
||||
.fm-switch rect { stroke-width: 1.2; transition: filter .2s; }
|
||||
.fm-switch.t-leaf rect { stroke: #2dd4bf; } .fm-switch.t-spine rect { stroke: #a78bfa; } .fm-switch.t-core rect { stroke: #fbbf24; }
|
||||
.fm-switch:hover rect, .fm-switch.hot rect { filter: url(#fm-glow); }
|
||||
.fm-switch.has-bad rect { stroke: var(--fm-bad); }
|
||||
.fm-name { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; }
|
||||
.fm-sub { fill: var(--fm-dim); font-size: 8.5px; text-anchor: middle; }
|
||||
.fm-use { stroke: rgba(255,255,255,.55); stroke-width: 2; stroke-linecap: round; }
|
||||
.fm-badge circle { fill: var(--fm-bad); filter: url(#fm-glow); }
|
||||
.fm-badge text { fill: #fff; font-size: 9px; font-weight: 800; text-anchor: middle; }
|
||||
|
||||
/* Adapters. */
|
||||
.fm-host { cursor: pointer; }
|
||||
.fm-host circle { fill: #334066; stroke: #4b5a88; stroke-width: 1; }
|
||||
.fm-host .fm-halo { fill: transparent; stroke: transparent; }
|
||||
.fm-host.known circle:not(.fm-halo) { fill: #2dd4bf; stroke: #99f6e4; }
|
||||
.mode-rails .fm-host.known circle:not(.fm-halo) { fill: var(--rail); stroke: #fff; }
|
||||
.fm-host.known .fm-halo { stroke: rgba(45, 212, 191, .35); animation: fm-breathe 3s ease-in-out infinite; }
|
||||
.fm-host.errs circle:not(.fm-halo) { stroke: var(--fm-slow); stroke-width: 2; }
|
||||
.fm-host.down circle:not(.fm-halo) { fill: var(--fm-bad); stroke: #fecdd3; }
|
||||
.fm-host.down .fm-halo { stroke: var(--fm-bad); animation: fm-breathe 1s ease-in-out infinite; }
|
||||
.fm-host.found .fm-halo { stroke: #fff; stroke-width: 2; }
|
||||
@keyframes fm-breathe { 50% { stroke-opacity: .1; r: 11; } }
|
||||
.fm-hlabel { fill: var(--fm-dim); font-size: 8.5px; }
|
||||
.fm-host:hover .fm-hlabel, .fm-host.hot .fm-hlabel { fill: #fff; }
|
||||
|
||||
/* Focus: hovering or choosing something fades what it does not touch. */
|
||||
.fm-svg.focus .fm-link:not(.hot) { opacity: .08; }
|
||||
.fm-svg.focus .fm-nodes > g:not(.hot) { opacity: .28; }
|
||||
.fm-svg.focus .fm-link.hot { opacity: 1; stroke-width: 2.6; filter: url(#fm-glow); }
|
||||
.fm-svg.focus .fm-particle { opacity: .35; }
|
||||
.only-problems .fm-link:not(.degraded) { opacity: .06; }
|
||||
.only-problems .fm-nodes > g:not(.has-bad):not(.down):not(.errs) { opacity: .2; }
|
||||
|
||||
.fm-tip { position: absolute; z-index: 3; max-width: 260px; pointer-events: none; font-size: .78rem; line-height: 1.45;
|
||||
padding: .5rem .65rem; border-radius: 8px; background: rgba(12, 18, 40, .94); border: 1px solid #2c3b6b;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,.5); color: var(--fm-fg); }
|
||||
.fm-panel { position: absolute; top: .75rem; right: .75rem; z-index: 2; width: 17rem; max-height: calc(100% - 1.5rem); overflow: auto;
|
||||
padding: .85rem 1rem; border-radius: 12px; background: rgba(12, 18, 40, .92); border: 1px solid #2c3b6b;
|
||||
box-shadow: 0 16px 40px rgba(0,0,0,.55); backdrop-filter: blur(8px); font-size: .82rem; }
|
||||
.fm-panel h4 { margin: 0 0 .5rem; font-size: 1rem; color: #fff; }
|
||||
.fm-panel dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; margin: 0 0 .6rem; }
|
||||
.fm-panel dt { color: var(--fm-dim); } .fm-panel dd { margin: 0; overflow-wrap: anywhere; }
|
||||
.fm-panel code { background: none; color: var(--fm-fg); font-size: .75rem; }
|
||||
.fm-panel a { color: #7dd3fc; }
|
||||
.fm-panel ul { margin: .25rem 0; padding-left: 1rem; }
|
||||
.fm-close { position: absolute; top: .4rem; right: .5rem; background: none; border: 0; color: var(--fm-dim); font-size: 1.2rem; cursor: pointer; }
|
||||
.fm-bad { color: var(--fm-bad); } .fm-dim { color: var(--fm-dim); }
|
||||
.fm-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: .6rem 1rem .8rem; font-size: .74rem; color: var(--fm-dim);
|
||||
border-top: 1px solid var(--fm-line); }
|
||||
.fm-legend span { display: inline-flex; align-items: center; gap: .35rem; }
|
||||
.fm-legend .sw { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
|
||||
.fm-legend .sw.sp-xdr { background: var(--fm-xdr); } .fm-legend .sw.sp-ndr { background: var(--fm-ndr); }
|
||||
.fm-legend .sw.sp-hdr { background: var(--fm-hdr); } .fm-legend .sw.sp-edr { background: var(--fm-edr); }
|
||||
.fm-legend .sw.sp-slow { background: var(--fm-slow); }
|
||||
.fm-legend .sw.degraded { background: repeating-linear-gradient(90deg, var(--fm-bad) 0 4px, transparent 4px 7px); }
|
||||
.fm-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #334066; border: 1px solid #4b5a88; }
|
||||
.fm-legend .dot.known { background: #2dd4bf; border-color: #99f6e4; } .fm-legend .dot.down { background: var(--fm-bad); }
|
||||
.fm-legend .note { color: var(--fm-dim); opacity: .8; }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.fm-link.degraded, .fm-host .fm-halo { animation: none; }
|
||||
}
|
||||
.mode-rails .fm-host.down circle:not(.fm-halo) { fill: var(--fm-bad); stroke: #fecdd3; }
|
||||
.fm-svg.focus .fm-warn { opacity: .25; }
|
||||
Reference in new issue
Block a user