[Cloud Posture] add findings distribution bar#129639
Conversation
df716ae to
be1569a
Compare
|
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security Posture) |
JordanSh
left a comment
There was a problem hiding this comment.
Looks good overall, some nit comments at the start that you can feel free to ignore. But mainly, I think we should stick to using Eui components when we can unless we decide otherwise, but this decision needs to be taken collectively IMO.
x-pack/plugins/cloud_security_posture/public/pages/findings/findings_container.test.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
mega nit but IMO one-liners don't need space between them, especially since they serve the same purpose of preparing the query and can be looked at as a group.
There was a problem hiding this comment.
nit I would put this line with the rest of the one-liners at the top, at 62
There was a problem hiding this comment.
if data is undefined does it still makes sense to put 0 here? i can understand total passed or failed can be undefined if nothing is found by the query and we can assume its 0. but if data is undefined its probably some kind of error isn't it?
Also if I'm not mistaken count does return a 0 if it does not find anything.
There was a problem hiding this comment.
might be better if the consumer of Counter will handle placement and margins for it
x-pack/plugins/cloud_security_posture/public/pages/findings/findings_distribution_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cloud_security_posture/public/pages/findings/findings_distribution_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cloud_security_posture/public/pages/findings/findings_distribution_bar.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
looks like this can throw? maybe add error handling since you already have the hook
There was a problem hiding this comment.
it might, not likely tho. i could add a defensive check for it so the type wouldn't be | undefined
in anyway, errors are already handled with react-query's onError
22b28b2 to
4463b04
Compare
There was a problem hiding this comment.
this bit with lastValueFrom was not added by us and i had conflicts in this file after rebasing, which led to minor type changes.
There was a problem hiding this comment.
this will change later on once we add data to the new table which will use this distribution bar too. for now it needs to be hidden as it reflects only results of group by none
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @orouz |
Summary
this PR adds: