Commit graph

49755 commits

Author SHA1 Message Date
Nicolas Chaulet
7fba1feaf3
[Fleet] Remove output id from agent policy APIs (#123403) 2022-01-20 08:20:30 -05:00
Matthew Kime
946be82994
[data views] fix capabilities check (#122503)
* fix permissions check

* typescript fix

* update jest test

* Update workspace_panel.tsx

* Update workspace_panel.test.tsx

* first swing at functional test

* refactor permissions code

* type improvement

* make client side specific service

* cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-20 06:59:10 -06:00
Esteban Beltran
ab5741ff78
[Cases] Show toast when a case is updated from the cases list (#123357)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-20 05:03:05 -07:00
Dario Gieselaar
b44f82e918
[APM] Restrict aggregated tx metrics search to date range (#123445) 2022-01-20 08:54:20 -03:00
Angela Chuang
4282355fb6
Update indexNames for general threat match timeline (#123358)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-20 04:05:19 -07:00
Shahzad
0ccd842122
[Uptime] Test now mode while adding/editing monitors (#122642) 2022-01-20 11:17:58 +01:00
Christos Nasikas
829fdae9fa
[Cases] Total connectors metric (#123060)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-20 02:45:03 -07:00
Christos Nasikas
b3455bb8ef
[Cases] Show "removed comment" user action in the UI (#123352)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-20 11:02:58 +02:00
Matthias Wilhelm
5238ba835a
[Discover] Fix unmapped field document explorer rendering (#123174) 2022-01-20 09:01:56 +01:00
Maja Grubic
d9709d018d
[Discover] Introduce storybook (#122538)
* [Discover] Add error state if chart loading fails

* Reorder stuff around

* Remove file

* Fix error message a bit

* Update src/plugins/discover/public/application/main/components/chart/histogram.tsx

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>

* Add error handling

* Add a unit test

* [Discover] Add storybook

* Add VisualizeButtonInner

* Merge master

* Fix package.json

* Add Discover webpack to tsconfig.json

* Remove unnecessary file

* Fix storybook path

* Fix yarn.lock

* Revert yarn.lock to main

* Add buckets to details; fix css

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
2022-01-20 08:47:04 +01:00
Frank Hassanabad
91825b9a4d
Fixes comments from earlier PR (#123392)
## Summary

Adds comments to earlier PR:
https://github.com/elastic/kibana/pull/123332

In the tests for documentation.
2022-01-19 23:25:32 -07:00
vladpro25
df163c63f6
[Kibana][Dev Console][Autocomplete] Autocomplete missing comma on correct location (#121611)
* Fix autocomplete missing comma on the correct location

* Add a test case


Co-authored-by: Muhammad Ibragimov <muhammad.ibragimov@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-20 09:11:50 +05:00
Garrett Spong
d6917fcb8b
Fixes broken cypress test after ECS update to Rule Registry (#123429)
## Summary

New ECS FieldMap was generated in https://github.com/elastic/kibana/pull/123012, however since it only contained changes to `Rule Registry` code the `Security Solution` Cypress tests were not run, and thus did not catch this field change.

See https://github.com/elastic/kibana/pull/122661#discussion_r784412959 for details. Confirmed w/ @madirey that expected value is indeed `5` now that `host.geo.continent_code` has been [added](https://github.com/elastic/kibana/pull/123012/files#diff-a1647ccb73ef26c8c8b6aefd87084504b146af72fcb088ccacad93fcaad15b69R1524-R1528).


Some failing PR's from `main`:
https://github.com/elastic/kibana/pull/123357
https://github.com/elastic/kibana/pull/121644
https://github.com/elastic/kibana/pull/123352

### Checklist

Delete any items that are not applicable to this PR.

- [x] [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
2022-01-19 19:30:21 -07:00
Pablo Machado
b5c8464162
Host Risk score tab on Host details page (#122586)
* Create host risk tab

* Create host score over time chart

* Create Top risk score contributors table

* Fix Host risk score over time chart

* Add Dashboard and information buttons to host details page

* Update Top risk score contributors table to follow timerange filter

* Improve unit tests

* Hide risk tab from Hots detaisl when feature flag is disabled

* Add cypress test to host details risk tab

* Delete filterQuery option from Hostrisk SearchStrategy
2022-01-19 17:57:52 -07:00
Dominique Clarke
aaefbd22aa
[Uptime] Monitor management - fix breadcrumbs (#123240)
* uptime - monitor management - fix breadcrumbs

* add synthetics breadcrumbs tests

* fix types

* update i18n
2022-01-19 18:43:16 -05:00
Spencer
12e63dd469
[ftr] support filtering tests by es version (#123289)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 15:46:32 -07:00
Yuliia Naumenko
158a9a53a3
[Actions] Fixed ad-hoc actions tasks remain as "running" when they timeout by adding cancellation support (#120853)
* [Actions] Fixed ad-hoc actions tasks remain as "running" when they timeout by adding cancellation support

* fixed test

* fixed tests

* fixed test

* removed test data

* fixed typechecks

* fixed typechecks

* fixed typechecks

* fixed tests

* fixed typechecks

* fixed tests

* fixed typechecks

* fixed test

* fixed tests

* fixed tests

* changed unit tests

* fixed tests

* fixed jest tests

* fixed typechecks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 14:09:31 -08:00
Brian Seeders
70c2b8b98e
Move bazel remote cache token to a space that more employees have access to (#123402) 2022-01-19 13:40:07 -07:00
Stacey Gammon
2050262b51
remove reference to deprecated kibana.index setting (#123379) 2022-01-19 14:04:37 -05:00
Nathan Reese
bdb3ce465f
[maps] fetch geometry from fields API (#122431)
* [maps] fetch geometry from fields API

* tslint, eslint

* fix elasticsearch_geo_utils unit test

* more clean up of unit test

* i18n

* clean up

* eslint

* update functional test expects

* eslint

* remove unused turfCircle import

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 11:50:25 -07:00
Nicolas Chaulet
d7dbf15919
[Fleet] Validate package policy on create or update APIs (#123261) 2022-01-19 13:20:32 -05:00
Miriam
8dc2244321
Create flag for the infrastructure view (#123159)
* Create flag for the infrastructure view

* added keys to schema and types

* update telemetry schema

* Change in copy, import key to the apm-services-template

* fix import
2022-01-19 18:14:10 +00:00
Miriam
ec38f00bb1
[APM] Show rows per page option tables pagination (#122658)
* Add rows per page on tables

* Set page options and default size at shared ManagedTable component

* Fixed TransactionsTable, the rows option wasn’t working, use ManagedTable

* Fix i18n

* Make hidePerPageOptions false by default

* fix snapshot

* Improvements after PR review
2022-01-19 18:03:06 +00:00
Frank Hassanabad
d2a8bb90be
[Security Solution] Adds telemetry for legacy notifications and regular notifications at a finer grained level (#123332)
## Summary

Related and previous PR:
https://github.com/elastic/kibana/pull/122472

This removes the above structure from the PR above and instead opts to use a more finer grained level of telemetry. The new structure adds to each rule these four counters to the telemetry:

* legacy_notifications_enabled - The number of legacy notifications on rules that are enabled/active
* legacy_notifications_disabled - The number of legacy notifications on rules that are disabled/in-active
* notifications_enabled - The number of notifications on rules that are enabled/active
* notifications_disabled - The number of notifications on rules that are disabled/in-active

For pre-built rules you have these booleans:
* has_legacy_notification - True if the pre-built rule has a legacy notification attached, otherwise false.
* has_notification - True if the pre-built rule has a notification attached, otherwise false.

Note, both those booleans are `false` if the pre-built rule has no notifications attached and both can never be `true` together.

These will show up within each rule type like for example on a query rule it will look like:

```json
"detection_rule_usage": {
  "query": {
    "enabled": 2,
    "disabled": 1,
    "cases": 0,
    "legacy_notifications_enabled": 1, <-- New
    "legacy_notifications_disabled": 0, <-- New
    "notifications_enabled": 1, <-- New
    "notifications_disabled": 1 <-- New
}
```

Within the counts/total sections it will show up on both the `elastic` rules and the `custom` rules like so:

```json
"elastic_total": {
  "enabled": 0,
  "disabled": 0,
  "alerts": 0,
  "cases": 0,
  "legacy_notifications_enabled": 0, <-- New
  "legacy_notifications_disabled": 0, <-- New
  "notifications_enabled": 0, <-- New
  "notifications_disabled": 0 <-- New
},
"custom_total": {
  "enabled": 2,
  "disabled": 1,
  "alerts": 7218,
  "cases": 0,
  "legacy_notifications_enabled": 1, <-- New
  "legacy_notifications_disabled": 0, <-- New
  "notifications_enabled": 1, <-- New
  "notifications_disabled": 1 <-- New
}
```

For pre-built it will be:

```json
"detection_rule_detail": [
  {
    "rule_name": "Potential Evasion via Filter Manager",
    "rule_id": "06dceabf-adca-48af-ac79-ffdf4c3b1e9a",
    "rule_type": "eql",
    "rule_version": 8,
    "enabled": false,
    "elastic_rule": true,
    "created_on": "2022-01-19T01:29:25.540Z",
    "updated_on": "2022-01-19T01:29:25.540Z",
    "alert_count_daily": 0,
    "cases_count_total": 0,
    "has_legacy_notification": false, <-- New
    "has_notification": false <-- New
  },
```

Screen shot of it if you go to "Advanced settings -> cluster data":
<img width="802" alt="Screen Shot 2022-01-18 at 6 27 14 PM" src="https://user-images.githubusercontent.com/1151048/150046445-b1850b1c-bca6-41e0-b101-1bac5f67dbb3.png">

<img width="798" alt="Screen Shot 2022-01-18 at 6 30 33 PM" src="https://user-images.githubusercontent.com/1151048/150046808-1109a4c9-8a54-4da8-8b42-5f957a9d3ed5.png">

Follow the manual test instructions on https://github.com/elastic/kibana/pull/122472 for how to test this. The same manual testing applies here for seeing how these work out. You should be able to see a higher granularity with these stats.

### Checklist

- [ ] [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
2022-01-19 10:39:47 -07:00
Nicolas Chaulet
d40c0abe5b
[Fleet] Validate policy id when creating an enrollment token (#123298) 2022-01-19 11:10:36 -05:00
Anton Dosov
d84a5df7bd
Unskip search api tests (#123145) 2022-01-19 17:08:53 +01:00
Anton Dosov
20c31b2fce
fix getDefaultDataView overrides existing default data view (#123182) 2022-01-19 17:08:03 +01:00
Quynh Nguyen
57ce4373bc
[ML] Add warnings for actions for managed Anomaly detection jobs and Transforms (#122305)
* Add managed badge

* Add managed to module configs

* Fix message

* Add management to managed transforms

* Update texts

* Handle bool in custom settings table

* Change message

* Add modal/warnings for resetting and closing. Move start warning to modal.

* Not clone AD managed settings

* Not clone transform managed settings

* Fix translations

* Fix translations id

* Remove showEditJobConfirmModal

* Consolidate call out messages

* Consolidate call out messages

* Add tooltip message

* Add tooltip message

* Remove warning message for start transform

* Remove managed flag in route instead of in client

* Add message for delete in space permission

* Add remove managed setting during clone in route

* Add stopDatafeeds to declaration file

* Add call out when editing managed transform

* Delete attr instead of setting it to false

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 09:07:49 -07:00
Lucas F. da Costa
e02a1f70e1
[Uptime] Avoid duplicate requests when loading monitor steps (#121889) 2022-01-19 10:42:23 -05:00
Chris Roberson
1f6ea432d2
[ResponseOps] Store success, failure and success ratio on the rule saved object (#122716)
* Success and failure ratio

* New shape

* Fix these tests

* Ensure we apply this at creation time too, and update tests to account for it

* Find more places

* Update tests

* Add more tests

* Fix test

* Add 200 cap

* Add debugging

* Change order

* Remove debug and add clarifying comment

* Add client side tests

* Add timestamp

* Fix tests

* PR feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 10:29:02 -05:00
Yulia Čech
ef14e7ff01
[Upgrade Assistant] Fixed functional test failures on Cloud (#123260)
[Upgrade Assistant] Fixed functional test failures on Cloud

[Upgrade Assistant] Fixed functional test failures on Cloud

[Upgrade Assistant] Adding logging to debug

Revert "[Upgrade Assistant] Adding logging to debug"

This reverts commit 84e23083b2d4bb2ce48a397a13261393810d4d1e.

Revert "[Upgrade Assistant] Fixed functional test failures on Cloud"

This reverts commit 94f337f3912161a8a5d8903db607378ed86f4a7a.

[Upgrade Assistant] Skipping not backed up status on cloud

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 08:06:42 -07:00
Marco Liberati
4ce9221378
[Lens] Multi terms dnd support in Lens (#119841)
* start working on multi field terms

* fix filter builder

* fix other buket

* add tests

* make other filter behave nice

* clean up

*  first implemenetation draft

* 🏷️ Fix type issue

* 🐛 Fix circular dependency issue

* 🐛 Fix test warnings

* 📝 fix label

*  Test plan

* 🐛 quick fixes

* 🔧 Extend canvas mock to all test files as for now

* adjust tests

* 🐛 +  Add tests for multi terms and fix other bugs

* 🏷️ Fix type issue with latest main

* 🏷️ Fix test types

* 🏷️ Fix last type error

*  Add field input tests

* 🐛 +  Improved time shift handling for edge cases + tests

*  Complete test suites and fix multi terms filters

*  Fix tests after some refactoring

*  Add dnd support for multi terms

* 🐛 Fix dnd control key for new field

* Apply suggestions from code review

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* 👌 Limit the number of terms allowed

* 🐛 Allow truncation to be disabled as default by operation

*  Implement limited terms for dnd

* 💄 Fix field select width alignment

* 🏷️ Fix type issue

* 🐛 Fix filtering multi terms

* 👌 Fix issues based on feedback

* 🔧 Change default separator for multi terms formatter

* 👌 Integrated feedback

* 🐛 Fix dimension drop bug

* 🐛 fix multiple scenarios of merging

* 🐛 Fix a bug when same source field was used

* 🔊 Update announcements for combine

* 🐛 Fix incompatible drop action

* ♻️ Refactor truncation logic

* 🔧 Fix i18n check issue

* 🐛 Fix broken test

* 🐛 Fix merge bug

* 💄 Update icon

*  First batch of tests for new terms API

* 🐛 Fix control key issue with combine columns

*  Add more unit tests

*  Add combine keyboard test

* 🐛 fix scenario with partial overlap between columns

*  Add tests for partial columns case

* Update x-pack/plugins/lens/public/drag_drop/drag_drop.tsx

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

*  Skip keyboard dnd test + add more simulated tests

* 🔥 Remove flacky test

*  Add scripted fields check + more tests

* 🔥 remove skipped test

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
2022-01-19 15:52:24 +01:00
ymao1
d19a2f3d05
[Connectors] Checking for undefined config and secrets during connector validation (#122696)
* Checking for undefined config and secrets during connector validation

* Adding functional tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 09:45:19 -05:00
Jonathan Buttner
d1eb0df190
[ResponseOps][Cases] Set case alert attachment rule info to null (#123094)
* Setting rule info to null

* Renaming variables

* Addressing PR feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 09:27:26 -05:00
Miriam
3280400b74
Improve copy in update jobs callout (#123355)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 13:56:06 +00:00
Dmitry Tomashevich
8b40fc2054
[Discover] Fix saved search hidden chart can't be opened when returning to Discover (#122745)
* [Discover] fix hide chart

* [Discover] fix unit test

* [Discover] fix state persistence on stateContainer updates

* [Discover] fix functional tests

* [Discover] add functional test

* [Discover] apply suggestions

* [Discover] return unnecessary code position change

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 14:58:57 +03:00
renovate[bot]
e9c0fcd025
Update dependency elastic-apm-node to ^3.27.0 (#123322)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-19 12:29:21 +01:00
David Sánchez
3514fa667a
Update text button changes (#123170) 2022-01-19 11:03:44 +01:00
Lisa Cawley
de7d48a55f
Update ML URLs in doc link service (#123328) 2022-01-19 09:21:06 +00:00
Dima Arnautov
0e112dfbcf
[ML] Standardize Add embeddable flow from the Anomaly Explorer page (#123199)
* wip: remove add to dashboard, add table action, replace url generator with locator

* add swim lane embeddable

* get embeddable input

* update functional tests

* clean up DashboardService

* remove unused i18n

* remove console statement
2022-01-19 10:12:06 +01:00
Devin W. Hurley
51ac9a0c89
[Security Solution] [Platform] updates rule indices to include indices from the enriched alert data (#123324)
* updates rule indices to include indices from the enriched alert data

* quick fix for type failure

* rely on functions, not types
2022-01-18 19:51:03 -07:00
Ryland Herrick
8737691bce
[RAC][Rule Registry] Generate ECS fieldmap from ECS 8.0 (#123012)
* Generate ECS fieldmap from ECS 8.0

This is the result of running the generate_ecs_fieldmap script against
ECS' 8.0 branch.

* Account for scaling_factor property from ECS

This is a required field for e.g. scaled_float fields, so we need to
reflect its value in our field map.

* Remove unused, unset property from FieldMap

It does not appear that this value was ever being set, nor does this
value appear in ECS' flat output, so I'm removing it for now to keep our
types as accurate as possible.

* Add path back to FieldMap definition

This is a required field for type: alias fields.

* Try upping the fields limit on our ECS component template

This now exceeds the default of 1000.

* Bump our field limit a bit more

Apparently 1300 wasn't enough, either.

* Fix type error

Makes this field optional, since the technical component template
doesn't currently use it.

* Bump the field limit of our composed template

Including the newest ECS fields, this index now exceeds 1600 fields.
This value should probably be derived from the composed template's
limits, but for now this allows the template to be created.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-18 19:47:44 -06:00
Steph Milovic
3b28f55ddb
[Security Solution] Newsfeed Url bugfix (#123283) 2022-01-18 17:11:36 -07:00
Devin W. Hurley
467d111566
[Security Solution] [Platform] Return additional errors during import rule + action migration process (#123088)
* exposes additional errors when ES failures occur during the swap of old, pre-8.0 action ids with the new migrated action SO ids. Ref: https://github.com/elastic/kibana/pull/120975#discussion_r778449187 for more information

* fix test error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-18 18:19:43 -05:00
Yara Tercero
b2c9f10691
[Security Solution][Exceptions] Fix export toast text (#123307)
### Summary

Fix bug on rule export where toaster reports export total as being rule objects + exceptions objects, but should just be rule objects total. Adds cypress test.
2022-01-18 15:18:31 -08:00
Dominique Clarke
5e71b39a1d
uptime - update synthetics tests kibana config (#123311) 2022-01-18 18:05:38 -05:00
Kristof C
91a35c20ce
Fix success message to show correct language based on timelin… (#123258)
* Fix success message to show correct language based on timeline type

* Fix translation problems

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
2022-01-18 15:49:59 -07:00
Marshall Main
886ad6fdaf
[Security Solution] Add aliases, fix types, remove extra fields (#122880)
* Add aliases, fix types, remove extra fields

* Update aliases version and update tests

* Update aliases version test

* Remove dangling references to fields

* Update test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-18 17:31:14 -05:00
Pete Hampton
4d98af824f
Fix issue with parsing out endpoint package policy. (#123287)
* Fix issue with parsing out endpoint package policy.

* revert schedule.
2022-01-18 15:04:51 -07:00
Chris Cowan
8e6ec25a51
[Metrics UI] Increase composite size to 10K for Metric Threshold Rule and optimize processing (#121904)
* [Metrics UI] Increase composite size for Metric Threshold Rule to 10K

* Adding performance optimizations

* Fixing metrics_alerting integration test

* fixing tests

* Fixing integration test and config mock

* Removing the setTimeout code to simplify to a for/of

* Adding new setting to docs

* Adding metric_threshold identifier to the config setting
2022-01-18 14:36:03 -07:00