Commit 1d8222ef by bergquist

feat(example): add basic annotation support for ds

parent ee635be4
......@@ -8,7 +8,7 @@
"staticRoot": ".",
"metrics": true,
"annotations": false,
"annotations": true,
"info": {
"description": "generic datsource plugin",
......
......@@ -37,6 +37,15 @@ export class GenericDatasource {
});
}
annotationQuery(options) {
return this.backendSrv.datasourceRequest({
url: this.url + '/annotations',
method: 'GET'
}).then(result => {
return result.data;
});
}
// Optional
// Required for templating
metricFindQuery(options) {
......
......@@ -7,9 +7,13 @@ GenericConfigCtrl.templateUrl = 'partials/config.html';
class GenericQueryOptionsCtrl {}
GenericQueryOptionsCtrl.templateUrl = 'partials/query.options.html';
class GenericAnnotationsQueryCtrl {}
GenericAnnotationsQueryCtrl.templateUrl = 'partials/annotations.editor.html'
export {
GenericDatasource as Datasource,
GenericDatasourceQueryCtrl as QueryCtrl,
GenericConfigCtrl as ConfigCtrl,
GenericQueryOptionsCtrl as QueryOptionsCtrl
GenericQueryOptionsCtrl as QueryOptionsCtrl,
GenericAnnotationsQueryCtrl as AnnotationsQueryCtrl
};
<h5 class="section-heading">Query</h5>
<div class="gf-form-group">
<div class="gf-form">
<input type="text" class="gf-form-input" ng-model='ctrl.annotation.query' placeholder=""></input>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment