mirror of
https://github.com/ansible/awx.git
synced 2026-02-14 09:44:47 -03:30
Limited filter on Job Events page to only those fields that make sense: Host and Status
This commit is contained in:
@@ -33,7 +33,10 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
// Expand or collapse children based on clicked element's icon
|
||||
if (set[clicked]['ngicon'] == 'icon-expand-alt') {
|
||||
// Expand: lookup and display children
|
||||
Rest.setUrl(children);
|
||||
var url = children;
|
||||
var search = scope[list.iterator + 'SearchParams'].replace(/^\&/,'').replace(/^\?/,'');
|
||||
url += (search) ? '?' + search : "";
|
||||
Rest.setUrl(url);
|
||||
Rest.get()
|
||||
.success( function(data, status, headers, config) {
|
||||
var found = false;
|
||||
|
||||
@@ -37,11 +37,25 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
else {
|
||||
sort_order = (list.fields[fld].desc) ? '-' + fld : fld;
|
||||
}
|
||||
scope[iterator + 'SearchField'] = fld
|
||||
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
|
||||
if (list.fields[fld].notSearchable == undefined || list.fields[fld].notSearchable == false) {
|
||||
scope[iterator + 'SearchField'] = fld;
|
||||
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!scope[iterator + 'SearchField']) {
|
||||
// A field marked as key may also be notSearchable
|
||||
for (fld in list.fields) {
|
||||
if (list.fields[fld].notSearchable == undefined || list.fields[fld].notSearchable == false) {
|
||||
scope[iterator + 'SearchField'] = fld;
|
||||
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scope[iterator + 'SearchType'] = 'icontains';
|
||||
scope[iterator + 'SearchTypeLabel'] = 'Contains';
|
||||
scope[iterator + 'SearchParams'] = '';
|
||||
|
||||
@@ -21,13 +21,15 @@ angular.module('JobEventsListDefinition', [])
|
||||
created: {
|
||||
label: 'Creation Date',
|
||||
key: true,
|
||||
nosort: true
|
||||
nosort: true,
|
||||
notSearchable: true
|
||||
},
|
||||
event_display: {
|
||||
label: 'Event',
|
||||
hasChildren: true,
|
||||
link: true,
|
||||
nosort: true
|
||||
nosort: true,
|
||||
notSearchable: true
|
||||
},
|
||||
host: {
|
||||
label: 'Host',
|
||||
|
||||
Reference in New Issue
Block a user