Commit graph

42 commits

Author SHA1 Message Date
Aleh Zasypkin 025861c189
Add API integration tests for Interactive Setup. (#111879) 2021-10-14 20:14:01 +02:00
Rudolf Meijering 5464af6923
legacy dashboards import/export API: deprecation logs and usage data (#111283)
* Move legacy dashboards API to core and adds usage data

* More legacy_export plugin removal

* Log a warning for deprecated dashboard import/export API

* Review comments
2021-09-08 16:15:52 -04:00
Spencer c0395c9ef6
[build_ts_refs] improve caches, allow building a subset of projects (#107981)
* [build_ts_refs] improve caches, allow building a subset of projects

* cleanup project def script and update refs in type check script

* rename browser_bazel config to avoid kebab-case

* remove execInProjects() helper

* list references for tsconfig.types.json for api-extractor workload

* disable composite features of tsconfig.types.json for api-extractor

* set declaration: true to avoid weird debug error

* fix jest tests

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-10 22:12:45 -07:00
Greg Thompson fa03028688
Enable CSS-in-JS styling with emotion (#98157)
* emotion deps

* kbn-babel

* kbn-test

* examples

* babel-plugin-styled-components config

* css prop type fixes

* type context

* declaration location

* some emotion types resolved

* clean up

* emotion v10 accomodations

* types

* kbn-crypto

* kbn-telemetry-tools

* bazel

* eslint rule; shared file regex array

* update paths

* Update packages/kbn-eslint-plugin-eslint/rules/module_migration.js

Co-authored-by: Spencer <email@spalger.com>

* remove placeholder styles

* doc api changes

* snapshot updates

* storybook comments

* use constant

* bump new deps

* condense versions

Co-authored-by: Spencer <email@spalger.com>
2021-07-09 13:42:50 -05:00
Josh Dover 524401973f
Add timeouts and setup enforcement for custom plugins statuses (#77965) 2021-06-23 13:58:10 -04:00
Spencer bdafd27e19
[ts] migrate x-pack/test to composite ts project (#101441)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 12:54:05 -04:00
Spencer 090d0abd11
[ts] migrate root test dir to project refs (#99148)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-04 13:17:00 -04:00
Greg Thompson 38fd8a268a
Upgrade EUI to v33.0.0 (#99382)
* eui to 33.0.0

* resize observer type inclusion - revisit

* src snapshot updates

* x-pack snapshot updates

* table sort test updates

* code block language sh -> bash

* datagrid datetime sort inversion

* types

* kbn-crypto

* refractor yarn resolution

* refractor yarn resolution

* update cypress tests

* url state test

* trial

* Revert "trial"

This reverts commit adc3538145.

* trial anomaly timeout

* Revert "trial anomaly timeout"

This reverts commit 9a11711ba8.

* kbn-telemetry-tools

* Change a useMemo to useCallback so the code executes when intended

* Removed no-longer-used import

* exitOrFail already retries for longer than tryForTime

* Wait for loading indicator to disappear

* Intentionally adding `.only`

* Revert .only

* Increase wait time for the ML chart to load

* Remove unused var

* overflow

* chartWidth

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2021-06-01 10:53:07 -05:00
Mikhail Shustov ee84e0b0b7
Merge tsconfig and x-pack/tsconfig files (#94519)
* merge all the typings at root level

* merge x-pack/tsconfig into tsconfig.json

* fix tsconfig after changes in master

* remove unnecessary typings

* update paths to the global typings

* update paths to the global elaticsearch typings

* fix import

* fix path to typings/elasticsearch in fleet plugin

* remove file deleted from master

* fix lint errors
2021-03-16 15:13:49 +01:00
Pierre Gayvallet 762abea14e
migrate more core-owned plugins to tsproject ref (#89975)
* migrate more plugins to tsproject ref

* revert changes for xpack_legacy

* fix IT
2021-02-02 16:16:25 +01:00
Christiane (Tina) Heiligers 5c96da1e20
Migrate indexPatternManagement to TS project ref (#89759) 2021-02-01 12:24:07 -07:00
Pierre Gayvallet 688b918888
migrate legacy_export plugin to tsproject ref (#89858) 2021-02-01 16:00:48 +01:00
Tiago Costa 9139ab15fd
chore(NA): remove mocha junit ci integrations (#88129)
* chore(NA): remove mocha junit ci integrations

* chore(NA): remove mocha script from xpack

* chore(NA): single rule exclusion on eslint config for mocha

* chore(NA): remove unused custom mocha integration code from kbn/test

* chore(NA): rewording packages readme

* docs(NA): remoe mocha mention from development-unit-tests
2021-01-15 21:17:25 +00:00
Mikhail Shustov bc06280451
[DX] SavedObjectsManagement to TS project (#88240)
* som to ts project

* global_search_providers to ts projecvt
2021-01-13 22:23:06 +01:00
Mikhail Shustov 5814ca6e05
[DX] move some ES UI plugins to TS project (#88050)
* es_ui_shared to ts project

* console to ts project

* console_extensions to ts project

* searchprofiler to ts project

* update includes
2021-01-13 21:58:34 +01:00
Christiane (Tina) Heiligers 2eca6aa11e
Converts Telemetry Management Section to TS project refs (#88073) 2021-01-13 07:09:32 -07:00
Joe Reuter 807e8bdeb2
Kibana app and presentation ts projects (#87639) 2021-01-12 17:33:07 +01:00
Christiane (Tina) Heiligers 0549f94332
[DX] Management to TS projects (#87660)
* Adds management to tsconfig refs

* removes preemptive script fix
2021-01-11 07:14:22 -07:00
Mikhail Shustov b75cd4bb29
[DX] Home & SO tagging OSS to TS projects (#87610)
* so tagging oss to ts project

* home to ts project
2021-01-07 13:58:09 +01:00
Mikhail Shustov 69e2c38bd3
Migrate App services plugins to TS projects (#87294)
* migrate expressions to ts project refs

* bfetch to ts project

* ui_actions to ts project

* move fitures to data plugins

* add data ts project

* remove outdated ts-expect-error

* add data to x-pack tsconfigs

* navigation to ts project

* cleanup licensing tsconfig

* saved_objects to ts project

* embeddable to ts project

* ui_actions_enhanced to ts project

* embeddable_enhanced to ts project

* features to ts project

* data_enhanced to ts project refs

* fix i18n check

* fix find_plugins_ready_to_migrate_to_ts_refs script

* add a comment for bug ignoring json for composite projects

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-07 09:30:30 +01:00
Dario Gieselaar 3a8ea2993f
Make expectSnapshot available in all functional test runs (#82932)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-19 08:38:51 +01:00
Mikhail Shustov 938b7624f7
disable incremenetal build for legacy tsconfig.json (#82986) 2020-11-18 20:52:52 +01:00
Nathan L Smith 2c1bc50ec0
Add TS project references for inspector (#81792) 2020-10-28 09:01:40 -05:00
Christiane (Tina) Heiligers f42f767bf0
Kibana usage collection to ts project refs (#81265) 2020-10-21 10:33:51 -07:00
Christiane (Tina) Heiligers 0395d686bf
Extracts newsfeed plugin to ts project refs (#81254) 2020-10-21 08:22:25 -07:00
Christiane (Tina) Heiligers e7f3044b31
Usage collection plugins to ts project refs (#81090) 2020-10-20 09:32:40 -07:00
Mikhail Shustov ae8f8e1d10
Add TS projects for src/plugins & x-pack/plugins (#78440)
* bump query-string version to remove manual type definitions

* remove manual type declaration

* add kibana_utils tsconfig

* add refs to kibana_utils tsconfig

* add kibana_utils to the project list

* add kibana_react project

* add support for x-pack/tsconfig.refs.json

* add ts project for x-pack licensing plugins

* add glob for ts projects in src/plugins & x-pack/plugins

* add refs to projects in examples

* fix ref paths in x-pack/test

* address mistic comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-30 15:02:41 +02:00
Mikhail Shustov e7d8ea3927
Extract src/core in a separate TS project (#76785)
* break dependency on data plugin TS code

* move global typings to @kbn/utility-types

* import types from @kbn/utility-types

* remove type dependency on plugins

* add intermediate js files to break dependency on outter TS code

* temp type declaration for query-string

* declare src/core project

* export types to reference in the built d.ts files

* reference core project

* move jest types out of kbn/utility-types due to a clash with mocha types

* fix wrong es_kuery path and ts project paths

* reference core from packages consuming it

* x-pack & oss should use the same lodash version

* Revert "x-pack & oss should use the same lodash version"

This reverts commit 79cec5781e.

* use the same lodash version

* fix @types/lodash TS2300: Duplicate identifier error

* fix wrong imports

* update docs

* update docs

* add a comment why file is needed
2020-09-15 12:41:27 +02:00
Mikhail Shustov e9e0ca3782
Introduce TS incremental builds & move src/test_utils to TS project (#76082)
* move test_helpers to the core

* create base tsconfig

* all tsconfigs use the base one

* use test_helpers exposed from the src/core

* move getFieldFormatsRegistry to data plugin

* add test_utils project

* compile types after checkout

* add a stub for platform tsconfig.json

* fix broken import

* fix broken path to the base config

* set tsBuildInfoFile for project without outDir

* do not commit tsbuildinfo file

* do not check output d.ts files

* fix type error

* use separate config to build types

* rollback changes to include paths

* mute import zone error

* rename files to avoid references to tsd

* do not use tsd for type tests

* include all ts files in project

* run buildRefs before type check to ensure the latest version

* store tsbuildinfo locally

* update paths to base config

* comment out core/tsconfig.json

* remove ui path

* fix wrong tsbuildinfo path
2020-09-03 14:20:04 +02:00
Tiago Costa 6c62c686cf
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>
2020-07-03 01:30:13 +01:00
Uladzislau Lasitsa c5d4d9e68a
Migrate test plugins ⇒ NP (kbn_tp_run_pipeline) (#64780)
* Migrated kbn_tp_run_pipeline to the new Platform

* Updated config.

* Added tsconfig.

* Updated index.ts for tests

* updated tsconfig

* Updated typescript task

* fixed tests

* Fixed tests

* updated comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 10:12:46 +03:00
Joe Reuter 4e56419ca4
Migrate timelion vis (#62819) 2020-04-17 10:42:27 +02:00
Alejandro Fernández Haro 452193fdba
[Telemetry] Server-side Migration to NP (#60485)
* [Telemetry] Migration to NP

* Telemetry management advanced settings section + fix import paths + dropped support for injectVars

* Fix i18nrc paths for telemetry

* Move ui_metric mappings to NP registerType

* Fixed minor test tweaks

* Add README docs (#60443)

* Add missing translation

* Update the telemetryService config only when authenticated

* start method is not a promise anymore

* Fix mocha tests

* No need to JSON.stringify the API responses

* Catch handleOldSettings as we used to do

* Deal with the forbidden use case in the optIn API

* No need to provide the plugin name in the logger.get(). It is automatically scoped + one missing CallCluster vs. APICaller type replacement

* Add empty start method in README.md to show differences with the other approach

* Telemetry collection with X-Pack README

* Docs update

* Allow monitoring collector to send its own ES client

* All collections should provide their own ES client

* PR feedback

* i18n NITs from kibana-platform feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 18:49:38 +00:00
Xavier Mouligneau d95c47f776
Add KQL functionality in the find function of the saved objects (#41136)
* Add KQL functionality in the find function of the saved objects

wip

rename variable from KQL to filter, fix unit test + add new ones

miss security pluggins

review I

fix api changes

refactor after reviewing with Rudolf

fix type

review III

review IV

for security put back allowed logic back to return empty results

remove StaticIndexPattern

review V

fix core_api_changes

fix type

* validate filter to match requirement type.attributes.key or type.savedObjectKey

* Fix types

* fix a bug + add more api integration test

* fix types in test until we create package @kbn/types

* fix type issue

* fix api integration test

* export nodeTypes from packages @kbn/es-query instead of the function buildNodeKuery

* throw 400- bad request when validation error in find

* fix type issue

* accept api change

* renove _ to represent private

* fix unit test + add doc

* add comment to explain why we removed the private
2019-10-02 18:23:44 -04:00
Rudolf Meijering 85c8232c0b
Move KibanaMigrator into Server SavedObjectsService (#43433)
* Rename SavedObjectsService -> SavedObjectsLegacyService

* Expose legacy pluginSpecs from Core LegacyService

* Expose legacy uiExports from Core LegacyService

* Move kibana config to NP

* Expose pluginExtendedConfig from LegacyService

* Make KibanaMigrator NP compatible

* KibanaMigrator -> NP SavedObjectsService

* SavedObjectsService never stop retrying ES connection error

* Move waiting for migrations to complete till after legacy service start

* Fix ESArchiver's KibanaMigrator

* Fix reload logging config tests

* Run migrations on savedobjects start

* Fix env tests

* Fix and make legacy tests more robust/isolated

* Cleanup code

* Fix invalid config test

* Fix SavedObject Migrations logging test

* SavedObjectsService tests

* Lifecycle logging and improve getting kibanaConfig instance

* Fix awaitMigration bug and test

* Fix typing error

* Review comments

* Remove unecessary KibanaConfig class

* Move legacy plugin config extension, specs, uiExports entirely into Core

uiExports, specs, disabledSpecs, config now get injected into KbnServer

* Fix config deprecation test

* Use existing logger mock

* Create SavedObjectsConfig for migration config

* Define KibanaMigratorContract type

* KibanaMigratorContract -> IKibanaMigrator + docs improvements

* Fix esArchiver's KibanaMigrator

* Fix plugin generator integration test

* ConfigServiceContract -> IConfigService

* Address review comments

* Review nits

* Document migrations.skip config

* Review comments continued...

* awaitMigrations -> runMigrations

* Type improvements
2019-10-01 09:11:33 +02:00
Josh Dover 5192dac0b6
Add ContextService to server (#42395) 2019-08-06 12:24:49 -05:00
Vitali Haradkou 9947045f69
Ftr tsfy webelement wrapper (#35355)
* tsfy webelement wrapper
2019-04-23 19:05:46 +03:00
Spencer 9122511370
[ftr] convert remaining JS to TS (#35110) 2019-04-18 12:06:24 -07:00
Stacey Gammon f5010cc8e6
Typescript sample panel action (#33602)
* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path
2019-03-26 12:31:10 -04:00
Spencer 2e232c2e31
[@kbn/expect] "fork" expect.js into repo (#33761)
* [@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 09:56:48 -07:00
Spencer 4749c6aab6
[ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948)
In https://github.com/elastic/kibana/pull/31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from https://github.com/elastic/kibana/pull/30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
2019-02-28 12:06:00 -08:00
Vitali Haradkou 75e49e667c tests typescript migration (#31234)
* add typescript support for functional tests
2019-02-21 19:38:54 -06:00