| 12345678910111213141516171819202122232425 |
- ///<reference path="../../headers/common.d.ts" />
- import angular from 'angular';
- /** @ngInject */
- function annotationsQueryEditor(dynamicDirectiveSrv) {
- return dynamicDirectiveSrv.create({
- scope: {
- annotation: "=",
- datasource: "="
- },
- watch: "datasource.type",
- 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);
|