|
@@ -5,7 +5,7 @@ import angular from 'angular';
|
|
|
/** @ngInject */
|
|
/** @ngInject */
|
|
|
function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
|
|
function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
|
|
|
return dynamicDirectiveSrv.create({
|
|
return dynamicDirectiveSrv.create({
|
|
|
- watch: "panel.datasource",
|
|
|
|
|
|
|
+ watchPath: "panel.datasource",
|
|
|
directive: scope => {
|
|
directive: scope => {
|
|
|
let datasource = scope.target.datasource || scope.panel.datasource;
|
|
let datasource = scope.target.datasource || scope.panel.datasource;
|
|
|
return datasourceSrv.get(datasource).then(ds => {
|
|
return datasourceSrv.get(datasource).then(ds => {
|
|
@@ -29,7 +29,7 @@ function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
|
|
|
/** @ngInject */
|
|
/** @ngInject */
|
|
|
function metricsQueryOptions(dynamicDirectiveSrv, datasourceSrv) {
|
|
function metricsQueryOptions(dynamicDirectiveSrv, datasourceSrv) {
|
|
|
return dynamicDirectiveSrv.create({
|
|
return dynamicDirectiveSrv.create({
|
|
|
- watch: "panel.datasource",
|
|
|
|
|
|
|
+ watchPath: "panel.datasource",
|
|
|
directive: scope => {
|
|
directive: scope => {
|
|
|
return datasourceSrv.get(scope.panel.datasource).then(ds => {
|
|
return datasourceSrv.get(scope.panel.datasource).then(ds => {
|
|
|
return System.import(ds.meta.module).then(dsModule => {
|
|
return System.import(ds.meta.module).then(dsModule => {
|