Commit graph

42 commits

Author SHA1 Message Date
Thomas Watson 777c80d8a0
Upgrade to hapi version 20 (#85406) (#86592) 2020-12-20 10:20:57 +01:00
Thom Heymann 9ef4d22cf3
ECS audit events for alerting (#84113) (#85093)
* ECS audit events for alerts plugin

* added api changes

* fixed linting and testing errors

* fix test

* Fixed linting errors after prettier update

* Revert "Allow predefined ids for encrypted saved objects (#83482)"

This reverts commit 7d929fe903.

* Added suggestions from code review

* Fixed unit tests

* Added suggestions from code review

* Changed names of alert events

* Changed naming as suggested in code review

* Added suggestions from PR

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-05 12:05:46 +00:00
Joe Reuter d3b0cfdc17
[Lens] Migrate legacy es client and remove total hits as int (#84340) (#84869) 2020-12-03 12:27:19 +01:00
Joe Reuter 4eb6f4ecc0
[Lens] Use index pattern through service instead of reading saved object (#84432) (#84737) 2020-12-02 11:31:48 +01:00
Mikhail Shustov de6090c87b
[7.x] [DX] Prettier v2.2 (#83899) (#84114)
* [DX] Prettier v2.2 (#83899)

* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
# Conflicts:
#	x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx
#	x-pack/plugins/upgrade_assistant/server/lib/telemetry/usage_collector.ts

* fix add removed property
2020-11-23 21:24:39 +01:00
Nathan L Smith fabfc546b0
Move Elasticsearch type definitions out of APM (#83081) (#83229)
...and into x-pack.

Also remove `PromiseReturnType` from APM and use the copy in observability everywhere.

All of the additional changes to APM imports are just automatic sorting.

This makes doing #77720 a little easier and removes some implicit circular dependencies for #80508.

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
# Conflicts:
#	x-pack/plugins/apm/public/utils/testHelpers.tsx
2020-11-11 22:32:56 -06:00
Wylie Conlon afae7fb618
[Lens] Use entire layers, not specific columns (#82550) (#83088)
* [Lens] Use entire layers, not specific columns

* Fix types

* Move all of state_helpers over

* Fix tests

* Fix crash and add tests to prevent future issues

* Prevent users from dropping duplicate fields

* Respond to review feedback

* Fix review feedback

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-10 17:25:58 -05:00
Thomas Watson df4f66b4ac
[7.x] Upgrade to hapi version 18 (#80468) (#82265) 2020-11-02 15:49:43 +01:00
Joe Reuter d16d005582
Log reason for 404 in field existence check (#81315) (#81743) 2020-10-28 10:11:37 +01:00
Gidi Meir Morris 831dbf9068
[Task Manager] Cleans up legacy plugin structure (#80381) (#81139)
This PR addresses a list of legacy code debt the plugin has incurred over the past year due to extensive changes in its internals and the adoption of the Kibana Platform.

It includes:
1. The `TaskManager` class has been split into several independent components: `TaskTypeDictionary`,  `TaskPollingLifecycle`,  `TaskScheduling`,  `Middleware`. This has made it easier to understand the roles of the different parts and makes it easier to plug them into the observability work.
2. The exposed `mocks` have been corrected to correctly express the Kibana Platform api
3. The lifecycle has been corrected to remove the need for  intermediary streames/promises which we're needed when we first introduced the `setup`/`start` lifecycle to support legacy.
4. The Logger mocks have been replaced with the platform's `coreMocks` implementation
5. The integration tests now test the plugin's actual public api (instead of the internals).
6. The Legacy Elasticsearch client has been replaced with the typed client in response to the deprecation notice.
7. Typing has been narrowed to prevent the `type` field from conflicting with the key in the `TaskDictionary`. This could have caused the displayed `type` on a task to differ from the `type` used in the Dictionary itself (this broke a test during refactoring and could have caused a bug in production code if left).
2020-10-20 15:56:49 +01:00
Wylie Conlon 2ee141508a
[7.x] [Lens] Show runtime fields in field list and improve performance (#79167) (#79340)
* [Lens] Show runtime fields in field list and improve performance (#79167)

* [Lens] Simplify request to determine existing fields

* Remove duplicate values
# Conflicts:
#	x-pack/test/api_integration/apis/lens/existing_fields.ts

* Fix merge issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 13:59:32 -04:00
Alejandro Fernández Haro dc658d6f4e
[7.x] [Task names in TaskManager] Rename "telemetry" to "usage" (#78129) (#79069)
* [Task names in TaskManager] Rename "telemetry" to "usage"

* Revert task IDs but leaving renamed titles

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 10:54:23 +01:00
Alejandro Fernández Haro b910b84718
[7.x] [Loggers] Rename "telemetry" to "usage" (#78130) (#79068)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 10:54:12 +01:00
Wylie Conlon ba9a18b4b8
[Lens] Stop using scripted metric to collect telemetry (#78687) (#78995) 2020-09-30 14:39:05 -04:00
Alejandro Fernández Haro 0b62537f2f
[7.x] [Usage Collection] [schema] lens (#77929) (#78401)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-24 14:05:08 +01:00
Joe Reuter 6a3ba80309
[7.x] [Lens] show meta field data in Lens (#77210) (#78388) 2020-09-24 13:35:33 +02:00
Alejandro Fernández Haro d02d08a4ba
[7.x] [Lens] Rename "telemetry" to "stats" (#78125) (#78275) 2020-09-23 15:42:18 +01:00
Wylie Conlon 78e2ed1ac7
[Lens] Show field stats for IP fields and scripted fields (#76457) (#76987)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-08 19:14:39 -04:00
Joe Reuter 4dde848aac
[Lens] Register saved object references (#74523) (#75668) 2020-08-21 20:14:53 +02:00
Tim Roes 5cb778c682
Disable indexing of unnecessary Saved Object fields (#70409) (#72409)
* Disable indexing of unnecessary SO fields

* Add doc_values

* Add no doc_values to discover saved object

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-20 15:00:11 +02:00
Pierre Gayvallet ecd2082e73
[7.x] Move and rename legacy elasticsearch client (#69797) (#70221)
* Move and rename legacy elasticsearch client (#69797)

* move last snapshot to inline

* move legacy files to legacy subfolder

* move request types out of legacy

* export Headers from http instead of elasticsearch

* renaming - first pass

* renaming - second pass

* fix core mocks

* adapt new calls

* update generated doc

* fix IT test mocks

* fix new usages
# Conflicts:
#	src/core/server/saved_objects/service/lib/repository.ts
#	x-pack/plugins/event_log/server/es/context.test.ts
#	x-pack/plugins/oss_telemetry/server/test_utils/index.ts
#	x-pack/plugins/upgrade_assistant/server/lib/es_migration_apis.ts

* fix usages
2020-06-29 23:24:04 +02:00
Wylie Conlon 58fee6c5c2
[Lens] Fix cross cluster bug and optimize existence query (#70132) (#70237)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 15:48:43 -04:00
Joe Reuter 524e0d1d81
[Lens] Add description property and check duplicate title on save (#68219) (#68788) 2020-06-10 20:59:05 +02:00
Joe Reuter db5a7ea551
Fix visualize and lens telemetry (#67749) (#67828) 2020-05-31 21:47:03 +02:00
Mikhail Shustov 42ae0b9031
[7.x] Mark elasticsearch client exposed via request context as deprecated (#67319) (#67576)
* Mark elasticsearch client exposed via request context as deprecated (#67319)

* add legacy prefix for es client exposed via request handler context

* update src/plugins

* update core mocks and tests

* update test plugins

* update xpack plugins

* include x-pack/mocks.ts

* update after master merge

* update docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/index_management/server/routes/api/templates/register_create_route.ts
#	x-pack/plugins/upgrade_assistant/server/routes/cluster_checkup.ts

* fix upgrade assistant tests
2020-05-28 14:02:01 +02:00
restrry 2fefd60e90 update code style 2020-05-22 10:35:02 +02:00
Joe Reuter ef2c5ef761
Switch to core application service (#63443) (#66353) 2020-05-13 11:34:57 +02:00
Wylie Conlon 159d49ed4f
[Lens] Type safe migrations (#65576) (#65766)
* [Lens] Type safe migrations

* Commit API changes

* Remove optional chaining for required properties

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 18:10:22 -04:00
Wylie Conlon 643cabe781
[7.x] [Lens] Bind all time fields to the time picker (#63874) (#64857)
* [Lens] Bind all time fields to the time picker (#63874)

* Bind non primary time fields to timepicker

* Fix typescript argument types

* Allow auto interval on all fields

* Remove lens_auto_date function

* Fix existing jest tests and add test todos

* Remove lens_auto_date from esarchives

* Add TimeBuckets jest tests

* Fix typo in esarchiver

* Address review feedback

* Make code a bit better readable

* Fix default time field retrieval

* Fix TS errors

* Add esaggs interpreter tests

* Change public API doc of data plugin

* Add toExpression tests for index pattern datasource

* Add migration stub

* Add full migration

* Fix naming inconsistency in esaggs

* Fix naming issue

* Revert archives to un-migrated version

* Ignore expressions that are already migrated

* test: remove extra spaces and  timeField=\\"products.created_on\\"} to timeField=\"products.created_on\"}

* Rename all timeField -> timeFields

* Combine duplicate functions

* Fix boolean error and add test for it

* Commit API changes

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>

* fix: fix migration

* types fix

Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
2020-04-30 13:47:03 -04:00
Pierre Gayvallet 361e7618ec
add generic typings for SavedObjectMigrationFn (#63943) (#64874)
* add generic typings for SavedObjectMigrationFn

* change default attributes type to unknown

* update generated doc

* adapt new calls

* update generated doc

* update migration example

* fix merge conflicts
2020-04-30 16:06:17 +02:00
Rudolf Meijering 069d347929
[7.x] Refactor Plugins to access elasticsearch from CoreStart (#59915) (#64329)
* Refactor Plugins to access elasticsearch from CoreStart (#59915)

* x-pack/watcher: use Elasticsearch from CoreStart

* x-pack/upgrade_assistant: use Elasticsearch from CoreStart

* x-pack/actions: use Elasticsearch from CoreStart

* x-pack/alerting: use Elasticsearch from CoreStart

* x-pack/lens: use Elasticsearch from CoreStart

* expressions: use Elasticsearch from CoreStart

* x-pack/remote_clusters: remove unused Elasticsearch dependency on CoreSetup

* x-pack/oss_telemetry: use Elasticsearch from CoreStart

* Cleanup after #59886

* x-pack/watcher: create custom client only once

* Revert "x-pack/watcher: create custom client only once"

This reverts commit 78fc4d2e93.

* Revert "x-pack/watcher: use Elasticsearch from CoreStart"

This reverts commit b621af9388.

* x-pack/task_manager: use Elasticsearch from CoreStart

* x-pack/event_log: use Elasticsearch from CoreStart

* x-pack/alerting: use Elasticsearch from CoreStart

* x-pack/apm: use Elasticsearch from CoreStart

* x-pack/actions: use Elasticsearch from CoreStart

* PR Feedback

* APM review nits

* Remove unused variable

* Remove unused variable

* x-pack/apm: better typesafety

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Fix event log tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-24 13:52:28 +02:00
Wylie Conlon 488e12fa53
[Lens] Fix existence for dotted paths in _source (#63752) (#63893) 2020-04-17 16:19:25 -04:00
Wylie Conlon c5fc56c750
Fix task manager cancel warning (#63756) (#63872)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 16:19:09 -04:00
Joe Portner f6cb14ad1a
[7.x] Refactor SO types to use namespaceType (#63217) (#63745)
Remove `namespaceAgnostic` field that was deprecated in #54605,
use `namespaceType` instead.
2020-04-16 19:11:43 -04:00
Tim Roes df163260d2
Move Lens frontend to Kibana Platform (#62965) (#63562)
* Move Lens frontend to Kibana platform

* Fix line breaks

* Fix jest tests

* Fix remaining test

* Remove old Lens plugin entry

* Fix i18n prefix

* Add config schema

* Address review
2020-04-15 14:41:16 +02:00
Wylie Conlon 742074287c
[Lens] Migration from 7.7 (#62879) (#63469)
* [Lens] Migration from 7.7

* Fix types

* Fix types in test

* Add docs

* Commit forgotten file

* Remove extra types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-14 13:12:23 -04:00
Tim Roes c18c5dbffd
Move lens saved object setup to Kibana platform (#61157) (#61306) 2020-03-26 08:48:20 +01:00
Larry Gregory 489d112f77
[7.x] Allow kbn-config-schema to ignore unknown keys (#59560) (#60407)
* allow kbn-config-schema to ignore unknown keys

* Consolidate unknown key configuration

* updates following merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 14:23:25 -04:00
Marta Bondyra e84ac45171
[7.x] [Lens] Adds using queries/filters for field existence en… (#59984)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-12 15:00:31 +01:00
Mikhail Shustov fc6674ad1e
force savedObject API consumers to define SO type explicitly (#58022) (#58281)
* force savedObject consumers to define type explicitly

* address comments

* regen docs
2020-02-22 07:36:20 +01:00
Tim Roes 981f53c52e
[Lens] Make field stats work for index patterns without time fields (#56759) (#56963)
* Fix field stats not loaded without time field

* Add integration test for API

* Add unit test for API call

* Correct typo in comment
2020-02-06 15:58:42 +01:00
Joe Reuter 6d23969bfb
Move lens server to new platform (#56474) (#56888) 2020-02-06 09:22:06 +01:00