Skip to content

Commit 14bc5ae

Browse files
[cueweb/docs] Add Monitor Cue page (CueCommander parity) (#2423)
## Related Issues Main issue: - #2016 Issues related to this PR: - #2424 ## Summarize your change. [cueweb] Add Monitor Cue page (CueCommander parity) Add the /monitor-cue route (previously a dead sidebar link) replicating CueGUI's Monitor Cue window: - [x] "Shows" multi-select (All Shows / Clear / per-show, persisted) drives a show-grouped job table. - [x] Full column set: Run, Cores, Gpus, Wait, Depend, Total, Min, Max, Min G, Max G, Pri, ETA, MaxRss, MaxGpuMem, Age, Progress (frame-state colored bar). Row coloring by paused/dead/depend/waiting. - [x] Toolbar: Eat / Retry / Pause / Unpause / Kill (confirm) on selected jobs, Refresh + Auto-refresh (5s), Expand/Collapse All, Select search + Clr + selectMine. - [x] Reuses the existing JobContextMenu (+ job action dialogs) for the per-job right-click menu and JobProgressBar for Progress. [cueweb] Monitor Cue: CueGUI parity for menu, columns, booking bar, selection Bring the CueCommander Monitor Cue table and its right-click menu closer to CueGUI/CueCommander. Right-click job menu - [x] Add "Send To Group..." (Monitor Cue only) with a group picker dialog (send-to-group-dialog.tsx) that reparents the job via reparentJobs. - [x] Merge "Auto-Eat On/Off" into a single state-aware toggle: "Enable auto eating" / "Disable auto eating". - [x] Rename "Unbook..." to "Unbook Frames..." (CueGUI naming). - [x] Move "Set Priority..." after the cores/gpus setters (CueGUI order). - [x] Monitor Cue only (hidden on Cuetopia/Monitor Jobs): Unmonitor, Set User Color / Clear User Color, Use Local Cores, and the resource/priority/unbook setters (Set Min/Max Cores, Set Minimum/Maximum Cores, Set Minimum/Maximum Gpus, Set Priority, Unbook Frames) - matching where CueGUI exposes them. - [x] Toolbar action buttons now show icons (eat/retry/pause/unpause/kill). Table - [x] Comment + auto-eat columns matching Monitor Jobs (amber sticky-note, yellow Pacman), and a "Readable Age" column. - [x] Booking Bar column (job-booking-bar.tsx) mirroring CueGUI's JobBookingBarDelegate: running/waiting bar with full-height min (cyan) and max (red) core markers. - [x] Sortable columns (asc/desc) with header arrows. - [x] Show/hide + reorder columns via a Columns dropdown, plus a "Filter jobs..." search box, both at the top-right of the table (persisted to localStorage). - [x] Select-all header checkbox; Shift+click range selection of rows. - [x] CueGUI row tint: blue=paused, red=dead, yellow=high maxRss, green=waiting, purple=all-depend. Removed the white-on-hover row highlight. - [x] "Select:" (name/regex) box now selects matching jobs live as you type. Fixes - [x] Kill failed on Monitor Cue in no-auth mode: fall back to UNKNOWN_USER (not "") so the username-required kill request validates. - [x] Mount JobExtraDialogs / JobCommentsDialog / SendToGroupDialog on the page so every job-menu action (Set Min/Max Cores, Reorder, Comments, etc.) works. [cueweb/docs] Document the Monitor Cue page (CueCommander parity) Document the new /monitor-cue page across all CueWeb guides and the README: - [x] user-guide: a "Monitor Cue" section - choosing shows, the full column set, booking bar, row coloring, toolbar + selection, and the Monitor-Cue-only job actions. - [x] reference: a "Monitor Cue" behavior table - Shows multi-select, data source (getActiveShows -> getShowGroups -> getGroupJobs, 5s refresh), columns + localStorage keys, booking bar, jobRowClass tints, toolbar, context-menu gating, Send To Group (group.GroupInterface/ReparentJobs), and the UNKNOWN_USER no-auth kill fix. - [x] developer-guide: a "Monitor Cue page" section - files, tree/data flow, pathname-gated context menu, mounted dialogs, and the no-auth kill fix. - [x] other-guides: a feature-list entry (renumbered the CueCommander pages so Monitor Cue precedes Monitor Hosts, matching menu order). - [x] concepts: extended the GroupInterface row (GetJobs / ReparentJobs). - [x] getting-started: a deploy note (no extra services; gate the destructive job actions via the group-authz admin gate). - [x] quick-starts / tutorials: "Monitor the cue" walkthroughs. - [x] README: a Monitor Cue feature bullet. ## LLM usage disclosure Parts of this solution's implementation were developed with assistance from Claude Opus.
1 parent e7a6f5c commit 14bc5ae

9 files changed

Lines changed: 150 additions & 14 deletions

File tree

cueweb/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ The current CueWeb system offers a robust set of features designed to enhance us
414414
- **Auto-reloading:** Real-time updates for tables.
415415
- **Job-finished notifications (two channels):** A per-row **Notify bell** subscribes the browser - a background poller fires a toast (and an optional desktop popup when notification permission is granted) when the job reaches `FINISHED`; subscriptions persist in `localStorage`, sync across tabs, and the notify decision is serialized cross-tab via the Web Locks API so only one tab toasts when several poll the same job. The right-click **Subscribe to Job** menu entry opens a CueGUI-parity dialog that registers an *email* subscriber on Cuebot via the `AddSubscriber` RPC, so Cuebot mails the saved address when the job finishes. The two channels are independent.
416416
- **Job dependencies (CueGUI parity):** the job right-click menu groups four entries together. **View Dependencies...** opens a themed dialog mirroring CueGUI's `DependDialog` - a Type / Target / Active / OnJob / OnLayer / OnFrame table backed by the `GetDepends` RPC, with a **Refresh** button. **Dependency Wizard...** is a multi-step state machine covering every CueGUI `depend.DependType` (Job-On-Job / Layer / Frame, Frame By Frame for all layers / Hard Depend, Layer-On-Job / Layer / Frame, Frame By Frame, Frame-On-Job / Layer / Frame, Layer on Simulation Frame); every picker (source layers / frames, target jobs / layers / frames) is multi-select and Done fires the full source x target cross-product in one bulk batch. The Hard Depend variant pairs source/target layers by `layer.type` and fans out one `CreateFrameByFrameDependency` per matched pair across every picked target job. **Drop External Dependencies** and **Drop Internal Dependencies** call the `DropDepends` RPC with `target = EXTERNAL` / `INTERNAL` respectively; on success they dispatch `cueweb:refresh-now` and `cueweb:depends-changed` so the Jobs table re-polls and the Group-By Dependent tree cache rebuilds immediately.
417+
- **Monitor Cue (CueCommander parity):** a show-grouped job tree at `/monitor-cue`, the CueWeb equivalent of CueGUI's Monitor Cue window (previously a dead sidebar link). A **Shows** multi-select (All Shows / Clear / per-show, persisted) drives the tree, loaded via `getActiveShows` → `getShowGroups` → `getGroupJobs` and auto-refreshed every 5s. Full CueGUI column set (Comment + Auto-eat icons, Job, Run, Cores, Gpus, Wait, Depend, Total, **Booking** bar with cyan min / red max core markers via `job-booking-bar.tsx`, Min, Max, Min G, Max G, Pri, ETA, MaxRss, MaxGpuMem, Age, Readable Age, Progress) with sortable headers, a show/hide + reorder Columns dropdown and a Filter box (persisted), and CueGUI row tint (`jobRowClass`: blue=paused, red=dead, yellow=high maxRss, green=waiting, purple=all-depend). Toolbar Eat / Retry / Pause / Unpause / Kill (confirm), Refresh + Auto-refresh, Expand/Collapse All, a live name/regex **Select:** box, select-all + Shift+click range selection. Reuses `JobContextMenu` with Monitor-Cue-only entries (View Job, **Send To Group…** via `reparentJobs` → `group.GroupInterface/ReparentJobs`, the resource/priority setters, Use Local Cores, Unbook Frames…, Set/Clear User Color) and a single Enable/Disable auto-eating toggle; the kill username falls back to `UNKNOWN_USER` so it works in no-auth mode.
417418
- **Monitor Hosts (CueCommander parity):** a host registry at `/hosts`, the CueWeb equivalent of CueGUI's Monitor Hosts window, with the full column set - Name, a Comments icon, Load %, Swap / Physical / GPU Memory / Temp red-green usage bars, Total/Idle Memory, Temp Free (%), Cores / Idle Cores, GPUs / Idle GPUs, GPU Mem / Idle, Ping, Boot Time, Hardware, Locked, ThreadMode, OS, Tags - and rows tinted by condition (`hostRowClassName`: red for non-`UP`, amber for `REBOOT_WHEN_IDLE`, yellow for `UP` + `LOCKED`). A filter bar adds a name/regex box plus Allocation / HardwareState / LockState / OS multi-selects (mirrored to the URL) and Auto-refresh / Refresh / Clear. The row right-click menu mirrors CueGUI: **Comments…** (with reusable predefined-comment macros, stored in `localStorage["cueweb-comment-macros"]`), **View Procs**, **Lock / Unlock / Take Ownership** (Take Ownership enabled only for a `NIMBY_LOCKED` host - confirms, then claims it for the signed-in user via `OwnerInterface/TakeOwnership`), **Edit Tags… / Rename Tag… / Change Allocation…**, **Reboot / Reboot when idle / Delete Host**, and **Set / Clear Repair State**, each routed through `HostInterface` (`Lock`, `Unlock`, `Reboot`, `RebootWhenIdle`, `AddTags`/`RemoveTags`, `RenameTag`, `SetAllocation`, `SetHardwareState`, `AddComment`, `Delete`). A bottom **proc monitor panel** lists procs for selected hosts (`ProcInterface/GetProcs`) - populated by a left-click on a host row, the menu's **View Procs**, or typing host names - with per-proc View Job / Unbook / Kill / Unbook and Kill.
418419
- **Redirect (CueCommander parity):** an admin tool at `/redirect` that moves cores to a job that needs them by reassigning busy procs to a target job (killing the frames on those procs). Job + resource filters (Show, Include Groups, Require Services, Exclude Regex, Allocations, Min/Max Cores, Min Memory, Result Limit, Proc Hour Cutoff) drive a `ProcInterface/GetProcs` search; typing a target job auto-detects its Show and core/memory needs; the redirect (`HostInterface/RedirectToJob`) refuses an invalid/maxed target and warns before a paused-target or cross-show redirect.
419420
- **Stuck Frames (CueCommander -> Stuck Frame):** a stuck-frame finder at `/stuck-frames`, the CueWeb equivalent of CueGUI's CueCommander Stuck Frame window. Scans every running frame across active jobs and flags the ones whose log has gone silent relative to runtime, grouped under their job, with columns Name / Frame / Host / LLU / Runtime / % Stuck / Average / Last Line and **Auto-refresh** / **Refresh** / **Clear** controls. Detection thresholds run client-side and persist per browser (% of Run Since LLU, Min LLU, % Avg Completion, Total Runtime, Exclude Keywords), with a **+** button to add per-service filter rows so long-running services (e.g. Arnold) can use looser limits than quick ones. Frame right-click actions: Tail / View / View Last Log, Retry / Eat / Kill, Log Stuck Frame (and Log and Retry / Eat / Kill), Frame Not Stuck, Add Job to Excludes / Exclude and Remove Job, **Core Up** (raise the layer's minimum cores), and View Host; job-header actions add View Comments, Job Not Stuck, and Core Up across the job's stuck layers.

