From 6d1dd95ab3400e7cd5e7aa9ef7e22a5472eca9a4 Mon Sep 17 00:00:00 2001 From: bmundt Date: Fri, 5 Aug 2016 04:03:46 -0400 Subject: [PATCH] adds check for making datasource template variables children of other template variables (#5717) --- public/app/features/templating/templateValuesSrv.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/templating/templateValuesSrv.js b/public/app/features/templating/templateValuesSrv.js index c03e43313f2..44904b07fad 100644 --- a/public/app/features/templating/templateValuesSrv.js +++ b/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); }