Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve resource allocation form item labels with resource details API #2485

Merged
merged 1 commit into from
Jun 24, 2024

Commits on Jun 24, 2024

  1. 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
    yomybaby committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    a3638bf View commit details
    Browse the repository at this point in the history