docs/_docs/concepts/cueweb-rest-gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ The REST Gateway exposes all OpenCue gRPC interfaces:
284284
| **CommentInterface** | Comment management | `Save`, `Delete` |
285285
| **FrameInterface** | Frame operations | `GetFrame`, `Retry`, `Kill`, `Eat` |
286286
| **LayerInterface** | Layer management | `GetLayer`, `GetFrames`, `Kill` |
287-
| **GroupInterface** | Resource groups | `GetGroup`, `SetMinCores`, `SetMaxCores` |
287+
| **GroupInterface** | Resource groups (Monitor Cue tree + Send To Group) | `GetGroup`, `GetJobs`, `ReparentJobs`, `SetMinCores`, `SetMaxCores` |
288288
| **HostInterface** | Host management (Monitor Hosts) | `GetHosts`, `Lock`, `Unlock`, `Reboot`, `RebootWhenIdle`, `AddTags`, `RenameTag`, `SetAllocation`, `SetHardwareState`, `AddComment`, `Delete` |
289289
| **OwnerInterface** | Resource ownership | `GetOwner`, `TakeOwnership` |
290290
| **ProcInterface** | Process control (proc panel) | `GetProcs`, `Kill`, `Unbook` |

docs/_docs/developer-guide/cueweb-development.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,63 @@ The confirm dialog lists the affected job names; destructive actions use the des
10911091

