2018-03-13 10:03:02 -05:00
|
|
|
import { MssqlDatasource } from './datasource';
|
|
|
|
import { MssqlQueryCtrl } from './query_ctrl';
|
2018-10-15 19:40:40 -05:00
|
|
|
import { MssqlConfigCtrl } from './config_ctrl';
|
2017-12-02 05:40:12 -06:00
|
|
|
|
2018-03-19 07:06:46 -05:00
|
|
|
const defaultQuery = `SELECT
|
|
|
|
<time_column> as time,
|
2017-12-02 05:40:12 -06:00
|
|
|
<text_column> as text,
|
|
|
|
<tags_column> as tags
|
2018-03-19 07:06:46 -05:00
|
|
|
FROM
|
|
|
|
<table name>
|
|
|
|
WHERE
|
|
|
|
$__timeFilter(time_column)
|
|
|
|
ORDER BY
|
|
|
|
<time_column> ASC`;
|
2017-12-02 05:40:12 -06:00
|
|
|
|
|
|
|
class MssqlAnnotationsQueryCtrl {
|
|
|
|
static templateUrl = 'partials/annotations.editor.html';
|
|
|
|
|
|
|
|
annotation: any;
|
|
|
|
|
2018-08-31 09:40:43 -05:00
|
|
|
/** @ngInject */
|
2017-12-02 05:40:12 -06:00
|
|
|
constructor() {
|
|
|
|
this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
MssqlDatasource,
|
|
|
|
MssqlDatasource as Datasource,
|
|
|
|
MssqlQueryCtrl as QueryCtrl,
|
|
|
|
MssqlConfigCtrl as ConfigCtrl,
|
|
|
|
MssqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
|
|
|
|
};
|