mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
add prompt on launch for workflow inventory
This commit is contained in:
@@ -50,8 +50,10 @@ function canLaunchWithoutPrompt () {
|
|||||||
const launchData = this.model.launch.GET;
|
const launchData = this.model.launch.GET;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
launchData.can_start_without_user_input &&
|
// TODO: may need api update
|
||||||
!launchData.survey_enabled
|
// launchData.can_start_without_user_input &&
|
||||||
|
!launchData.survey_enabled &&
|
||||||
|
!this.model.GET.ask_inventory_on_launch
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
|
|||||||
dataTitle: i18n._('Inventory'),
|
dataTitle: i18n._('Inventory'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: "body",
|
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',
|
ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate) || !canEditInventory',
|
||||||
},
|
},
|
||||||
labels: {
|
labels: {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ export default [
|
|||||||
data[fld] = $scope[fld];
|
data[fld] = $scope[fld];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
data.ask_inventory_on_launch = Boolean($scope.ask_inventory_on_launch);
|
||||||
|
|
||||||
data.extra_vars = ToJSON($scope.parseType,
|
data.extra_vars = ToJSON($scope.parseType,
|
||||||
$scope.variables, true);
|
$scope.variables, true);
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ export default [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data.ask_inventory_on_launch = Boolean($scope.ask_inventory_on_launch);
|
||||||
|
|
||||||
data.extra_vars = ToJSON($scope.parseType,
|
data.extra_vars = ToJSON($scope.parseType,
|
||||||
$scope.variables, true);
|
$scope.variables, true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user