resolves kickback on #2862

This commit is contained in:
Leigh Johnson 2016-07-11 12:23:30 -04:00
parent 34523d59a2
commit c721e234e2
2 changed files with 14 additions and 6 deletions

View File

@ -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: {

View File

@ -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) {