Просмотр исходного кода

adds check for making datasource template variables children of other template variables (#5717)

bmundt 9 лет назад
Родитель
Сommit
6d1dd95ab3
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      public/app/features/templating/templateValuesSrv.js

+ 3 - 1
public/app/features/templating/templateValuesSrv.js

@@ -166,7 +166,9 @@ function (angular, _, $, kbn) {
         if (otherVariable === updatedVariable) {
           return;
         }
-        if (templateSrv.containsVariable(otherVariable.query, updatedVariable.name) ||
+        if ((otherVariable.type === "datasource" &&
+            templateSrv.containsVariable(otherVariable.regex, updatedVariable.name)) ||
+            templateSrv.containsVariable(otherVariable.query, updatedVariable.name) ||
             templateSrv.containsVariable(otherVariable.datasource, updatedVariable.name)) {
           return self.updateOptions(otherVariable);
         }