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

Node resource table and modals #3565

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

dpanshug
Copy link
Contributor

@dpanshug dpanshug commented Dec 11, 2024

RHOAIENG-16256

Description

Added table and modal for Node resource for Hardware profile

image
Screenshot 2024-12-24 at 2 20 50 PM
Screenshot 2024-12-24 at 2 26 36 PM
Screenshot 2024-12-24 at 2 26 46 PM
Screenshot 2024-12-24 at 2 27 18 PM

How Has This Been Tested?

Currently this table and modal are standalone components and are not used anywhere, to tests you can import <ManageNodeResourceSection /> to any form page, like i have tested this in ManageAcceleratorProfile

Test Impact

Add unit tests for validation utility functions

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@vconzola

@dpanshug
Copy link
Contributor Author

dpanshug commented Dec 11, 2024

WIP: needs some clarification around UX and data validation
discussing here: https://redhat-internal.slack.com/archives/C07C0FNHVPT/p1733920395039179

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 22.13740% with 102 lines in your changes missing coverage. Please review.

Project coverage is 85.07%. Comparing base (5d3efb2) to head (6c59a81).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
...eProfiles/nodeResource/ManageNodeResourceModal.tsx 3.22% 30 Missing ⚠️
...s/hardwareProfiles/nodeResource/CountFormField.tsx 4.34% 22 Missing ⚠️
...hardwareProfiles/nodeResource/NodeResourceForm.tsx 4.54% 21 Missing ⚠️
...ardwareProfiles/nodeResource/NodeResourceTable.tsx 34.61% 17 Missing ⚠️
...ges/hardwareProfiles/ManageNodeResourceSection.tsx 0.00% 10 Missing ⚠️
...wareProfiles/nodeResource/NodeResourceTableRow.tsx 83.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3565      +/-   ##
==========================================
- Coverage   85.20%   85.07%   -0.14%     
==========================================
  Files        1381     1402      +21     
  Lines       31592    32174     +582     
  Branches     8832     9024     +192     
==========================================
+ Hits        26919    27371     +452     
- Misses       4673     4803     +130     
Files with missing lines Coverage Δ
...d/src/pages/hardwareProfiles/nodeResource/const.ts 100.00% <100.00%> (ø)
...d/src/pages/hardwareProfiles/nodeResource/utils.ts 100.00% <100.00%> (ø)
...wareProfiles/nodeResource/NodeResourceTableRow.tsx 83.33% <83.33%> (ø)
...ges/hardwareProfiles/ManageNodeResourceSection.tsx 0.00% <0.00%> (ø)
...ardwareProfiles/nodeResource/NodeResourceTable.tsx 34.61% <34.61%> (ø)
...hardwareProfiles/nodeResource/NodeResourceForm.tsx 4.54% <4.54%> (ø)
...s/hardwareProfiles/nodeResource/CountFormField.tsx 4.34% <4.34%> (ø)
...eProfiles/nodeResource/ManageNodeResourceModal.tsx 3.22% <3.22%> (ø)

... and 61 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 065da14...6c59a81. Read the comment docs.

@dpanshug dpanshug changed the title [WIP] Node resource table and modals Node resource table and modals Dec 12, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Dec 12, 2024
@dpanshug dpanshug force-pushed the node-table branch 2 times, most recently from 13a9f2d to 60d87b6 Compare December 12, 2024 12:47
@dpanshug
Copy link
Contributor Author

@kaedward @vconzola i have updated the mocks, please review the error message for field validation.

@dpanshug dpanshug force-pushed the node-table branch 2 times, most recently from fd5b060 to fd8a726 Compare December 12, 2024 13:02
frontend/src/types.ts Outdated Show resolved Hide resolved
@vconzola
Copy link

I believe there should be a space between the numbers and the units in the table, e.g., "1 GiB", not "1GiB", bur defer to @kaedward. Also, the units in the table should match the units in the dropdown, e.g., "GiB", not "Gi".

@Gkrumbach07
Copy link
Member

Could you also update the other table node table to now use your view only table

@DaoDaoNoCode
Copy link
Member

I think all the tables should use compact variant.

@dpanshug dpanshug force-pushed the node-table branch 2 times, most recently from 1abbee0 to c2f6c05 Compare December 18, 2024 10:21
@DaoDaoNoCode
Copy link
Member

@dpanshug Can you update the add button like we discussed above as well?

@dpanshug dpanshug reopened this Jan 6, 2025
Copy link
Member

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Member

@DaoDaoNoCode DaoDaoNoCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

openshift-ci bot commented Jan 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DaoDaoNoCode, Gkrumbach07

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit e91020a into opendatahub-io:main Jan 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants