module.ts 760 B

1234567891011121314151617181920212223242526272829303132
  1. import { PostgresDatasource } from './datasource';
  2. import { PostgresQueryCtrl } from './query_ctrl';
  3. import { PostgresConfigCtrl } from './config_ctrl';
  4. const defaultQuery = `SELECT
  5. extract(epoch from time_column) AS time,
  6. text_column as text,
  7. tags_column as tags
  8. FROM
  9. metric_table
  10. WHERE
  11. $__timeFilter(time_column)
  12. `;
  13. class PostgresAnnotationsQueryCtrl {
  14. static templateUrl = 'partials/annotations.editor.html';
  15. annotation: any;
  16. /** @ngInject */
  17. constructor() {
  18. this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
  19. }
  20. }
  21. export {
  22. PostgresDatasource,
  23. PostgresDatasource as Datasource,
  24. PostgresQueryCtrl as QueryCtrl,
  25. PostgresConfigCtrl as ConfigCtrl,
  26. PostgresAnnotationsQueryCtrl as AnnotationsQueryCtrl,
  27. };