-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.html
54 lines (52 loc) · 1.21 KB
/
site.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript"></script>
</head>
<body>
<div>
{% if notification != "" %}
<script>
alert("{{notification}}");
</script>
{% endif %}
<script>
var updater;
{% if status == "StartPending" or status == "StopPending" %}
updater = setInterval(function(){location.href = "/check";}, 1000);
{% else %}
clearInterval(updater);
{% endif %}
</script>
{% if mode == True %}
<input type="checkbox" id="turn" onclick="change()" checked>
<label for="turn">Application is Up.</label>
{% else %}
<input type="checkbox" id="turn" onclick="change()">
<label for="turn">Application is Down.</label>
{% endif %}
</div>
<font color={{color}}>Service state is {{status}}</font>
<div>
<form action="/start">
<input type="submit" value="Start">
</form>
</div>
<div>
<form action="/reboot">
<input type="submit" value="Reboot">
</form>
</div>
<div>
<form action="/stop">
<input type="submit" value="Shutdown">
</form>
</div>
</body>
<script>
function change(){
location.href = "/?mode";
};
</script>
</html>