module.ts 813 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { MysqlDatasource } from './datasource';
  2. import { MysqlQueryCtrl } from './query_ctrl';
  3. class MysqlConfigCtrl {
  4. static templateUrl = 'partials/config.html';
  5. }
  6. const defaultQuery = `SELECT
  7. UNIX_TIMESTAMP(<time_column>) as time_sec,
  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. LIMIT 100
  14. `;
  15. class MysqlAnnotationsQueryCtrl {
  16. static templateUrl = 'partials/annotations.editor.html';
  17. annotation: any;
  18. /** @ngInject */
  19. constructor() {
  20. this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
  21. }
  22. }
  23. export {
  24. MysqlDatasource,
  25. MysqlDatasource as Datasource,
  26. MysqlQueryCtrl as QueryCtrl,
  27. MysqlConfigCtrl as ConfigCtrl,
  28. MysqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  29. };