blob: a3f61edb9e9f620967a055ee15af0560481ce0cf (
plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Four Sections Layout</title>
<link rel="stylesheet" href="css/style.css">
<script type="module" src="js/main.js"></script>
</head>
<body>
<dialog id="setupDialog">
<h1>Setup</h1>
<div>LFV status: <span id="lfvReadyValue">offline</span></div>
<div class="padtop">
<button disabled value="true" id="lfvReadyBtn" onclick="api.msg.send.start(this)">start LFVs</button>
</div>
</dialog>
<!-- <script>document.getElementById("setupDialog").showModal()</script> -->
<dialog id="sosDialog">
<h1 class="blink">SOS!!!</h1>
<div class="padtop">
<button value="false" onclick="api.msg.send.sos(this)">stop!!</button>
</div>
</dialog>
<div class="container">
<div class="section overview_control">
<details open>
<summary>State controls</summary>
<div class="state_controls">
<ul>
<li class="list-item">
<span id="photocellValue" class="dot"></span> Fotocellen
<div class="buttons">
<button value="true" onclick="api.msg.send.photocell(this)">On</button>
<button value="false" onclick="api.msg.send.photocell(this)">Off</button>
</div>
</li>
<li class="list-item">
<span id="barrierValue" class="dot"></span> Slagboom
<div class="buttons">
<button value="true" onclick="api.msg.send.barrier(this)">Open</button>
<button value="false" onclick="api.msg.send.barrier(this)">Close</button>
</div>
</li>
<li class="list-item">
Matrixbord
<div class="buttons">
<select class="dropdown" id="matrixValue" onchange="api.msg.send.matrix(this)">
<option value="road_closed">Wegafsluiting</option>
<option value="construction">Werkzaamheden</option>
<option value="disabled">Uitschakelen</option>
</select>
</div>
</li>
</ul>
</div>
</details>
<details open>
<summary>Verlichting</summary>
<div class="light_controls">
<div>Felheid: <span id="lightsValue">??</span>%</div>
<input id="lightsInput" type="range" min="0" max="10" step="1" value="0" oninput="api.msg.send.lights(this)"/>
</div>
</details>
<details open>
<summary>Stoplichten</summary>
<div class="traffic_light_controls">
<button value="red" onclick="api.msg.send.trafficLights(this)">Rood</button>
<button value="off" onclick="api.msg.send.trafficLights(this)">Uit</button>
<div>Status: <span id="trafficLightsValue">??</span></div>
</div>
</details>
<details open>
<summary>CCTV Controls</summary>
<div class="buttons">
<button value="preset1" onclick="api.msg.send.cctvPreset(this)">Preset 1</button>
<button value="preset2" onclick="api.msg.send.cctvPreset(this)">Preset 2</button>
<button value="preset3" onclick="api.msg.send.cctvPreset(this)">Preset 3</button>
<button value="preset4" onclick="api.msg.send.cctvPreset(this)">Preset 4</button>
<button value="preset5" onclick="api.msg.send.cctvPreset(this)">Preset 5</button>
<button value="preset6" onclick="api.msg.send.cctvPreset(this)">Preset 6</button>
<button value="preset7" onclick="api.msg.send.cctvPreset(this)">Preset 7</button>
<button value="preset8" onclick="api.msg.send.cctvPreset(this)">Preset 8</button>
<button value="preset9" onclick="api.msg.send.cctvPreset(this)">Preset 9</button>
</div>
<div>
<div class="inputlabel">
<label>Pan</label>
<input id="cctvPanInput" type="range" min="0" max="360" step="1" value="0" oninput="api.msg.send.cctvCtl()"/>
</div>
<div class="inputlabel">
<label>Tilt</label>
<input id="cctvTiltInput" type="range" min="-90" max="90" step="1" value="0" oninput="api.msg.send.cctvCtl()"/>
</div>
<div class="inputlabel">
<label>Zoom</label>
<input id="cctvZoomInput" type="range" min="10" max="45" step="1" value="10" oninput="api.msg.send.cctvCtl()"/>
</div>
</div>
</details>
<details>
<summary>WebSocket Demo</summary>
<div class="websocket_demo">
<button onclick="api.msg.send.helloWorld()">Hello World!</button>
</div>
</details>
</div>
<div class="section notifications" id="sectionNotifications">
<div class="table-wrapper">
<table id="myTable">
<tr>
<th>Meldingen</th>
</tr>
</table>
</div>
</div>
<div class="section bottom-right">
<p>Start</p>
<div class="canvas-square" id="myCanvas1">
<div class="inner-content">
<!-- <div class="traffic-light"></div>
<div class="barrier"></div> -->
<div>Autos: <span id="zone1CarsValue">??</span></div>
<!-- <div>Gem.S.: <span id="zone1SpeedValue">??</span> km/h</div> -->
</div>
</div>
<div class="canvas-square" id="myCanvas2">
<div class="inner-content">
<div>Autos: <span id="zone2CarsValue">??</span></div>
<!-- <div>Gem.S.: <span id="zone2SpeedValue">??</span> km/h</div> -->
</div>
</div>
<p>End</p>
</div>
</div>
</body>
</html>
|