Extra Variable parsing on job launch

the extra_vars didn't need the key 'extra_vars' when posting to the API. i also cleaned up some hint errors from matt
This commit is contained in:
Jared Tabor 2014-10-31 16:17:11 -04:00
parent 89f34f6a2e
commit bf6b201bf5
2 changed files with 10 additions and 6 deletions

View File

@ -107,10 +107,10 @@ angular.module('PermissionFormDefinition', [])
value: 'admin',
ngShow: "category == 'Inventory'"
}, {
label: 'Create',
value: 'create',
ngShow: "category == 'Deploy'"
}, {
label: 'Create',
value: 'create',
ngShow: "category == 'Deploy'"
}, {
label: 'Run',
value: 'run',
ngShow: "category == 'Deploy'"

View File

@ -22,7 +22,8 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
callback = params.callback || 'JobLaunched',
job_launch_data = {},
url = params.url,
fld;
fld,
extra_vars;
if(!Empty(scope.passwords_needed_to_start) && scope.passwords_needed_to_start .length>0){
@ -31,7 +32,10 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
});
}
if(scope.prompt_for_vars===true){
job_launch_data.extra_vars = ToJSON(scope.parseType, scope.variables, true);
extra_vars = ToJSON(scope.parseType, scope.variables, false);
$.each(extra_vars, function(key,value){
job_launch_data[key] = value;
});
}
if(scope.survey_enabled===true){
for (fld in scope.job_launch_form){