config_ctrl.ts 692 B

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