From 6531283c9141c10cd3dd51ce6fa36b6d01d19354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastien=20Loix?= Date: Wed, 4 Nov 2020 12:04:22 +0100 Subject: [PATCH] Revert "Setup consumer (to be reverted)" This reverts commit f2779f40cf63c02a8df3839b271ac64208bda168. --- x-pack/plugins/index_management/kibana.json | 3 +-- .../public/application/app_context.tsx | 2 -- .../application/mount_management_section.ts | 3 --- .../public/application/sections/home/home.tsx | 25 +------------------ .../plugins/index_management/public/plugin.ts | 13 ++-------- 5 files changed, 4 insertions(+), 42 deletions(-) diff --git a/x-pack/plugins/index_management/kibana.json b/x-pack/plugins/index_management/kibana.json index b8ff62fdf6532..097ac03aabd22 100644 --- a/x-pack/plugins/index_management/kibana.json +++ b/x-pack/plugins/index_management/kibana.json @@ -7,8 +7,7 @@ "home", "licensing", "management", - "features", - "runtimeFields" + "features" ], "optionalPlugins": [ "security", 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 e32bf7367ab06..22e6f09907d75 100644 --- a/x-pack/plugins/index_management/public/application/app_context.tsx +++ b/x-pack/plugins/index_management/public/application/app_context.tsx @@ -11,7 +11,6 @@ import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; import { CoreSetup, CoreStart } from '../../../../../src/core/public'; import { IngestManagerSetup } from '../../../ingest_manager/public'; -import { RuntimeFieldsSetup } from '../../../runtime_fields/public'; import { IndexMgmtMetricsType } from '../types'; import { UiMetricService, NotificationService, HttpService } from './services'; import { ExtensionsService } from '../services'; @@ -25,7 +24,6 @@ export interface AppDependencies { }; plugins: { usageCollection: UsageCollectionSetup; - runtimeFields: RuntimeFieldsSetup; ingestManager?: IngestManagerSetup; }; services: { 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 dfda6a78f9e7c..f7b728c875762 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 @@ -10,7 +10,6 @@ import { ManagementAppMountParams } from 'src/plugins/management/public/'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; import { IngestManagerSetup } from '../../../ingest_manager/public'; -import { RuntimeFieldsSetup } from '../../../runtime_fields/public'; import { PLUGIN } from '../../common/constants'; import { ExtensionsService } from '../services'; import { IndexMgmtMetricsType } from '../types'; @@ -33,7 +32,6 @@ export async function mountManagementSection( usageCollection: UsageCollectionSetup, services: InternalServices, params: ManagementAppMountParams, - runtimeFields: RuntimeFieldsSetup, ingestManager?: IngestManagerSetup ) { const { element, setBreadcrumbs, history } = params; @@ -59,7 +57,6 @@ export async function mountManagementSection( plugins: { usageCollection, ingestManager, - runtimeFields, }, services, history, diff --git a/x-pack/plugins/index_management/public/application/sections/home/home.tsx b/x-pack/plugins/index_management/public/application/sections/home/home.tsx index 8b9a524c31314..ee8970a3c4509 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/home.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/home.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { useEffect, useCallback } from 'react'; +import React, { useEffect } from 'react'; import { Route, RouteComponentProps, Switch } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n/react'; import { @@ -17,16 +17,13 @@ import { EuiTab, EuiTabs, EuiTitle, - EuiButton, } from '@elastic/eui'; -import { RuntimeField } from '../../../../../runtime_fields/public'; import { documentationService } from '../../services/documentation'; import { DataStreamList } from './data_stream_list'; import { IndexList } from './index_list'; import { TemplateList } from './template_list'; import { ComponentTemplateList } from '../../components/component_templates'; import { breadcrumbService } from '../../services/breadcrumbs'; -import { useAppContext } from '../../app_context'; export enum Section { Indices = 'indices', @@ -46,8 +43,6 @@ interface MatchParams { section: Section; } -const defaultRuntimeField: RuntimeField = { name: 'myField', type: 'date', script: 'test=123' }; - export const IndexManagementHome: React.FunctionComponent> = ({ match: { params: { section }, @@ -92,19 +87,6 @@ export const IndexManagementHome: React.FunctionComponent { - console.log('Updated field', field); - }, []); - - const openRuntimeFieldEditor = useCallback(async () => { - const { openEditor } = await runtimeFields.loadEditor(); - openEditor({ onSave: onSaveRuntimeField, defaultValue: defaultRuntimeField }); - }, [onSaveRuntimeField, runtimeFields]); - useEffect(() => { breadcrumbService.setBreadcrumbs('home'); }, []); @@ -135,11 +117,6 @@ export const IndexManagementHome: React.FunctionComponent - - - Create field - - diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index 241c1e99a5f10..6139ed5d2e6ad 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -10,7 +10,6 @@ import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/p import { ManagementSetup } from '../../../../src/plugins/management/public'; import { IngestManagerSetup } from '../../ingest_manager/public'; -import { RuntimeFieldsSetup } from '../../runtime_fields/public'; import { UIM_APP_NAME, PLUGIN } from '../common/constants'; import { httpService } from './application/services/http'; @@ -31,7 +30,6 @@ interface PluginsDependencies { ingestManager?: IngestManagerSetup; usageCollection: UsageCollectionSetup; management: ManagementSetup; - runtimeFields: RuntimeFieldsSetup; } export class IndexMgmtUIPlugin { @@ -47,7 +45,7 @@ export class IndexMgmtUIPlugin { public setup(coreSetup: CoreSetup, plugins: PluginsDependencies): IndexManagementPluginSetup { const { http, notifications } = coreSetup; - const { ingestManager, usageCollection, management, runtimeFields } = plugins; + const { ingestManager, usageCollection, management } = plugins; httpService.setup(http); notificationService.setup(notifications); @@ -65,14 +63,7 @@ export class IndexMgmtUIPlugin { uiMetricService: this.uiMetricService, extensionsService: this.extensionsService, }; - return mountManagementSection( - coreSetup, - usageCollection, - services, - params, - runtimeFields, - ingestManager - ); + return mountManagementSection(coreSetup, usageCollection, services, params, ingestManager); }, });