module.ts 790 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { MssqlDatasource } from './datasource';
  2. import { MssqlQueryCtrl } from './query_ctrl';
  3. class MssqlConfigCtrl {
  4. static templateUrl = 'partials/config.html';
  5. }
  6. const defaultQuery = `SELECT
  7. <time_column> as time,
  8. <text_column> as text,
  9. <tags_column> as tags
  10. FROM
  11. <table name>
  12. WHERE
  13. $__timeFilter(time_column)
  14. ORDER BY
  15. <time_column> ASC`;
  16. class MssqlAnnotationsQueryCtrl {
  17. static templateUrl = 'partials/annotations.editor.html';
  18. annotation: any;
  19. /** @ngInject */
  20. constructor() {
  21. this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
  22. }
  23. }
  24. export {
  25. MssqlDatasource,
  26. MssqlDatasource as Datasource,
  27. MssqlQueryCtrl as QueryCtrl,
  28. MssqlConfigCtrl as ConfigCtrl,
  29. MssqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  30. };