Commit graph

54 commits

Author SHA1 Message Date
Mikhail Shustov 99cd66f72d
[Core] Explicit typings for request handler context (#88718) (#88975)
* move context to server part. couple with RequestHandlerContext

Context implementation will be simplified in follow-up.

* adopt core code

* adopt bfetch code

* adopt data code

* adopt search examples

* adopt vis_type_timelion

* adopt vis_type_timeseries

* adopt plugin functional tests

* adopt actions

* adopt alerting plugin

* adopt APM plugin

* adopt beats_management

* adopt case plugin

* adopt cross_cluster_replication

* adopt data_enhanced

* adopt event_log

* adopt global_search

* adopt index_management

* adopt infra

* adopt licensing

* adopt lists

* adopt logstash

* adopt reporting

* adopt observability

* adopt monitoring

* adopt rollup

* adopt so tagging

* adopt security

* adopt security_solutions

* adopt watcher

* adopt uptime

* adopt spaces

* adopt snapshot_restore

* adopt features changes

* mute error when null used to extend context

* update docs

* small cleanup

* add type safety for return type

* refactor registerRouteHandlerContext type

* update docs

* update license header

* update docs

* fix type error. fetch body does not accept array of strings

* fix telemetry test

* remove unnecessary ts-ignore

* address comments

* update docs
# Conflicts:
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.plugin.start.md
#	src/plugins/data/server/server.api.md
#	x-pack/plugins/monitoring/server/plugin.ts
2021-01-21 18:13:51 +01:00
Christiane (Tina) Heiligers 245c8c1a29
[7.x] Switches rollup usage collector's fetch es client to the new client (#86684) (#87203)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-04 13:51:39 -07:00
Alexey Antonov 98354d1f8f
[TSVB] use new Search API for rollup search (#83275) (#83639)
* [TSVB] use new Search API for rollup search

Closes: #82710

* remove unused code

* rollup_search_strategy.test.js -> rollup_search_strategy.test.ts

* default_search_capabilities.test.js -> default_search_capabilities.test.ts

* remove getRollupService

* fix CI

* fix some types

* update types

* update codeowners

* fix PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS
#	x-pack/plugins/vis_type_timeseries_enhanced/server/search_strategies/rollup_search_capabilities.test.ts
2020-11-18 23:09:17 +03:00
Matthew Kime a3d2afd58f
Index patterns api - load field list on server (#82629) (#83021)
The server side index patterns api can now load the field list. Previously it would error if a field list refresh was required.

The regular and rollup index pattern field list loading methods were merged. Rollup index patterns require additional functionality over regular index patterns when it comes to loading the field list, but this won't be necessary once rollups v2 is released.
2020-11-09 20:49:07 -06:00
Alexey Antonov a42c52fd0b
[Step 2] Use Observables on server search API (#80709) (#82409)
* [Step 2] Use Observables on server search API

* apply some suggestions

* use concatMap instead of expand

* update docs

* cleanup

* fix PR comments

* remove AsyncOptions

* remove $config from eql_search_strategy

* remove $config from es_search_strategy

* remove DoSearchFnArgs, SearchMethod

* some work

* fix docs

* remove waitForCompletion param

* cleanup

* some work

* fix circular imports

* Update src/plugins/data/server/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update src/plugins/data/common/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update src/plugins/data/common/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update x-pack/plugins/data_enhanced/common/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* fix PR comments

* update docs

* apply suggestions

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 15:55:47 +03:00
Matthew Kime 41206e10e4
Index Patterns API - Remove legacy es client usage for field caps (#80116) (#81784)
* remove legacy es client usage
2020-10-27 11:41:40 -05:00
Christiane (Tina) Heiligers 308c24694d
[7.x] [Usage Collection] Improves Collector fetch API (#79595) (#80383)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-13 14:12:10 -07:00
Pierre Gayvallet 97e7137599
[7.x] remove legacy ES plugin (#77703) (#77847)
* remove legacy ES plugin (#77703)

* remove legacy ES plug

* fix types

* delete some `legacy/core_plugins` references

* fix type
# Conflicts:
#	.github/CODEOWNERS
#	src/legacy/core_plugins/elasticsearch/index.js
#	src/legacy/core_plugins/elasticsearch/lib/abortable_request_handler.js
#	src/legacy/core_plugins/elasticsearch/lib/abortable_request_handler.test.js
#	src/legacy/core_plugins/elasticsearch/lib/cluster.ts
#	src/legacy/core_plugins/elasticsearch/lib/create_proxy.js
#	x-pack/dev-tools/jest/create_jest_config.js

* remove unused legacy file from 7.x
2020-09-18 11:45:32 +02:00
Stratoula Kalafateli 5242103e4a
Use Search API in TSVB (#76274) (#77767)
* Use Search API for TSVB

* Fixed ci

* Fixed ci

* Use constants

* Fixed tests

* Fixed ci

* Fixed ci

* Back old rollup search

* Fixed test

* Fixed tests

* Fixed issue with series data

* Fixed comments

* Fixed comments

* Fixed unit test

* Deleted unused import

* Fixed comments

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

Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-18 08:58:35 +03:00
Larry Gregory 047152f890
[7.x] Hide management sections based on cluster/index privileges (#67791) (#77345)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 14:33:17 -04:00
Mikhail Shustov b2040a5a1b
[7.x] Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091) (#74384)
* Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)

* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
# Conflicts:
#	src/legacy/ui/public/new_platform/new_platform.ts
#	x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx

* remove unnecessary comment
2020-08-05 21:45:29 +02:00
Alison Goryachev 8dd9b51ca5
[7.x] [Rollups] Make telemetry code more resilient (#70152) (#70817) 2020-07-06 13:05:12 -04:00
Tiago Costa 7759b924fc
[7.x] chore(NA): upgrade to lodash@4 (#69868) (#70683)
* chore(NA): upgrade to lodash@4 (#69868)

* chore(NA): upgrade oss to lodash4

chore(NA): migrate cli, cli_plugin, cli_keystore,  dev, test_utils and apm src script to lodash4

chore(NA): missing file for cli plugin

chore(NA): add src core

chore(NA): es archiver and fixtures

chore(NA): try to fix functional test failure

chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins

chore(NA): move legacy core plugins to lodash4

chore(NA): upgrade optimize to lodash4

chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard

chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins

chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4

chore(NA): missing data upgrades to lodash4

Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"

This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.

Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""

This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.

Revert "chore(NA): missing data upgrades to lodash4"

This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.

Revert "chore(NA): upgrade data plugin to lodash4"

This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.

chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4

chore(NA): map src plugin data to lodash3

chore(NA): missing lodash.clonedeep dep

chore(NA): change packages kbn-config-schema deps

chore(NA): update renovate config

chore(NA): upgrade vis_type plugins to lodash4

chore(NA): move vis_type_vislib to lodash3

chore(NA): update visualizations and visualize to lodash4

chore(NA): remove lodash 3 types from src and move test to lodash4

chore(NA): move home, usage_collection and management to lodash 3

Revert "chore(NA): move home, usage_collection and management to lodash 3"

This reverts commit f86e8585f02d21550746569af54215b076a79a3d.

chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3

chore(NA): update x-pack test to mock lodash4

Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"

This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.

* chore(NA): move x-pack and packages to lodash 4

* chore(NA): remove mention to lodash from main package.json

* chore(NA): remove helper alias for lodash4 and make it the default lodash

* chore(NA): fix last failing types in the repo

* chore(NA): fix public api

* chore(NA): fix types for agg_row.tsx

* chore(NA): fix increment of optimizer modules in the rollup plugin

* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)

* omit undefined query props

* just remove merge usage

* fix types

* chore(NA): fixes for feedback from apm team

* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx

* chore(NA): fixes for feedback from watson

* Platform lodash4 tweaks (#6)

* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts

* Canvas fixes for lodash upgrade

* [APM] Adds unit test for APM service maps transform (#7)

* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier

* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`

* chore(NA): update yarn.lock

* chore(NA): remove any and use a real type for alerts task runner

Co-authored-by: Gidi Meir Morris <github@gidi.io>

* chore(NA): used named import for triggers_actions_ui file

* chore(NA): fix eslint

* chore(NA): fix types

* Delete most uptime lodash references.

* Simplify. Clean up types.

* [Uptime] Delete most uptime lodash references (#8)

* Delete most uptime lodash references.

* Simplify. Clean up types.

* chore(NA): add eslint rule to avoid using lodash3

* chore(NA): apply changes on feedback from es-ui team

* fix some types (#9)

* Clean up some expressions types.

* chore(NA): missing ts-expect-error statements

* Upgrade lodash 4 vislib (#11)

* replace lodash 3 with lodash 4 on vislib plugin

* Further changes

* further replacement of lodash3 to 4

* further work on upgrading to lodash 4

* final changes to update lodash

* chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade data plugin public to lodash4

chore(NA): fix typecheck task

chore(NA): fix agg_config with hasIn

chore(NA): assign to assignIn and has to hasIn

chore(NA): upgrade data plugin server to lodash4

chore(NA): new signature for core api

fix(NA): match behaviour between lodash3 and lodash4 for set in search_source

* chore(NA): remove lodash3 completely from the repo

* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content

* chore(NA): fix lodash usage on apm

* chore(NA): fix typecheck for maps

* Patch lodash template (#12)

* Applying changes from https://github.com/elastic/kibana/pull/64985

* Using isIterateeCall, because it seems less brittle

* Also patching `lodash/template` and `lodash/fp/template`

* Reorganizing some files...

* Revising comment

* Ends up `_` is a function also... I hate JavaScript

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
# Conflicts:
#	renovate.json5
#	x-pack/plugins/apm/public/services/rest/observability_dashboard.ts
#	x-pack/plugins/canvas/common/lib/pivot_object_array.ts
#	x-pack/plugins/canvas/public/components/workpad_templates/workpad_templates.js
#	x-pack/plugins/canvas/server/collectors/custom_element_collector.ts
#	x-pack/plugins/canvas/server/collectors/workpad_collector.ts

* chore(NA): updated kbn-pm dist file
2020-07-03 04:40:17 +01: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
Ahmad Bamieh f1fcd57ed5
[7.x] [Telemetry] Collector Schema (#64942) (#70141)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-28 20:34:33 +03:00
Alison Goryachev 661fd85d34
[7.x] [ES UI] Error handling (#68809) (#69146) 2020-06-15 12:00:12 -04:00
Mikhail Shustov c9ac203e94
Bump TypeScript to v3.9 (#67666) (#68870)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 12:25:28 +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
Mikhail Shustov 1616be75ae
Use ES API from start contract (#66157) (#66842)
* watcher uses es api from start

* CCR uses ES API from start contract

* Rollup uses ES API from start contract

* Transform uses ES API from start contract

* Snapshot_restore uses ES API from start contract

* remove excessive logging. platform logs all the lifecycles

* file uploader uses ES API from start contract

* remove unnecessary async

* use async getter

* update rollup custom client usage

* address cj comment

* roll back changes. maps tests are failing

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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-16 11:08:34 +02:00
CJ Cenizal ecdbece5d5
[7.x] Move Rollup out of legacy (#62891) (#64608)
* Move Rollup out of legacy (#62891)

* Put back 7.x-specific logic.
2020-04-27 19:09:40 -07:00
Joe Reuter bbad5ca7d3
Migrate rollup client side code (#63227) (#63869) 2020-04-20 11:27:34 +02:00
Alison Goryachev 84bc980724
[Rollups] Server NP migration (#55606) (#57116) 2020-02-07 13:51:39 -05:00
Court Ewing dbb0534c21 Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:35:00 -04:00
Matthew Kime 24282a57be
No unused vars cleanup set two (#37051) (#37124)
* no unused vars cleanup
2019-06-08 22:25:33 -05:00
Matthias Wilhelm aa592cfd73
Remove duplicate fields of rollup based index patterns (#37221) (#37307)
Rollup fields were were merged twice with other fields, this caused duplicates. Fix of a bug introduced by #28762
2019-05-29 13:13:52 +02:00
Alexey Antonov a1d2643ad2
[TSVB] Rollup Search - override index pattern functionality is not working with Rollup search (#36641) (#37077) 2019-05-24 16:58:19 +03:00
Alexey Antonov 382970b14f
[TSVB] Fix Rollup Search with auto interval for Rollup Jobs in calendar intervals (#36081) (#37066)
* auto interval

* [TSVB] Rollup Search - 'auto' interval is not working for Rollup Jobs which were created in Calendar intervals

* [TSVB] Rollup Search - 'auto' interval is not working for Rollup Jobs which were created in Calendar intervals

* fix issue

* fix broken tests

* fix pr comments

* fix pr comments
2019-05-24 13:22:12 +03:00
Chris Roberson 2ac88caf21
[Monitoring/Telemetry] Force collectors to indicate when they are ready (#36153) (#36706)
* Initial code to force collectors to indicate when they are ready

* Add and fix tests

* Remove debug

* Add ready check in api call

* Fix prettier complaints

* Return 503 if not all collectors are ready

* PR feedback

* Add retry logic for  usage collection in the reporting tests

* Fix incorrect boomify usage

* Fix more issues with the tests

* Just add debug I guess

* More debug

* Try and handle this exception

* Try and make the tests more defensive and remove console logs

* Retry logic here too

* Debug for the reporting tests failure

* I don't like this, but lets see if it works

* Move the retry logic into the collector set directly

* Add support for this new collector

* Localize this

* This shouldn't be static on the class, but rather static for the entire runtime
2019-05-20 16:39:46 -04:00
Matt Bargar 11a05bd8a4
Add esTypes property to index pattern field (#35251) (#35438)
Adds an array property to the Field object containing all of the types the field is mapped as across ES indices.
2019-04-23 13:36:30 -04:00
Alexey Antonov b87a99abb3
[TSVB] [Rollup support] exclude unsupported metrics from the Metric Aggregations dropdown (#34165) (#34853)
* [TSVB] [Rollup support] exclude unsupported metrics from the Metric Aggregations dropdown

Fix: #34047

* TSVB] [Rollup support] exclude unsupported metrics from the Metric Aggregations dropdown - fix broken tests

* [TSVB] [Rollup support] exclude unsupported metrics from the Metric Aggregations dropdown

* [TSVB] [Rollup support] exclude unsupported metrics from the Metric Aggregations dropdown - add filtering for group by

* fix tests

* Fix issue with fetching fields
2019-04-10 15:41:49 +03:00
CJ Cenizal 9c227243bc
Add collector to ui_metric app so that it reports its own telemetry. (#34210) (#34398)
* Add collector to ui_metric app so that it reports its own telemetry, so app maintainers don't need to update their apps' collectors.
* Remove UI metrics and some collectors from Index Manamgement, ILM, and Rollups.
2019-04-02 15:37:01 -07:00
CJ Cenizal d7838e2787 Rename user_action telemetry app to ui_metric (#33904)
* Rename internal references to user actions to UI metrics in Index Management, ILM, and Rollups.

(cherry picked from commit 8d262bded5)
2019-03-29 15:28:09 -07:00
Sébastien Loix 27102bb3f3
[Rollup] Re-enable api integration tests (#33381) (#33960) 2019-03-27 17:37:16 +01:00
Spencer 883ea31bd2
[@kbn/expect] "fork" expect.js into repo (#33761) (#33794)
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
2019-03-25 13:13:21 -07:00
Sébastien Loix 4321fa7250
[Rollup] Fix flaky test when deleting Jobs (#33231) (#33254) 2019-03-14 18:36:43 +01:00
spalger 9256164755 Revert "[Rollup] Api integration test wildcard + search (#32884) (#33141)"
This reverts commit 26ffdccded.
2019-03-13 11:03:07 -07:00
Sébastien Loix 26ffdccded
[Rollup] Api integration test wildcard + search (#32884) (#33141)
* [Rollup] Api integration test fields for wildcard
* [Rollup] Api integration test search
2019-03-13 17:14:23 +01:00
Sébastien Loix 392a3df440
[Rollup] API integration tests (#32780) (#33130)
* Rollup Indice
* Index validity
* CRUD
* Test "job start"
* Test "job stop"
2019-03-13 16:06:03 +01:00
CJ Cenizal 554478f4ce
Add user_action app for gathering telemetry on user actions (#31543) (#32533)
* Add user_action app with API endpoint for tracking user actions.
* Track 'Create rollup job' action and publish it in the collector.
* Extract fetchUserActions into a generic helper inside of xpack/server/lib.
* Add trackUserRequest helper.
2019-03-05 17:54:33 -08:00
Spencer 23d37cf7d9
[7.x] [eslint] require final newline (#32265) (#32268)
Backports the following commits to 7.x:
 - [eslint] require final newline  (#32265)
2019-02-28 19:10:43 -08:00
Aleh Zasypkin 515682956d
[7.x] Introduce Elasticsearch service. (#32206) 2019-02-28 18:53:32 +02:00
Alexey Antonov 354b1566bf
Rollup support for TSVB (#28762) (#32036)
* Added a feature of rollup search on the UI side

Signed-off-by: Alexey Antonov <alexwizp@gmail.com>

* Rollup Feature - initial commit

* Revert "Added a feature of rollup search on the UI side"

This reverts commit 9568b0970b16f5102f50b748bb4d691a8612c2c2.

# Conflicts:
#	src/legacy/core_plugins/metrics/public/components/index_pattern.js

* Remove the 'label' property from the search strategies

* Changed search by strategy from the last

* add single search request

* rollup_search_strategy add base implementation of isViable method

* rollup_search_strategy add base implementation of isViable method -fix

* Changed requests due to search request type

* refactoring of import Base classes / remove '../../../../../../

* remove extra await

* rollup_search_strategy. Refactoring of isRollupJobExists method

* remove question

* Add support of annotations and table data

* skeleton for adding Search Strategy restrictions

* Add rollup search capabilities

* apply search strategy for annotations request

* set fields capabilities for rollup strategy

* add timezone, interval into SearchCapabilities

* Add fields from capabilities

* add timezone, interval into SearchCapabilities

* fix default timezone

* Merging of two Rollup Jobs was removed

* move getFieldsForWildcard to searchStrategy

* Fix TSVB search requests should have a timeout

# Conflicts:
#	src/legacy/core_plugins/metrics/server/lib/vis_data/get_annotations.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/series/get_request_params.js

* Add unit test

* apply getEsShardTimeout for annorations/get_request_params,  series/get_request_params

* rename metrics -> tsvb

* search_strategies_register refactoring: move 'add' method from class

* Add merge rollup capabilities with fields

* Add merge rollup capabilities with fields - small fixes

* Add support of 'Everything' aggregation for Rollup Search

* Return back metrics plugin

* remove 'metrics' from the X-pack\rollup require

* Fix test cases

* fix broken test: fail: "apis InfraOps GraphQL Endpoints metrics should basically work"

* rollup search - split by terms is not working

* Add count metric

* /get_bucket_size.js. Add support of 'auto' interval, Add support of gte intervals  e.g.:  >=1m

* fix build_request_body test

* [Rollup] [Phase 1] Error handling - rollup search errors should be more user friendly

* [Rollup] [Phase 1] Table View - research the query to ES - sorting is not wokring

* Merge #26006 into rollup

# Conflicts:
#	src/legacy/core_plugins/metrics/server/lib/vis_data/annorations/build_request_body.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/get_annotations.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/get_series_data.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/get_table_data.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/request_processors/annotations/query.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/series/__tests__/build_request_body.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/series/build_request_body.js
#	src/legacy/core_plugins/metrics/server/lib/vis_data/series/get_request_params.js

* Add table view support

* fix broken build

* fix broken build

* [Rollup] [Phase 1] - write new tests  (rollup_search_request, rollup_search_strategy)

* [Rollup] [Phase 1] - write tests for rollup_search_capabilities

* Add test on default_search_capabilities, abstract_search_strategy, search_strategies_register

* Add test cases for search_requests folder

* [Rollup] [Phase 1] - write tests for rollup_search_strategy

* FIx broken build

* remove todo

* fix calculation of interval value for rollup search

* add unit tests

* Remove default exports

* fix PR comments

* fix calendar intervals
2019-02-27 15:41:32 +03:00
CJ Cenizal dd0dbc2005
Fix spacing error in license header in CCR, Remote Clusters, and Rollups. (#31869) (#31881)
* Remove duplicate license header.
2019-02-25 06:34:17 -08:00
Mike Côté 1b0f595f01
Add new "references" attribute to saved objects for relationships (#28199)
* Add new references attribute to saved objects

* Add dual support for dashboard export API

* Use new relationships API supporting legacy relationships extraction

* Code cleanup

* Fix style and CI error

* Add missing spaces test for findRelationships

* Convert collect_references_deep to typescript

* Add missing trailing commas

* Fix broken test by making saved object API consistently return references

* Fix broken api integration tests

* Add comment about the two TS types for saved object

* Only return title from the attributes returned in findRelationships

* Fix broken test

* Add missing security tests

* Drop filterTypes support

* Implement references to search, dashboard, visualization, graph

* Add index pattern migration to dashboards

* Add references mapping to dashboard mppings.json

* Remove findRelationships from repository and into it's own function / file

* Apply PR feedback pt1

* Fix some failing tests

* Remove error throwing in migrations

* Add references to edit saved object screen

* Pass types to findRelationships

* [ftr] restore snapshots from master, rely on migrations to add references

* [security] remove `find_relationships` action

* remove data set modifications

* [security/savedObjectsClient] remove _getAuthorizedTypes method

* fix security & spaces tests to consider references and migrationVersion

* Add space id prefixes to es_archiver/saved_objects/spaces/data.json

* Rename referenced attributes to have a suffix of RefName

* Fix length check in scenario references doesn't exist

* Add test for inject references to not be called when references array is empty or missing

* some code cleanup

* Make migrations run on machine learning data files, fix rollup filterPath for savedSearchRefName

* fix broken test

* Fix collector.js to include references in elasticsearch response

* code cleanup pt2

* add some more tests

* fix broken tests

* updated documentation on referencedBy option for saved object client find function

* Move visualization migrations into kibana plugin

* Update docs with better description on references

* Apply PR feedback

* Fix merge

* fix tests I broke adressing PR feedback

* PR feedback pt2
2019-01-30 15:53:03 -05:00
Jonathan Budzenski e9f0006890
Remove es _xpack endpoint usage (#29465)
* _xpack/rollup -> _rollup

* _xpack/sql -> _sql

* _xpack/license -> _license

* _xpack/migration -> _migration

* _xpack/watcher -> _watcher

* _xpack/monitoring -> _monitoring

* _xpack/security -> _security

* [console_extensions] regenerate

* [console_extensions] update ml overrides

* [console_extensions] update security overrides

* [console_extensions] update rollup overrides

* Revert "[console_extensions] update rollup overrides"

This reverts commit bb3742570d.

* Revert "[console_extensions] update security overrides"

This reverts commit 5c0263b35e.

* Revert "[console_extensions] update ml overrides"

This reverts commit e8254d5671.

* Revert "[console_extensions] regenerate"

This reverts commit 91b754e956.
2019-01-29 13:28:32 -06:00
CJ Cenizal bfa417c7d6
Localize strings in Rollup and ILM apps. (#29034)
* Add ILM to i18nrc.json. Fix validation errors.
* Localize CCR and Rollups checkLicense errors.
* Fix bug in Remote Clusters checkLicense error.
* Use rollupJobs namespace in checkLicense.
2019-01-23 16:36:48 -08:00
Tim Roes 1852b4b786
Add rest_total_hits_as_int into Kibana App (#26404) 2018-12-04 10:42:45 +01:00
Jen Huang f3cf074ffa
Move call to standard index pattern fields for wildcard from client to server (#25270) 2018-11-07 08:24:59 -08:00
Jen Huang 077634c483
Prepend ES endpoint with slash (#25073) 2018-11-02 15:16:06 -07:00