diff --git a/awx/ui/client/src/inventories/manage/hosts/hosts-add.controller.js b/awx/ui/client/src/inventories/manage/hosts/hosts-add.controller.js index 3b620fb950..d0dd6c3c86 100644 --- a/awx/ui/client/src/inventories/manage/hosts/hosts-add.controller.js +++ b/awx/ui/client/src/inventories/manage/hosts/hosts-add.controller.js @@ -10,7 +10,6 @@ var generator = GenerateForm, form = HostForm; $scope.parseType = 'yaml'; - $scope.extraVars = '---'; $scope.formCancel = function(){ $state.go('^'); }; @@ -19,7 +18,7 @@ }; $scope.formSave = function(){ var params = { - variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars, + variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables, name: $scope.name, description: $scope.description, enabled: $scope.host.enabled, @@ -43,7 +42,6 @@ ParseTypeChange({ scope: $scope, field_id: 'host_variables', - variable: 'extraVars', }); }; init(); diff --git a/awx/ui/client/src/inventories/manage/hosts/hosts-edit.controller.js b/awx/ui/client/src/inventories/manage/hosts/hosts-edit.controller.js index 7241cc6069..9098e53333 100644 --- a/awx/ui/client/src/inventories/manage/hosts/hosts-edit.controller.js +++ b/awx/ui/client/src/inventories/manage/hosts/hosts-edit.controller.js @@ -19,7 +19,7 @@ $scope.formSave = function(){ var host = { id: $scope.host.id, - variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars, + variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables, name: $scope.name, description: $scope.description, enabled: $scope.host.enabled @@ -30,15 +30,13 @@ }; var init = function(){ $scope.host = host; - $scope.extraVars = host.variables === '' ? '---' : host.variables; generator.inject(form, {mode: 'edit', related: false, id: 'Inventory-hostManage--panel', scope: $scope}); - $scope.extraVars = $scope.host.variables === '' ? '---' : $scope.host.variables; + $scope.variables = host.variables === '' ? '---' : host.variables; $scope.name = host.name; $scope.description = host.description; ParseTypeChange({ scope: $scope, field_id: 'host_variables', - variable: 'extraVars', }); }; init();