You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cueweb/docs] Host and Allocation Management: Hosts monitor page - Initial version (#2391)
## Related Issues
- #2292
This is the foundation for the other Host & Allocation Management issues
that need a host listing surface to build on: #2293 (lock/unlock), #2294
(reboot), #2295 (host detail page), #2296 (host tag editor).
## Summarize your change.
Adds a `/hosts` Monitor Hosts page to CueWeb: the web equivalent of
CueGUI's CueCommander Monitor Hosts plugin
(`cuegui/cuegui/plugins/MonitorHostsPlugin.py`,
`cuegui/cuegui/HostMonitorTree.py`). CueWeb previously had no hosts
page; the sidebar `CueCommander > Monitor Hosts` link 404'd. This
provides the basic sortable, auto-refreshing table the issue asks for.
- New page at `app/hosts/page.tsx`: loads hosts via the existing
`getHosts()` proxy (`/api/host/gethosts`) and auto-refreshes every 30s,
with loading (skeletons), empty, and error (inline message + Retry)
states. Read-only.
- Sortable, filterable table (`app/hosts/columns.tsx`) with columns:
Name, State, Locked, NIMBY, Cores (Idle/Total), Memory (Idle/Total),
Free /mcp. State/Locked reuse the existing `Status` badge. Numeric
columns sort by their underlying value, not the formatted string.
- `Host` type widened (`app/utils/get_utils.ts`) to include the fields
the table needs. Memory/`mcp` values arrive from the gateway as
KB-in-string, so there are small parse/format helpers
(`app/hosts/host_format_utils.ts`) with Jest unit tests.
- `getHosts()` (`app/utils/get_utils.ts`) now throws on a failed request
instead of collapsing failures into `[]`, so the page can tell a real
Cuebot/gateway outage from an empty registry and actually render the
inline error + **Retry** (the dashboard host widgets get the same fix
for free).
- `SimpleDataTable` (shared by jobs/layers/frames) gains an
`isHostsTable` flag, mirroring the existing `isFramesTable` /
`isFramesLogTable` flags: host-specific filter placeholder and
empty-state copy, and no row context menu. It defaults to `false`, so
existing callers are unchanged, verified by the existing test suite
still passing.
- Docs: Monitor Hosts section in the CueWeb user guide (with
CueCommander-menu and light/dark page screenshots), a feature entry in
the CueWeb overview (`other-guides/cueweb.md`), and a reference
subsection plus the `GetHosts` endpoint / `/api/host/gethosts`
proxy-route entries (`reference/cueweb.md`).
**Idle/Total vs used/total:** the issue text says "used/total", but the
backend and CueGUI's Monitor Hosts both expose idle vs total, so the
columns show and are labeled "(Idle/Total)" to stay faithful to the data
source.
**Scope:** read-only by design. Host actions (lock/unlock, tag edit,
reboot, NIMBY toggle) and server-side filtering belong to the sibling
issues (#2293–#2296) and are intentionally out of scope here.
**Testing:** added Jest unit tests for the formatting/sort helpers; full
CueWeb suite passes (48/48). Manually verified against the local
sandbox, the page lists the rqd hosts, sorting and the substring filter
work, the table refreshes every 30s, and the existing jobs/layers/frames
tables are unaffected by the `SimpleDataTable` change.
## LLM usage disclosure
Hai Shun: @ttpss930141011
- Claude (Opus) was used to explore the existing CueGUI patterns, draft
unit tests and the PR request, and write the documentation.
Co-authored-by: Hai Shun <o927416847@gmail.com>
Co-authored-by: Ramon Figueiredo <rfigueiredo@imageworks.com>
0 commit comments