config_ctrl.ts 702 B

123456789101112131415161718192021222324252627
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import angular from 'angular';
  3. import _ from 'lodash';
  4. export class OpenTsConfigCtrl {
  5. static templateUrl = 'public/app/plugins/datasource/opentsdb/partials/config.html';
  6. current: any;
  7. /** @ngInject */
  8. constructor($scope) {
  9. this.current.jsonData = this.current.jsonData || {};
  10. this.current.jsonData.tsdbVersion = this.current.jsonData.tsdbVersion || 1;
  11. this.current.jsonData.tsdbResolution = this.current.jsonData.tsdbResolution || 1;
  12. }
  13. tsdbVersions = [
  14. {name: '<=2.1', value: 1},
  15. {name: '>=2.2', value: 2},
  16. ];
  17. tsdbResolutions = [
  18. {name: 'second', value: 1},
  19. {name: 'millisecond', value: 2},
  20. ];
  21. }