diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js
index 29966446d0..858deebfdf 100644
--- a/awx/ui/static/js/controllers/Inventories.js
+++ b/awx/ui/static/js/controllers/Inventories.js
@@ -238,7 +238,7 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP
});
scope.filterInventory = function() {
- RefreshTree({ scope: scope });
+ HostsReload({ scope: scope, inventory_id: scope['inventory_id'], group_id: scope['group_id'] });
}
scope.filterHosts = function() {
diff --git a/awx/ui/static/js/forms/Inventories.js b/awx/ui/static/js/forms/Inventories.js
index cbb0bcfe91..811752bd6d 100644
--- a/awx/ui/static/js/forms/Inventories.js
+++ b/awx/ui/static/js/forms/Inventories.js
@@ -118,9 +118,16 @@ angular.module('InventoryFormDefinition', [])
badgeToolTip: 'Most recent job failed',
badgePlacement: 'bottom'
},
- description: {
+ /*description: {
label: 'Description',
ngClick: "editHost(\{\{ host.id \}\}, '\{\{ host.name \}\}')"
+ },*/
+ groups: {
+ label: 'Groups',
+ searchable: false,
+ sourceModel: 'groups',
+ sourceField: 'name',
+ nosort: true
}
},
fieldActions: {
diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js
index b2fd2b4b90..0c50d3d9b8 100644
--- a/awx/ui/static/js/helpers/Hosts.js
+++ b/awx/ui/static/js/helpers/Hosts.js
@@ -446,6 +446,33 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
var url = (group_id !== null && group_id !== undefined) ? GetBasePath('groups') + group_id + '/all_hosts/' :
GetBasePath('inventory') + params.inventory_id + '/hosts/';
+ if (scope.hostFailureFilter) {
+ url += '?has_active_failures=true';
+ }
+
+ if (scope.removeRelatedHosts) {
+ scope.removeRelatedHosts();
+ }
+ scope.removeRelatedHosts = scope.$on('relatedhosts', function() {
+ var groups, descr='';
+ for (var i=0; i < scope.hosts.length; i++) {
+ groups = scope.hosts[i].summary_fields.groups;
+ for (var j=0; j < groups.length; j++) {
+ if (groups[j].name.match(/^_deleted/)) {
+ descr += groups[j].name.substr(1,18) + ', ';
+ }
+ else {
+ descr += groups[j].name + ', ';
+ }
+ }
+ descr = descr.replace(/, $/,'');
+ if (descr.length > 50) {
+ descr = descr.substr(0,49) + '...';
+ }
+ scope.hosts[i].groups = descr;
+ }
+ });
+
var relatedSets = { hosts: { url: url, iterator: 'host' } };
RelatedSearchInit({ scope: params.scope, form: InventoryForm, relatedSets: relatedSets });
RelatedPaginateInit({ scope: params.scope, relatedSets: relatedSets, pageSize: 40 });
diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less
index 8d57bb83fe..9256b5215c 100644
--- a/awx/ui/static/less/ansible-ui.less
+++ b/awx/ui/static/less/ansible-ui.less
@@ -85,7 +85,10 @@ hr {
}
.dropdown-toggle:hover,
-.btn-default:hover {
+.btn-default:visited,
+.btn-default:hover,
+.btn-default:active
+ {
color: #333;
background-color: #bbb;
border-color: #bbb;
diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js
index ceddc992dd..af34ed871b 100644
--- a/awx/ui/static/lib/ansible/form-generator.js
+++ b/awx/ui/static/lib/ansible/form-generator.js
@@ -989,120 +989,93 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += "\n";
html += "\n";
//html += " \n";
- html += "";
- html += "# \n";
- html += "\n";
+ html += " \n";
for (var fld in form.related[itm].fields) {
- html += " " +
- form.related[itm]['fields'][fld].label;
- html += " " + form.related[itm]['fields'][fld].label;
+ if (form.related[itm].fields[fld].nosort == undefined || form.related[itm].fields[fld].nosort == false) {
+ html += " ";
}
- else {
- html += "icon-sort";
- }
- html += "\"> \n";
- }
+ html += "\n";
+ }
- html += "\n";
- html += "