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() {
|
2015-10-08 13:09:15 +02:00
|
|
|
$scope.aliasSyntax = '{{metric}} {{stat}} {{namespace}} {{region}} {{<dimension name>}}';
|
2015-09-02 12:36:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.refreshMetricData = function() {
|
2015-10-08 11:37:47 +02:00
|
|
|
if (!_.isEqual($scope.oldTarget, $scope.target)) {
|
2015-09-02 12:36:56 +02:00
|
|
|
$scope.oldTarget = angular.copy($scope.target);
|
|
|
|
|
$scope.get_data();
|
|
|
|
|
}
|
2015-07-30 11:37:31 +09:00
|
|
|
};
|
|
|
|
|
|
2015-09-02 12:36:56 +02:00
|
|
|
$scope.init();
|
|
|
|
|
|
2015-07-30 11:37:31 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|