diff --git a/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-add.controller.js b/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-add.controller.js index 0cad2dc9fa..620a68f1ac 100644 --- a/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-add.controller.js +++ b/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-add.controller.js @@ -17,7 +17,7 @@ $scope.toggleEnabled = function(){ $scope.host.enabled = !$scope.host.enabled; }; - $scope.formSave = function(){; + $scope.formSave = function(){ var params = { variables: $scope.extraVars === '---' || $scope.extraVars === '{}' ? null : $scope.extraVars, name: $scope.name, @@ -25,18 +25,18 @@ enabled: $scope.host.enabled, inventory: $stateParams.inventory_id }; - ManageHostsService.post(params).then(function(res){ + ManageHostsService.post(params).then(function(){ $state.go('^', null, {reload: true}); }); }; var init = function(){ $scope.host = {enabled: true}; generator.inject(form, {mode: 'add', related: false, id: 'Inventory-hostManage--panel', scope: $scope}); - ParseTypeChange({ - scope: $scope, - field_id: 'host_variables', - variable: 'extraVars', + ParseTypeChange({ + scope: $scope, + field_id: 'host_variables', + variable: 'extraVars', }); }; init(); - }]; \ No newline at end of file + }]; diff --git a/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-edit.controller.js b/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-edit.controller.js index b8322fbdf2..de733124fa 100644 --- a/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-edit.controller.js +++ b/awx/ui/client/src/inventories/manage/manage-hosts/manage-hosts-edit.controller.js @@ -24,7 +24,7 @@ description: $scope.description, enabled: $scope.host.enabled }; - ManageHostsService.put(host).then(function(res){ + ManageHostsService.put(host).then(function(){ $state.go('^', null, {reload: true}); }); }; @@ -34,12 +34,12 @@ generator.inject(form, {mode: 'edit', related: false, id: 'Inventory-hostManage--panel', scope: $scope}); $scope.extraVars = $scope.host.variables === '' ? '---' : $scope.host.variables; $scope.name = host.name; - $scope.description = host.description; - ParseTypeChange({ - scope: $scope, - field_id: 'host_variables', - variable: 'extraVars', + $scope.description = host.description; + ParseTypeChange({ + scope: $scope, + field_id: 'host_variables', + variable: 'extraVars', }); - }; + }; init(); - }]; \ No newline at end of file + }];