aboutsummaryrefslogtreecommitdiff
path: root/ui/index.html
blob: 98cd44d0b7b3f5147abe6593099a6e9b83114fae (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
<!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="cctvValue" class="dot"></span> CCTV
							<div class="buttons">
								<button value="true" onclick="api.msg.send.cctv(this)">On</button>
								<button value="false" onclick="api.msg.send.cctv(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">
					<input id="lightsInput" type="range" min="0" max="10" step="1" value="0" oninput="api.msg.send.lights(this)"/>
					<div>Felheid: <span id="lightsValue">??</span>%</div>
				</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>
				<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>