module.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. import InfluxDatasource from './datasource';
  2. import { InfluxQueryCtrl } from './query_ctrl';
  3. import {
  4. createChangeHandler,
  5. createResetHandler,
  6. PasswordFieldEnum,
  7. } from '../../../features/datasources/utils/passwordHandlers';
  8. class InfluxConfigCtrl {
  9. static templateUrl = 'partials/config.html';
  10. current: any;
  11. onPasswordReset: ReturnType<typeof createResetHandler>;
  12. onPasswordChange: ReturnType<typeof createChangeHandler>;
  13. constructor() {
  14. this.onPasswordReset = createResetHandler(this, PasswordFieldEnum.Password);
  15. this.onPasswordChange = createChangeHandler(this, PasswordFieldEnum.Password);
  16. this.current.jsonData.httpMode = this.current.jsonData.httpMode || 'GET';
  17. }
  18. httpMode = [{ name: 'GET', value: 'GET' }, { name: 'POST', value: 'POST' }];
  19. }
  20. class InfluxAnnotationsQueryCtrl {
  21. static templateUrl = 'partials/annotations.editor.html';
  22. }
  23. export {
  24. InfluxDatasource as Datasource,
  25. InfluxQueryCtrl as QueryCtrl,
  26. InfluxConfigCtrl as ConfigCtrl,
  27. InfluxAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  28. };