mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
38 lines
834 B
JavaScript
38 lines
834 B
JavaScript
define([
|
|
'angular',
|
|
'lodash'
|
|
],
|
|
function (angular, _) {
|
|
'use strict';
|
|
|
|
var module = angular.module('grafana.controllers');
|
|
|
|
module.controller('SubmenuCtrl', function($scope, $q, $rootScope, templateValuesSrv) {
|
|
var _d = {
|
|
enable: true
|
|
};
|
|
|
|
_.defaults($scope.pulldown,_d);
|
|
|
|
$scope.init = function() {
|
|
$scope.panel = $scope.pulldown;
|
|
$scope.row = $scope.pulldown;
|
|
$scope.variables = $scope.dashboard.templating.list;
|
|
$scope.annotations = $scope.dashboard.templating.list;
|
|
};
|
|
|
|
$scope.disableAnnotation = function (annotation) {
|
|
annotation.enable = !annotation.enable;
|
|
$rootScope.$broadcast('refresh');
|
|
};
|
|
|
|
$scope.setVariableValue = function(param, option) {
|
|
templateValuesSrv.setVariableValue(param, option);
|
|
};
|
|
|
|
$scope.init();
|
|
|
|
});
|
|
|
|
});
|