config_ctrl.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ///<reference path="../../../headers/common.d.ts" />
  2. export class CloudWatchConfigCtrl {
  3. static templateUrl = 'partials/config.html';
  4. current: any;
  5. accessKeyExist = false;
  6. secretKeyExist = false;
  7. /** @ngInject */
  8. constructor($scope) {
  9. this.current.jsonData.timeField = this.current.jsonData.timeField || '@timestamp';
  10. this.current.jsonData.authType = this.current.jsonData.authType || 'credentials';
  11. this.accessKeyExist = this.current.secureJsonFields.accessKey;
  12. this.secretKeyExist = this.current.secureJsonFields.secretKey;
  13. }
  14. resetAccessKey() {
  15. this.accessKeyExist = false;
  16. }
  17. resetSecretKey() {
  18. this.secretKeyExist = false;
  19. }
  20. authTypes = [
  21. { name: 'Access & secret key', value: 'keys' },
  22. { name: 'Credentials file', value: 'credentials' },
  23. { name: 'ARN', value: 'arn' },
  24. ];
  25. indexPatternTypes = [
  26. { name: 'No pattern', value: undefined },
  27. { name: 'Hourly', value: 'Hourly', example: '[logstash-]YYYY.MM.DD.HH' },
  28. { name: 'Daily', value: 'Daily', example: '[logstash-]YYYY.MM.DD' },
  29. { name: 'Weekly', value: 'Weekly', example: '[logstash-]GGGG.WW' },
  30. { name: 'Monthly', value: 'Monthly', example: '[logstash-]YYYY.MM' },
  31. { name: 'Yearly', value: 'Yearly', example: '[logstash-]YYYY' },
  32. ];
  33. }