Commit 9b6571fa by bergquist

template: dont allow template variables to begin with '__'

closes #7678
parent 3ef077c1
...@@ -10,6 +10,7 @@ export class VariableEditorCtrl { ...@@ -10,6 +10,7 @@ export class VariableEditorCtrl {
constructor(private $scope, private datasourceSrv, private variableSrv, templateSrv) { constructor(private $scope, private datasourceSrv, private variableSrv, templateSrv) {
$scope.variableTypes = variableTypes; $scope.variableTypes = variableTypes;
$scope.ctrl = {}; $scope.ctrl = {};
$scope.namePattern = /^((?!__).)*$/;
$scope.refreshOptions = [ $scope.refreshOptions = [
{value: 0, text: "Never"}, {value: 0, text: "Never"},
......
...@@ -66,6 +66,25 @@ $gf-form-margin: 0.25rem; ...@@ -66,6 +66,25 @@ $gf-form-margin: 0.25rem;
} }
} }
.gf-form-error {
padding: $input-padding-y $input-padding-x;
margin-right: $gf-form-margin;
flex-shrink: 0;
background-color: $input-label-bg;
display: block;
font-size: $font-size-sm;
margin-right: $gf-form-margin;
border: $input-btn-border-width solid $red;
@include border-radius($label-border-radius-sm);
&--grow {
flex-grow: 1;
min-height: 2.60rem;
}
}
.gf-form-checkbox { .gf-form-checkbox {
flex-shrink: 0; flex-shrink: 0;
padding: $input-padding-y $input-padding-x; padding: $input-padding-y $input-padding-x;
......
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