feat(gui): add full computing unit tab#4331
feat(gui): add full computing unit tab#4331gracecluvohio wants to merge 25 commits intoapache:mainfrom
Conversation
|
@gracecluvohio Let's use "Compute" instead of "Computing Units" on the navigation bar. |
|
@kunwp1 Please review it. |
|
@gracecluvohio Since this is part 3 of the computing unit tab, can it be reviewed independently, or should I wait for the first two PRs to be merged? |
You should probably wait for the first two PRs to be merged. Each PR adds commits on top of the others, so there will be less files to review (and less conflicts) if earlier PRs are reviewed and merged before later ones. |
|
Thanks! Then I will wait until the two PRs are merged. |
Signed-off-by: Grace Chia <94275517+gracecluvohio@users.noreply.github.com>
|
@kunwp1 The PR is ready for review now, please take a look when you have time. Thank you! |
There was a problem hiding this comment.
Pull request overview
This PR completes the Dashboard “Computing Unit” tab feature set by adding UI flows for listing computing units, creating new units (Kubernetes/local), terminating units, and viewing unit details/metrics. It’s part 3/3 of the broader computing unit dashboard work (related to #3691) and closes #3690.
Changes:
- Implemented computing unit create + terminate flows in the dashboard computing unit section (including resource selection controls).
- Added a new computing-unit list-item component to render per-unit status/metrics and open a details modal.
- Introduced shared frontend utilities for computing-unit metadata rendering and resource parsing/conversion.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts | Adds computing unit data loading + create/terminate logic and form state for the create modal. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.html | Renders computing unit list and the “Create Computing Unit” modal UI. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.scss | Styles for create modal controls (CPU/memory/GPU/JVM/shm). |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts | Updates unit test providers/mocking for the expanded component dependencies. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.ts | New component implementing per-unit rename, metrics calculations, and details modal open. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.html | New template for list-item card, metrics popover, and delete action. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.scss | Styling for the new list-item component layout and metrics. |
| frontend/src/app/dashboard/component/dashboard.component.html | Renames the sidebar label from “Computing Units” to “Compute”. |
| frontend/src/app/common/util/computing-unit.util.ts | Adds shared helpers for metadata table rendering and resource parsing/conversion. |
| frontend/src/app/app.module.ts | Registers the new list-item component in the app module declarations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
Show resolved
Hide resolved
frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
Outdated
Show resolved
Hide resolved
frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts
Outdated
Show resolved
Hide resolved
...tend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.html
Show resolved
Hide resolved
...er-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.html
Show resolved
Hide resolved
...er-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.html
Show resolved
Hide resolved
...user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.ts
Show resolved
Hide resolved
...user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.ts
Show resolved
Hide resolved
...d/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts
Outdated
Show resolved
Hide resolved
...tend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.html
Show resolved
Hide resolved
There was a problem hiding this comment.
I have three questions:
- We still have this old interface to create a computing unit. Don't we need to remove it?
-
We have a feature to share computing unit to other users and seems like it's missing in the new tab. Is this intentional?
-
If the code changes you are making are 100% reusing the old computing unit's logic, you can safely ignore the comments below. However, if that's the case, we have two duplicate codes in our codebase so I want you to refactor the code to remove duplicates.
| return toScaled.toFixed(4); | ||
| } | ||
|
|
||
| export function cpuPercentage(usage: string, limit: string): number { |
There was a problem hiding this comment.
Can you refactor cpuPercentage and memoryPercentage as they share a similar logic?
There was a problem hiding this comment.
I could create a separate "percentage" function that takes the display unit and the conversion function to use, but I feel that could harm readability. Let me know what you think though.
| terminateTitle: "Terminate Computing Unit", | ||
| terminateWarning: | ||
| "<p style='color: #ff4d4f;'><strong>Warning:</strong> All execution results in this computing unit will be lost.</p>", | ||
| createSuccess: "Successfully created the Kubernetes computing unit", |
There was a problem hiding this comment.
Remove the word "Kubernetes". It's a low level detail for users.
There was a problem hiding this comment.
It's part of the UI as well when creating the computing unit.
Screen.Recording.2026-04-06.at.12.09.12.AM.mov
I think it might be better to keep it, since the dropdown makes me think we may want to allow users to select between different types of computing units in the future. Not too sure though.
|
|
As I work on this, I notice a lot of shared services (such as However, as they are used by both the workflow computing unit component (in the I'll work on this later in a separate PR though, so that there aren't too many files in this PR. |
…ent that is already in computing-unit.util

What changes were proposed in this PR?
This PR adds the rest of the features to create a new computing unit tab, including creating and deleting computing units and viewing computing unit details. It is part 3 of 3 of PR #3691.
Demonstration:
Creating a new computing unit:
Screen.Recording.2026-03-29.at.2.50.27.PM.mov
Deleting a computing unit:
Screen.Recording.2026-04-05.at.11.15.21.PM.mov
Viewing computing unit details:
Screen.Recording.2026-04-05.at.11.13.42.PM.mov
Any related issues, documentation, discussions?
Closes #3690
How was this PR tested?
Tested locally
Was this PR authored or co-authored using generative AI tooling?
No