mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
26 lines
678 B
TypeScript
26 lines
678 B
TypeScript
///<reference path="../../headers/common.d.ts" />
|
|
|
|
import angular from 'angular';
|
|
|
|
/** @ngInject */
|
|
function annotationsQueryEditor(dynamicDirectiveSrv) {
|
|
return dynamicDirectiveSrv.create({
|
|
scope: {
|
|
annotation: "=",
|
|
datasource: "="
|
|
},
|
|
watchPath: "annotation.datasource",
|
|
directive: scope => {
|
|
return System.import(scope.datasource.meta.module).then(function(dsModule) {
|
|
return {
|
|
name: 'annotation-query-editor-' + scope.datasource.meta.id,
|
|
fn: dsModule.annotationsQueryEditor,
|
|
};
|
|
});
|
|
},
|
|
});
|
|
}
|
|
|
|
|
|
angular.module('grafana.directives').directive('annotationsQueryEditor', annotationsQueryEditor);
|