Skip to content

Commit

Permalink
Migrate feature registration to NP
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Jan 13, 2020
1 parent fba34eb commit 4cb4e5e
Showing 1 changed file with 14 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@
* you may not use this file except in compliance with the Elastic License.
*/

import {
FeatureCatalogueRegistryProvider,
FeatureCatalogueCategory,
} from 'ui/registry/feature_catalogue';

import { i18n } from '@kbn/i18n';
import { npSetup } from 'ui/new_platform';
import { FeatureCatalogueCategory } from '../../../../../src/plugins/home/public';

FeatureCatalogueRegistryProvider.register(() => {
return {
id: 'painless_playground',
title: i18n.translate('xpack.painlessPlayground.registryProviderTitle', {
defaultMessage: 'Painless Playground',
}),
description: i18n.translate('xpack.painlessPlayground.registryProviderDescription', {
defaultMessage: 'Simulate and debug painless code',
}),
icon: '',
path: '/app/kibana#/dev_tools/painless_playground',
showOnHomePage: false,
category: FeatureCatalogueCategory.ADMIN,
};
npSetup.plugins.home.featureCatalogue.register({
id: 'painless_playground',
title: i18n.translate('xpack.painlessPlayground.registryProviderTitle', {
defaultMessage: 'Painless Playground',
}),
description: i18n.translate('xpack.painlessPlayground.registryProviderDescription', {
defaultMessage: 'Simulate and debug painless code',
}),
icon: '',
path: '/app/kibana#/dev_tools/painless_playground',
showOnHomePage: false,
category: FeatureCatalogueCategory.ADMIN,
});

0 comments on commit 4cb4e5e

Please sign in to comment.