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

Ability to sort in MetalK8s UI Nodes table #2919

Closed
thomasdanan opened this issue Nov 9, 2020 · 0 comments · Fixed by #2926
Closed

Ability to sort in MetalK8s UI Nodes table #2919

thomasdanan opened this issue Nov 9, 2020 · 0 comments · Fixed by #2926
Assignees
Labels
severity:minor No impact, or minor impact, on live deployments topic:ui UI-related issues

Comments

@thomasdanan
Copy link
Contributor

Component:

'ui'

Why this is needed:

In the same way we can sort in Volumes table, it would be great to have the ability to sort in the Nodes table

What should be done:

Sorting should be available for all columns:

Name: Alphanumeric sorting, case-insensitive (based on Name String only)
Roles: Alphanumeric sorting
Health: Enum sorting: Critical, Warning, Healthy, Unknown
Status: Enum sorting: Ready, NotReady, Unknown

In terms of UI, it should be equivalent to what was done in Volumes table: #2876

Implementation proposal (strongly recommended):

Test plan:

@thomasdanan thomasdanan added topic:ui UI-related issues severity:minor No impact, or minor impact, on live deployments labels Nov 9, 2020
alexis-ld pushed a commit that referenced this issue Nov 13, 2020
Extract Sorting styled components to re-use those in Nodes table

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 13, 2020
Base for Nodes sorting, added react-table utilities and basic header triggers

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 13, 2020
Add missing constant for Node status

User constants instead of strings in NodeUtils table data generator to be consistent with Sorting

Implement Status Sorting

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 13, 2020
Add name lowercase sorting

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 13, 2020
Move the URL Sync logic for both Volumes and Nodes tables to its custom hook function to avoid a big block of code redundancy.

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 13, 2020
Add missing history dependency in useEffect in Sort URL Sync custom hook

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 17, 2020
Version >= 16.9 needed in order to use the custom hook testing library

Refs: #2919
alexis-ld pushed a commit that referenced this issue Nov 17, 2020
Add react-hooks-testing-library to render hooks within a test component

Test useTableSortURLSync to check if URL params are handled properly

Refs: #2919
ChengYanJin added a commit that referenced this issue Nov 19, 2020
Autosizer automatically adjusts the width and height of a single child.

Refs: #2919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:minor No impact, or minor impact, on live deployments topic:ui UI-related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants