config_ctrl.ts 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import angular from 'angular';
  3. import _ from 'lodash';
  4. export class CloudWatchConfigCtrl {
  5. static templateUrl = 'partials/config.html';
  6. current: any;
  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. }
  12. authTypes = [
  13. {name: 'Access & secret key', value: 'keys'},
  14. {name: 'Credentials file', value: 'credentials'},
  15. {name: 'ARN', value: 'arn'},
  16. ];
  17. indexPatternTypes = [
  18. {name: 'No pattern', value: undefined},
  19. {name: 'Hourly', value: 'Hourly', example: '[logstash-]YYYY.MM.DD.HH'},
  20. {name: 'Daily', value: 'Daily', example: '[logstash-]YYYY.MM.DD'},
  21. {name: 'Weekly', value: 'Weekly', example: '[logstash-]GGGG.WW'},
  22. {name: 'Monthly', value: 'Monthly', example: '[logstash-]YYYY.MM'},
  23. {name: 'Yearly', value: 'Yearly', example: '[logstash-]YYYY'},
  24. ];
  25. }