diff --git a/src/app/controllers/dashboardCtrl.js b/src/app/controllers/dashboardCtrl.js index 99b7a45a84f..346c25ec1a4 100644 --- a/src/app/controllers/dashboardCtrl.js +++ b/src/app/controllers/dashboardCtrl.js @@ -48,28 +48,22 @@ function (angular, $, config, _) { $scope.dashboard = dashboardSrv.create(dashboardData); $scope.dashboardViewState = dashboardViewStateSrv.create($scope); - $scope.grafana.style = $scope.dashboard.style; - + // init services timeSrv.init($scope.dashboard); templateValuesSrv.init($scope.dashboard); + panelMoveSrv.init($scope.dashboard, $scope); - $scope.submenuEnabled = $scope.dashboard.templating.enable || $scope.dashboard.annotations.enable; - - var panelMove = panelMoveSrv.create($scope.dashboard); - - $scope.panelMoveDrop = panelMove.onDrop; - $scope.panelMoveStart = panelMove.onStart; - $scope.panelMoveStop = panelMove.onStop; - $scope.panelMoveOver = panelMove.onOver; - $scope.panelMoveOut = panelMove.onOut; - - window.document.title = config.window_title_prefix + $scope.dashboard.title; - + $scope.checkFeatureToggles(); dashboardKeybindings.shortcuts($scope); $scope.emitAppEvent("dashboard-loaded", $scope.dashboard); }; + $scope.setWindowTitleAndTheme = function() { + window.document.title = config.window_title_prefix + $scope.dashboard.title; + $scope.grafana.style = $scope.dashboard.style; + }; + $scope.isPanel = function(obj) { if(!_.isNull(obj) && !_.isUndefined(obj) && !_.isUndefined(obj.type)) { return true; @@ -113,6 +107,10 @@ function (angular, $, config, _) { } }; + $scope.checkFeatureToggles = function() { + $scope.submenuEnabled = $scope.dashboard.templating.enable || $scope.dashboard.annotations.enable; + }; + $scope.setEditorTabs = function(panelMeta) { $scope.editorTabs = ['General','Panel']; if(!_.isUndefined(panelMeta.editorTabs)) { diff --git a/src/app/partials/annotations_editor.html b/src/app/partials/annotations_editor.html index f6aca707f46..f23a425e9c6 100644 --- a/src/app/partials/annotations_editor.html +++ b/src/app/partials/annotations_editor.html @@ -14,20 +14,30 @@
|
-
+
+
+
|
+ + + + Edit + + | ++ | + | + + + + | +