module.ts 865 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import {MysqlDatasource} from './datasource';
  3. import {MysqlQueryCtrl} from './query_ctrl';
  4. class MysqlConfigCtrl {
  5. static templateUrl = 'partials/config.html';
  6. }
  7. const defaultQuery = `SELECT
  8. UNIX_TIMESTAMP(<time_column>) as time_sec,
  9. <text_column> as text,
  10. <tags_column> as tags
  11. FROM <table name>
  12. WHERE $__timeFilter(time_column)
  13. ORDER BY <time_column> ASC
  14. LIMIT 100
  15. `;
  16. class MysqlAnnotationsQueryCtrl {
  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. MysqlDatasource,
  26. MysqlDatasource as Datasource,
  27. MysqlQueryCtrl as QueryCtrl,
  28. MysqlConfigCtrl as ConfigCtrl,
  29. MysqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  30. };