module.ts 794 B

12345678910111213141516171819202122232425262728293031323334
  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 TOP 100
  7. $__utcTime(<time_column>),
  8. <text_column> as text,
  9. <tags_column> as tags
  10. FROM <table name>
  11. WHERE $__timeFilter(time_column)
  12. ORDER BY <time_column> ASC
  13. `;
  14. class MssqlAnnotationsQueryCtrl {
  15. static templateUrl = 'partials/annotations.editor.html';
  16. annotation: any;
  17. /** @ngInject **/
  18. constructor() {
  19. this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
  20. }
  21. }
  22. export {
  23. MssqlDatasource,
  24. MssqlDatasource as Datasource,
  25. MssqlQueryCtrl as QueryCtrl,
  26. MssqlConfigCtrl as ConfigCtrl,
  27. MssqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  28. };