Skip to content

Commit d01c31e

Browse files
committed
Add annotation support
1 parent 90bfd34 commit d01c31e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/datasource.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
dateTime,
99
LiveChannelScope,
1010
DataQueryResponse,
11-
LoadingState,
11+
LoadingState
1212
} from '@grafana/data';
1313
import { DataSourceWithBackend, getGrafanaLiveSrv, getTemplateSrv } from '@grafana/runtime';
1414
import {
@@ -75,6 +75,8 @@ export class DataSource extends DataSourceWithBackend<MongoQuery, MongoDataSourc
7575
};
7676
}
7777

78+
annotations = {}
79+
7880
async metricFindQuery(query: VariableQuery, options?: LegacyMetricFindQueryOptions): Promise<MetricFindValue[]> {
7981
const request: DataQueryRequest<MongoQuery> = {
8082
requestId: 'variable-query-' + randomId(3),

src/plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"id": "haohanyang-mongodb-datasource",
88
"metrics": true,
99
"backend": true,
10+
"annotations": true,
1011
"executable": "gpx_mongodb_datasource",
1112
"info": {
1213
"description": "MongoDB integration and data source",

0 commit comments

Comments
 (0)