From 0e6db94b83838d70deda6e2bbedbaaad5a55504b Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 25 Jan 2026 17:16:21 -0800 Subject: [PATCH] Replace Cytoscape with DOM-based grid layout Co-Authored-By: Claude Opus 4.5 --- config.go | 7 +- config.yaml | 145 ++++++------ static/index.html | 580 +++++++++++++++++++--------------------------- 3 files changed, 315 insertions(+), 417 deletions(-) diff --git a/config.go b/config.go index 3a678d2..0fd6432 100644 --- a/config.go +++ b/config.go @@ -12,9 +12,10 @@ type Config struct { } type Location struct { - Name string `yaml:"name" json:"name"` - Nodes []string `yaml:"nodes,omitempty" json:"nodes,omitempty"` - Children []*Location `yaml:"children,omitempty" json:"children,omitempty"` + Name string `yaml:"name" json:"name"` + Direction string `yaml:"direction,omitempty" json:"direction,omitempty"` + Nodes []string `yaml:"nodes,omitempty" json:"nodes,omitempty"` + Children []*Location `yaml:"children,omitempty" json:"children,omitempty"` } func LoadConfig(path string) (*Config, error) { diff --git a/config.yaml b/config.yaml index f04c3ea..627f87b 100644 --- a/config.yaml +++ b/config.yaml @@ -1,40 +1,41 @@ locations: - name: Stage 1 + direction: vertical children: - - children: - - children: - - name: LIGHTING-2 Rack - nodes: - - lighting-2 - - "48:59:00:41:00:29" # Pixie Driver 8k Port 1 - - "48:59:00:28:00:27" # Pixie Driver 8k Port 2 - - "48:59:00:43:00:29" # Pixie Driver 8k Port 3 - - "48:59:00:42:00:29" # Pixie Driver 8k Port 4 - - "48:59:00:3c:00:3e" # Pixie Driver 8k Port 5 - - "48:59:00:3f:00:3e" # Pixie Driver 8k Port 6 - - "48:59:00:25:00:3e" # Pixie Driver 8k Port 7 - - "48:59:00:41:00:3e" # Pixie Driver 8k Port 8 - - ART9 # Cyc - - ART10 # Cyc - - ART11 # Cyc - - ART12 # Cyc - - ART13 # Cyc - - ART14 # Cyc + - name: LIGHTING-2 Rack + nodes: + - lighting-2 + - "48:59:00:41:00:29" # Pixie Driver 8k Port 1 + - "48:59:00:28:00:27" # Pixie Driver 8k Port 2 + - "48:59:00:43:00:29" # Pixie Driver 8k Port 3 + - "48:59:00:42:00:29" # Pixie Driver 8k Port 4 + - "48:59:00:3c:00:3e" # Pixie Driver 8k Port 5 + - "48:59:00:3f:00:3e" # Pixie Driver 8k Port 6 + - "48:59:00:25:00:3e" # Pixie Driver 8k Port 7 + - "48:59:00:41:00:3e" # Pixie Driver 8k Port 8 + - ART9 # Cyc + - ART10 # Cyc + - ART11 # Cyc + - ART12 # Cyc + - ART13 # Cyc + - ART14 # Cyc - - children: - - children: - - nodes: - - ART16 # R2X1 + - direction: horizontal + children: + - nodes: + - ART16 # R2X1 - - nodes: - - ART20 # R2X2 + - nodes: + - ART20 # R2X2 - - children: - - nodes: - - "MON1-A" - - "MON1-B" + - direction: horizontal + children: + - nodes: + - "MON1-A" + - "MON1-B" - name: Under Apron + direction: horizontal children: - name: AUDIO Rack nodes: @@ -76,7 +77,8 @@ locations: - TX-MISC - TX-PREVIEW -- children: +- direction: horizontal + children: - nodes: - "Y001-MAIN1-L-d1e155" - "ac:44:f2:4e:84:d6" # MAIN1-L bridge interface @@ -93,14 +95,16 @@ locations: - "Y001-MAIN1-R-d1e194" - "ac:44:f2:4e:84:d4" # MAIN1-R bridge interface -- children: +- direction: horizontal + children: - nodes: - "RX-PROJ-1" - nodes: - "RX-PROJ-2" -- children: +- direction: horizontal + children: - nodes: - satellite-2 - "Y001-MAIN2-L-d1e298" @@ -124,44 +128,45 @@ locations: - ART19 # Focus - name: Booth + direction: vertical children: - - children: - - name: SATELLITE-1 Rack - nodes: - - satellite-1 + - name: SATELLITE-1 Rack + nodes: + - satellite-1 - - children: - - name: Lighting Control - nodes: - - qlab - - TX-QLAB-1 - - TX-QLAB-2 - - "SK_PTZEXTREMEV2 [457081]" - - "SK_RACKPRO2 [452514]" - - pigeon - - showpi1 - - showpi2 + - direction: horizontal + children: + - name: Lighting Control + nodes: + - qlab + - TX-QLAB-1 + - TX-QLAB-2 + - "SK_PTZEXTREMEV2 [457081]" + - "SK_RACKPRO2 [452514]" + - pigeon + - showpi1 + - showpi2 - - name: Sound Control - nodes: - - SQ-7 - - "00:04:c4:15:07:a4" # SQ-7 bridge port - - BT - - - name: Camera Control - nodes: - - RX-CC-PREVIEW - - RX-CC-M16 - - "AtemPanel-7c2e0da86d22" - - "AtemPanel-7c2e0da86d4c" - - - name: Video Control - nodes: - - RX-VC-M4 - - RX-VC-M16 - - "ATEM-2-ME-Advanced-Panel-20" - - - name: Control - nodes: - - sunset - - RX-CONTROL-1 + - name: Sound Control + nodes: + - SQ-7 + - "00:04:c4:15:07:a4" # SQ-7 bridge port + - BT + + - name: Camera Control + nodes: + - RX-CC-PREVIEW + - RX-CC-M16 + - "AtemPanel-7c2e0da86d22" + - "AtemPanel-7c2e0da86d4c" + + - name: Video Control + nodes: + - RX-VC-M4 + - RX-VC-M16 + - "ATEM-2-ME-Advanced-Panel-20" + + - name: Control + nodes: + - sunset + - RX-CONTROL-1 diff --git a/static/index.html b/static/index.html index 73ad0aa..c13e783 100644 --- a/static/index.html +++ b/static/index.html @@ -12,47 +12,120 @@ padding: 10px; background: #111; color: #eee; - height: 100vh; } #controls { margin-bottom: 10px; } - #controls button { - background: #333; - color: #fff; - border: 1px solid #555; - padding: 6px 12px; - margin-right: 5px; - border-radius: 4px; - cursor: pointer; + #stats { margin-left: 10px; } + #error { color: #f66; padding: 20px; } + + #container { + display: flex; + flex-direction: column; + gap: 20px; } - #controls button:hover { background: #444; } - #cy { - background: #1a1a1a; - border: 1px solid #333; - height: calc(100vh - 50px); + + .location { + background: #222; + border: 1px solid #444; + border-radius: 8px; + padding: 10px; + } + + .location.top-level { width: 100%; } - #error { color: #f66; padding: 20px; } + + .location-name { + font-weight: bold; + font-size: 14px; + margin-bottom: 10px; + text-align: center; + } + + .location.anonymous { + background: transparent; + border: none; + padding: 0; + } + + .location.anonymous > .location-name { + display: none; + } + + .node-row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 8px; + justify-content: center; + } + + .node-row + .node-row { + margin-top: 8px; + } + + .node { + width: 120px; + height: 50px; + background: #a6d; + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; + text-align: center; + font-size: 11px; + padding: 4px; + cursor: pointer; + overflow: hidden; + word-break: normal; + overflow-wrap: break-word; + white-space: pre-line; + } + + .node:hover { + filter: brightness(1.2); + } + + .node.switch { + background: #2a2; + border: 2px solid #4f4; + font-weight: bold; + } + + .node.copied { + outline: 2px solid #fff; + } + + .children { + display: flex; + gap: 15px; + margin-top: 10px; + } + + .children.horizontal { + flex-direction: row; + flex-wrap: wrap; + align-items: flex-start; + justify-content: space-evenly; + width: 100%; + } + + .children.vertical { + flex-direction: column; + align-items: center; + }
Tendrils - -
-
+
- - -