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] Add status update actions in row menu #108698

Merged
merged 33 commits into from
Aug 17, 2021

Conversation

semd
Copy link
Contributor

@semd semd commented Aug 16, 2021

Summary

  • Toast management encapsulated inside the useStatusBulkActionItems public hook.
  • IndexName to update alert statuses taken from ecs data prop.
  • Pass new <Action> component props in order to show the loader.
  • Menu item sized unified.
  • Alert status update items added to the o11y row actions popover menu:

alertstatusupdate

Checklist

Delete any items that are not applicable to this PR.

semd and others added 26 commits August 10, 2021 21:06
…s and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals
… to use WORKFLOW_STATUS instead of ALERT_STATUS
adds replace ALERT_STATUS with ALERT_WORKFLOW_STATUS and updates tests and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals
…us' and not { signals: {status }} in alerts client
optionally use fields api in requests if _source does not contain authz properties
…g ids param in alerts bulk update. Adds integration tests for detection engine testing update alerts with new alerts as data client routes
…test

fix a bug where we were not waiting for updates to complete when usin…
@semd semd added release_note:skip Skip the PR/issue when compiling release notes Team:Observability Team label for Observability Team (for things that are handled across all of observability) Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Aug 16, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@@ -48,6 +28,57 @@ export const useStatusBulkActionItems = ({
onUpdateFailure,
}: StatusBulkActionsProps) => {
const { updateAlertStatus } = useUpdateAlertsStatus();
const { addSuccess, addError, addWarning } = useAppToasts();
Copy link
Contributor Author

@semd semd Aug 16, 2021

Choose a reason for hiding this comment

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

Toast management encapsulated in the public component to prevent duplication. Still calls optional onUpdateSuccess and onUpdateFailure when needed

@@ -94,6 +125,7 @@ export const useStatusBulkActionItems = ({
key="open"
data-test-subj="open-alert-status"
onClick={() => onClickUpdate(FILTER_OPEN)}
size="s"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unification of item sizes

Copy link
Contributor

@dplumlee dplumlee left a comment

Choose a reason for hiding this comment

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

this all looks good from the security solution side of things and works for me, i should be able to build off this with the acknowledged migrations pretty easily 🚀

@lukasolson lukasolson added v8.0.0 and removed 8.0.0 labels Aug 17, 2021
@mgiota mgiota mentioned this pull request Aug 17, 2021
52 tasks
@semd semd enabled auto-merge (squash) August 17, 2021 17:50
Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

LGTM!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 244 245 +1

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.3KB +1.7KB
securitySolution 6.5MB 6.5MB -448.0B
timelines 421.2KB 409.2KB -12.0KB
total -10.8KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observability 57.9KB 58.2KB +236.0B
timelines 313.0KB 318.2KB +5.2KB
total +5.4KB
Unknown metric groups

API count

id before after diff
securitySolution 1329 1333 +4
timelines 938 959 +21
total +25

API count missing comments

id before after diff
securitySolution 1278 1282 +4
timelines 818 839 +21
total +25

Non-exported public API item count

id before after diff
timelines 25 24 -1

History

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

cc @semd

@semd semd merged commit b607f42 into elastic:master Aug 17, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 17, 2021
…08698)

* use rac alerts bulk_update

* cleanup

* adds replace ALERT_STATUS with ALERT_WORKFLOW_STATUS and updates tests and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals

* allow object and string types in query param, fixed single update api to use WORKFLOW_STATUS instead of ALERT_STATUS

* adds additional integration test for when query is a DSL object in addtion to KQL string

* optionally use fields api in requests if _source does not contain authz properties

* integrate bulk update to all hook calls

* adds fields support, fixes bug where we were writing to 'signals.status' and not { signals: {status }} in alerts client

* clean up and fixes

* fix a bug where we were not waiting for updates to complete when using ids param in alerts bulk update. Adds integration tests for detection engine testing update alerts with new alerts as data client routes

* take index name from ecsData props

* pr suggestions

* some more type fixes

* refactor and type fixes

* snapshot updated

* add status update actions to row context menu

* refactor to use dispatch function in o11y actions

* comment removed

* bring alertConsumer back

* bring indexNames back

* check capabilities to show status update items

Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Aug 17, 2021
…108992)

* use rac alerts bulk_update

* cleanup

* adds replace ALERT_STATUS with ALERT_WORKFLOW_STATUS and updates tests and adds logic for switching between signal.status and workflow status when updating alerts in .siem-signals

* allow object and string types in query param, fixed single update api to use WORKFLOW_STATUS instead of ALERT_STATUS

* adds additional integration test for when query is a DSL object in addtion to KQL string

* optionally use fields api in requests if _source does not contain authz properties

* integrate bulk update to all hook calls

* adds fields support, fixes bug where we were writing to 'signals.status' and not { signals: {status }} in alerts client

* clean up and fixes

* fix a bug where we were not waiting for updates to complete when using ids param in alerts bulk update. Adds integration tests for detection engine testing update alerts with new alerts as data client routes

* take index name from ecsData props

* pr suggestions

* some more type fixes

* refactor and type fixes

* snapshot updated

* add status update actions to row context menu

* refactor to use dispatch function in o11y actions

* comment removed

* bring alertConsumer back

* bring indexNames back

* check capabilities to show status update items

Co-authored-by: Devin Hurley <devin.hurley@elastic.co>

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
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 release_note:skip Skip the PR/issue when compiling release notes Team:Observability Team label for Observability Team (for things that are handled across all of observability) Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants