feat(frontend): add admin computing units dashboard - #7356
Draft
kunwp1 wants to merge 6 commits into
Draft
Conversation
Add an ADMIN-only page listing every active computing unit across all users (name, owner, type, status, created, resource summary), with an expandable row revealing full specs (CPU, memory, GPU, JVM, shared memory). Read-only. Reuses the existing WorkflowComputingUnitManagingService (new listAllComputingUnits() hitting GET /computing-unit/admin/list) and DashboardWorkflowComputingUnit type, plus the shared status-badge and relative-time formatters. Follows the existing admin dashboard pattern (nz-table, admin route + guard + nav entry). Closes apache#6479.
The dashboard's template pipes creationTime through `date` for the
created-at tooltip, but the standalone component imported only NgFor and
NgIf from @angular/common. AOT compilation therefore failed with NG8004
("No pipe found with name 'date'"), and since a failed build emits no
index.html, `ng serve` answered every request with a 404 rather than
serving the app.
The existing specs did not catch this: none of them render the template,
so JIT never resolved the pipe. Add the one render test that mounts a row,
which fails with NG0302 without the import and passes with it, so a pipe
or directive missing from `imports` is caught by the unit tests instead of
only by the app build.
Surface fetch/poll errors via NzMessageService and clear the loading flag so a failed load stops the spinner instead of spinning forever; catch poll errors inside switchMap so one failure does not terminate the refresh interval. Drop the isOwner star on the owner avatar — isOwner is relative to the requesting admin, so it is meaningless in an all-users view.
Contributor
Automated Reviewer SuggestionsBased on the
|
The rxjs/no-implicit-any-catch rule (run in format:ci) requires an explicit `: unknown` on catchError and subscribe error callbacks, and crashes on an untyped parameter. Annotate both to match the codebase convention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Adds an ADMIN-only Computing Units dashboard: a read-only table of every active computing unit across all users.
Columns: name, owner, type, status, created. A row expands to show its full specs (CPU, memory, GPU, JVM memory, shared memory). For local development environment, local units have no limits. The table reuses the existing
WorkflowComputingUnitManagingService(newlistAllComputingUnits()callingGET /computing-unit/admin/list) and theDashboardWorkflowComputingUnittype and follows the existing admin page pattern.Any related issues, documentation, discussions?
Closes #6479. Part of #6476.
How was this PR tested?
Test manually in both local and kubernetes environment.
In Kubernetes environment,
[VIDEO]
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)