-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve resource allocation form item labels with resource …
…details API (#2485) ### TL;DR Add functionality to use `resourceSlotsDetails` for better resource information display in `ResourceAllocationFormItems` and `ResourceNumber` components. ### What changed? - Imported `useResourceSlotsDetails` from `backendai` hooks - Added `resourceSlotsDetails` usage in `ResourceAllocationFormItems` - Updated `ResourceNumber` component to use `resourceSlotsDetails` for better display of resources - Adjusted stale time for `useResourceSlotsDetails` query ### How to test? 1. Ensure that the resource display reflects human-readable names and units as provided by `resourceSlotsDetails`. 2. Check the display of CPU and memory resources in the `ResourceAllocationFormItems`. 3. Verify the `ResourceNumber` component displays the updated format and units. ### Why make this change? Enhances the clarity and accuracy of resource information displayed to the users through the `ResourceAllocationFormItems` and `ResourceNumber` components by utilizing detailed slot information. --- <!-- Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes, and how it affects the users and other developers. --> **Checklist:** (if applicable) - [ ] Mention to the original issue - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
- Loading branch information
Showing
5 changed files
with
37 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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