summaryrefslogtreecommitdiffstats
path: root/modules-available/backup/templates/restore.html
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/backup/templates/restore.html')
-rw-r--r--modules-available/backup/templates/restore.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules-available/backup/templates/restore.html b/modules-available/backup/templates/restore.html
index c9c19d2b..3e57a3ee 100644
--- a/modules-available/backup/templates/restore.html
+++ b/modules-available/backup/templates/restore.html
@@ -20,6 +20,7 @@
<script type="text/javascript">
var slxDotInterval = false;
+ var restoreSuccess = false;
function restoreCb(task)
{
if (!task || !task.statusCode)
@@ -28,6 +29,7 @@
$('#restorefailed').show('slow');
}
if (task.statusCode === 'TASK_ERROR' || task.statusCode === 'TASK_FINISHED') {
+ restoreSuccess = (task.statusCode === 'TASK_FINISHED');
startRebootPoll();
}
}
@@ -48,14 +50,18 @@
}
$('#dots').text($('#dots').text() + '..');
slxTimeoutId = setTimeout(rebootPoll, 3500);
- $.ajax({url: "index.php?do=Main", timeout: 3000}).success(function(data, textStatus, jqXHR) {
+ $.ajax({url: "?do=main", timeout: 3000}).success(function(data, textStatus, jqXHR) {
if (textStatus !== "success" && textStatus !== "notmodified")
return;
if (data.indexOf('Status: DB running') === -1)
return;
clearTimeout(slxTimeoutId);
setTimeout(function() {
- window.location.replace("index.php?do=Main&message[]=success%7Cbackup.restore-done");
+ if (restoreSuccess) {
+ window.location.replace("?do=main&message[]=success%7Cbackup.restore-done");
+ } else {
+ window.location.replace("?do=main");
+ }
}, 3500);
});
}