1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #370 from mabashian/7542-cancel-sync-tooltip

Reload the project list when we get a canceled socket message
This commit is contained in:
Michael Abashian 2017-09-01 11:32:33 -04:00 committed by GitHub
commit a9f4b4883a

View File

@ -112,7 +112,7 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert',
// And we found the affected project
$log.debug('Received event for project: ' + project.name);
$log.debug('Status changed to: ' + data.status);
if (data.status === 'successful' || data.status === 'failed') {
if (data.status === 'successful' || data.status === 'failed' || data.status === 'canceled') {
$scope.reloadList();
} else {
project.scm_update_tooltip = "SCM update currently running";
@ -220,7 +220,6 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert',
Rest.post()
.success(function () {
Alert(i18n._('SCM Update Cancel'), i18n._('Your request to cancel the update was submitted to the task manager.'), 'alert-info');
$scope.refresh();
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: i18n._('Error!'), msg: i18n.sprintf(i18n._('Call to %s failed. POST status: '), url) + status });