Skip to content

Commit

Permalink
Fix usage of feature catalogue and fix time buckets types
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Nov 21, 2019
1 parent 04709a4 commit 8067bd0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
22 changes: 22 additions & 0 deletions src/legacy/ui/public/time_buckets/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

declare module 'ui/time_buckets' {
export const TimeBuckets: any;
}
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/watcher/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "watcher",
"version": "kibana",
"requiredPlugins": [
"feature_catalogue"
"home"
],
"server": true,
"ui": true
Expand Down
8 changes: 3 additions & 5 deletions x-pack/legacy/plugins/watcher/public/register_feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@

import { i18n } from '@kbn/i18n';
import { npSetup } from 'ui/new_platform';
import { FeatureCatalogueCategory } from 'ui/registry/feature_catalogue';

// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { FeatureCatalogueCategory } from '../../../../../src/plugins/feature_catalogue/public/services';

npSetup.plugins.feature_catalogue.register({
npSetup.plugins.home.featureCatalogue.register({
id: 'watcher',
title: 'Watcher', // This is a product name so we don't translate it.
category: FeatureCatalogueCategory.ADMIN,
description: i18n.translate('xpack.watcher.watcherDescription', {
defaultMessage: 'Detect changes in your data by creating, managing, and monitoring alerts.',
}),
icon: 'watchesApp',
path: '/app/kibana#/management/elasticsearch/watcher/watches',
showOnHomePage: true,
category: FeatureCatalogueCategory.ADMIN,
});

0 comments on commit 8067bd0

Please sign in to comment.