Skip to content

Commit

Permalink
[ML] Tweak plugin setup types.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Mar 6, 2020
1 parent 6e97c31 commit 893275b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions x-pack/plugins/transform/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
import { i18n as kbnI18n } from '@kbn/i18n';

import { CoreSetup } from 'src/core/public';
import { DataPublicPluginStart } from 'src/plugins/data/public';
Expand All @@ -21,24 +21,24 @@ export interface PluginsDependencies {
}

export class TransformUiPlugin {
public setup(coreSetup: CoreSetup, pluginsSetup: PluginsDependencies): void {
public setup(coreSetup: CoreSetup<PluginsDependencies>, pluginsSetup: PluginsDependencies): void {
const { management } = pluginsSetup;

// Register management section
const esSection = management.sections.getSection('elasticsearch');
if (esSection !== undefined) {
esSection.registerApp({
id: 'transform',
title: i18n.translate('xpack.transform.appTitle', {
title: kbnI18n.translate('xpack.transform.appTitle', {
defaultMessage: 'Transforms',
}),
order: 3,
mount: async ({ element, setBreadcrumbs }) => {
const { http, notifications, getStartServices } = coreSetup;
const startServices = await getStartServices();
const [core, plugins] = startServices;
const { chrome, docLinks, uiSettings, savedObjects, overlays } = core;
const { data } = plugins as PluginsDependencies;
const { chrome, docLinks, i18n, overlays, savedObjects, uiSettings } = core;
const { data } = plugins;
const { docTitle } = chrome;

// Initialize services
Expand All @@ -49,14 +49,14 @@ export class TransformUiPlugin {
// AppCore/AppPlugins to be passed on as React context
const appDependencies: AppDependencies = {
chrome,
data,
docLinks,
http,
i18n: core.i18n,
i18n,
notifications,
uiSettings,
savedObjects,
overlays,
data,
savedObjects,
uiSettings,
};

return renderApp(element, appDependencies);
Expand Down

0 comments on commit 893275b

Please sign in to comment.