Browse Source

Templating: Do not copy hide option (#16696)

* Do not override default `hide` value of variables

Some variables like `constant` are configured to
be hidden by default and this setting must be
treated with respect.

* make textBox variable visible by default

Fixes #16695
Roman Khavronenko 6 years ago
parent
commit
532abe2fc2

+ 1 - 1
public/app/features/templating/TextBoxVariable.ts

@@ -9,7 +9,7 @@ export class TextBoxVariable implements Variable {
   defaults = {
   defaults = {
     type: 'textbox',
     type: 'textbox',
     name: '',
     name: '',
-    hide: 2,
+    hide: 0,
     label: '',
     label: '',
     query: '',
     query: '',
     current: {},
     current: {},

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

@@ -163,7 +163,6 @@ export class VariableEditorCtrl {
         type: $scope.current.type,
         type: $scope.current.type,
       });
       });
       $scope.current.name = old.name;
       $scope.current.name = old.name;
-      $scope.current.hide = old.hide;
       $scope.current.label = old.label;
       $scope.current.label = old.label;
 
 
       const oldIndex = _.indexOf(this.variables, old);
       const oldIndex = _.indexOf(this.variables, old);