[Security Solution] add expandable flyout header components#153187
[Security Solution] add expandable flyout header components#153187PhilippeOberti merged 2 commits intomainfrom
Conversation
638d0c9 to
cbf56c2
Compare
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
lgestc
left a comment
There was a problem hiding this comment.
casting is okay to me when it comes to storybook, testing etc, but I would go with something better / stricter when it comes to an actual program. I hope you are not offended sir 🗡️
| ); | ||
|
|
||
| if (!dataFormattedForFieldBrowser) { | ||
| return <></>; |
There was a problem hiding this comment.
null would work just as well :)
There was a problem hiding this comment.
looking at some docs, it seems that null is preferred over React.Fragment, thanks for pointing this out! 👍
| */ | ||
| export const RiskScore: FC = memo(() => { | ||
| const { getFieldsData } = useRightPanelContext(); | ||
| const alertRiskScore = getFieldsData(ALERT_RISK_SCORE) as string; |
There was a problem hiding this comment.
I would write some kind of assertion here, I can see that this can return unknown | unknown[] so its not really safe to cast it to string.
There was a problem hiding this comment.
yes absolutely, thanks for pushing for this, fixed!
- title - timestamp - risk score - severity
cbf56c2 to
0f65795
Compare
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
christineweng
left a comment
There was a problem hiding this comment.
Desk tested on both alert page and events, LGTM!
Summary
This PR leverages the work done in a previous PR and add the content of the header component of expandable flyout right section:
Document details@timestamppropertyuseGetFieldsDatahookuseGetFieldsDatahookHow to test
xpack.securitySolution.enableExperimental: ['securityFlyoutEnabled']to thekibana.jsonfileyarn es snapshot --license trial,yarn test:generateandyarn start --no-base-pathRun tests and storybook
node scripts/storybook security_solutionto run Storybooknpm run test:jest --config ./x-pack/plugins/security_solution/public/flyoutto run the unit testsyarn cypress:open-as-cibut note that the integration/e2e tests have been written but are now skipped because the feature is protected behind a feature flag, disabled by default. To check them, add'securityFlyoutEnabled'hereNotes:
https://github.com/elastic/security-team/issues/6117
Checklist
Delete any items that are not applicable to this PR.