diff --git a/src/core_plugins/kibana/public/visualize/editor/editor.html b/src/core_plugins/kibana/public/visualize/editor/editor.html index a782c53106dc6..05088606bb248 100644 --- a/src/core_plugins/kibana/public/visualize/editor/editor.html +++ b/src/core_plugins/kibana/public/visualize/editor/editor.html @@ -3,16 +3,14 @@
- -
+ - -
+ title="getVisualizationTitle()" + use-links="true" + omit-current-page="true" + omit-pages="['edit']" + >
- +
diff --git a/src/core_plugins/kibana/public/visualize/editor/editor.js b/src/core_plugins/kibana/public/visualize/editor/editor.js index 159ff5e01b98e..7d3201a8936b8 100644 --- a/src/core_plugins/kibana/public/visualize/editor/editor.js +++ b/src/core_plugins/kibana/public/visualize/editor/editor.js @@ -224,6 +224,10 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie $state.replace(); + $scope.getVisualizationTitle = function getVisualizationTitle() { + return savedVis.lastSavedTitle || 'New Visualization'; + }; + $scope.$watch('searchSource.get("index").timeFieldName', function (timeField) { timefilter.enabled = !!timeField; }); diff --git a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html index 7caa22b6139da..988a1f293f347 100644 --- a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html +++ b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.html @@ -50,7 +50,7 @@ diff --git a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js index 7ee61742b3084..0d136b962dd25 100644 --- a/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js +++ b/src/core_plugins/kibana/public/visualize/listing/visualize_listing.js @@ -66,18 +66,8 @@ export function VisualizeListingController( .catch(error => notify.error(error)); }; - this.open = function open(item) { - kbnUrl.change(item.url.substr(1)); - }; - - this.edit = function edit(item) { - const params = { - // TODO: Get this value from somewhere instead of hardcoding it. - service: 'savedVisualizations', - id: item.id - }; - - kbnUrl.change('/management/kibana/objects/{{ service }}/{{ id }}', params); + this.getUrlForItem = function getUrlForItem(item) { + return `#/visualize/edit/${item.id}`; }; $scope.$watch(() => this.filter, () => { diff --git a/src/core_plugins/kibana/public/visualize/wizard/step_1.html b/src/core_plugins/kibana/public/visualize/wizard/step_1.html index 076254ad41f91..7a6fc7907e57d 100644 --- a/src/core_plugins/kibana/public/visualize/wizard/step_1.html +++ b/src/core_plugins/kibana/public/visualize/wizard/step_1.html @@ -5,6 +5,7 @@
diff --git a/src/core_plugins/kibana/public/visualize/wizard/step_2.html b/src/core_plugins/kibana/public/visualize/wizard/step_2.html index 8000b70c57faf..ec924de7be201 100644 --- a/src/core_plugins/kibana/public/visualize/wizard/step_2.html +++ b/src/core_plugins/kibana/public/visualize/wizard/step_2.html @@ -5,6 +5,7 @@ diff --git a/src/core_plugins/kibana/public/visualize/wizard/wizard.js b/src/core_plugins/kibana/public/visualize/wizard/wizard.js index e7c33d4857a84..8bb9b28d736f0 100644 --- a/src/core_plugins/kibana/public/visualize/wizard/wizard.js +++ b/src/core_plugins/kibana/public/visualize/wizard/wizard.js @@ -15,7 +15,7 @@ const module = uiModules.get('app/visualize', ['kibana/courier']); /******** /** Wizard Step 1 /********/ -routes.when('/visualize/step/1', { +routes.when('/visualize/new', { template: visualizeWizardStep1Template, controller: 'VisualizeWizardStep1', }); @@ -28,7 +28,7 @@ module.controller('VisualizeWizardStep1', function ($scope, $route, kbnUrl, time $scope.visTypes = Private(RegistryVisTypesProvider); $scope.visTypeUrl = function (visType) { - const baseUrl = visType.requiresSearch ? '#/visualize/step/2?' : '#/visualize/create?'; + const baseUrl = visType.requiresSearch ? '#/visualize/new/configure?' : '#/visualize/create?'; const params = [`type=${encodeURIComponent(visType.name)}`]; if (addToDashMode) { params.push(DashboardConstants.ADD_VISUALIZATION_TO_DASHBOARD_MODE_PARAM); @@ -41,7 +41,7 @@ module.controller('VisualizeWizardStep1', function ($scope, $route, kbnUrl, time /******** /** Wizard Step 2 /********/ -routes.when('/visualize/step/2', { +routes.when('/visualize/new/configure', { template: visualizeWizardStep2Template, controller: 'VisualizeWizardStep2', resolve: { diff --git a/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.js b/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.js index f032005490a62..4a155219184dc 100644 --- a/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.js +++ b/src/ui/public/kbn_top_nav/bread_crumbs/bread_crumbs.js @@ -11,6 +11,11 @@ module.directive('breadCrumbs', function ($location) { replace: true, scope: { omitCurrentPage: '=', + /** + * Pages to omit from the breadcrumbs. Should be lower-case. + * @type {Array} + */ + omitPages: '=', /** * Optional title to append at the end of the breadcrumbs. Note that this can't just be * 'title', because that will be interpreted by browsers as an actual 'title' HTML attribute. @@ -32,6 +37,12 @@ module.directive('breadCrumbs', function ($location) { $scope.breadcrumbs.pop(); } + if ($scope.omitPages) { + $scope.breadcrumbs = $scope.breadcrumbs.filter(breadcrumb => + $scope.omitPages.indexOf(breadcrumb.toLowerCase()) === -1 + ); + } + if ($scope.useLinks) { const url = '#' + $location.path(); $scope.breadCrumbUrls = getBreadCrumbUrls($scope.breadcrumbs, url);