Limited filter on Job Events page to only those fields that make sense: Host and Status

This commit is contained in:
chouseknecht
2013-06-19 10:22:23 -04:00
parent 85a483a6fb
commit 964a523daf
3 changed files with 24 additions and 5 deletions

View File

@@ -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;

View File

@@ -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'] = '';

View File

@@ -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',