mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
Latest UI changes
This commit is contained in:
@@ -39,9 +39,16 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
|
|||||||
if (scope.inventories[i].hosts_with_active_failures > 0) {
|
if (scope.inventories[i].hosts_with_active_failures > 0) {
|
||||||
scope.inventories[i].active_failures_params = "/?has_active_failures=true";
|
scope.inventories[i].active_failures_params = "/?has_active_failures=true";
|
||||||
}
|
}
|
||||||
//if (scope.inventories[i].hosts_with_active_failures < 99) {
|
if (scope.inventories[i].has_inventory_sources) {
|
||||||
// scope.inventories[i].hosts_with_active_failures = ('00' + scope.inventories[i].hosts_with_active_failures).substr(-2);
|
//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 [
|
return [
|
||||||
{ label: 'Manual', value: null },
|
{ label: 'Manual', value: null },
|
||||||
{ label: 'Amazon EC2', value: 'ec2' },
|
{ 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 }}',
|
ngHref: '/#/inventories/{{ inventory.id }}/hosts{{ inventory.active_failures_params }}',
|
||||||
type: 'badgeCount',
|
type: 'badgeCount',
|
||||||
"class": "{{ 'failures-' + inventory.has_active_failures }}",
|
"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.',
|
awToolTip: '# of hosts with failed jobs. Click to view hosts.',
|
||||||
dataPlacement: 'bottom',
|
dataPlacement: 'bottom',
|
||||||
searchable: false
|
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: {
|
organization: {
|
||||||
label: 'Organization',
|
label: 'Organization',
|
||||||
ngBind: 'inventory.summary_fields.organization.name',
|
ngBind: 'inventory.summary_fields.organization.name',
|
||||||
@@ -46,8 +57,15 @@ angular.module('InventoriesListDefinition', [])
|
|||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
excludeModal: true
|
excludeModal: true
|
||||||
},
|
},
|
||||||
|
has_inventory_sources: {
|
||||||
|
label: 'Has external sources?',
|
||||||
|
searchSingleValue: true,
|
||||||
|
searchType: 'boolean',
|
||||||
|
searchValue: 'true',
|
||||||
|
searchOnly: true
|
||||||
|
},
|
||||||
has_active_failures: {
|
has_active_failures: {
|
||||||
label: 'Hosts with failed jobs?',
|
label: 'Has hosts with failed jobs?',
|
||||||
searchSingleValue: true,
|
searchSingleValue: true,
|
||||||
searchType: 'boolean',
|
searchType: 'boolean',
|
||||||
searchValue: 'true',
|
searchValue: 'true',
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ angular.module('InventorySummaryDefinition', [])
|
|||||||
type: 'badgeCount',
|
type: 'badgeCount',
|
||||||
"class": "{{ 'failures-' + group.has_active_failures }}",
|
"class": "{{ 'failures-' + group.has_active_failures }}",
|
||||||
awToolTip: '# of hosts with job failures. Click to view hosts.',
|
awToolTip: '# of hosts with job failures. Click to view hosts.',
|
||||||
dataPlacement: 'bottom',
|
dataPlacement: 'top',
|
||||||
searchable: false,
|
searchable: false,
|
||||||
nosort: true
|
nosort: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -741,6 +741,21 @@ select.field-mini-height {
|
|||||||
color: @red;
|
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 {
|
.field-success {
|
||||||
color: #5bb75b;
|
color: #5bb75b;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,18 @@ angular.module('RestServices',['ngCookies','AuthService'])
|
|||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
options: function() {
|
||||||
|
var token = Authorization.getToken();
|
||||||
|
if (token) {
|
||||||
|
return $http({method: 'OPTIONS',
|
||||||
|
url: this.url,
|
||||||
|
headers: { 'Authorization': 'Token ' + token }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
Reference in New Issue
Block a user