Skip to content

feat(proxy-ui): ONOS-style SVG topology and visual Instance detail dashboard (Closes #126)#127

Merged
zhy1658858023 merged 3 commits into
mainfrom
codex/-proxy-ui
Jul 20, 2026
Merged

feat(proxy-ui): ONOS-style SVG topology and visual Instance detail dashboard (Closes #126)#127
zhy1658858023 merged 3 commits into
mainfrom
codex/-proxy-ui

Conversation

@zhy1658858023

Copy link
Copy Markdown
Collaborator

Motivation

  • Replace the simplistic text/div topology with a stable, responsive SVG topology and upgrade the Instance detail view into a visual, operator-friendly dashboard while preserving existing polling, selection and accessibility semantics.
  • Keep the change incremental, avoid new front-end frameworks or build tooling, and rely only on native HTML/CSS/JS and the existing Proxy APIs.

Description

  • Implemented a deterministic topology model and layout via buildTopologyModel() and computeTopologyLayout() and render an inline responsive SVG in renderSystemTopology() with inline <symbol> icons for Scheduler/Proxy/Instance, animated links, accessibility attributes, keyboard selection and event-delegated click handling (files modified: UI/proxy_ui/static/app.js, UI/proxy_ui/static/style.css).
  • Reworked Instance Detail into KPI cards, resource metric bars, memory/GPU donut charts, queue/load visualizations and structured hardware cards, plus a collapsed details Raw JSON with a Copy JSON button, and preserved the hash-based selectedInstanceId flow (changes in UI/proxy_ui/static/app.js).
  • Added robust, defensive helpers for numeric formatting and bounds: finiteNumber(), percentOf(), displayNumber(), renderMetricBar(), renderDonutChart() and extractQueueMetrics() which safely detect queue-like numeric fields from load, resource, meta, queue(s), stats without inventing values; donuts/bars show No data or for missing or invalid totals.
  • Styling additions include topology CSS variables, responsive SVG container, link animation with prefers-reduced-motion support and paused-animation behavior; no backend API changes were made; new test fixture UI/proxy_ui/test_proxy_ui_pure.js exercises pure functions and layout determinism.

Testing

  • Ran static/functional pure-JS tests: node --check UI/proxy_ui/static/app.js and node UI/proxy_ui/test_proxy_ui_pure.js, and they passed (tests validate topology model/layout, percent/donut handling, queue extraction and theme/reduced-motion hooks).
  • Verified server module compiles: python3 -m py_compile UI/proxy_ui/proxy_ui_server.py succeeded.
  • Note: UI screenshots were not produced because no browser/runtime (Chromium/Playwright) was available in this environment; the PR documents the visual states and the topology/detail behavior and can be validated locally by running the Proxy UI against live or fixture Proxy payloads.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant