|
|
|
@ -30,6 +30,10 @@ function pluginDirectiveLoader($compile, datasourceSrv) { |
|
|
|
case "metrics-query-editor": { |
|
|
|
case "metrics-query-editor": { |
|
|
|
let datasource = scope.target.datasource || scope.ctrl.panel.datasource; |
|
|
|
let datasource = scope.target.datasource || scope.ctrl.panel.datasource; |
|
|
|
return datasourceSrv.get(datasource).then(ds => { |
|
|
|
return datasourceSrv.get(datasource).then(ds => { |
|
|
|
|
|
|
|
if (!scope.target.refId) { |
|
|
|
|
|
|
|
scope.target.refId = 'A'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return System.import(ds.meta.module).then(dsModule => { |
|
|
|
return System.import(ds.meta.module).then(dsModule => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
name: 'metrics-query-editor-' + ds.meta.id, |
|
|
|
name: 'metrics-query-editor-' + ds.meta.id, |
|
|
|
|