Files
grafana/public/app/plugins/datasource/cloudwatch/query_ctrl.js

28 lines
562 B
JavaScript
Raw Normal View History

2015-07-30 11:37:31 +09:00
define([
'angular',
'lodash',
],
2015-08-06 00:05:40 +09:00
function (angular, _) {
2015-07-30 11:37:31 +09:00
'use strict';
var module = angular.module('grafana.controllers');
2015-11-29 22:25:36 +09:00
module.controller('CloudWatchQueryCtrl', function($scope) {
2015-07-30 11:37:31 +09:00
$scope.init = function() {
$scope.aliasSyntax = '{{metric}} {{stat}} {{namespace}} {{region}} {{<dimension name>}}';
};
$scope.refreshMetricData = function() {
if (!_.isEqual($scope.oldTarget, $scope.target)) {
$scope.oldTarget = angular.copy($scope.target);
$scope.get_data();
}
2015-07-30 11:37:31 +09:00
};
$scope.init();
2015-07-30 11:37:31 +09:00
});
});