mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 12:40:06 -03:30
Fixes bug where schedule extra vars were not being displayed in the edit form
This commit is contained in:
@@ -316,13 +316,13 @@ function($filter, $state, $stateParams, Wait, $scope, moment,
|
|||||||
// the extra vars codemirror is ONLY shown if the
|
// the extra vars codemirror is ONLY shown if the
|
||||||
// schedule is for a JT and the JT has
|
// schedule is for a JT and the JT has
|
||||||
// ask_variables_on_launch = true.
|
// ask_variables_on_launch = true.
|
||||||
$scope.extraVars = ParentObject.extra_vars === '' ? '---' : ParentObject.extra_vars;
|
|
||||||
$scope.noVars = false;
|
$scope.noVars = false;
|
||||||
ParseTypeChange({
|
ParseTypeChange({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
variable: 'extraVars',
|
variable: 'extraVars',
|
||||||
parse_variable: 'parseType',
|
parse_variable: 'parseType',
|
||||||
field_id: 'SchedulerForm-extraVars'
|
field_id: 'SchedulerForm-extraVars',
|
||||||
|
readOnly: !$scope.schedule_obj.summary_fields.user_capabilities.edit
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$scope.noVars = true;
|
$scope.noVars = true;
|
||||||
@@ -366,16 +366,6 @@ function($filter, $state, $stateParams, Wait, $scope, moment,
|
|||||||
|
|
||||||
$scope.missingSurveyValue = processed.missingSurveyValue;
|
$scope.missingSurveyValue = processed.missingSurveyValue;
|
||||||
|
|
||||||
$scope.extraVars = (processed.extra_data === '' || _.isEmpty(processed.extra_data)) ? '---' : '---\n' + jsyaml.safeDump(processed.extra_data);
|
|
||||||
|
|
||||||
ParseTypeChange({
|
|
||||||
scope: $scope,
|
|
||||||
variable: 'extraVars',
|
|
||||||
parse_variable: 'parseType',
|
|
||||||
field_id: 'SchedulerForm-extraVars',
|
|
||||||
readOnly: !$scope.schedule_obj.summary_fields.user_capabilities.edit
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.promptData = {
|
$scope.promptData = {
|
||||||
launchConf: launchConf,
|
launchConf: launchConf,
|
||||||
launchOptions: launchOptions,
|
launchOptions: launchOptions,
|
||||||
|
|||||||
Reference in New Issue
Block a user