Skip to content

Commit

Permalink
Remove Open and New menu buttons from Visualize.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Feb 4, 2017
1 parent 93c9533 commit f243762
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
12 changes: 1 addition & 11 deletions src/core_plugins/kibana/public/visualize/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,10 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie
const searchSource = savedVis.searchSource;

$scope.topNavMenu = [{
key: 'new',
description: 'New Visualization',
run: function () { kbnUrl.change('/visualize/step/1', {}); },
testId: 'visualizeNewButton',
}, {
key: 'save',
description: 'Save Visualization',
template: require('plugins/kibana/visualize/editor/panels/save.html'),
testId: 'visualizeSaveButton',
}, {
key: 'open',
description: 'Open Saved Visualization',
run: function () { kbnUrl.change('/visualize', {}); },
testId: 'visualizeOpenButton',
}, {
key: 'share',
description: 'Share Visualization',
Expand Down Expand Up @@ -225,7 +215,7 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie
$state.replace();

$scope.getVisualizationTitle = function getVisualizationTitle() {
return savedVis.lastSavedTitle || 'New Visualization';
return savedVis.lastSavedTitle || `${savedVis.title} (unsaved)`;
};

$scope.$watch('searchSource.get("index").timeFieldName', function (timeField) {
Expand Down
11 changes: 5 additions & 6 deletions test/support/page_objects/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,6 @@ export default class VisualizePage {
});
}

clickNewVisualization() {
return PageObjects.common.findTestSubject('visualizeNewButton')
.click();
}

saveVisualization(vizName) {
return PageObjects.common.findTestSubject('visualizeSaveButton')
.click()
Expand Down Expand Up @@ -337,7 +332,11 @@ export default class VisualizePage {
}

clickLoadSavedVisButton() {
return PageObjects.common.findTestSubject('visualizeOpenButton')
// TODO: Use a test subject selector once we rewrite breadcrumbs to accept each breadcrumb
// element as a child instead of building the breadcrumbs dynamically.
return self.remote
.setFindTimeout(defaultFindTimeout)
.findByCssSelector('[href="#/visualize"]')
.click();
}

Expand Down

0 comments on commit f243762

Please sign in to comment.