Skip to content

[RAM] Alert Table from triggers_actions_ui plugin - #131883

Merged
XavierM merged 58 commits into
elastic:mainfrom
XavierM:alert_hook
May 17, 2022
Merged

XavierM merged 58 commits into
elastic:mainfrom
XavierM:alert_hook

Conversation

@XavierM

@XavierM XavierM commented May 10, 2022 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a hook to fetch alerts
  • Create a state alert component to manage all the plumbing of the alert table
  • insert the alert table in case

image

Checklist

Release note

View all alerts attached to a case in the alerts table. The feature is experimental.

@XavierM XavierM added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// Feature:Cases Cases feature v8.3.0 labels May 10, 2022
Comment thread x-pack/plugins/alerting/server/rules_client/rules_client.ts Outdated
Comment thread x-pack/plugins/alerting/server/types.ts
Comment thread x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx Outdated
Comment thread x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx Outdated
Comment thread x-pack/plugins/cases/public/components/user_actions/helpers.ts Outdated
@@ -133,20 +129,12 @@ const AlertsTable: React.FunctionComponent<AlertsTableProps> = (props: AlertsTab
<EuiDataGrid
aria-label="Alerts table"
data-test-subj="alertsTable"

@academo academo May 10, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make this data-test-subj a prop.

@academo

academo commented May 10, 2022

Copy link
Copy Markdown
Contributor

so far looking good and I like how simple to use is on the cases side! good work.

I know this is a draft PR but nevertheless pointing at missing:

  • jest tests for all new hooks, component and helpers.
  • do not forget to set false to feature flags and code flags.

Comment thread x-pack/plugins/cases/public/components/case_view/case_view_page.tsx
Comment thread x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx Outdated
Comment thread x-pack/plugins/cases/public/components/user_actions/helpers.ts Outdated
Comment thread x-pack/plugins/triggers_actions_ui/public/plugin.ts Outdated
@academo
academo removed request for a team, joeypoon and paul-tavares May 17, 2022 12:24
Comment thread x-pack/plugins/triggers_actions_ui/common/experimental_features.ts Outdated
cnasikas and others added 11 commits May 17, 2022 18:07
…tic#132184)

* Add support of Data View switching for Agg-Based visualizations

* fix CI

* add use_date_view_updates

* implement sync with state

* cleanup

* cleanup

* cleanup

* Update index.ts

* fix PR comments

* Update use_data_view_updates.ts

* Update use_data_view_updates.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Discover] Add Analytics No Data Page

* Make showEmptyPrompt parameter optional

* Remove unused import

* Remove unnecessary test

* Fix test

* Update failing test?

* Update failing test

* Changing the order of functional tests

* Fix error handling

* Addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibana-ci

Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cases 427 431 +4
triggersActionsUi 380 385 +5
total +9

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
ruleRegistry 169 174 +5
triggersActionsUi 383 368 -15
total -10

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 298.3KB 299.8KB +1.5KB
triggersActionsUi 750.1KB 772.2KB +22.1KB
total +23.6KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
ruleRegistry 8 9 +1
triggersActionsUi 31 34 +3
total +4

Page load bundle

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

id before after diff
cases 112.1KB 112.2KB +125.0B
triggersActionsUi 103.2KB 103.2KB -19.0B
total +106.0B
Unknown metric groups

API count

id before after diff
ruleRegistry 196 202 +6
triggersActionsUi 397 382 -15
total -9

async chunk count

id before after diff
triggersActionsUi 81 82 +1

ESLint disabled line counts

id before after diff
cases 80 81 +1
triggersActionsUi 172 173 +1
total +2

Total ESLint disabled count

id before after diff
cases 96 97 +1
triggersActionsUi 178 179 +1
total +2

History

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

@XavierM
XavierM merged commit 859a795 into elastic:main May 17, 2022
@cnasikas cnasikas added release_note:feature Makes this part of the condensed release notes and removed release_note:skip Skip the PR/issue when compiling release notes labels May 27, 2022
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
* wip I

* add alert table state in case

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add new API to get FeatureID form registrationContext and update UI to use this new API

* rm dead code

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* remove unnecessary memo

* adds tests for case view helpers

* Move http call to API and add tests for getFeatureIds

* fix type + unit test

* add unit tests + cleanup

* add new api integration test for _feature_ids

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Fix small type creating typescript slowness

* remove console log

* use import type for validfeatureId

* force any to improve typescript performance

