config_ctrl.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 =
  10. this.current.jsonData.timeField || "@timestamp";
  11. this.current.jsonData.authType =
  12. this.current.jsonData.authType || "credentials";
  13. this.accessKeyExist = this.current.secureJsonFields.accessKey;
  14. this.secretKeyExist = this.current.secureJsonFields.secretKey;
  15. }
  16. resetAccessKey() {
  17. this.accessKeyExist = false;
  18. }
  19. resetSecretKey() {
  20. this.secretKeyExist = false;
  21. }
  22. authTypes = [
  23. { name: "Access & secret key", value: "keys" },
  24. { name: "Credentials file", value: "credentials" },
  25. { name: "ARN", value: "arn" }
  26. ];
  27. indexPatternTypes = [
  28. { name: "No pattern", value: undefined },
  29. { name: "Hourly", value: "Hourly", example: "[logstash-]YYYY.MM.DD.HH" },
  30. { name: "Daily", value: "Daily", example: "[logstash-]YYYY.MM.DD" },
  31. { name: "Weekly", value: "Weekly", example: "[logstash-]GGGG.WW" },
  32. { name: "Monthly", value: "Monthly", example: "[logstash-]YYYY.MM" },
  33. { name: "Yearly", value: "Yearly", example: "[logstash-]YYYY" }
  34. ];
  35. }