-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
80 lines (72 loc) · 2.02 KB
/
index.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
79
80
<!doctype html>
<html>
<head>
<title>Sempal</title>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<script src="/socket.io/socket.io.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Exo:300" rel="stylesheet" />
<script>
$(function ()
{
var socket = io(); // an event-listener for the socket
socket.on('Voltage value latest : ', function(voltage)
{
$('#voltage').text(voltage);
});
socket.on('Current value latest : ', function(current)
{
$('#current').text(current);
});
socket.on('Frequency value latest :', function(frequency)
{
$('#frequency').text(frequency);
});
});
</script>
</head>
<body>
<div class="header">
<div class="header-text">
<p> SEMPAL </p><br>
</div>
</div>
<div id="data-wrapper">
<div id="row">
<div id="voltage-tab-wrapper">
<div id="voltage-data">
<p>Voltage :
<div id="voltage-data-number"> <span id="voltage">no data yet</span>
</div>
</p>
<br>
</div>
<div id="voltage-container" style="height: 150px; width: 280px;">
</div>
</div>
<div id="current-tab-wrapper">
<div id ="current-data">
<p>Current :
<div id="current-data-number"> <span id="current">no data yet</span>
</div>
</p>
<br>
</div>
<div id="current-container" style="height: 150px; width: 280px;">
</div>
</div>
<div id="frequency-tab-wrapper">
<div id="frequency-data">
<p>Frequency :
<div id="frequency-data-number">
<span id="frequency">no data yet</span>
</div>
</p>
<br>
</div>
<div id="frequency-container" style="height: 150px; width: 280px;">
</div>
</div>
</body>
</html>