| 12345678910111213141516171819202122232425262728 |
- define([
- 'angular',
- 'lodash',
- ],
- function (angular, _) {
- 'use strict';
- var module = angular.module('grafana.controllers');
- module.controller('CloudWatchQueryCtrl', function($scope) {
- $scope.init = function() {
- $scope.target.divideSumByPeriod = $scope.target.divideSumByPeriod || false;
- $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();
- }
- };
- $scope.init();
- });
- });
|