mirror of
https://github.com/grafana/grafana.git
synced 2025-09-22 20:19:05 +08:00
SQL data sources: Convert to return data frames (#32257)
Convert SQL data sources to return data frames. Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Will Browne <will.browne@grafana.com> Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
import { PostgresDatasource } from './datasource';
|
||||
import { PostgresQueryCtrl } from './query_ctrl';
|
||||
import { PostgresConfigCtrl } from './config_ctrl';
|
||||
import { PostgresQuery } from './types';
|
||||
import { DataSourcePlugin } from '@grafana/data';
|
||||
|
||||
const defaultQuery = `SELECT
|
||||
extract(epoch from time_column) AS time,
|
||||
@ -24,10 +26,7 @@ class PostgresAnnotationsQueryCtrl {
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
PostgresDatasource,
|
||||
PostgresDatasource as Datasource,
|
||||
PostgresQueryCtrl as QueryCtrl,
|
||||
PostgresConfigCtrl as ConfigCtrl,
|
||||
PostgresAnnotationsQueryCtrl as AnnotationsQueryCtrl,
|
||||
};
|
||||
export const plugin = new DataSourcePlugin<PostgresDatasource, PostgresQuery>(PostgresDatasource)
|
||||
.setQueryCtrl(PostgresQueryCtrl)
|
||||
.setConfigCtrl(PostgresConfigCtrl)
|
||||
.setAnnotationQueryCtrl(PostgresAnnotationsQueryCtrl);
|
||||
|
Reference in New Issue
Block a user