소스 검색

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

Torkel Ödegaard 8 년 전
부모
커밋
c1c241698a
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      public/app/features/templating/editor_ctrl.ts

+ 5 - 0
public/app/features/templating/editor_ctrl.ts

@@ -77,6 +77,11 @@ export class VariableEditorCtrl {
         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;
     };