diff --git a/src/app/controllers/dash.js b/src/app/controllers/dash.js index 14aca114c4b..c4ab3669458 100644 --- a/src/app/controllers/dash.js +++ b/src/app/controllers/dash.js @@ -23,7 +23,6 @@ define([ 'config', 'underscore', 'services/all', - 'services/dashboard/all' ], function (angular, $, config, _) { "use strict"; @@ -119,12 +118,6 @@ function (angular, $, config, _) { return $scope.editorTabs; }; - // This is whoafully incomplete, but will do for now - $scope.parse_error = function(data) { - var _error = data.match("nested: (.*?);"); - return _.isNull(_error) ? data : _error[1]; - }; - $scope.colors = [ "#7EB26D","#EAB839","#6ED0E0","#EF843C","#E24D42","#1F78C1","#BA43A9","#705DA0", //1 "#508642","#CCA300","#447EBC","#C15C17","#890F02","#0A437C","#6D1F62","#584477", //2 diff --git a/src/app/controllers/dashLoader.js b/src/app/controllers/dashLoader.js index ec91b3e6e9e..16fa7a84635 100644 --- a/src/app/controllers/dashLoader.js +++ b/src/app/controllers/dashLoader.js @@ -48,20 +48,13 @@ function (angular, _, moment) { }; $scope.set_default = function() { - if($scope.dashboard.set_default($location.path())) { - alertSrv.set('Home Set','This page has been set as your default dashboard','success',5000); - } else { - alertSrv.set('Incompatible Browser','Sorry, your browser is too old for this feature','error',5000); - } + window.localStorage.grafanaDashboardDefault = $location.path(); + alertSrv.set('Home Set','This page has been set as your default dashboard','success',5000); }; $scope.purge_default = function() { - if($scope.dashboard.purge_default()) { - alertSrv.set('Local Default Clear','Your default dashboard has been reset to the default', - 'success',5000); - } else { - alertSrv.set('Incompatible Browser','Sorry, your browser is too old for this feature','error',5000); - } + delete window.localStorage.grafanaDashboardDefault; + alertSrv.set('Local Default Clear','Your default dashboard has been reset to the default','success', 5000); }; $scope.saveForSharing = function() { diff --git a/src/app/partials/dashLoader.html b/src/app/partials/dashLoader.html index 2d9b37975e0..7fadb03b57e 100644 --- a/src/app/partials/dashLoader.html +++ b/src/app/partials/dashLoader.html @@ -66,7 +66,7 @@ -