mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(firefox): fixed js issue that made master build break in firefox
This commit is contained in:
parent
01d47fb280
commit
f6a3b53fb5
@ -40,9 +40,9 @@ class DynamicDirectiveSrv {
|
||||
restrict: 'E',
|
||||
scope: options.scope,
|
||||
link: (scope, elem, attrs) => {
|
||||
if (options.watch) {
|
||||
if (options.watchPath) {
|
||||
let childScope = null;
|
||||
scope.$watch(options.watch, () => {
|
||||
scope.$watch(options.watchPath, () => {
|
||||
if (childScope) {
|
||||
childScope.$destroy();
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ function annotationsQueryEditor(dynamicDirectiveSrv) {
|
||||
annotation: "=",
|
||||
datasource: "="
|
||||
},
|
||||
watch: "datasource.type",
|
||||
watchPath: "datasource.type",
|
||||
directive: scope => {
|
||||
return System.import(scope.datasource.meta.module).then(function(dsModule) {
|
||||
return {
|
||||
|
@ -9,7 +9,7 @@ function dsConfigView(dynamicDirectiveSrv) {
|
||||
dsMeta: "=",
|
||||
current: "="
|
||||
},
|
||||
watch: "dsMeta.module",
|
||||
watchPath: "dsMeta.module",
|
||||
directive: scope => {
|
||||
return System.import(scope.dsMeta.module).then(function(dsModule) {
|
||||
return {
|
||||
|
@ -5,7 +5,7 @@ import angular from 'angular';
|
||||
/** @ngInject */
|
||||
function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
|
||||
return dynamicDirectiveSrv.create({
|
||||
watch: "panel.datasource",
|
||||
watchPath: "panel.datasource",
|
||||
directive: scope => {
|
||||
let datasource = scope.target.datasource || scope.panel.datasource;
|
||||
return datasourceSrv.get(datasource).then(ds => {
|
||||
@ -29,7 +29,7 @@ function metricsQueryEditor(dynamicDirectiveSrv, datasourceSrv) {
|
||||
/** @ngInject */
|
||||
function metricsQueryOptions(dynamicDirectiveSrv, datasourceSrv) {
|
||||
return dynamicDirectiveSrv.create({
|
||||
watch: "panel.datasource",
|
||||
watchPath: "panel.datasource",
|
||||
directive: scope => {
|
||||
return datasourceSrv.get(scope.panel.datasource).then(ds => {
|
||||
return System.import(ds.meta.module).then(dsModule => {
|
||||
|
Loading…
Reference in New Issue
Block a user