Skip to content

Commit d3ca125

Browse files
committed
Add docs
1 parent 220c068 commit d3ca125

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/datasource.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ export class JsonDataSource extends DataSourceApi<JsonApiQuery, JsonApiDataSourc
3030
this.languageProvider = new JsonPathLanguageProvider(this);
3131
}
3232

33+
/**
34+
* metadataRequest is used by the language provider to return the JSON
35+
* document to generate suggestions for the QueryField.
36+
*
37+
* This is a custom method and is not part of the DataSourceApi, feel free to
38+
* name it as you like.
39+
*/
3340
async metadataRequest(query: JsonApiQuery, range?: TimeRange) {
3441
const scopedVars = {};
3542
const templateSrv = getTemplateSrv();

0 commit comments

Comments
 (0)