diff --git a/src/app/controllers/dash.js b/src/app/controllers/dash.js index ed998aa6a77..35573616b38 100644 --- a/src/app/controllers/dash.js +++ b/src/app/controllers/dash.js @@ -72,6 +72,12 @@ function (angular, $, config, _) { $rootScope.fullscreen = false; }); + $rootScope.$on('dashboard-saved', function() { + if ($rootScope.fullscreen) { + $rootScope.$emit('panel-fullscreen-exit'); + } + }); + keyboardManager.bind('ctrl+f', function(evt) { $rootScope.$emit('open-search', evt); }, { inputDisabled: true }); diff --git a/src/app/controllers/dashLoader.js b/src/app/controllers/dashLoader.js index 92dca7508c5..3add0226a15 100644 --- a/src/app/controllers/dashLoader.js +++ b/src/app/controllers/dashLoader.js @@ -65,17 +65,18 @@ function (angular, _, moment) { type, ($scope.elasticsearch.title || dashboard.current.title), ($scope.loader.save_temp_ttl_enable ? ttl : false) - ).then( - function(result) { - if(!_.isUndefined(result._id)) { - alertSrv.set('Dashboard Saved','This dashboard has been saved to Elasticsearch as "' + - result._id + '"','success',5000); - if(type === 'temp') { - $scope.share = dashboard.share_link(dashboard.current.title,'temp',result._id); - } - } else { + ).then(function(result) { + if(_.isUndefined(result._id)) { alertSrv.set('Save failed','Dashboard could not be saved to Elasticsearch','error',5000); + return; } + + alertSrv.set('Dashboard Saved', 'This dashboard has been saved to Elasticsearch as "' + result._id + '"','success', 5000); + if(type === 'temp') { + $scope.share = dashboard.share_link(dashboard.current.title,'temp',result._id); + } + + $rootScope.$emit('dashboard-saved'); }); }; diff --git a/src/app/panels/graphite/module.js b/src/app/panels/graphite/module.js index 061821d9ac8..22b5bfe388b 100644 --- a/src/app/panels/graphite/module.js +++ b/src/app/panels/graphite/module.js @@ -56,9 +56,9 @@ function (angular, app, $, _, kbn, moment, timeSeries) { ], menuItems: [ - { text: 'View fullscreen', click: 'toggleFullscreen()' }, - { text: 'Edit', click: 'openConfigureModal()' }, - { text: 'Duplicate', click: 'duplicate()' }, + { text: 'Edit', click: 'openConfigureModal()' }, + { text: 'Fullscreen', click: 'toggleFullscreen()' }, + { text: 'Duplicate', click: 'duplicate()' }, { text: 'Span', submenu: [ { text: '1', click: 'updateColumnSpan(1)' }, { text: '2', click: 'updateColumnSpan(2)' }, diff --git a/src/app/panels/graphite/styleEditor.html b/src/app/panels/graphite/styleEditor.html index 748fd070c8a..e61bda19c4d 100644 --- a/src/app/panels/graphite/styleEditor.html +++ b/src/app/panels/graphite/styleEditor.html @@ -71,9 +71,7 @@ - -
Legend