* Update APM (elastic#132270)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* [ResponseOps][Docs] Updating ServiceNow docs with OAuth setup instructions (elastic#131344)

* Updating ServiceNow docs. Need screenshots

* Adding screenshots

* Fix nested screenshots and lists

* Tweaks and screenshots

* Updates

* blergh

* Apply suggestions from code review

Co-authored-by: Lisa Cawley <lcawley@elastic.co>

* Apply suggestions from code review

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>

Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>

* Show polling options when 'Data streams' option is selected in the Console Settings modal. (elastic#132277)

* [Osquery] Make Osquery All with All base privillege (elastic#130523)

* [XY] Add normalizeTable function to correct works with esdocs (elastic#131917)

* Add normalizeTable function to correct works with esdocs

* Fix types

* Fix types

* Fix CI

* Fix CI

* Some fixes

* Remove fallback with min/max value for domain

* Added tests

* Some refactoring

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>

* [Osquery] Add default osquery_saved_query objects (elastic#129461)

* [Unified Search] Show error message for invalid date filter value (elastic#131290)

* feat: added show error message for invalid date

* refact: move logic in HOC

* feat: refactoring code and added translation

* refact show error

* refact: show error message

* refact: remove translation

* refactor: changed menu for show FilterEdit

* fix: open/close popover

* feat: field.type => KBN_FIELD_TYPES

* feat: remove extra code with with input check and refactored filter item

* feat: added tests and refactoring code

* refact: getFieldValidityAndErrorMessage

* feat: return isInvalid checking in valur input type for string, ip

* Update navigation landing pages to use appLinks config (elastic#132027)

* Update navigation landing pages to use appLinks config

* Please code review

* align app links changes

* Update links descriptions

* Rollback title changes

* Fix wrong links descriptions

* Fix unit tests

* Fix description

Co-authored-by: semd <sergi.massaneda@elastic.co>

* [Cloud Posture] add resource findings page flyout  (elastic#132243)

* [Discover] Add a tour for Document Explorer (elastic#131125)

* [Discover] Add "Take a tour" button to the Document Explorer callout

* [Discover] Tmp

* [Discover] Add a first Document Explorer tour step

* [Discover] Add other Document Explorer tour steps

* [Discover] Update tour steps positioning

* [Discover] Add gifs to tour steps

* [Discover] Refactor how tour steps are registered

* [Discover] Add new step to the tour. Update tour steps text.

* [Discover] Improve steps positioning

* [Discover] Fix positioning for Add field step

* [Discover] Add icons to tour steps

* [Discover] Reorganize components

* [Discover] Skip Columns step when it's not available

* [Discover] Rename components

* [Discover] Add some tests

* [Discover] Fix positioning

* [Discover] Fix props

* [Discover] Render steps only if the tour is active

* [Discover] Update gifs

* [Discover] Add image alt text for gifs

* [Discover] Tag the Take tour button

* [Discover] Update text and tests

* [Discover] Add more tests

* [Discover] Rename assets directory

* [Discover] Fix tour in mobile view. Improve steps positioning and animation.

* [Discover] Update text in tour steps

* [Discover] Update sort.gif

* [Discover] Update image width

* Update src/plugins/discover/public/components/discover_tour/discover_tour_provider.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update src/plugins/discover/public/components/discover_tour/discover_tour_provider.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* [Discover] Update sort.gif

* [Discover] Fix code style

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* [XY] Add `minTimeBarInterval` arg (elastic#128726)

* Added `xAxisInterval` arg

* Add validation

* Add tests

* Rename xAxisInterval to minTimeBarInterval and add validation

* Fix imports

* Add tests to validation

* Fix conflicts

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Fix tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* do not use barrel imports

* do not use barrel import

* do not use barrel import

* do not use barrel imports

* do not use barrel import

* import types

* Add tests

* Fix cases bundle size

* Add more tests

* [Fleet] Add new API to get current upgrades (elastic#132276)

* Add support of Data View switching for Agg-Based visualizations (elastic#132184)

* Add support of Data View switching for Agg-Based visualizations

* fix CI

* add use_date_view_updates

* implement sync with state

* cleanup

* cleanup

* cleanup

* Update index.ts

* fix PR comments

* Update use_data_view_updates.ts

* Update use_data_view_updates.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* [Security Solution] Responsive styling fixes (elastic#131951)

* [Discover] Add Analytics No Data Page (elastic#131965)

* [Discover] Add Analytics No Data Page

* Make showEmptyPrompt parameter optional

* Remove unused import

* Remove unnecessary test

* Fix test

* Update failing test?

* Update failing test

* Changing the order of functional tests

* Fix error handling

* Addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Remove barrel export from public index file

* remove barrel export

* Re-export missing exports

* Turn off feature flag

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Esteban Beltran <esteban.beltran@elastic.co>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ying Mao <ying.mao@elastic.co>
Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: CJ Cenizal <cj.cenizal@elastic.co>
Co-authored-by: Tomasz Ciecierski <ciecierskitomek@gmail.com>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
Co-authored-by: Nodir Latipov <nodir.latypov@gmail.com>
Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
Co-authored-by: semd <sergi.massaneda@elastic.co>
Co-authored-by: Or Ouziel <or.ouziel@elastic.co>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Maja Grubic <maja.grubic@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Cases Cases feature release_note:feature Makes this part of the condensed release notes Team:Fleet - DEPRECATED Use Team:streams-ui Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.