grafana/src/app/controllers/submenuCtrl.js

38 lines
804 B
JavaScript
Raw Normal View History

2014-02-09 12:31:06 -06:00
define([
'angular',
'app',
2014-08-07 07:35:19 -05:00
'lodash'
2014-02-09 12:31:06 -06:00
],
function (angular, app, _) {
'use strict';
2014-07-28 11:11:52 -05:00
var module = angular.module('grafana.controllers');
2014-02-09 12:31:06 -06:00
module.controller('SubmenuCtrl', function($scope, $q, $rootScope, templateValuesSrv) {
2014-06-06 23:38:33 -05:00
var _d = {
enable: true
};
2014-02-09 12:31:06 -06:00
2014-06-06 23:38:33 -05:00
_.defaults($scope.pulldown,_d);
2014-02-09 12:31:06 -06:00
2014-06-06 23:38:33 -05:00
$scope.init = function() {
$scope.panel = $scope.pulldown;
$scope.row = $scope.pulldown;
$scope.templateParameters = $scope.dashboard.templating.list;
};
$scope.disableAnnotation = function (annotation) {
annotation.enable = !annotation.enable;
$rootScope.$broadcast('refresh');
};
$scope.filterOptionSelected = function(param, option) {
templateValuesSrv.filterOptionSelected(param, option);
};
2014-06-06 23:38:33 -05:00
$scope.init();
2014-02-09 12:31:06 -06:00
2014-06-06 23:38:33 -05:00
});
2014-02-09 12:31:06 -06:00
});