break out credential watch statement in order to disable launch when creds are removed

This commit is contained in:
John Mitchell 2019-02-21 12:18:22 -05:00
parent 635aa9fd56
commit 7e47a924c5
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94

View File

@ -221,10 +221,14 @@ export default
$scope.job_template_form.$setPristine();
// this is used to set the overall form as dirty for the values
// that don't actually set this internally (lookups, toggles and code mirrors).
$scope.$watchCollection('multiCredential.selectedCredentials', (val, prevVal) => {
if (!_.isEqual(val, prevVal)) {
$scope.job_template_form.$setDirty();
}
});
$scope.$watchGroup([
'inventory',
'project',
'multiCredential.selectedCredentials',
'extra_vars',
'diff_mode',
'instance_groups'