query_ctrl.js 562 B

123456789101112131415161718192021222324252627
  1. define([
  2. 'angular',
  3. 'lodash',
  4. ],
  5. function (angular, _) {
  6. 'use strict';
  7. var module = angular.module('grafana.controllers');
  8. module.controller('CloudWatchQueryCtrl', function($scope) {
  9. $scope.init = function() {
  10. $scope.aliasSyntax = '{{metric}} {{stat}} {{namespace}} {{region}} {{<dimension name>}}';
  11. };
  12. $scope.refreshMetricData = function() {
  13. if (!_.isEqual($scope.oldTarget, $scope.target)) {
  14. $scope.oldTarget = angular.copy($scope.target);
  15. $scope.get_data();
  16. }
  17. };
  18. $scope.init();
  19. });
  20. });