Commit graph

239 commits

Author SHA1 Message Date
Spencer fecdba7eba
[eslint] add rule to prevent export* in plugin index files (#109357)
* [eslint] add rule to prevent export* in plugin index files

* deduplicate export names for types/instances with the same name

* attempt to auto-fix duplicate exports too

* capture exported enums too

* enforce no_export_all for core too

* disable rule by default, allow opting-in for help fixing

* update tests

* reduce yarn.lock duplication

* add rule but no fixes

* disable all existing violations

* update api docs with new line numbers

* revert unnecessary changes to yarn.lock which only had drawbacks

* remove unnecessary eslint-disable

* rework codegen to split type exports and use babel to generate valid code

* check for "export types" deeply

* improve test by using fixtures

* add comments to some helper functions

* disable fix for namespace exports including types

* label all eslint-disable comments with related team-specific issue

* ensure that child exports of `export type` are always tracked as types

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 18:05:45 -07:00
Marshall Main f58865c1f5
[Rule Registry][RAC] Rename kibana.alert.id to kibana.alert.instance.id (#110528)
* Rename kibana.alert.id to kibana.alert.instance.id

* Update test snapshot

* Fix test

* One more fix
2021-09-01 16:56:49 -04:00
Jonathan Buttner 31d335868e
Disable sync toggle in flyout (#110714) 2021-09-01 09:06:29 -04:00
Katrin Freihofner 8bcbc2dabd
increases contrast of recovered health badge (#110210)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-31 17:12:15 +02:00
Xavier Mouligneau 782f29a407
[RAC][o11y] fix o11y privileges when rule created in stack (#110167)
* fix o11y privileges when rule created in stack

* fix merge

* fix dsl alerts

* fix privileges on o11y

* after discussion with o11y, we agree to simplify logic of the count of alerts

* remove unused variable

* fix one more type error

Co-authored-by: mgiota <panagiota.mitsopoulou@elastic.co>
2021-08-31 07:31:38 -04:00
Milton Hultgren 02538b6b41
[Observability] Update AlertsSearchBar placeholder (#110192)
* [Observability] Update AlertsSearchBar placeholder (#108179)
* [Observability] Remove default search query from Alerts page (#110242)

This is done to align with other placeholder texts found within the
Observability solution.
2021-08-31 08:32:46 +02:00
Milton Hultgren ab2deb773a
[Observability] Make Alerts page callout more subtle (#110197) 2021-08-30 15:41:09 +02:00
Marshall Main 682bc7c771
[RAC] Replace usages of kibana.alert.status: open with active (#109033)
* Replace usages of alert.status: open with active

* Update unit tests

* Add back home.disableWelcomeScreen=true

* Only disable welcome screen within APM ftr config

* Add disableWelcomeScreen option to security solution cypress config

* Fix reference to workflow status

* oops

* Remove duplicate disableWelcomeScreen

* Update README.md

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-26 18:58:44 -04:00
Pablo Machado 3854d3a586
[RAC] EuiDataGrid pagination (#109269)
* Update T-Grid to use DataGrid pagination

* It also improves the Gtid loading state
* DataGrid pagination makes sure that we display the grid with the proper height.

* Add DataGrid height hack to t-grid

HUGE HACK!!!

DataGrtid height isn't properly calculated when the grid has horizontal scroll.
https://github.com/elastic/eui/issues/5030

In order to get around this bug we are calculating `DataGrid` height here and setting it as a prop.

Please revert this commit  and allow DataGrid to calculate its height when the bug is fixed.

* Apply DataGrid laoding and pagination changes to observability

* Fix cypress tests

* Fix t-grid page render bug on Observability

* some pagination fixes

* hide table when analyzer active

* isolate exported function

Co-authored-by: semd <sergi.massaneda@elastic.co>
2021-08-26 14:41:47 -04:00
Alejandro Fernández Gómez 754bf980f3
[RAC] Remove alerts from the table if user changes their workflow status (#110227) 2021-08-26 12:59:35 -04:00
Felix Stürmer 137c182761
[RAC] Populate common rule fields in alert helpers (#108679)
Co-authored-by: mgiota <panagiota.mitsopoulou@elastic.co>
2021-08-26 09:19:51 -04:00
Georgii Gorbachev 8ce1d10791
[RAC] Fix index names used by RBAC, delete hardcoded map of Kibana features to index names (#109567)
**Ticket:** https://github.com/elastic/kibana/issues/102089

🚨 **This PR is critical for Observability 7.15** 🚨

## Summary

This PR introduces changes that fix the usage of alerts-as-data index naming in RBAC. It builds on top of https://github.com/elastic/kibana/pull/109346 and replaces https://github.com/elastic/kibana/pull/108872.

TODO:

- [x] Address https://github.com/elastic/kibana/pull/109346#pullrequestreview-735158370
- [x] Make changes to `AlertsClient.getAuthorizedAlertsIndices()` so it starts using `RuleDataService` to get index names by feature ids.
- [x] Delete the hardcoded `mapConsumerToIndexName` where we had incorrect index names.
- [x] Close https://github.com/elastic/kibana/pull/108872

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-08-25 16:29:16 +02:00
Sergi Massaneda c34cbbc7ad
fix empty actions popover button (#110015) 2021-08-25 07:11:33 -04:00
Anton Dosov 48d894427a
[IndexPatterns] Clean up StubIndexPattern (#108555) 2021-08-25 12:26:28 +02:00
Xavier Mouligneau 6a1a38b346
[RAC] [o11y] add permission in alerts table from kibana privilege/consumer (#109759)
* add alert permission in o11y

* review I

* review II

* fix selection all when checkbox disabled

* fix selected on bulk actions
2021-08-24 23:32:40 -04:00
Jonathan Buttner cc9912c542
[Cases][Observability] Disabling sync alerts for observability (#109929)
* Disabling sync alerts for observability

* Adding unit tests
2021-08-24 18:09:03 -04:00
Kerry Gallagher 09fda96254
[RAC] Fix scrolling on Obs alerts table (#109139)
* Fix scrolling on obs alerts table and default to 50 items per page
2021-08-24 18:21:23 +01:00
Liza Katz 268a279930
[Data][Es Query] Use ES types in Filters (#108378)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* types for filters

* sec fixes

* filtersss

* typey type

* typey type

* comparator options

* test typescript

* test

* fixes

* test types

* test

* cr

* cleanup a bit more

* Jest fix + types

* Remove geo bounding box and geo polygon filters

* delete geo filters

* geo

* geo

* Fix tests \_0_/

* doc

* types and fixes

* jests

* ts

* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs

* ts

* plg ts

* types

* cast

* Update types.ts

* Update create_threat_signal.ts

* Update packages/kbn-es-query/src/es_query/migrate_filter.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Code review

* revert change

* docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2021-08-24 11:28:22 +02:00
Greg Thompson 873f2e23a9
Upgrade EUI to v37.3.0 (#109157)
* eui to 37.3.0

* i18n tokens

* reinstate discover_grid_flyout test

* more i18n tokens

* snapshot updates

* fix jest failures

* update cell position pattern

* clean up pattern

* buttongroup click -> change

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 11:12:02 -05:00
Sergi Massaneda 64dff78dce
[RAC] Actions popovers UI unification (#109221)
* popover padding size unified

* remove panels from all context menus

* action items order changed

* cases menu items test fixed

* translations and small changes

* remove components not used anywhere

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
2021-08-23 08:42:24 -04:00
Kerry Gallagher 597593d056
[RAC] Fix hover on alert status column (#109273)
* Fix alert status column hover
2021-08-23 13:10:27 +01:00
Xavier Mouligneau e8e53e36e5
[RAC] Get o11y alerts in alerts table (#109346)
* get back index names  in o11y

* testing and integration

* fix types

* Avoid using the rule data client for field list

* Remove left-over index argument

* no needs of alert consumer anymore

Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2021-08-20 12:52:34 -04:00
Justin Kambic cb3d353a36
Remove references to deprecated IIndexPattern. (#109347) 2021-08-20 12:08:54 -04:00
Alejandro Fernández Gómez 5fd903b7fe
[RAC] Enable workflow status filtering (#108215)
Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 12:07:09 +02:00
mgiota 8c8dca6ad2
[RAC] [Observability] Use simpler alert severity level mapping (#109068)
* [RAC][Observability] remove severity fields from mapping keep only ALERT_SEVERITY

* temporarily remove severity value occurences

* remove ALERT_SEVERITY_VALUE occurences, this value is not being read and shown in the Observability alerts table

* remove duplicate ALERT_SEVERITY identifier

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 16:29:24 -04:00
mgiota ed78d4b700
[RAC][Observability] temporarily hide severity column (#109004)
* [RAC][Observability] temporarily hide severity column

* remove severity from flyout & rename Trigerred to last updated

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 12:01:42 -04:00
mgiota 8d92668d20
[Observability RAC] add filter for value action (#108648)
* filter for value

* code clean up

* fix i18n tests

* fix type errors

* revert changes to reason field to make reason field clickable again

* [RAC Observability] fix reason field

* fix type issues

* filter my kibana.alert. status on load (will refactor)

* refactor filter for alert status on load

* remove rest params

* fix eslint errors

* hard code alert status for now, will be fixed in another PR

* move filter_for button in a separate file

* fix errors

* comply with kibana i18n guideines

* simpler implementation for default filtering

* fix syntax error

* fix type errors

* fix eslint errors

* fix eslint errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 13:41:39 +02:00
Kerry Gallagher fd1bf565f6
[RAC] Update alert status column in alerts table (#108695)
* Update alert status in alerts table
2021-08-18 10:13:28 +01:00
Patryk Kopyciński 754b79f08a
[Cases] Add Lens markdown plugin (#96703) 2021-08-17 15:49:44 -07:00
Sergi Massaneda b607f42fcf
[RAC][Observability] Add status update actions in row menu (#108698)
* 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>
2021-08-17 16:03:35 -04:00
Katrin Freihofner cac84d7cce
styling updates to alerts table and alignment of elements (#108507)
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
2021-08-17 14:35:21 -04:00
Kevin Qualters 87c93abf1d
[RAC] [Observability] [Security Solution] Use correct url to management app for observability cases, use normalized ids (#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
2021-08-17 13:49:59 -04:00
mgiota 8724826468
[RAC][Observability] fix flyout in fullscreen mode (#108746)
* [RAC][Observability] fix flyout in fullscreen mode

* eslint fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-17 13:30:24 +02:00
Michael Marcialis f80104df0e
Home Page Solutions & Add Data Updates (#108580)
* balance solutions

* clean up solution changes

* change footer button size

* update management section

* apply max-width to management items

* remove right side items from page header

* add data content update

* illustration poc

* add data content updates per feedback

* img size and alignment

* moved shared images to shared assets folder

* more solutions clean up

* rm unneeded import

* remove references to subtitle and appDescriptions

* update tests and snapshots

* more test and snapshot updates

* restore solution sort order

* ts and jest fixes; thx catherine!

* i18n fixes

* use new `KibanaPageTemplateSolutionNavAvatar` comp

* change solution imgs from png to svg

* update tests and snapshots

* rm spacer and update snapshots

* account for flex margin changes in img offset

* Change "Kibana" overview page text to "Analytics"

* update overview icon to match hp changes

* update snapshots

* center justify solutions and update snapshots

* update snapshots

* title case dev tools and stack management

* update text and snapshots

* fix merge error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 19:21:25 -04:00
Kevin Qualters 34eb8c6c46
Prevent unneeded re-renders of tgrid on opening alert flyout (#108781) 2021-08-16 19:05:13 -04:00
Oliver Gupte 678aa4a29f
[APM] Adds Observability Overview to global search results (#99017) (#108778) 2021-08-16 18:38:20 -04:00
Dominique Clarke 024eeed3c3
[Uptime] adjust RAC RBAC and index settings (#108200)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 14:01:01 -04:00
Kevin Qualters 1de67c7c80
Prevent observability table actions from ever wrapping (#108704) 2021-08-16 13:07:16 -04:00
Cauê Marcondes 512ab2d82f
[OBS] Editing navigation docs adding badge information (#108530)
* Adding badge description

* apm-new-badge_docs

* adding warning

* addressing PR comments

* changing i18n

* adjusting docs

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 12:44:45 -04:00
Kevin Qualters 0828788b66
[RAC][Security Solution][Observability] Add the add to new case and add to existing case actions to observability alerts table (#108502)
* [RAC][Security Solution][Observability] Add the add to new case and add to existing case actions to observability alerts table

* Remove fake data and make features work with observability data format

* Remove console.log and unused translations

* Remove commented out code

* Remove unneeded copy pasta id, create initializeStore function in timelines

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-15 13:27:28 -04:00
Cauê Marcondes 3b4dca1efb
[APM] Backends UI: Show "NEW" badge in the Observability solution nav for the new Backends view (#108397)
* adding badge to obs nav

* addressing PR comments

* refacroting
2021-08-13 06:38:54 -04:00
Katrin Freihofner 5876f8a4e1
changes investigate icon to eye icon (#108436) 2021-08-12 17:15:52 -04:00
Felix Stürmer 45b33ba806
[Observability] Remove outdated top_alerts route and related types (#107579)
* Remove outdated top_alerts route and related types

* Remove tests for deleted code

* Remove test for deleted API

* Remove reference to deleted type

* Remove unused translations

* Remove unused mock from story

* Remove no-op alerts page story for now

* Remove unsafe type assertions

* Factor out alert field type

* Compile kbn-io-ts-utils for the browser as well

* Avoid deep import which doesn't work cross-platform

* Revert "Avoid deep import which doesn't work cross-platform"

This reverts commit 492378c6b5.

* Revert "Compile kbn-io-ts-utils for the browser as well"

This reverts commit a1267b139d.

* Revert "Factor out alert field type"

This reverts commit def6987498.

* Revert "Remove unsafe type assertions"

This reverts commit c88d4cd005.

* Remove unsafe type assertions (again)
2021-08-12 22:22:21 +02:00
mgiota caaa76feab
[RAC] display timestamp value instead of triggered (#108029)
* [RAC] display timestamp value instead of triggered

* remove unused value

* fix imports

* fix imports

* Update x-pack/plugins/observability/public/pages/alerts/alerts_table_t_grid.tsx

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>

* add some explanations

* more explanations

* 108035: change relative time for timestamp to absolute

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-12 12:39:32 -04:00
mgiota 99e73c7960
[Observability RAC] Alerts page header updates (#108110)
* [RAC] remove gear icon from manage rules button

* change text

* Change to empty button

* remove unused translations

* change href const

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-12 12:47:11 +02:00
Marco Liberati dc2a1e1cea
[Lens] Introduce new layer types (#107791) 2021-08-12 08:29:31 +02:00
Tiago Costa dfaf54082a
chore(NA): moving @kbn/rule-data-utils to babel transpiler (#107573)
* chore(NA): moving @kbn/rule-data-utils to babel transpiler

* chore(NA): update imports

* chore(NA): targetted imports for apm

* chore(NA): fix imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 15:59:21 +01:00
Yara Tercero cec5d3f27a
[RAC] - Update field names (#107857)
### Summary
### Fields used moving forward
`kibana.alert.rule.consumer` will refer to the context in which a rule instance is created. Rules created in:
- stack --> `alerts`
- security solution --> `siem`
- apm --> `apm`

`kibana.alert.rule.producer` will refer to the plugin that registered a rule type. Rules registered in:
- stack --> `alerts`
- security solution --> `siem`
- apm --> `apm`

So an `apm.error_rate` rule created in stack will have:
- consumer: `alerts` and producer: `apm`
 An `apm.error_rate` rule created in apm will have:
- consumer: `apm` and producer: `apm`

`kibana.alert.rule.rule_type_id` will refer to a rule's rule type id. Examples:
- `apm.error_rate`
- `siem.signals`
- `siem.threshold`

Also renamed the following because `rule.*` fields are meant to be ecs fields pulled from the source/event document, not refer to our rule fields.
`rule.name` --> `kibana.alert.rule.name` will refer to the rule's name.

`rule.category` --> `kibana.alert.rule.category` will refer to the rule's category.

`rule.id` --> `kibana.alert.rule.uuid` will refer to the rule's uuid.
2021-08-11 06:25:46 -04:00
Dario Gieselaar b4a736c28f
[APM] Add telemetry to links into backend views (#107872) 2021-08-10 16:07:36 -04:00
Dominique Clarke 1649661ffd
[Observability][Exploratory View] revert exploratory view multi-series (#107647)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-10 11:52:49 -04:00