mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
35 lines
794 B
TypeScript
35 lines
794 B
TypeScript
import { MssqlDatasource } from './datasource';
|
|
import { MssqlQueryCtrl } from './query_ctrl';
|
|
|
|
class MssqlConfigCtrl {
|
|
static templateUrl = 'partials/config.html';
|
|
}
|
|
|
|
const defaultQuery = `SELECT TOP 100
|
|
$__utcTime(<time_column>),
|
|
<text_column> as text,
|
|
<tags_column> as tags
|
|
FROM <table name>
|
|
WHERE $__timeFilter(time_column)
|
|
ORDER BY <time_column> ASC
|
|
`;
|
|
|
|
class MssqlAnnotationsQueryCtrl {
|
|
static templateUrl = 'partials/annotations.editor.html';
|
|
|
|
annotation: any;
|
|
|
|
/** @ngInject **/
|
|
constructor() {
|
|
this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
|
|
}
|
|
}
|
|
|
|
export {
|
|
MssqlDatasource,
|
|
MssqlDatasource as Datasource,
|
|
MssqlQueryCtrl as QueryCtrl,
|
|
MssqlConfigCtrl as ConfigCtrl,
|
|
MssqlAnnotationsQueryCtrl as AnnotationsQueryCtrl,
|
|
};
|