10921092
---
10931093

1094+
## Monitor Cue page (CueCommander parity)
1095+
1096+
The `/monitor-cue` page (`app/monitor-cue/page.tsx`) replicates CueGUI's
1097+
CueCommander Monitor Cue window: a show-grouped job tree with a CueGUI-parity
1098+
column set, booking bar, and right-click menu. Files involved:
1099+
1100+
```text
1101+
app/monitor-cue/page.tsx # page: Shows select, tree load, toolbar, selection, row coloring, mounted dialogs
1102+
components/ui/monitor-cue-show-menu.tsx # Shows multi-select (All Shows / Clear / per-show)
1103+
components/ui/job-booking-bar.tsx # Booking column (CueGUI JobBookingBarDelegate parity)
1104+
components/ui/send-to-group-dialog.tsx # Send To Group… (reparentJobs)
1105+
components/ui/context_menus/action-context-menu.tsx # JobContextMenu (Monitor-Cue-only entries gated by pathname)
1106+
app/utils/action_utils.ts # reparentJobs (+ the shared job action helpers)
1107+
app/utils/get_utils.ts # getActiveShows/getShowGroups/getGroupJobs
1108+
```
1109+
1110+
### Data + tree
1111+
1112+
On mount the page loads `getActiveShows()`, then for each selected show
1113+
`getShowGroups()` (`/api/show/getgroups`) and per group `getGroupJobs()`
1114+
(`/api/group/getjobs`), assembled by `buildTreeFromGroups`. Jobs are keyed by
1115+
group id (a job carries only its group *name*, not unique within a show). It
1116+
auto-refreshes every 5s (`REFRESH_MS`), guarded by a monotonic
1117+
`loadRequestIdRef` so a slow earlier load can't overwrite a newer one, and also
1118+
reloads on `GROUPS_CHANGED_EVENT`.
1119+
1120+
### Table
1121+
1122+
Column visibility/order persist to `localStorage["cueweb.monitor-cue.columnOrder"]`
1123+
and `["cueweb.monitor-cue.columnHidden"]`; the selected shows to
1124+
`["cueweb.monitor-cue.shows"]`. `JobContextMenu` receives the table storage
1125+
names `cueweb.monitor-cue.jobs` / `.jobsUnfiltered`. Row tint comes from
1126+
`jobRowClass()` (paused/dead/maxRss/depend/waiting). The **Booking** column
1127+
(`JobBookingBar`) computes cores-per-frame as `reserved/running` (default 6) and
1128+
places cyan (min) / red (max) markers over a running/waiting bar.
1129+
1130+
### Context-menu gating
1131+
1132+
`JobContextMenu` shows Monitor-Cue-only items when `pathname === "/monitor-cue"`:
1133+
View Job, **Send To Group…**, the resource/priority setters (Set Min/Max Cores,
1134+
Set Minimum/Maximum Cores, Set Minimum/Maximum Gpus, then Set Priority - CueGUI
1135+
order), Use Local Cores, **Unbook Frames…** (renamed from "Unbook…"), and Set /
1136+
Clear User Color. Auto-eat is a single state-aware toggle (Enable / Disable auto
1137+
eating). **Send To Group** (`send-to-group-dialog.tsx`) reparents via
1138+
`reparentJobs()` → `/api/group/reparentjobs` →
1139+
`group.GroupInterface/ReparentJobs`, then fires `cueweb:refresh-now`.
1140+
`JobExtraDialogs`, `JobCommentsDialog`, and `SendToGroupDialog` are all mounted
1141+
on the page so every menu action resolves.
1142+
1143+
### No-auth kill fix
1144+
1145+
The kill username falls back to `UNKNOWN_USER` (`"unknown"`,
1146+
`app/utils/constants.ts`) when there is no session, so the username-required
1147+
kill RPC validates in no-auth (sandbox) mode.
1148+
1149+
---
1150+
10941151
## Host management actions (CueCommander parity)
10951152

