Commit graph

41 commits

Author SHA1 Message Date
Joe Reuter 9041ea5478
[Lens] Migrate legacy es client and remove total hits as int (#84340) 2020-12-03 09:41:45 +01:00
Joe Reuter 44c436b8ad
[Lens] Use index pattern through service instead of reading saved object (#84432) 2020-12-02 09:42:42 +01:00
Mikhail Shustov 95861a0fb0
[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
2020-11-23 13:17:05 +01:00
Nathan L Smith bc2da67608
Move Elasticsearch type definitions out of APM (#83081)
...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>
2020-11-11 16:23:34 -06:00
Wylie Conlon ccb0b35452
[Lens] Use entire layers, not specific columns (#82550)
* [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>
2020-11-10 13:45:46 -05:00
Thomas Watson 700225061a
Upgrade to hapi version 18 (#80468) 2020-11-02 13:18:00 +01:00
Joe Reuter 2dcfe2a99f
Log reason for 404 in field existence check (#81315) 2020-10-27 11:43:42 +01:00
Gidi Meir Morris 5460ad741c
[Task Manager] Cleans up legacy plugin structure (#80381)
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 13:00:13 +01:00
Wylie Conlon 374ccfd66f
[Lens] Show runtime fields in field list and improve performance (#79167)
* [Lens] Simplify request to determine existing fields

* Remove duplicate values
2020-10-02 14:18:01 -04:00
Alejandro Fernández Haro 65cf6393c7
[Task names in TaskManager] Rename "telemetry" to "usage" (#78129)
* [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>
2020-10-01 08:26:14 +01:00
Alejandro Fernández Haro 9fdb23769b
[Loggers] Rename "telemetry" to "usage" (#78130)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 08:25:05 +01:00
Wylie Conlon 189953299b
[Lens] Stop using scripted metric to collect telemetry (#78687) 2020-09-30 13:07:09 -04:00
Alejandro Fernández Haro 4d08763af7
[Usage Collection] [schema] lens (#77929)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-24 11:40:59 +01:00
Joe Reuter 839817ca9a
[Lens] show meta field data in Lens (#77210) 2020-09-24 09:55:32 +02:00
Alejandro Fernández Haro 75a84ad56f
[Lens] Rename "telemetry" to "stats" (#78125) 2020-09-23 12:50:07 +01:00
Wylie Conlon cb5979ad51
[Lens] Show field stats for IP fields and scripted fields (#76457)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-08 17:29:26 -04:00
Joe Reuter 86f73cb0c2
[Lens] Register saved object references (#74523) 2020-08-21 18:08:25 +02:00
Tim Roes ade93f0780
Disable indexing of unnecessary Saved Object fields (#70409)
* 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>
2020-07-20 11:40:39 +02:00
Wylie Conlon 736e64c60f
[Lens] Fix cross cluster bug and optimize existence query (#70132)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 13:47:08 -04:00
Pierre Gayvallet fe1c508d8d
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
2020-06-29 17:43:31 +02:00
Joe Reuter 497ecf8164
[Lens] Add description property and check duplicate title on save (#68219) 2020-06-10 18:28:00 +02:00
Joe Reuter 6a8b07fe8e
Fix visualize and lens telemetry (#67749) 2020-05-30 21:22:42 +02:00
Mikhail Shustov 4040c3090b
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>
2020-05-27 19:00:16 +02:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Joe Reuter b7e87c2c8b
Switch to core application service (#63443) 2020-05-13 09:19:24 +02:00
Wylie Conlon 8cf6730dfe
[Lens] Type safe migrations (#65576)
* [Lens] Type safe migrations

* Commit API changes

* Remove optional chaining for required properties

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 16:02:08 -04:00
Marta Bondyra fc2f2446eb
fix: fix migration (#64894)
(cherry picked from commit 99b5982f1c)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-30 14:08:30 -04:00
Pierre Gayvallet 6e2691358f
add generic typings for SavedObjectMigrationFn (#63943)
* 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 10:28:14 +02:00
Tim Roes 9b65cbd92b
[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>
2020-04-29 20:10:14 -04:00
Wylie Conlon dc9bfb5d0f
[Lens] Fix existence for dotted paths in _source (#63752) 2020-04-17 14:27:40 -04:00
Wylie Conlon fb1ff02ed3
Fix task manager cancel warning (#63756)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-17 12:07:51 -04:00
Joe Portner d72de0ea16
Refactor saved object types to use namespaceType (#63217)
Remove `namespaceAgnostic` field that was deprecated in #54605,
use `namespaceType` instead.
2020-04-16 14:37:55 -04:00
Rudolf Meijering 00a1144ae2
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>
2020-04-15 17:07:57 +02:00
Tim Roes ebbc062689
Move Lens frontend to Kibana Platform (#62965)
* 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 12:22:37 +02:00
Wylie Conlon 8489efc034
[Lens] Migration from 7.7 (#62879)
* [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>
2020-04-14 11:04:47 -04:00
Tim Roes b8e3ccb356
Move lens saved object setup to Kibana platform (#61157) 2020-03-25 17:56:49 +01:00
Larry Gregory 9318862f19
Allow kbn-config-schema to ignore unknown keys (#59560)
* 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>
2020-03-17 12:30:17 -04:00
Marta Bondyra 1434953370
[Lens] Adds using queries/filters for field existence endpoint (#59033) 2020-03-12 09:03:40 +01:00
Mikhail Shustov d61ef267d5
force savedObject API consumers to define SO type explicitly (#58022)
* force savedObject consumers to define type explicitly

* address comments

* regen docs
2020-02-21 22:11:05 +01:00
Tim Roes ed2bac360e
[Lens] Make field stats work for index patterns without time fields (#56759)
* 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 12:21:40 +01:00
Joe Reuter 27dd6dda38
Move lens server to new platform (#56474) 2020-02-05 18:35:40 +01:00