From c721e234e2dc626fe17256bc19fae47aa4dd28ce Mon Sep 17 00:00:00 2001 From: Leigh Johnson Date: Mon, 11 Jul 2016 12:23:30 -0400 Subject: [PATCH 1/2] resolves kickback on #2862 --- awx/ui/client/src/lists/ScheduledJobs.js | 13 ++++++++----- awx/ui/client/src/search/tagSearch.service.js | 7 ++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/awx/ui/client/src/lists/ScheduledJobs.js b/awx/ui/client/src/lists/ScheduledJobs.js index c42ff8c1e6..30658404ba 100644 --- a/awx/ui/client/src/lists/ScheduledJobs.js +++ b/awx/ui/client/src/lists/ScheduledJobs.js @@ -45,14 +45,17 @@ export default sourceModel: 'unified_job_template', sourceField: 'unified_job_type', ngBind: 'schedule.type_label', - searchField: 'unified_job_template__name', - searchLable: 'Type', + searchField: 'unified_job_template__polymorphic_ctype__model', + filterBySearchField: true, + searchLabel: 'Type', searchable: true, searchType: 'select', searchOptions: [ - { value: 'inventory source', label: 'Inventory Sync' }, - { value: 'job template', label: 'Playbook Run' }, - { value: 'project', label: 'SCM Update' } + { value: 'inventorysource', label: 'Inventory Sync' }, + { value: 'jobtemplate', label: 'Playbook Run' }, + { value: 'project', label: 'SCM Update' }, + { value: 'systemjobtemplate', label: 'Management Job'} + ] }, next_run: { diff --git a/awx/ui/client/src/search/tagSearch.service.js b/awx/ui/client/src/search/tagSearch.service.js index 777c4c6441..5b1473a00e 100644 --- a/awx/ui/client/src/search/tagSearch.service.js +++ b/awx/ui/client/src/search/tagSearch.service.js @@ -6,7 +6,12 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu var obj = {}; // build the value (key) var value; - if (field.sourceModel && field.sourceField) { + console.log(field) + if (field.searchField && field.filterBySearchField === true){ + value = field.searchField; + } + else if (field.sourceModel && field.sourceField) { + console.log('condition met 2') value = field.sourceModel + '__' + field.sourceField; obj.related = true; } else if (typeof(field.key) === String) { From d3aadd4847b61c60ca3698c1c775b6596b8e7b6f Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Mon, 11 Jul 2016 13:13:27 -0400 Subject: [PATCH 2/2] Removing console.logs --- awx/ui/client/src/search/tagSearch.service.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/awx/ui/client/src/search/tagSearch.service.js b/awx/ui/client/src/search/tagSearch.service.js index 5b1473a00e..6b02b8fdf8 100644 --- a/awx/ui/client/src/search/tagSearch.service.js +++ b/awx/ui/client/src/search/tagSearch.service.js @@ -6,12 +6,10 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu var obj = {}; // build the value (key) var value; - console.log(field) if (field.searchField && field.filterBySearchField === true){ value = field.searchField; } else if (field.sourceModel && field.sourceField) { - console.log('condition met 2') value = field.sourceModel + '__' + field.sourceField; obj.related = true; } else if (typeof(field.key) === String) {