mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
fix external source and sync failure queries on inv groups/invs
This commit is contained in:
@@ -74,8 +74,14 @@ export default
|
||||
},
|
||||
inventory_sources_with_failures: {
|
||||
label: 'Sync failures?',
|
||||
searchType: 'gtzero',
|
||||
searchValue: 'true',
|
||||
searchType: 'select',
|
||||
searchOptions: [{
|
||||
label: 'Yes',
|
||||
value: 'inventory_sources_with_failures__gt=0'
|
||||
}, {
|
||||
label: 'No',
|
||||
value: 'inventory_sources_with_failures__lte=0'
|
||||
}],
|
||||
searchOnly: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -95,11 +95,15 @@ export default
|
||||
},
|
||||
has_external_source: {
|
||||
label: 'Has external source?',
|
||||
searchType: 'in',
|
||||
searchValue: 'ec2,rax,vmware,azure,gce,openstack',
|
||||
searchOnly: true,
|
||||
sourceModel: 'inventory_source',
|
||||
sourceField: 'source'
|
||||
searchType: 'select',
|
||||
searchOptions: [{
|
||||
label: 'Yes',
|
||||
value: 'inventory_source__source__in=ec2,rax,vmware,azure,gce,openstack'
|
||||
}, {
|
||||
label: 'No',
|
||||
value: 'not__inventory_source__source__in=ec2,rax,vmware,azure,gce,openstack'
|
||||
}],
|
||||
searchOnly: true
|
||||
},
|
||||
has_active_failures: {
|
||||
label: 'Has failed hosts?',
|
||||
|
||||
@@ -41,7 +41,7 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
|
||||
if (type === 'select') {
|
||||
obj.typeOptions = typeOptions;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
@@ -180,6 +180,9 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
|
||||
if (tag.type === "text") {
|
||||
tag.url = tag.value + "__icontains=" + textVal;
|
||||
tag.name = textVal;
|
||||
} else if (selectVal.value.indexOf("=") > 0) {
|
||||
tag.url = selectVal.value;
|
||||
tag.name = selectVal.label;
|
||||
} else {
|
||||
tag.url = tag.value + "=" + selectVal.value;
|
||||
tag.name = selectVal.label;
|
||||
|
||||
Reference in New Issue
Block a user