From e96c3bd0a89e0c914063cc115671644c56e61dcc Mon Sep 17 00:00:00 2001 From: Catherine Liu Date: Thu, 18 Oct 2018 14:52:34 -0400 Subject: [PATCH] Adds Canvas to Kibana Home (#24038) (#24225) * Adds Canvas to the feature registry * Removes timelion from the home page --- .../timelion/public/register_feature.js | 12 ++++-- x-pack/plugins/canvas/index.js | 1 + .../plugins/canvas/public/register_feature.js | 41 +++++++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 x-pack/plugins/canvas/public/register_feature.js diff --git a/src/core_plugins/timelion/public/register_feature.js b/src/core_plugins/timelion/public/register_feature.js index 0c10944780bbc7..cd2243bbd49594 100644 --- a/src/core_plugins/timelion/public/register_feature.js +++ b/src/core_plugins/timelion/public/register_feature.js @@ -17,16 +17,20 @@ * under the License. */ -import { FeatureCatalogueRegistryProvider, FeatureCatalogueCategory } from 'ui/registry/feature_catalogue'; +import { + FeatureCatalogueRegistryProvider, + FeatureCatalogueCategory, +} from 'ui/registry/feature_catalogue'; FeatureCatalogueRegistryProvider.register(() => { return { id: 'timelion', title: 'Timelion', - description: 'Use an expression language to analyze time series data and visualize the results.', + description: + 'Use an expression language to analyze time series data and visualize the results.', icon: 'timelionApp', path: '/app/timelion', - showOnHomePage: true, - category: FeatureCatalogueCategory.DATA + showOnHomePage: false, + category: FeatureCatalogueCategory.DATA, }; }); diff --git a/x-pack/plugins/canvas/index.js b/x-pack/plugins/canvas/index.js index f9353180518acd..2457c364df39e1 100644 --- a/x-pack/plugins/canvas/index.js +++ b/x-pack/plugins/canvas/index.js @@ -32,6 +32,7 @@ export function canvas(kibana) { 'plugins/canvas/lib/load_expression_types.js', 'plugins/canvas/lib/load_transitions.js', ], + home: ['plugins/canvas/register_feature'], mappings, }, diff --git a/x-pack/plugins/canvas/public/register_feature.js b/x-pack/plugins/canvas/public/register_feature.js new file mode 100644 index 00000000000000..658896d104bbdf --- /dev/null +++ b/x-pack/plugins/canvas/public/register_feature.js @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +/* + * 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. + */ + +import { + FeatureCatalogueRegistryProvider, + FeatureCatalogueCategory, +} from 'ui/registry/feature_catalogue'; + +FeatureCatalogueRegistryProvider.register(() => { + return { + id: 'canvas', + title: 'Canvas', + description: 'Showcase your data in a pixel-perfect way.', + icon: 'canvasApp', + path: '/app/canvas', + showOnHomePage: true, + category: FeatureCatalogueCategory.DATA, + }; +});