diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index f48967bbaf..e15e329bb7 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -623,6 +623,10 @@ function HomeHosts($scope, $location, $routeParams, HomeHostList, GenerateList, LoadBreadCrumbs(); + $scope.refreshHosts = function() { + $scope.search(list.iterator); + }; + $scope.viewJob = function(id) { ViewJob({ scope: $scope, id: id }); }; @@ -649,7 +653,7 @@ function HomeHosts($scope, $location, $routeParams, HomeHostList, GenerateList, }); if (host) { HostsEdit({ - scope: $scope, + host_scope: $scope, host_id: host_id, inventory_id: host.inventory, group_id: null, diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js index 18b3094a1c..4cb953d165 100644 --- a/awx/ui/static/js/helpers/Hosts.js +++ b/awx/ui/static/js/helpers/Hosts.js @@ -621,7 +621,12 @@ function($rootScope, $location, $log, $routeParams, Rest, Alert, HostForm, Gener catch(err) { // ignore } - group_scope.refreshHosts(); + if (group_scope && group_scope.refreshHosts) { + group_scope.refreshHosts(); + } + if (parent_scope.refreshHosts) { + parent_scope.refreshHosts(); + } scope.$destroy(); }); diff --git a/awx/ui/static/partials/home.html b/awx/ui/static/partials/home.html index 7c115bab46..d97590eb8b 100644 --- a/awx/ui/static/partials/home.html +++ b/awx/ui/static/partials/home.html @@ -22,4 +22,5 @@
-
\ No newline at end of file +
+ \ No newline at end of file