Commit c1c24169 by Torkel Ödegaard

Merge branch 'master' of github.com:grafana/grafana

parents adf7645b e527aebb
...@@ -77,6 +77,11 @@ export class VariableEditorCtrl { ...@@ -77,6 +77,11 @@ export class VariableEditorCtrl {
return false; return false;
} }
if ($scope.current.type === 'query' && $scope.current.query.match(new RegExp('\\$' + $scope.current.name))) {
$scope.appEvent('alert-warning', ['Validation', 'Query contains variable self-reference']);
return false;
}
return true; return true;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment