config_ctrl.ts 1.2 KB

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