config_ctrl.ts 733 B

12345678910111213141516171819202122232425262728
  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. {name: '==2.3', value: 3},
  17. ];
  18. tsdbResolutions = [
  19. {name: 'second', value: 1},
  20. {name: 'millisecond', value: 2},
  21. ];
  22. }