-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cloud Posture] [Dashboard] Add sorting by Compliance Score in the clusters section #149566
[Cloud Posture] [Dashboard] Add sorting by Compliance Score in the clusters section #149566
Conversation
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, overall LGTM 👍
...ity_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.test.tsx
Outdated
Show resolved
Hide resolved
...ity_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.test.tsx
Outdated
Show resolved
Hide resolved
...ity_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.test.tsx
Outdated
Show resolved
Hide resolved
...ity_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.test.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't test locally, just a quick diff review
see comments
...ity_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.test.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...security_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.tsx
Outdated
Show resolved
Hide resolved
...ity_posture/public/pages/compliance_dashboard/dashboard_sections/benchmarks_section.test.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…usters section (elastic#149566) Issue elastic#144013 ## Summary This PR adds the capability to sort Clusters by Compliance Score in the Cloud Posture Dashboard. It saves the sorting on the Local Storage and defaults to **Descending** on the initial load. The following changes were also introduced: - Added unit tests for sorting - Also added missing tests for the clusters section columns and added some tests to do in future PRs - Isolated `mockDashboardData` into own mock file and added a `clusterMockData` - Styling optimizations - Wrapped existent callbacks into `useCallback` ## Screenshots ### Initial load ![image](https://user-images.githubusercontent.com/19270322/215618280-65415866-e8fb-4df5-85bc-4ea7af0ce375.png) ### Sort Toggle ![image](https://user-images.githubusercontent.com/19270322/215618358-520fe047-0624-4c87-8e99-998ae18610fa.png) ### Tests ![image](https://user-images.githubusercontent.com/19270322/215618537-ce064460-71b4-48ef-9594-ce1093a94157.png)
Issue #144013
Summary
This PR adds the capability to sort Clusters by Compliance Score in the Cloud Posture Dashboard. It saves the sorting on the Local Storage and defaults to Descending on the initial load.
The following changes were also introduced:
mockDashboardData
into own mock file and added aclusterMockData
useCallback
Screenshots
Initial load
Sort Toggle
Tests