define([ 'angular', 'lodash', ], function (angular, _) { 'use strict'; var module = angular.module('grafana.controllers'); module.controller('CloudWatchQueryCtrl', function($scope) { $scope.init = function() { $scope.aliasSyntax = '{{metric}} {{stat}} {{namespace}} {{region}} {{}}'; }; $scope.refreshMetricData = function() { if (!_.isEqual($scope.oldTarget, $scope.target)) { $scope.oldTarget = angular.copy($scope.target); $scope.get_data(); } }; $scope.init(); }); });