diff --git a/awx/ui/client/src/forms/Hosts.js b/awx/ui/client/src/forms/Hosts.js index 4158917fc2..23df0f009d 100644 --- a/awx/ui/client/src/forms/Hosts.js +++ b/awx/ui/client/src/forms/Hosts.js @@ -20,6 +20,8 @@ export default well: false, formLabelSize: 'col-lg-3', formFieldSize: 'col-lg-9', + cancelButton: false, + showHeader: false, fields: { name: { diff --git a/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.controller.js b/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.controller.js index 87b706a48b..2940bf810c 100644 --- a/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.controller.js +++ b/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.controller.js @@ -30,23 +30,22 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam url, form_scope; var host_id = $stateParams.host_id || undefined; - + var hostName = ''; form_scope = generator.inject(HostForm, { - mode: 'edit', + mode: mode, id: 'host-panel-form', related: false, scope: scope, - cancelButton: false }); generator.reset(); - // Retrieve detail record and prepopulate the form if (mode === 'edit') { defaultUrl = GetBasePath('hosts') + host_id + '/'; Rest.setUrl(defaultUrl); Rest.get() .success(function(data) { + vm.hostName = data.name; var set, fld, related; for (fld in form.fields) { if (data[fld]) { @@ -187,7 +186,8 @@ function manageHostsDirectiveController($rootScope, $location, $log, $stateParam angular.extend(vm, { cancelPanel: cancelPanel, saveHost: saveHost, - mode: mode + mode: mode, + hostName: hostName }); } diff --git a/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.partial.html b/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.partial.html index 31c2249234..16bb9e16ac 100644 --- a/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.partial.html +++ b/awx/ui/client/src/inventories/manage/manage-hosts/directive/manage-hosts.directive.partial.html @@ -1,25 +1,20 @@