From 3726fc61426ccbb9c0dbdcb4ba2c1ba68c08ee36 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Fri, 14 Nov 2014 17:36:30 -0700 Subject: [PATCH 1/9] [visaulize] [dash] handle titles like discover --- src/kibana/plugins/dashboard/index.html | 2 +- src/kibana/plugins/visualize/editor/editor.html | 2 +- src/kibana/plugins/visualize/saved_visualizations/_saved_vis.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kibana/plugins/dashboard/index.html b/src/kibana/plugins/dashboard/index.html index 1eec9641c2c17..85fbe95c59b67 100644 --- a/src/kibana/plugins/dashboard/index.html +++ b/src/kibana/plugins/dashboard/index.html @@ -1,7 +1,7 @@
diff --git a/src/kibana/plugins/visualize/saved_visualizations/_saved_vis.js b/src/kibana/plugins/visualize/saved_visualizations/_saved_vis.js index 72c5a51977dcd..fe7f46f2d28bd 100644 --- a/src/kibana/plugins/visualize/saved_visualizations/_saved_vis.js +++ b/src/kibana/plugins/visualize/saved_visualizations/_saved_vis.js @@ -28,7 +28,7 @@ define(function (require) { }, defaults: { - title: '', + title: 'New Visualization', visState: (function () { if (!opts.type) return null; var def = {}; From 153575eea762953f22b1df534f30464bbd882924 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Fri, 14 Nov 2014 17:37:24 -0700 Subject: [PATCH 2/9] [kibana] expose the current app on $rootScope --- src/kibana/controllers/kibana.js | 5 +---- src/kibana/index.html | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/kibana/controllers/kibana.js b/src/kibana/controllers/kibana.js index 701a4e2687ea4..ec0c01daadfff 100644 --- a/src/kibana/controllers/kibana.js +++ b/src/kibana/controllers/kibana.js @@ -131,15 +131,12 @@ define(function (require) { function onRouteChange() { var route = $location.path().split(/\//); - var app = _.find($scope.apps, {id: route[1]}); + var app = $rootScope.activeApp = _.find($scope.apps, {id: route[1]}); if (!app) return; // Record the last URL w/ state of the app, use for tab. lastPathFor(app, globalState.removeFromUrl($location.url())); - - // Set class of container to application- - $scope.activeApp = route ? route[1] : null; } $rootScope.$on('$routeChangeSuccess', onRouteChange); diff --git a/src/kibana/index.html b/src/kibana/index.html index 689c317fb7d8a..ff2b7367ff9be 100644 --- a/src/kibana/index.html +++ b/src/kibana/index.html @@ -25,7 +25,7 @@ require(['kibana'], function (kibana) { kibana.init(); }); - +