mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Merge pull request #1182 from mabashian/1082-relaunch-playbook-run
Fixed bug relaunching job on successful/failed hosts
This commit is contained in:
commit
d9cd205929
@ -101,13 +101,22 @@ function atRelaunchCtrl (
|
||||
};
|
||||
});
|
||||
} else {
|
||||
jobObj.postRelaunch({
|
||||
id: vm.job.id
|
||||
}).then((launchRes) => {
|
||||
if (!$state.includes('jobs')) {
|
||||
$state.go('jobResult', { id: launchRes.data.id }, { reload: true });
|
||||
}
|
||||
});
|
||||
const launchParams = {
|
||||
id: vm.job.id,
|
||||
};
|
||||
|
||||
if (_.has(option, 'name')) {
|
||||
launchParams.relaunchData = {
|
||||
hosts: (option.name).toLowerCase()
|
||||
};
|
||||
}
|
||||
|
||||
jobObj.postRelaunch(launchParams)
|
||||
.then((launchRes) => {
|
||||
if (!$state.includes('jobs')) {
|
||||
$state.go('jobResult', { id: launchRes.data.id }, { reload: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user