mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 23:18:03 -03:30
Latest UI changes
This commit is contained in:
parent
9325dbc846
commit
8955dbf594
@ -39,9 +39,16 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
|
||||
if (scope.inventories[i].hosts_with_active_failures > 0) {
|
||||
scope.inventories[i].active_failures_params = "/?has_active_failures=true";
|
||||
}
|
||||
//if (scope.inventories[i].hosts_with_active_failures < 99) {
|
||||
// scope.inventories[i].hosts_with_active_failures = ('00' + scope.inventories[i].hosts_with_active_failures).substr(-2);
|
||||
//}
|
||||
if (scope.inventories[i].has_inventory_sources) {
|
||||
//scope.inventories[i].inventory_source = 'external';
|
||||
scope.inventories[i].has_inventory_tip = 'Has one or more external sources. Click to view details.';
|
||||
scope.inventories[i].has_inventory_link = '/#/inventories/' + scope.inventories[i].id + '/groups';
|
||||
}
|
||||
else {
|
||||
//scope.inventories[i].inventory_source = 'manual';
|
||||
scope.inventories[i].has_inventory_tip = 'Has no external sources. Click to view details';
|
||||
scope.inventories[i].has_inventory_link = '/#/inventories/' + scope.inventories[i].id + '/groups';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
||||
return [
|
||||
{ label: 'Manual', value: null },
|
||||
{ label: 'Amazon EC2', value: 'ec2' },
|
||||
{ label: 'Rackspace', value: 'rackspace' },
|
||||
{ label: 'Rackspace', value: 'rackspace' }
|
||||
];
|
||||
}
|
||||
}])
|
||||
|
||||
@ -32,12 +32,23 @@ angular.module('InventoriesListDefinition', [])
|
||||
ngHref: '/#/inventories/{{ inventory.id }}/hosts{{ inventory.active_failures_params }}',
|
||||
type: 'badgeCount',
|
||||
"class": "{{ 'failures-' + inventory.has_active_failures }}",
|
||||
//badgeIcon: "\{\{ 'icon-failures-' + inventory.has_active_failures \}\}",
|
||||
//badgePlacement: 'left',
|
||||
awToolTip: '# of hosts with failed jobs. Click to view hosts.',
|
||||
dataPlacement: 'bottom',
|
||||
searchable: false
|
||||
},
|
||||
inventory_source: {
|
||||
label: 'Source?',
|
||||
//ngHref: "\{\{ inventory.has_inventory_link \}\}",
|
||||
//awToolTip: "\{\{ inventory.has_inventory_tip \}\}",
|
||||
//dataPlacement: 'top',
|
||||
badgeNgHref: '\{\{ inventory.has_inventory_link \}\}',
|
||||
badgeIcon: "\{\{ 'icon-cloud-' + inventory.has_inventory_sources \}\}",
|
||||
badgePlacement: 'left',
|
||||
badgeToolTip: "\{\{ inventory.has_inventory_tip \}\}",
|
||||
badgeTipPlacement: 'top',
|
||||
searchable: false,
|
||||
nosort: true
|
||||
},
|
||||
organization: {
|
||||
label: 'Organization',
|
||||
ngBind: 'inventory.summary_fields.organization.name',
|
||||
@ -46,8 +57,15 @@ angular.module('InventoriesListDefinition', [])
|
||||
sourceField: 'name',
|
||||
excludeModal: true
|
||||
},
|
||||
has_inventory_sources: {
|
||||
label: 'Has external sources?',
|
||||
searchSingleValue: true,
|
||||
searchType: 'boolean',
|
||||
searchValue: 'true',
|
||||
searchOnly: true
|
||||
},
|
||||
has_active_failures: {
|
||||
label: 'Hosts with failed jobs?',
|
||||
label: 'Has hosts with failed jobs?',
|
||||
searchSingleValue: true,
|
||||
searchType: 'boolean',
|
||||
searchValue: 'true',
|
||||
|
||||
@ -33,7 +33,7 @@ angular.module('InventorySummaryDefinition', [])
|
||||
type: 'badgeCount',
|
||||
"class": "{{ 'failures-' + group.has_active_failures }}",
|
||||
awToolTip: '# of hosts with job failures. Click to view hosts.',
|
||||
dataPlacement: 'bottom',
|
||||
dataPlacement: 'top',
|
||||
searchable: false,
|
||||
nosort: true
|
||||
},
|
||||
|
||||
@ -740,7 +740,22 @@ select.field-mini-height {
|
||||
.icon-cloud-failed {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
|
||||
/* Inventory cloud sourced? indicator */
|
||||
.icon-cloud-true:before,
|
||||
.icon-cloud-false:before {
|
||||
content: "\f0c2";
|
||||
}
|
||||
|
||||
.icon-cloud-true {
|
||||
color: @blue-link;
|
||||
}
|
||||
|
||||
.icon-cloud-false {
|
||||
color: @grey;
|
||||
}
|
||||
/* end */
|
||||
|
||||
.field-success {
|
||||
color: #5bb75b;
|
||||
}
|
||||
|
||||
@ -76,6 +76,18 @@ angular.module('RestServices',['ngCookies','AuthService'])
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
options: function() {
|
||||
var token = Authorization.getToken();
|
||||
if (token) {
|
||||
return $http({method: 'OPTIONS',
|
||||
url: this.url,
|
||||
headers: { 'Authorization': 'Token ' + token }
|
||||
});
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user