@@ -193,8 +193,14 @@ app.controller('RestoreController', ['$scope', '$http', 'Client', function ($sco
|
||||
$scope.busy = true;
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
if (!error && !status.webadminStatus.restoring) {
|
||||
window.location.href = '/';
|
||||
if (!error && !status.webadminStatus.restore.active) { // restore finished
|
||||
if (status.webadminStatus.restore.error) {
|
||||
$scope.busy = false;
|
||||
$scope.error.generic = status.webadminStatus.restore.error;
|
||||
} else { // restore worked, redirect to admin page
|
||||
window.location.href = '/';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(waitForRestore, 5000);
|
||||
@@ -225,7 +231,7 @@ app.controller('RestoreController', ['$scope', '$http', 'Client', function ($sco
|
||||
return;
|
||||
}
|
||||
|
||||
if (status.restoring) return waitForRestore();
|
||||
if (status.webadminStatus.restore.active) return waitForRestore();
|
||||
|
||||
if (status.activated) {
|
||||
window.location.href = '/';
|
||||
|
||||
Reference in New Issue
Block a user