mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
Merge pull request #2542 from mabashian/1466-workflow-node
Properly clear out prompt data when user manually changes a node's JT
This commit is contained in:
@@ -216,7 +216,8 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
|
|||||||
});
|
});
|
||||||
|
|
||||||
let credentialsToAdd = credentialsNotInPriorCredentials.filter(function(credNotInPrior) {
|
let credentialsToAdd = credentialsNotInPriorCredentials.filter(function(credNotInPrior) {
|
||||||
return !params.node.promptData.prompts.credentials.previousOverrides.some(function(priorCred) {
|
let previousOverrides = params.node.promptData.prompts.credentials.previousOverrides ? params.node.promptData.prompts.credentials.previousOverrides : [];
|
||||||
|
return !previousOverrides.some(function(priorCred) {
|
||||||
return credNotInPrior.id === priorCred.id;
|
return credNotInPrior.id === priorCred.id;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -433,10 +434,10 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
|
|||||||
.then(function() {
|
.then(function() {
|
||||||
$scope.closeDialog();
|
$scope.closeDialog();
|
||||||
}).catch(({data, status}) => {
|
}).catch(({data, status}) => {
|
||||||
ProcessErrors($scope, data, status, null);
|
ProcessErrors($scope, data, status, null, {});
|
||||||
});
|
});
|
||||||
}).catch(({data, status}) => {
|
}).catch(({data, status}) => {
|
||||||
ProcessErrors($scope, data, status, null);
|
ProcessErrors($scope, data, status, null, {});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1026,6 +1027,10 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
|
|||||||
|
|
||||||
$scope.templateManuallySelected = function(selectedTemplate) {
|
$scope.templateManuallySelected = function(selectedTemplate) {
|
||||||
|
|
||||||
|
if (promptWatcher) {
|
||||||
|
promptWatcher();
|
||||||
|
}
|
||||||
|
|
||||||
if (surveyQuestionWatcher) {
|
if (surveyQuestionWatcher) {
|
||||||
surveyQuestionWatcher();
|
surveyQuestionWatcher();
|
||||||
}
|
}
|
||||||
@@ -1034,6 +1039,8 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
|
|||||||
credentialsWatcher();
|
credentialsWatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.promptData = null;
|
||||||
|
|
||||||
if (selectedTemplate.type === "job_template") {
|
if (selectedTemplate.type === "job_template") {
|
||||||
let jobTemplate = new JobTemplate();
|
let jobTemplate = new JobTemplate();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user