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

[RAC] [Observability] [Security Solution] Use correct url to management app for observability cases, use normalized ids #108775

Conversation

kqualters-elastic
Copy link
Contributor

@kqualters-elastic kqualters-elastic commented Aug 16, 2021

Summary

This pr adds the link to rules for cases in the observability solution, which was preventing alerts from being shown as comments in the case detail view. Also adds the alert flyout to the case detail view, to display the flyout when clicking the detail button. Also uses normalized rule ids and names across observability and security solution for rule names and ids.

obs_link_working
obs_alert_detail_flyout

@kqualters-elastic kqualters-elastic changed the title [RAC] [Observability] [Security Soltuion] Use correct url to management app for observability cases, use normalized ids [RAC] [Observability] [Security Solution] Use correct url to management app for observability cases, use normalized ids Aug 16, 2021
@kqualters-elastic kqualters-elastic added 8.0.0 Feature:Observability RAC Feature:RAC label obsolete release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Theme: rac label obsolete v7.15.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Aug 16, 2021
@kqualters-elastic kqualters-elastic marked this pull request as ready for review August 16, 2021 20:43
@kqualters-elastic kqualters-elastic requested a review from a team as a code owner August 16, 2021 20:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@@ -52,13 +51,14 @@ const AddToCaseActionComponent: React.FC<AddToCaseActionProps> = ({
} = useAddToCase({ event, useInsertTimeline, casePermissions, appId, onClose });

const getAllCasesSelectorModalProps = useMemo(() => {
const { ruleId, ruleName } = normalizedEventFields(event);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏾

@lukasolson lukasolson added v8.0.0 and removed 8.0.0 labels Aug 17, 2021
@kibanamachine
Copy link
Contributor

💚 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
observability 483.6KB 485.6KB +1.9KB
timelines 407.9KB 429.6KB +21.7KB
total +23.6KB

History

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

const ruleId = event && event.data.find(({ field }) => field === ALERT_RULE_ID);
const ruleUuid = event && event.data.find(({ field }) => field === ALERT_RULE_UUID);
const ruleName = event && event.data.find(({ field }) => field === ALERT_RULE_NAME);
const ruleIdValue = ruleId && ruleId.value && ruleId.value[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible value could have a length of 0? perhaps consider :

Suggested change
const ruleIdValue = ruleId && ruleId.value && ruleId.value[0];
const ruleIdValue = getOr('', 'value[0]', ruleId);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't as far as I know, if it ever blows up I'll come back to this 🤣

Copy link
Contributor

@stephmilovic stephmilovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! only thing was that value length question. manual testing went smoothly.
thanks @kqualters-elastic 🚀 🎸

@kqualters-elastic kqualters-elastic merged commit 87c93ab into elastic:master Aug 17, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 17, 2021
…nt app for observability cases, use normalized ids (elastic#108775)

* Use correct url to management app for observability cases, use normalized ids in timelines

* Update failing test

* Load alert details data to render flyout in case detail view
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@kqualters-elastic kqualters-elastic deleted the fix-cases-links-observability branch August 17, 2021 17:52
kibanamachine added a commit that referenced this pull request Aug 17, 2021
…nt app for observability cases, use normalized ids (#108775) (#108958)

* Use correct url to management app for observability cases, use normalized ids in timelines

* Update failing test

* Load alert details data to render flyout in case detail view

Co-authored-by: Kevin Qualters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Observability RAC Feature:RAC label obsolete release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team Theme: rac label obsolete v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants