* 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>
* [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>
* 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>
* 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
* [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>
* 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
* 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
## 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
* 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>
[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>
* 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>
* 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>
* 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>
### 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.
* Fix success message to show correct language based on timeline type
* Fix translation problems
Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
* 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>
* [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