kunwp1 opened a new pull request, #8888: URL: https://github.com/apache/texera/pull/8888
### What changes were proposed in this PR? Problem. An admin cannot see computing units across users in the UI. On a full Kubernetes cluster they run `kubectl` and match each pod's `cuid` to its `workflow_computing_unit` row by hand. Fix. Adds an ADMIN-only Computing Units page, reached from Admin in the dashboard sidebar. It lists every active unit from the existing `GET /computing-unit/admin/list`, one row each with name, owner, type, status, creation time and a resource summary. A Kubernetes row expands to its CPU, memory, GPU, JVM memory and shared memory, while a local unit has no limits and does not expand. Type and status are filterable, status covers every state including `Failed`, `Unknown` and `Terminating`, and a failing unit's `statusReason` shows in the status tooltip. The table polls every 5 seconds with `exhaustMap`, so a response slower than the interval finishes instead of being cancelled by the next tick, and a failed poll shows a message and keeps polling. `parseDashboardUnit` now gives a `NULL` or malformed `resource` the `NaN` placeholder, so one bad row cannot break the table. ``` Before: admin -> ssh -> kubectl get pods -> match cuid to a workflow_computing_unit row After: admin -> Admin > Computing Units -> filter by status -> expand a row for its specs ``` Not included. Terminating a unit from the page (#6480), the cluster capacity panel (#6481, #6482) and the owner notification (#6483) are separate issues. ### Any related issues, documentation, discussions? Closes #6479. Part of #6476. Replaces #7356, which the stale bot closed after 37 days without review activity. This is the same change rebased onto current `main`. ### How was this PR tested? Tests were added for the page, for `listAllComputingUnits` and for the sidebar entry. They cover the poll (a failed poll, a slow response, teardown), the expander, the status filter, sorting, and a `NULL`, `"null"` or malformed `resource`. ``` cd frontend && npx ng test --watch=false --include='**/admin-computing-unit.component.spec.ts' --include='**/dashboard.component.spec.ts' --include='**/workflow-computing-unit-managing.service.spec.ts' cd frontend && npx ng test --watch=false ``` The first command passes 59 tests and the second passes 6,600 (1 skipped). `ngc -p src/tsconfig.app.json --noEmit`, `prettier-eslint` and `eslint` ran clean on the changed files. Checked in a browser against a local stack: sign in as an admin, open Admin > Computing Units, and the local unit lists with a green `Running` badge. The first request fires at once and then every 5 seconds without overlap. No Kubernetes cluster was available, so the Kubernetes rows (expand, limits, `Pending`, `Failed`) are covered by unit tests only. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code, Claude Sonnet 5.5 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
