Skip to content

Commit

Permalink
Revert "Setup consumer (to be reverted)"
Browse files Browse the repository at this point in the history
This reverts commit f2779f4.
  • Loading branch information
sebelga committed Nov 4, 2020
1 parent 7808ce3 commit 6531283
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 42 deletions.
3 changes: 1 addition & 2 deletions x-pack/plugins/index_management/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"home",
"licensing",
"management",
"features",
"runtimeFields"
"features"
],
"optionalPlugins": [
"security",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -25,7 +24,6 @@ export interface AppDependencies {
};
plugins: {
usageCollection: UsageCollectionSetup;
runtimeFields: RuntimeFieldsSetup;
ingestManager?: IngestManagerSetup;
};
services: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -33,7 +32,6 @@ export async function mountManagementSection(
usageCollection: UsageCollectionSetup,
services: InternalServices,
params: ManagementAppMountParams,
runtimeFields: RuntimeFieldsSetup,
ingestManager?: IngestManagerSetup
) {
const { element, setBreadcrumbs, history } = params;
Expand All @@ -59,7 +57,6 @@ export async function mountManagementSection(
plugins: {
usageCollection,
ingestManager,
runtimeFields,
},
services,
history,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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',
Expand All @@ -46,8 +43,6 @@ interface MatchParams {
section: Section;
}

const defaultRuntimeField: RuntimeField = { name: 'myField', type: 'date', script: 'test=123' };

export const IndexManagementHome: React.FunctionComponent<RouteComponentProps<MatchParams>> = ({
match: {
params: { section },
Expand Down Expand Up @@ -92,19 +87,6 @@ export const IndexManagementHome: React.FunctionComponent<RouteComponentProps<Ma
history.push(`/${newSection}`);
};

const {
plugins: { runtimeFields },
} = useAppContext();

const onSaveRuntimeField = useCallback((field: RuntimeField) => {
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');
}, []);
Expand Down Expand Up @@ -135,11 +117,6 @@ export const IndexManagementHome: React.FunctionComponent<RouteComponentProps<Ma
/>
</EuiButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton onClick={openRuntimeFieldEditor} fill>
Create field
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</EuiTitle>

Expand Down
13 changes: 2 additions & 11 deletions x-pack/plugins/index_management/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -31,7 +30,6 @@ interface PluginsDependencies {
ingestManager?: IngestManagerSetup;
usageCollection: UsageCollectionSetup;
management: ManagementSetup;
runtimeFields: RuntimeFieldsSetup;
}

export class IndexMgmtUIPlugin {
Expand All @@ -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);
Expand All @@ -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);
},
});

Expand Down

0 comments on commit 6531283

Please sign in to comment.