Commit graph

3470 commits

Author SHA1 Message Date
Anton Dosov 92af812c82
[Search Sessions] Display time labels in search session popover (#95082) 2021-03-29 17:45:08 +02:00
James Gowdy 478ad3bad5
[Fleet] Adding ML module asset type (#94950)
* [Fleet] Adding ML module asset type

* adding test

* guessing asset ids

* better guess at IDs

* renaming asset ids

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 16:21:49 +01:00
Uladzislau Lasitsa 0e40b94348
[TSVB] Change the default mode from last value to entire timerange (#93608)
* Make 'enter time range' value as default and add telemetry for 'last value' mode

* Fix telemetry schema

* Fix test

* Add possibility count timeseries created from dashboard

* Fix remark

* Fix remark

* Fix problem with time_range_mode

* Fix tests

* Fix tests

* Fix tests for markdown and table

* exclude TSVB which have type as timeseries

* Add description for field in schema in telemetry

* Fix telemetry schema

* Fix some remarks

* Added check for hits

* fix CI

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-03-29 17:31:01 +03:00
Georgii Gorbachev d16101f377
[Event Log] Extend ECS event schema with fields needed for Detection Engine (#95067)
**Related to:** https://github.com/elastic/kibana/pull/94143

## Summary

This PR adds new fields to the schema (`EventSchema`, `IEvent`):

- standard ECS fields: `error.*`, `event.*`, `log.level`, `log.logger`, `rule.*`
- custom field set `kibana.detection_engine`

We need these fields on the Detections side to implement detection rule execution log. See the related proposal (https://github.com/elastic/kibana/pull/94143) for more details.

Also, this PR bumps ECS used in Event Log from `1.6.0` to the current `1.8.0` version. They are 100% same in terms of fields used in Event Log, so no changes in the schema were caused by this version increment.
2021-03-29 14:59:36 +02:00
Tiago Costa cf8ebe619b
skip flaky suite (#92358) 2021-03-29 13:11:33 +01:00
Marta Bondyra 755c186c28
[Lens] Multiple drop targets (#93616) 2021-03-29 14:07:39 +02:00
Tiago Costa a10e3d4f2b
skip flaky suite (#91450) 2021-03-29 13:05:33 +01:00
Alexey Antonov 4342f26eaf
[TSVB] Enable dual mode, support index patterns and strings (#92812)
* [TSVB] Enable `dual mode`, support index patterns and strings

* modify UI

* add migration script

* refactoring

* fix CI

* prefill the index pattern name

* modify UI

* modify UI

* update UI

* fix functional test

* some work

* remove callouts

* fix rollup test

* update UI

* fix typo

* add some unit tests

* add functional test

* fix CI

* correct labels

* fix ci group 12

* cleanup interface

* fix CI

* cleanup API

* fix some of PR comments

* move index patterns into so references

* remove wrong logic

* fix JEST

* fix some ui issues

* update sample data

* indexPatternObject -> indexPatternValue

* fix comments

* I have a dashboard with two TSVB viz. One with the default (haven't applied it to the combobox) and one with the logs. The filter contains fields only from the logs index pattern

* When I am on the string mode and try to write my index, sometimes some of the chars are not added or they are deleted while typing, something with the denounce maybe?

* fix merge conflicts

* Does this PR also supports runtime fields? I created one from the editor and I see that I can select it

* fix UI issue

* If I create a viz with the string mode and a wildcard e.g. kibana_sample*, the index patterns are not communicated correctly to the dashboard.

* fix import/export refs for dashboard

* remove MigrationPopover

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 04:32:01 -04:00
Søren Louv-Jansen 84adfe551b
[APM] Add elasticsearch queries to api response (#95146) 2021-03-29 07:50:27 +02:00
liza-mae b7d8ada65a
Fix reporting test (#95586) 2021-03-26 16:33:29 -06:00
Brian Seeders b95e5a996a skip failing suite blocking ES promotion (#95594) 2021-03-26 17:46:20 -04:00
Brian Seeders 1362561a03 skip flaky suite (#95592) 2021-03-26 17:40:01 -04:00
John Schulz 7f15931725
[Fleet] /bulk_unenroll response matches other bulk action APIs (#95571)
## Summary
`/agents/bulk_unenroll` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object. https://github.com/elastic/kibana/issues/90437


[TS type diff for response](dd34e4c5ef/x-pack/plugins/fleet/common/types/rest_spec/agent.ts (L124-L130))

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUnenrollResponse {}
+ export type PostBulkAgentUnenrollResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

### Checklist

- [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
2021-03-26 17:36:39 -04:00
Brian Seeders 173731b342 skip flaky suite (#95590) 2021-03-26 17:23:12 -04:00
Candace Park 4ff9bfd113
[Security Solution][Endpoint][Admin] Match endpoint list host status with fleet agent status (#95243) 2021-03-26 16:17:12 -04:00
Aaron Caldwell d89ede9834
[Maps] Add drawing index data endpoint (#94728) 2021-03-26 14:29:16 -04:00
Quynh Nguyen 95e308a473
[ML] Add Anomaly Explorer charts embeddable (#94396) 2021-03-26 13:10:19 -05:00
Aleh Zasypkin 796f679e92
Migrate away from legacyEs service in tests. (#95402) 2021-03-26 18:49:19 +01:00
Anton Dosov ce6641bac1
[Search Sessions] Rename search sessions functional tests. Remove wip mention (#95330) 2021-03-26 18:08:46 +01:00
John Schulz ab33df898a
[Fleet] Bulk upgrade api response change (#95236)
## Summary
`/agents/bulk_upgrade` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object.

This PR includes commits from open PR https://github.com/elastic/kibana/pull/95024. The additions from this PR are https://github.com/jfsiii/kibana/compare/bulk-reassign-response-should-include-all-given-agents..871ebcb

[TS type diff for response](https://github.com/jfsiii/kibana/compare/bulk-reassign-response-should-include-all-given-agents..871ebcb#diff-7006a6c170a608c8c7211fc218c0a6f4bc8ff642c170ea264db4b1b5545fb728)

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUpgradeResponse {}

+ export type PostBulkAgentUpgradeResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

### Checklist

- [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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 11:40:38 -05:00
Dima Arnautov 924724cf0b
[ML] Replace legacy es client in Transform API service for functional tests 2021-03-26 12:09:11 -04:00
renovate[bot] 33e213cb2b
Update dependency @elastic/charts to v26 (master) (#95184)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2021-03-26 16:30:10 +01:00
Shahzad b1525f0af7
[Lens] Allow modifying curve type for line/area series charts (#94675) 2021-03-26 16:23:41 +01:00
Larry Gregory dbd4b2bac8
Unskip flaky spaces tests (#95207)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 15:08:56 +01:00
Matthew Kime ae4dae46d9
Index pattern field editor - Add warning and type 'confirm' on delete or save (#95237)
* add runtime field change/delete confirm dialog
2021-03-26 09:03:13 -05:00
Cauê Marcondes 33b81b115c
[APM] Split All instances API adding a new API to return comparison statistics (#94767)
* adding comparison to instances table

* fixing tests

* adding api tests

* removing unnecessary files

* fixing ts issue

* fixing ts issue

* refactoring

* refactoring

* refactoring

* refactoring

* refactoring

* addressing PR comments

* addressing PR comments
2021-03-26 09:14:03 -04:00
Jonathan Buttner f4526ad88c
[Cases] Fix _find API total bug (#95235)
* Cherry-picking 7.12 find total fix

* Starting fix for total bug in master with new field

* Adding feature flag for sub cases

* Disabling case as a connector in security solution

* Adding additional tests for pagination

* Removing other api integration tests

* Fixing up problems from merge

* Fixing sub case tests and type errors

* Renaming comment tag for case connector
2021-03-26 08:46:07 -04:00
Marco Liberati 243a7f9b2b
[Lens] Rename operations to map exposed names for Formula (#94710)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 11:54:42 +01:00
Lukas Olson a10c4188b7
Re-enable skipped test (discover with async scripted fields) (#94653)
* Re-enable skipped test

* remove comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 12:24:36 -07:00
Ece Özalp d70d02ee83
Add a11y test coverage to Rule Creation Flow for Detections tab (#94377)
[Security Solution] Add a11y test coverage to Detections rule creation flow (#80060)
2021-03-25 15:05:23 -04:00
Nathan Reese c5e3e78de8
[Maps] do not track total hits for elasticsearch search requests (#91754)
* [Maps] do not track total hits for elasticsearch search requests

* set track_total_hits for es_search_source tooltip fetch

* tslint

* searchSource doc updates, set track_total_hits in MVT requests

* revert changes made to searchsourcefields docs

* tslint

* review feedback

* tslint

* remove Hits (Total) from functional tests

* remove sleep in functional test

* tslint

* fix method name

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 13:00:16 -06:00
Kerry Gallagher 6b6404954e
[Logs / Metrics UI] Separate logs / metrics source configuration awareness (#95334)
* Remove metrics awareness of logs fields
2021-03-25 18:59:18 +00:00
MadameSheema 6a571486fc
[Security Solution][Detections] Improves indicator match Cypress tests (#94913)
* updates the data used in the test

* adds matches test

* adds enrichment test

* improves speed and adds missing files

* fixes type check issue

* adds 'data-test-subj' for the json view tab

* refactor

* fixes typecheck issue

* updates tests with latest master changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-25 19:25:49 +01:00
Jonathan Budzenski 02fce98254 skip flaky test. #89389 2021-03-25 12:51:05 -05:00
Jonathan Buttner 07f32d03b3
[Cases] Adding feature flag for sub cases (#95122)
* Adding feature flag for sub cases

* Disabling case as a connector in security solution

* Fix connector test

* Switching feature flag to global variable

* Removing this.config use

* Fixing circular import and renaming flag
2021-03-25 13:36:25 -04:00
Nathan Reese 373a108cfe
[Maps] upgrade server to use new elasticsearch-js client (#95314)
* [Maps] upgrade server to use new elasticsearch-js client

* update functional test expect
2021-03-25 10:06:56 -06:00
igoristic 80e53d5fe6
[Monitoring] Remove license check for alerting (#94874)
* Removed license check for alerting

* Fixed tests and CR feedback

* Fixed test
2021-03-25 09:02:51 -04:00
Tomas Della Vedova 238791b942
ES client : use the new type definitions (#83808)
* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <github.com@jfsiii.org>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2021-03-25 04:47:16 -04:00
Shahzad b88f02ffb4
[Uptime] unskip overview test (#95290) 2021-03-25 09:05:26 +01:00
Matthias Wilhelm 2da269fe93
[Discover][EuiDataGrid] Fix generating reports (#93748) 2021-03-24 20:09:11 +01:00
Sonja Krause-Harder 2e5b5debb5
[Fleet] Add force option to DELETE package endpoint. (#95051)
* Add force option to DELETE package endpoint.

* Add integration test.

* Adjust openapi spec.

* Run EPM tests before fleet setup tests.

* Run package delete tests first in EPM tests
2021-03-24 17:04:49 +01:00
Nathan L Smith de3a7d6f0d
Use es instead of legacyEs in APM API integration test (#95303)
References #83910.
2021-03-24 10:45:51 -05:00
John Schulz 3639aa4422
[Fleet] Bulk reassign response should include all given ids (#95024)
## Summary
`/agents/bulk_reassign` should return a response with a result for each agent given; including invalid or missing ids. It currently filters out missing or invalid before updating. This PR leaves them in and includes their error results in the response. 

[Added/updated tests](https://github.com/elastic/kibana/pull/95024/files#diff-7ec94bee3e2bae79e5d98b8c17c17b26fad14736143ffa144f3e035773d4cad1R113-R128) to confirm

### Checklist
- [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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 11:44:22 -04:00
Anton Dosov 1527ab510b
[Search Sessions] Improve search session name edit test (#95152) 2021-03-24 16:01:52 +01:00
Dima Arnautov edaa64f150
[ML] Functional tests for Anomaly swim lane (#94723)
* [ML] update @elastic/charts

* [ML] swim lane service, axes tests

* [ML] check single cell selection and current URL

* [ML] clear selection

* [ML] assert anomaly explorer charts

* [ML] fix unit test

* [ML] assert anomalies table and top influencers list

* [ML] update apiDoc version

* [ML] exclude host from the URL assertion

* [ML] clicks view by swim lane

* [ML] fix method for cell selection

* [ML] brush action tests

* [ML] use debug state flag

* [ML] declare window interface

* [ML] pagination tests

* [ML] enable test

* [ML] scroll into view for swim lane actions

* [ML] rename URL assertion method

* [ML] fix assertion for charts count

* [ML] extend assertion

* [ML] refactor test subjects selection

* [ML] fix assertSelection

* [ML] reduce timeout for charts assertion
2021-03-24 10:38:58 -04:00
Tiago Costa 017a2b8413
skip flaky suite (#94535) 2021-03-24 13:46:38 +00:00
Joe Reuter c218ce292a
[Lens] Add ability to remove runtime field (#94949) 2021-03-24 11:47:56 +01:00
James Gowdy fdda564a84
[ML] Adding additional runtime mapping checks (#94760)
* [ML] Adding additional runtime mapping checks

* adding functional test for datafeed preview

* renaming findFieldsInAgg

* updating query check

* always use runtime mappings if present in agg field exists check

* changes based on review

* updating tests based on review

* fixing permission check on endpoint and test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-24 10:29:46 +00:00
Aleh Zasypkin 3f3cc8ee35
Expose session invalidation API. (#92376) 2021-03-24 09:54:08 +01:00
Jen Huang d886979e3b
[Fleet] Remove upgradePackage and consolidate it with installPackage, optimize calls to create index patterns (#94490)
* Add data plugin to server app context

* First attempt at switching to indexPatternService for EPM index pattern creation & deletion, instead of interacting directly with index pattern SOs

* Simplify bulk install package, remove upgradePackage() method in favor of consolidating with installPackage(), use installPackage() for bulk install instead

* Update tests

* Change cache logging of objects to trace level

* Install index patterns as a post-package installation operation, for bulk package installation, install index pattern only if one or more packages are actually new installs, add debug logging

* Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true

* Allow `getFieldsForWildcard` to return fields saved on index pattern when allowNoIndices is true

* Bring back passing custom ID for index pattern SO

* Fix tests

* Revert "Merge branch 'index-pattern/allow-no-index' into epm/missing-index-patterns"

This reverts commit 8e712e9c00, reversing
changes made to af0fb0eaa8.

* Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true

(cherry picked from commit 69b93da180)

* Update API docs

* Run post-install ops for install by upload too

* Remove allowedInstallTypes param

* Adjust force install conditions

* Revert "Update API docs"

This reverts commit b9770fdc56.

* Revert "Allow getAsSavedObjectBody to return non-scripted fields when allowNoIndex is true"

This reverts commit afc91ce32f.

* Go back to using SO client for index patterns :(

* Stringify attributes again for SO client saving

* Fix condition for reinstall same pkg version

* Remove unused type

* Adjust comment

* Update snapshot

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 11:34:20 -07:00