-
Notifications
You must be signed in to change notification settings - Fork 11
/
reload_web_settings.html
78 lines (61 loc) · 2.13 KB
/
reload_web_settings.html
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{% extends ../base.html %}
{% block title %}{{ _('Crafty Controller - Dashboard') }}{% end %}
{% block content %}
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-md-6">
<h1 class="m-0">
{{ _('Reloading Web Server') }}
<small style="font-size:.45em;">{{ _('Hold on to your butts') }}</small>
</h1>
</div>
<div class="col-md-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="/admin/dashboard"><i class="fas fa-tachometer-alt"></i> {{ _('Home') }}</a></li>
<li class="active breadcrumb-item">{{ _('Server Control') }}</li>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="row">
<div class="col-6">
<div class="card card-secondary card-outline">
<div class="card-header">
<h3 class="card-title">
{{ _('Reloading Web Services') }}
</h3>
</div>
<div class="card-body">
{{ _('This could take several seconds') }}<br />
<div class="progress">
<div class="progress-bar bg-primary progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="">
<span class="sr-only">{{ _('40% Complete (success)') }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{% end %}
{% block js-script %}
<script type="text/javascript">
var i = 0;
function makeProgress(){
if(i < 100){
i = i + 1;
$(".progress-bar").css("width", i + "%").text(i + " %");
}
// Wait for sometime before running this script again
setTimeout("makeProgress()", 100);
}
makeProgress();
setTimeout("do_redirect()", 10000);
function do_redirect(){
window.location.href = window.location.protocol + "://" + window.location.hostname + ":{{ data['web_settings']['port_number'] }}";
}
</script>
{% end %}