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

[Alerting] adds an Run When field in the alert flyout to assign the action to an Action Group #82472

Merged
merged 16 commits into from
Nov 9, 2020

Conversation

gmmorris
Copy link
Contributor

@gmmorris gmmorris commented Nov 3, 2020

Summary

Closes #82274

This PR:

  1. Adds a RunsWhen field to actions in the Alerts Flyout when creating / editing an Alert
  2. Refactores the ActionsForm component into 3 separate components to improve rendering performance and reduce unnecessary rerenders.

Screenshot 2020-11-05 at 16 44 13

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@gmmorris gmmorris changed the title plugged Task Manager lifecycle into status reactively added action group field in alert flyout Nov 3, 2020
This reverts commit e9f2cd0.
* master: (127 commits)
  [ILM] Fix breadcrumbs (elastic#82594)
  [UX]Swap env filter with percentile (elastic#82246)
  Add platform's missing READMEs (elastic#82268)
  [Discover] Adding uiMetric to track Visualize link click (elastic#82344)
  [Search] Add used index pattern name to the search agg error field (elastic#82604)
  improve client-side SO client get pooling (elastic#82603)
  [Security Solution] Unskips Overview tests (elastic#82459)
  Embeddables/migrations (elastic#82296)
  [Enterprise Search] Refactor product server route registrations to their own files/folders (elastic#82663)
  Moving reinstall function outside of promise.all (elastic#82672)
  Load choropleth layer correctly (elastic#82628)
  Master  backport elastic#81233 (elastic#82642)
  [Fleet] Allow snake cased Kibana assets (elastic#77515)
  Reduce saved objects authorization checks (elastic#82204)
  [data.search] Add request handler context and asScoped pattern (elastic#80775)
  [ML] Fixes formatting of fields in index data visualizer (elastic#82593)
  Usage collector readme (elastic#82548)
  [Lens] Visualization validation and better error messages (elastic#81439)
  [ML] Add annotation markers to time series brush area to indicate annotations exist outside of selected range (elastic#81490)
  chore(NA): install microdnf in UBI docker build only (elastic#82611)
  ...
* master:
  Revert "[Fleet] Allow snake cased Kibana assets (elastic#77515)" (elastic#82706)
@gmmorris gmmorris added Feature:Alerting release_note:enhancement Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.11.0 v8.0.0 labels Nov 5, 2020
@gmmorris gmmorris marked this pull request as ready for review November 5, 2020 17:48
@gmmorris gmmorris requested review from a team as code owners November 5, 2020 17:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@gmmorris gmmorris changed the title added action group field in alert flyout [Alerting] adds an Run When field in the alert flyout t oasign the actio nto an Actio nGroup Nov 5, 2020
@gmmorris gmmorris changed the title [Alerting] adds an Run When field in the alert flyout t oasign the actio nto an Actio nGroup [Alerting] adds an Run When field in the alert flyout to assign the action to an Action Group Nov 5, 2020
Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM. Works as expected.

I'm seeing a console warning for

Warning: Each child in a list should have a unique "key" prop.

Check the render method of `ActionForm`. See https://fb.me/react-warning-keys for more information.
    in ActionTypeForm (created by ActionForm)
    in ActionForm
    in Suspense
    in Unknown (created by AlertForm)

@gmmorris
Copy link
Contributor Author

gmmorris commented Nov 6, 2020

Check the render method of ActionForm. See https://fb.me/react-warning-keys for more information.

Good catch, thanks. :)
Fixed

@mikecote mikecote self-requested a review November 6, 2020 13:54
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Changes LGTM! I did a local test on the index threshold, added an action group and it showed in the UI, saved, etc. This is going to be a great feature!

@gmmorris
Copy link
Contributor Author

gmmorris commented Nov 9, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id before after diff
triggersActionsUi 285 287 +2

async chunks size

id before after diff
triggersActionsUi 1.5MB 1.5MB +6.8KB

History

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

@gmmorris gmmorris merged commit 3c525d7 into elastic:master Nov 9, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 9, 2020
…ction to an Action Group (elastic#82472)

Adds a `RunsWhen` field to actions in the Alerts Flyout when creating / editing an Alert which allows the user to assign specific actions to a certain Action Groups
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 9, 2020
* master:
  Added `defaultActionMessage` to index threshold alert UI type definition (elastic#80936)
  [ILM] Migrate Delete phase and name field to Form Lib (elastic#82834)
  skip flaky suite (elastic#57426)
  [Alerting] adds an Run When field in the alert flyout to assign the action to an Action Group (elastic#82472)
  [APM] Expose APM event client as part of plugin contract (elastic#82724)
  [Logs UI] Fix errors during navigation (elastic#78319)
  Enable send to background in TSVB (elastic#82835)
  SavedObjects search_dsl: add match_phrase_prefix clauses when using prefix search (elastic#82693)
  [Ingest Manager] Unify install* under installPackage (elastic#82916)
gmmorris added a commit that referenced this pull request Nov 10, 2020
…ction to an Action Group (#82472) (#82946)

Adds a `RunsWhen` field to actions in the Alerts Flyout when creating / editing an Alert which allows the user to assign specific actions to a certain Action Groups
phillipb added a commit to phillipb/kibana that referenced this pull request Nov 10, 2020
…e-details-overlay

* 'master' of github.com:elastic/kibana: (201 commits)
  Added `defaultActionMessage` to index threshold alert UI type definition (elastic#80936)
  [ILM] Migrate Delete phase and name field to Form Lib (elastic#82834)
  skip flaky suite (elastic#57426)
  [Alerting] adds an Run When field in the alert flyout to assign the action to an Action Group (elastic#82472)
  [APM] Expose APM event client as part of plugin contract (elastic#82724)
  [Logs UI] Fix errors during navigation (elastic#78319)
  Enable send to background in TSVB (elastic#82835)
  SavedObjects search_dsl: add match_phrase_prefix clauses when using prefix search (elastic#82693)
  [Ingest Manager] Unify install* under installPackage (elastic#82916)
  [Fleet] Make stream id unique in agent policy (elastic#82447)
  skip flaky suite (elastic#82915)
  skip flaky suite (elastic#75794)
  Copy `dateAsStringRt` to observability plugin (elastic#82839)
  [Maps] rename connected_components/map folder to mb_map (elastic#82897)
  [Security Solution] Fix EventsViewer DnD cypress tests (elastic#82619)
  [Security Solution] Adds logging and performance fan out API for threat/Indicator matching (elastic#82546)
  Implemented Alerting health status pusher by using task manager and status pooler for Kibana status plugins 'kibanahost/api/status' (elastic#79056)
  [APM] Adds new configuration 'xpack.apm.maxServiceEnvironments' (elastic#82090)
  Move single use function in line (elastic#82885)
  [ML] Add unsigned_long support to data frame analytics and anomaly detection (elastic#82636)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting release_note:enhancement Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Alerts] There is no way to assign actions to a specific Action Group in the Add / Edit flyouts
6 participants