module.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. define([
  2. 'angular',
  3. './datasource',
  4. './query_parameter_ctrl',
  5. ],
  6. function (angular, CloudWatchDatasource) {
  7. 'use strict';
  8. var module = angular.module('grafana.directives');
  9. module.directive('metricQueryEditorCloudwatch', function() {
  10. return {controller: 'CloudWatchQueryCtrl', templateUrl: 'app/plugins/datasource/cloudwatch/partials/query.editor.html'};
  11. });
  12. module.directive('annotationsQueryEditorCloudwatch', function() {
  13. return {templateUrl: 'app/plugins/datasource/cloudwatch/partials/annotations.editor.html'};
  14. });
  15. module.directive('cloudwatchQueryParameter', function() {
  16. return {
  17. templateUrl: 'app/plugins/datasource/cloudwatch/partials/query.parameter.html',
  18. controller: 'CloudWatchQueryParameterCtrl',
  19. restrict: 'E',
  20. scope: {
  21. target: "=",
  22. datasourceName: "@",
  23. onChange: "&",
  24. }
  25. };
  26. });
  27. function configView() {
  28. return {templateUrl: 'app/plugins/datasource/cloudwatch/partials/edit_view.html'};
  29. }
  30. return {
  31. Datasource: CloudWatchDatasource,
  32. configView: configView,
  33. };
  34. });