10961153
The Monitor Hosts table (`app/hosts/page.tsx`) and the host detail page

docs/_docs/getting-started/deploying-cueweb.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,12 @@ The `/redirect` route (CueCommander → Redirect) reassigns the cores of busy
596596

597597
---
598598

599+
## Monitor Cue
600+
601+
The `/monitor-cue` route (CueCommander → Monitor Cue) needs **no extra services or env vars** - it loads shows, groups and jobs through the same REST gateway + cuebot path as the rest of the app and is purely client-side beyond that (the show selection and column layout persist in the browser's `localStorage`). Its job actions (Eat / Retry / Pause / Unpause / **Kill**, Unbook Frames, and **Send To Group** via `GroupInterface/ReparentJobs`) are the same destructive admin actions as Monitor Jobs; gate them at the authentication / reverse-proxy layer or with the optional [group-based authorization](#authorization-group-based-access-control) admin gate (`/monitor-cue` is a CueCommander admin page) if you need to restrict who can run them.
602+
603+
---
604+
599605
## Monitor Hosts (host & proc management)
600606

601607
The `/hosts` route (CueCommander → Monitor Hosts) and its bottom proc panel need **no extra services or env vars** - all host and proc operations go through the same REST gateway + cuebot path as the rest of the app (`HostInterface` for lock/unlock, reboot, tags, allocation, hardware/repair state, comments, and delete; `ProcInterface` for the proc list, unbook, and kill).

0 commit comments

Comments
 (0)