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