blob: e613bdf4d9cd12ad08db13d525b2aa12c899b93c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
<div class="panel panel-default">
<div class="panel-heading">{{lang_backup}}</div>
<div class="panel-body">
<div id="zeug">
<div data-tm-id="{{syncid}}" data-tm-log="messages">{{lang_stopping}} syncdaemon</div>
<div data-tm-id="{{dmsdid}}" data-tm-log="messages">{{lang_stopping}} dmsd</div>
<div data-tm-id="{{ldadpid}}" data-tm-log="messages">{{lang_stopping}} ldadp</div>
<div data-tm-id="{{mountid}}" data-tm-log="messages">{{lang_stopping}} vmstore</div>
<div data-tm-id="{{restoreid}}" data-tm-log="messages" data-tm-callback="restoreCb">{{lang_restoreConfig}}</div>
<div data-tm-id="{{rebootid}}" data-tm-log="messages">{{lang_reboot}}</div>
</div>
<div id="restorefailed" class="alert alert-danger" style="display:none">
{{lang_restoreFailed}}
</div>
<div id="waiting" style="display:none">
<span id="dots"></span>
</div>
</div>
</div>
<script type="text/javascript">
function restoreCb(task)
{
if (!task || !task.statusCode)
return;
if (task.statusCode === 'TASK_ERROR') {
$('#restorefailed').show('slow');
}
if (task.statusCode === 'TASK_ERROR' || task.statusCode === 'TASK_FINISHED') {
startRebootPoll();
}
}
function startRebootPoll()
{
$('#waiting').show();
$('#waiting').prepend('<span class="glyphicon glyphicon-refresh slx-rotation"></span>');
$('#dots').text('{{lang_waitReboot}}');
slxDotInterval = setInterval(function() { $('#dots').text($('#dots').text() + '..'); }, 3000);
setTimeout('rebootPoll()', 10000);
}
function rebootPoll()
{
if (slxDotInterval !== false) {
clearInterval(slxDotInterval);
slxDotInterval = false;
}
$('#dots').text($('#dots').text() + '..');
slxTimeoutId = setTimeout('rebootPoll()', 3500);
$.ajax({url: "index.php?do=Main", timeout: 3000}).success(function(data, textStatus, jqXHR) {
if (textStatus !== "success" && textStatus !== "notmodified")
return;
if (data.indexOf('Connecting to the local database failed') > -1)
return;
clearTimeout(slxTimeoutId);
setTimeout(function() {
window.location.replace("index.php?do=Main&message[]=success%7Crestore-done");
}, 2000);
});
}
</script>
|