From fae2167714cf4576968b177ab4a80ff852c34035 Mon Sep 17 00:00:00 2001 From: Christiane Heiligers Date: Fri, 29 Jan 2021 14:48:28 -0700 Subject: [PATCH 1/6] Hack --- .../client_integration/home/data_streams_tab.test.ts | 2 +- .../index_management/public/application/app_context.tsx | 3 +-- .../public/application/mount_management_section.ts | 5 ++--- .../sections/home/data_stream_list/data_stream_list.tsx | 4 ++-- x-pack/plugins/index_management/public/plugin.ts | 2 +- x-pack/plugins/index_management/public/types.ts | 3 +-- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts index 87f5408f6ca42..3221054839865 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts @@ -71,7 +71,7 @@ describe('Data Streams tab', () => { test('when Fleet is enabled, links to Fleet', async () => { testBed = await setup({ - plugins: { fleet: { hi: 'ok' } }, + plugins: { isFleetEnabled: true }, }); await act(async () => { diff --git a/x-pack/plugins/index_management/public/application/app_context.tsx b/x-pack/plugins/index_management/public/application/app_context.tsx index 91bcfe5ed55c0..552534bcc61ad 100644 --- a/x-pack/plugins/index_management/public/application/app_context.tsx +++ b/x-pack/plugins/index_management/public/application/app_context.tsx @@ -10,7 +10,6 @@ import { ManagementAppMountParams } from 'src/plugins/management/public'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; import { CoreSetup, CoreStart } from '../../../../../src/core/public'; -import { FleetSetup } from '../../../fleet/public'; import { UiMetricService, NotificationService, HttpService } from './services'; import { ExtensionsService } from '../services'; import { SharePluginStart } from '../../../../../src/plugins/share/public'; @@ -24,7 +23,7 @@ export interface AppDependencies { }; plugins: { usageCollection: UsageCollectionSetup; - fleet?: FleetSetup; + isFleetEnabled: boolean; }; services: { uiMetricService: UiMetricService; diff --git a/x-pack/plugins/index_management/public/application/mount_management_section.ts b/x-pack/plugins/index_management/public/application/mount_management_section.ts index b94718c14d3aa..f4136a977df1a 100644 --- a/x-pack/plugins/index_management/public/application/mount_management_section.ts +++ b/x-pack/plugins/index_management/public/application/mount_management_section.ts @@ -9,7 +9,6 @@ import { CoreSetup } from 'src/core/public'; import { ManagementAppMountParams } from 'src/plugins/management/public/'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; -import { FleetSetup } from '../../../fleet/public'; import { UIM_APP_NAME } from '../../common/constants'; import { PLUGIN } from '../../common/constants/plugin'; import { ExtensionsService } from '../services'; @@ -50,7 +49,7 @@ export async function mountManagementSection( usageCollection: UsageCollectionSetup, params: ManagementAppMountParams, extensionsService: ExtensionsService, - fleet?: FleetSetup + isFleetEnabled: boolean ) { const { element, setBreadcrumbs, history } = params; const [core, startDependencies] = await coreSetup.getStartServices(); @@ -80,7 +79,7 @@ export async function mountManagementSection( }, plugins: { usageCollection, - fleet, + isFleetEnabled, }, services: { httpService, notificationService, uiMetricService, extensionsService }, history, diff --git a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx index 64d874c76afb3..07eccd23d9f44 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx @@ -52,7 +52,7 @@ export const DataStreamList: React.FunctionComponent {' ' /* We need this space to separate these two sentences. */} - {fleet ? ( + {isFleetEnabled ? ( Date: Fri, 29 Jan 2021 15:42:18 -0700 Subject: [PATCH 2/6] Converts runtime_fields to TS project ref, declares setup as any in index_template_wizzard helpers --- .../template_clone.helpers.ts | 2 +- .../template_create.helpers.ts | 2 +- .../template_edit.helpers.ts | 2 +- x-pack/plugins/index_management/tsconfig.json | 31 +++++++++++++++++++ x-pack/plugins/runtime_fields/tsconfig.json | 19 ++++++++++++ 5 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 x-pack/plugins/index_management/tsconfig.json create mode 100644 x-pack/plugins/runtime_fields/tsconfig.json diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts index 4cc40c71e4efd..0d18ad6e06692 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_clone.helpers.ts @@ -21,4 +21,4 @@ const testBedConfig: TestBedConfig = { const initTestBed = registerTestBed(WithAppDependencies(TemplateClone), testBedConfig); -export const setup = formSetup.bind(null, initTestBed); +export const setup: any = formSetup.bind(null, initTestBed); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts index 330723d87a3de..f1681c7ad6d96 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.helpers.ts @@ -23,4 +23,4 @@ const initTestBed = registerTestBed( testBedConfig ); -export const setup = formSetup.bind(null, initTestBed); +export const setup: any = formSetup.bind(null, initTestBed); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts index 21ecf18aa0d38..4c3578b5f401d 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_edit.helpers.ts @@ -21,4 +21,4 @@ const testBedConfig: TestBedConfig = { const initTestBed = registerTestBed(WithAppDependencies(TemplateEdit), testBedConfig); -export const setup = formSetup.bind(null, initTestBed); +export const setup: any = formSetup.bind(null, initTestBed); diff --git a/x-pack/plugins/index_management/tsconfig.json b/x-pack/plugins/index_management/tsconfig.json new file mode 100644 index 0000000000000..dec953e2d4726 --- /dev/null +++ b/x-pack/plugins/index_management/tsconfig.json @@ -0,0 +1,31 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "__jest__/**/*", + "common/**/*", + "public/**/*", + "server/**/*", + "test/**/*", + "../../typings/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + { "path": "../../../src/plugins/home/tsconfig.json"}, + { "path": "../../../src/plugins/management/tsconfig.json"}, + { "path": "../features/tsconfig.json"}, + { "path": "../../../src/plugins/share/tsconfig.json"}, + { "path": "../security/tsconfig.json"}, + { "path": "../../../src/plugins/usage_collection/tsconfig.json"}, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../../src/plugins/es_ui_shared/tsconfig.json" }, + { "path": "../runtime_fields/tsconfig.json"} + ] +} diff --git a/x-pack/plugins/runtime_fields/tsconfig.json b/x-pack/plugins/runtime_fields/tsconfig.json new file mode 100644 index 0000000000000..a1efe4c9cf2dd --- /dev/null +++ b/x-pack/plugins/runtime_fields/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "public/**/*", + "../../../typings/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/es_ui_shared/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_legacy/tsconfig.json"} + ] +} From 6b1d40800f2842526933e1a4a7a593f90c149904 Mon Sep 17 00:00:00 2001 From: Christiane Heiligers Date: Fri, 29 Jan 2021 15:50:54 -0700 Subject: [PATCH 3/6] Adds runtime_fields and index_management TS project refs --- x-pack/test/tsconfig.json | 4 +++- x-pack/tsconfig.json | 4 ++++ x-pack/tsconfig.refs.json | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index cc36a2c93b1a0..301e5d3254c0d 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -60,6 +60,8 @@ { "path": "../plugins/saved_objects_tagging/tsconfig.json" }, { "path": "../plugins/global_search_bar/tsconfig.json" }, { "path": "../plugins/license_management/tsconfig.json" }, - { "path": "../plugins/watcher/tsconfig.json" } + { "path": "../plugins/watcher/tsconfig.json" }, + { "path": "./plugins/runtime_fields/tsconfig.json" }, + { "path": "./plugins/index_management/tsconfig.json" }, ] } diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index 956bd409f979d..7c7f57ce9d57b 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -39,6 +39,8 @@ "plugins/global_search_bar/**/*", "plugins/license_management/**/*", "plugins/watcher/**/*", + "plugins/runtime_fields/**/*", + "plugins/index_management/**/*", "test/**/*" ], "compilerOptions": { @@ -111,5 +113,7 @@ { "path": "./plugins/stack_alerts/tsconfig.json"}, { "path": "./plugins/license_management/tsconfig.json" }, { "path": "./plugins/watcher/tsconfig.json" }, + { "path": "./plugins/runtime_fields/tsconfig.json" }, + { "path": "./plugins/index_management/tsconfig.json" }, ] } diff --git a/x-pack/tsconfig.refs.json b/x-pack/tsconfig.refs.json index 1724cb2afbffa..b8406c79425c1 100644 --- a/x-pack/tsconfig.refs.json +++ b/x-pack/tsconfig.refs.json @@ -33,6 +33,8 @@ { "path": "./plugins/saved_objects_tagging/tsconfig.json" }, { "path": "./plugins/global_search_bar/tsconfig.json" }, { "path": "./plugins/license_management/tsconfig.json" }, - { "path": "./plugins/watcher/tsconfig.json" } + { "path": "./plugins/watcher/tsconfig.json" }, + { "path": "./plugins/runtime_fields/tsconfig.json" }, + { "path": "./plugins/index_management/tsconfig.json" } ] } From 9269119a8168ac771873b1c506da5f78e485a9bb Mon Sep 17 00:00:00 2001 From: Christiane Heiligers Date: Fri, 29 Jan 2021 17:11:06 -0700 Subject: [PATCH 4/6] Fixes wrong path to project in x-pack/test/tsconfig.json --- x-pack/test/tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 301e5d3254c0d..0be1f0c98b1af 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -61,7 +61,7 @@ { "path": "../plugins/global_search_bar/tsconfig.json" }, { "path": "../plugins/license_management/tsconfig.json" }, { "path": "../plugins/watcher/tsconfig.json" }, - { "path": "./plugins/runtime_fields/tsconfig.json" }, - { "path": "./plugins/index_management/tsconfig.json" }, + { "path": "../plugins/runtime_fields/tsconfig.json" }, + { "path": "../plugins/index_management/tsconfig.json" }, ] } From ad72709355cc12802f0906320b16047209403272 Mon Sep 17 00:00:00 2001 From: Christiane Heiligers Date: Sat, 30 Jan 2021 07:08:09 -0700 Subject: [PATCH 5/6] reshuffle references --- x-pack/plugins/index_management/tsconfig.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/index_management/tsconfig.json b/x-pack/plugins/index_management/tsconfig.json index dec953e2d4726..87be6cfc2d627 100644 --- a/x-pack/plugins/index_management/tsconfig.json +++ b/x-pack/plugins/index_management/tsconfig.json @@ -17,15 +17,15 @@ ], "references": [ { "path": "../../../src/core/tsconfig.json" }, - { "path": "../licensing/tsconfig.json" }, - { "path": "../../../src/plugins/home/tsconfig.json"}, - { "path": "../../../src/plugins/management/tsconfig.json"}, - { "path": "../features/tsconfig.json"}, - { "path": "../../../src/plugins/share/tsconfig.json"}, - { "path": "../security/tsconfig.json"}, - { "path": "../../../src/plugins/usage_collection/tsconfig.json"}, + { "path": "../../../src/plugins/home/tsconfig.json" }, + { "path": "../../../src/plugins/management/tsconfig.json" }, + { "path": "../../../src/plugins/share/tsconfig.json" }, + { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, { "path": "../../../src/plugins/es_ui_shared/tsconfig.json" }, - { "path": "../runtime_fields/tsconfig.json"} + { "path": "../features/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + { "path": "../security/tsconfig.json" }, + { "path": "../runtime_fields/tsconfig.json" } ] } From c53a53d7c018e625525428ca9b095ce90f19eba8 Mon Sep 17 00:00:00 2001 From: Christiane Heiligers Date: Sat, 30 Jan 2021 07:23:53 -0700 Subject: [PATCH 6/6] formatting --- x-pack/tsconfig.refs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/tsconfig.refs.json b/x-pack/tsconfig.refs.json index 9fee64fa62999..0605b8d3df077 100644 --- a/x-pack/tsconfig.refs.json +++ b/x-pack/tsconfig.refs.json @@ -35,7 +35,7 @@ { "path": "./plugins/global_search_bar/tsconfig.json" }, { "path": "./plugins/license_management/tsconfig.json" }, { "path": "./plugins/painless_lab/tsconfig.json" }, - { "path": "./plugins/watcher/tsconfig.json" } + { "path": "./plugins/watcher/tsconfig.json" }, { "path": "./plugins/runtime_fields/tsconfig.json" }, { "path": "./plugins/index_management/tsconfig.json" } ]