diff --git a/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.controller.js b/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.controller.js index 135413545e..f25a961ceb 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.controller.js +++ b/awx/ui/client/src/inventories-hosts/hosts/related/groups/hosts-related-groups.controller.js @@ -5,11 +5,9 @@ *************************************************/ export default ['$scope', '$rootScope', '$state', '$stateParams', 'HostsRelatedGroupsList', 'InventoryUpdate', - 'CancelSourceUpdate', 'rbacUiControlService', 'GetBasePath', - 'GetHostsStatusMsg', 'Dataset', 'Find', 'QuerySet', 'inventoryData', 'host', 'GroupsService', + 'CancelSourceUpdate', 'rbacUiControlService', 'GetBasePath', 'Dataset', 'Find', 'QuerySet', 'inventoryData', 'host', 'GroupsService', function($scope, $rootScope, $state, $stateParams, HostsRelatedGroupsList, InventoryUpdate, - CancelSourceUpdate, rbacUiControlService, GetBasePath, - GetHostsStatusMsg, Dataset, Find, qs, inventoryData, host, GroupsService){ + CancelSourceUpdate, rbacUiControlService, GetBasePath, Dataset, Find, qs, inventoryData, host, GroupsService){ let list = HostsRelatedGroupsList; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/factories/get-hosts-status-msg.factory.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/factories/get-hosts-status-msg.factory.js deleted file mode 100644 index 43ddedb584..0000000000 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/factories/get-hosts-status-msg.factory.js +++ /dev/null @@ -1,33 +0,0 @@ -export default - ['i18n', function(i18n) { - return function(params) { - var active_failures = params.active_failures, - total_hosts = params.total_hosts, - tip, failures, html_class; - - // Return values for use on host status indicator - - if (active_failures > 0) { - tip = total_hosts + ((total_hosts === 1) ? ' host' : ' hosts') + '. ' + active_failures + i18n._(' with failed jobs.'); - html_class = 'error'; - failures = true; - } else { - failures = false; - if (total_hosts === 0) { - // no hosts - tip = i18n._("Contains 0 hosts."); - html_class = 'none'; - } else { - // many hosts with 0 failures - tip = total_hosts + ((total_hosts === 1) ? ' host' : ' hosts') + '. ' + i18n._('No job failures'); - html_class = 'success'; - } - } - - return { - tooltip: tip, - failures: failures, - 'class': html_class - }; - }; - }]; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js index 2ab3d1656a..6d36cd6178 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/list/groups-list.controller.js @@ -5,12 +5,10 @@ *************************************************/ export default ['$scope', '$state', '$stateParams', 'listDefinition', 'InventoryUpdate', - 'GroupsService', 'CancelSourceUpdate', - 'GetHostsStatusMsg', 'Dataset', 'inventoryData', 'canAdd', + 'GroupsService', 'CancelSourceUpdate', 'Dataset', 'inventoryData', 'canAdd', 'InventoryHostsStrings', '$transitions', 'GetBasePath', 'Rest', function($scope, $state, $stateParams, listDefinition, InventoryUpdate, - GroupsService, CancelSourceUpdate, - GetHostsStatusMsg, Dataset, inventoryData, canAdd, + GroupsService, CancelSourceUpdate, Dataset, inventoryData, canAdd, InventoryHostsStrings, $transitions, GetBasePath, Rest){ let list = listDefinition; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/main.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/main.js index 4edf6ada5d..940bcf5645 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/main.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/main.js @@ -9,7 +9,6 @@ import groupAdd from './add/main'; import groupEdit from './edit/main'; import groupFormDefinition from './groups.form'; import groupListDefinition from './groups.list'; -import GetHostsStatusMsg from './factories/get-hosts-status-msg.factory'; import nestedGroups from './related/nested-groups/main'; import nestedHosts from './related/nested-hosts/main'; @@ -22,5 +21,4 @@ export default nestedHosts.name ]) .factory('GroupForm', groupFormDefinition) - .factory('GroupList', groupListDefinition) - .factory('GetHostsStatusMsg', GetHostsStatusMsg); + .factory('GroupList', groupListDefinition); diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js index c97fe843da..aa87266985 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-groups/group-nested-groups-list.controller.js @@ -6,11 +6,11 @@ export default ['$scope', '$rootScope', '$state', '$stateParams', 'NestedGroupListDefinition', 'InventoryUpdate', 'GroupsService', 'CancelSourceUpdate', 'rbacUiControlService', 'GetBasePath', - 'GetHostsStatusMsg', 'Dataset', 'Find', 'QuerySet', 'inventoryData', 'canAdd', 'groupData', 'ProcessErrors', + 'Dataset', 'Find', 'QuerySet', 'inventoryData', 'canAdd', 'groupData', 'ProcessErrors', '$transitions', function($scope, $rootScope, $state, $stateParams, NestedGroupListDefinition, InventoryUpdate, GroupsService, CancelSourceUpdate, rbacUiControlService, GetBasePath, - GetHostsStatusMsg, Dataset, Find, qs, inventoryData, canAdd, groupData, ProcessErrors, + Dataset, Find, qs, inventoryData, canAdd, groupData, ProcessErrors, $transitions){ let list = NestedGroupListDefinition; diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related/nested-groups/host-nested-groups-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related/nested-groups/host-nested-groups-list.controller.js index 8a962f39d4..9fdeb7d652 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related/nested-groups/host-nested-groups-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related/nested-groups/host-nested-groups-list.controller.js @@ -6,10 +6,10 @@ export default ['$scope', '$rootScope', '$state', '$stateParams', 'HostNestedGroupListDefinition', 'InventoryUpdate', 'GroupsService', 'CancelSourceUpdate', 'rbacUiControlService', 'GetBasePath', - 'GetHostsStatusMsg', 'Dataset', 'Find', 'QuerySet', 'inventoryData', 'canAdd', 'ProcessErrors', 'host', + 'Dataset', 'Find', 'QuerySet', 'inventoryData', 'canAdd', 'ProcessErrors', 'host', function($scope, $rootScope, $state, $stateParams, HostNestedGroupListDefinition, InventoryUpdate, GroupsService, CancelSourceUpdate, rbacUiControlService, GetBasePath, - GetHostsStatusMsg, Dataset, Find, qs, inventoryData, canAdd, ProcessErrors, host){ + Dataset, Find, qs, inventoryData, canAdd, ProcessErrors, host){ let list = HostNestedGroupListDefinition;