Removed Status filter from Job Events page. Changed form attribute 'notSearchable' to 'searchable' -cause it just makes more sense.

This commit is contained in:
chouseknecht
2013-06-28 11:40:31 -04:00
parent 7065086a1c
commit 114bc05b8d
4 changed files with 12 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
else { else {
sort_order = (list.fields[fld].desc) ? '-' + fld : fld; sort_order = (list.fields[fld].desc) ? '-' + fld : fld;
} }
if (list.fields[fld].notSearchable == undefined || list.fields[fld].notSearchable == false) { if (list.fields[fld].searchable == undefined || list.fields[fld].searchable == true) {
scope[iterator + 'SearchField'] = fld; scope[iterator + 'SearchField'] = fld;
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label; scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
} }
@@ -46,9 +46,9 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
} }
if (!scope[iterator + 'SearchField']) { if (!scope[iterator + 'SearchField']) {
// A field marked as key may also be notSearchable // A field marked as key may not be 'searchable'
for (fld in list.fields) { for (fld in list.fields) {
if (list.fields[fld].notSearchable == undefined || list.fields[fld].notSearchable == false) { if (list.fields[fld].searchable == undefined || list.fields[fld].searchable == true) {
scope[iterator + 'SearchField'] = fld; scope[iterator + 'SearchField'] = fld;
scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label; scope[iterator + 'SearchFieldLabel'] = list.fields[fld].label;
break; break;

View File

@@ -22,7 +22,7 @@ angular.module('JobEventsListDefinition', [])
label: 'Date', label: 'Date',
key: true, key: true,
nosort: true, nosort: true,
notSearchable: true, searchable: false,
ngClick: "viewJobEvent(\{\{ jobevent.id \}\})", ngClick: "viewJobEvent(\{\{ jobevent.id \}\})",
}, },
event_display: { event_display: {
@@ -30,7 +30,7 @@ angular.module('JobEventsListDefinition', [])
hasChildren: true, hasChildren: true,
ngClick: "viewJobEvent(\{\{ jobevent.id \}\})", ngClick: "viewJobEvent(\{\{ jobevent.id \}\})",
nosort: true, nosort: true,
notSearchable: true searchable: false
}, },
host: { host: {
label: 'Host', label: 'Host',
@@ -47,7 +47,8 @@ angular.module('JobEventsListDefinition', [])
searchField: 'failed', searchField: 'failed',
searchType: 'boolean', searchType: 'boolean',
searchOptions: [{ name: "success", value: 0 }, { name: "error", value: 1 }], searchOptions: [{ name: "success", value: 0 }, { name: "error", value: 1 }],
nosort: true nosort: true,
searchable: false,
} }
}, },

View File

@@ -27,11 +27,11 @@ angular.module('JobHostDefinition', [])
}, },
ok: { ok: {
label: 'Success', label: 'Success',
notSearchable: true searchable: false
}, },
changed: { changed: {
label: 'Changed', label: 'Changed',
notSearchable: true searchable: false
}, },
failures: { failures: {
label: 'Failure', label: 'Failure',
@@ -39,11 +39,11 @@ angular.module('JobHostDefinition', [])
}, },
dark: { dark: {
label: 'Unreachable', label: 'Unreachable',
notSearchable: true searchable: false
}, },
skipped: { skipped: {
label: 'Skipped', label: 'Skipped',
notSearchable: true searchable: false
} }
}, },

View File

@@ -177,7 +177,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
html += "<ul class=\"dropdown-menu\" id=\"" + iterator + "SearchDropdown\">\n"; html += "<ul class=\"dropdown-menu\" id=\"" + iterator + "SearchDropdown\">\n";
for ( var fld in form.fields) { for ( var fld in form.fields) {
if (form.fields[fld].notSearchable == undefined || form.fields[fld].notSearchable == false) { if (form.fields[fld].searchable == undefined || form.fields[fld].searchable == true) {
html += "<li><a href=\"\" ng-click=\"setSearchField('" + iterator + "','"; html += "<li><a href=\"\" ng-click=\"setSearchField('" + iterator + "','";
html += fld + "','" + form.fields[fld].label + "')\">" html += fld + "','" + form.fields[fld].label + "')\">"
+ form.fields[fld].label + "</a></li>\n"; + form.fields[fld].label + "</a></li>\n";