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

[Cloud Posture] [Dashboard] Add sorting by Compliance Score in the clusters section #149566

Merged
merged 13 commits into from
Jan 31, 2023

Conversation

opauloh
Copy link
Contributor

@opauloh opauloh commented Jan 26, 2023

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:

  • 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

Sort Toggle

image

Tests

image

@opauloh opauloh requested a review from a team as a code owner January 26, 2023 03:32
@opauloh opauloh added the Team:Cloud Security Cloud Security team related label Jan 26, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@opauloh opauloh added backport:skip This commit does not require backporting v8.7.0 release_note:feature Makes this part of the condensed release notes labels Jan 26, 2023
Copy link
Contributor

@JordanSh JordanSh left a 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 👍

Copy link
Contributor

@orouz orouz left a 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

@opauloh opauloh added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes labels Jan 30, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 140.7KB 140.9KB +236.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@opauloh opauloh merged commit 830d9bd into elastic:main Jan 31, 2023
@opauloh opauloh linked an issue Jan 31, 2023 that may be closed by this pull request
6 tasks
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this pull request Feb 6, 2023
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Cloud Posture] Dashboard clusters section - add sorting to clusters
6 participants