make forks fill for value of 0 and update timeout help text based on docs feedback

This commit is contained in:
John Mitchell
2019-01-22 13:48:57 -05:00
parent fcd759fa1f
commit e95da84e5a
2 changed files with 2 additions and 8 deletions

View File

@@ -282,7 +282,7 @@ export default
$scope.breadcrumb.job_template_name = jobTemplateData.name;
var fld, i;
for (fld in form.fields) {
if (fld !== 'extra_vars' && fld !== 'survey' && fld !== 'forks' && jobTemplateData[fld] !== null && jobTemplateData[fld] !== undefined) {
if (fld !== 'extra_vars' && fld !== 'survey' && jobTemplateData[fld] !== null && jobTemplateData[fld] !== undefined) {
if (form.fields[fld].type === 'select') {
if ($scope[fld + '_options'] && $scope[fld + '_options'].length > 0) {
for (i = 0; i < $scope[fld + '_options'].length; i++) {
@@ -301,12 +301,6 @@ export default
}
master[fld] = $scope[fld];
}
if (fld === 'forks') {
if (jobTemplateData[fld] !== 0) {
$scope[fld] = jobTemplateData[fld];
master[fld] = $scope[fld];
}
}
if (fld === 'extra_vars') {
// Parse extra_vars, converting to YAML.
$scope.extra_vars = ParseVariableString(jobTemplateData.extra_vars);

View File

@@ -277,7 +277,7 @@ function(NotificationsList, i18n) {
dataTitle: i18n._('Timeout'),
dataPlacement: 'right',
dataContainer: 'body',
awPopOver: "<p>" + i18n._("The amount of time (in seconds) to run before the task is canceled. Defaults to 0, which means the job will not timeout.") + "</p>",
awPopOver: "<p>" + i18n._("The amount of time (in seconds) to run before the task is canceled. Defaults to 0 for no job timeout.") + "</p>",
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
},
diff_mode: {