add prompt on launch for workflow inventory

This commit is contained in:
Jake McDermott 2018-11-07 23:16:43 -05:00
parent a94042def5
commit 2376013d49
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
4 changed files with 12 additions and 2 deletions

View File

@ -50,8 +50,10 @@ function canLaunchWithoutPrompt () {
const launchData = this.model.launch.GET;
return (
launchData.can_start_without_user_input &&
!launchData.survey_enabled
// TODO: may need api update
// launchData.can_start_without_user_input &&
!launchData.survey_enabled &&
!this.model.GET.ask_inventory_on_launch
);
}

View File

@ -81,6 +81,11 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
dataTitle: i18n._('Inventory'),
dataPlacement: 'right',
dataContainer: "body",
subCheckbox: {
variable: 'ask_inventory_on_launch',
ngChange: 'workflow_job_template_form.inventory_name.$validate()',
text: i18n._('Prompt on launch')
},
ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate) || !canEditInventory',
},
labels: {

View File

@ -75,6 +75,7 @@ export default [
data[fld] = $scope[fld];
}
}
data.ask_inventory_on_launch = Boolean($scope.ask_inventory_on_launch);
data.extra_vars = ToJSON($scope.parseType,
$scope.variables, true);

View File

@ -88,6 +88,8 @@ export default [
}
}
data.ask_inventory_on_launch = Boolean($scope.ask_inventory_on_launch);
data.extra_vars = ToJSON($scope.parseType,
$scope.variables, true);