module.ts 949 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import angular from 'angular';
  3. import _ from 'lodash';
  4. import {MysqlDatasource} from './datasource';
  5. import {MysqlQueryCtrl} from './query_ctrl';
  6. class MysqlConfigCtrl {
  7. static templateUrl = 'partials/config.html';
  8. }
  9. const defaultQuery = `SELECT
  10. UNIX_TIMESTAMP(<time_column>) as time_sec,
  11. <title_column> as title,
  12. <text_column> as text,
  13. <tags_column> as tags
  14. FROM <table name>
  15. WHERE $__timeFilter(time_column)
  16. ORDER BY <time_column> ASC
  17. LIMIT 100
  18. `;
  19. class MysqlAnnotationsQueryCtrl {
  20. static templateUrl = 'partials/annotations.editor.html';
  21. annotation: any;
  22. /** @ngInject **/
  23. constructor() {
  24. this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
  25. }
  26. }
  27. export {
  28. MysqlDatasource,
  29. MysqlDatasource as Datasource,
  30. MysqlQueryCtrl as QueryCtrl,
  31. MysqlConfigCtrl as ConfigCtrl,
  32. MysqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  33. };