-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
179 lines (154 loc) · 9.92 KB
/
index.html
File metadata and controls
179 lines (154 loc) · 9.92 KB
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?php
// Prevent caching
header("Cache-Control: no-cache, must-revalidate"); // HTTP 1.1
header("Pragma: no-cache"); // HTTP 1.0
header("Expires: 0"); // Proxies
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/styles.css">
<title>FLTA Rabbit Control Center</title>
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
</head>
<body>
<script src="js/navigation.js" defer></script>
<header> <img src="static/FTL_320x.jpg" alt="Logo"> </header>
<hr>
<div id="poolmanagement" style="display:none; text-align: center;">
<h1 style="margin: 0 auto;">Edit and Submit JSON</h1>
<button id="pmReturnButton" onclick="goBack()" class="button-prep2 pure-button" style="display: block; margin: 4px auto;">Return</button>
<textarea id="pmjsonTextarea" rows="10" cols="50" style="margin: 0 auto;">loading...</textarea>
<button onclick="fetchAndLoadJSON('pmjsonTextarea','/db/pools.json')" class="button-prep2 pure-button" style="display: block; margin: 4px auto;">Reload JSON</button>
<button onclick="submitJSON('pmjsonTextarea','/db/pools.json')" class="button-prep2 pure-button" style="display: block; margin: 4px auto;">Submit JSON</button>
</div>
<div id="networkmanagement" style="display:none; text-align: center;">
<h1 style="margin: 0 auto;">Edit and Submit Wifi Details</h1>
<button id="nwReturnButton" onclick="goBack()" class="button-prep2 pure-button" style="display: block; margin: 4px auto;">Return</button>
<textarea id="nwjsonTextarea" rows="10" cols="50" style="margin: 0 auto;">loading...</textarea>
<button onclick="fetchAndLoadJSON('nwjsonTextarea','/db/wifi.json')" class="button-prep2 pure-button" style="display: block; margin: 4px auto;">Reload</button>
<button onclick="submitJSON('nwjsonTextarea','/db/wifi.json')" class="button-prep2 pure-button" style="display: block; margin: 4px auto;">Submit</button>
</div>
<div id="mainmenu" style="display:block">
<nav>
<ul>
<li><button onclick="showdiv('paceset')" class="button-prep2 pure-button">Pace Set</button></li>
<li><button onclick="showdiv('sprintset')" class="button-prep2 pure-button">Sprint Set</button></li>
<li><button onclick="showdiv('poolmanagement')" class="button-prep2 pure-button">Pool Management</button></li>
<li><button onclick="showdiv('networkmanagement')" class="button-prep2 pure-button">Network Management</button></li>
<li><button onclick="showdiv('ledcontrols')" class="button-prep2 pure-button">Led Controls</button></li>
<li><button onclick="callApi('/HardReset')" class="button-prep2 pure-button">Hard Reset</button></li>
<!-- Add more buttons as needed -->
</ul>
</nav>
</div>
<div id="paceset" style="display:none">
<button id="ReturnButton" onclick="goBack()" class="button-prep2 pure-button" style="display: block; margin: 0 auto;">Return</button>
<button id="CancelButton" onclick="CancelIt()" class="button-prep2 pure-button" style="display: none; margin: 0 auto;">Cancel</button>
<button id="StopButton" onclick="StopIt()" class="button-prep2 pure-button" style="display: none; margin: 0 auto;">Stop</button>
<table id="tableofinputs" style=" margin: 0 auto;">
<tr>
<th class="left-aligned-label"><label for="pools" >Pool</label></th>
<th><select id="pools" class="selection"></select></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="direction">Start (Near/Far)</label></th>
<th> <select id="direction" class="selection">
<option value="Near">Near</option>
<option value="Far">Far</option>
</select></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="audio" >Audio</label></th>
<th> <select id="audio" class="selection">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="duration">Duration(s) CSV [HH:]mm:ss.ss</label></th>
<th><input name="duration" id="duration" value="2:00.00" type="text" onblur="validateTimeFormat(this)" class="text-entry"/></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="distance" >Distance</label></th>
<th><input name="distance" id="distance" value="200" class="text-entry"/></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="repetitions" >Repetitions</label></th>
<th><input name="repetitions" id="repetitions" value="20" class="text-entry"/></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="interval" >Intervals hh:mm:ss.ss</label></th>
<th><input name="interval" id="interval" value="2:30.00" type="text" onblur="validateTimeFormat(this)" class="text-entry"/></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="stagger">Stagger</label></th>
<th><input id="stagger" type="checkbox" checked/></th>
</tr>
</table>
<button id="PrepButton" onclick="PrepIt()" class="button-prep2 pure-button" style="display: block; margin: 0 auto;">Prep Set</button>
<button id="StartButton" onclick="StartIt()" class="button-prep2 pure-button" style="display: none; margin: 0 auto;">Start Set</button>
</div>
<div id="sprintset" style="display:none">
<button id="ssReturnButton" onclick="goBack()" class="button-prep2 pure-button" style="display: block; margin: 0 auto;">Return</button>
<button id="ssCancelButton" onclick="CancelSprint()" class="button-prep2 pure-button" style="display: none; margin: 0 auto;">Cancel</button>
<button id="ssStopButton" onclick="StopSprint()" class="button-prep2 pure-button" style="display: none; margin: 0 auto;">Stop</button>
<table id="sstableofinputs" style=" margin: 0 auto;">
<tr>
<th class="left-aligned-label"><label for="pools" >Pool</label></th>
<th><select id="sspools" class="selection"></select></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="direction">Start (Near/Far)</label></th>
<th> <select id="ssdirection" class="selection">
<option value="Near">Near</option>
<option value="Far">Far</option>
</select></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="audio" >Audio</label></th>
<th> <select id="ssaudio" class="selection">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select></th>
</tr>
<tr>
<th class="left-aligned-label"><label for="duration">Duration(s) CSV [HH:]mm:ss.ss</label></th>
<th><input name="duration" id="ssduration" value="0:10.00" type="text" onblur="validateTimeFormat(this)" class="text-entry"/></th>
</tr>
</table>
<label for="interval"></label><input name="interval" id="ssinterval" value="00.00" type="text" onblur="validateTimeFormat(this)" class="text-entry" style="display: none;"/>
<label for="distance"></label><input name="distance" id="ssdistance" value="25" type="text" onblur="validateTimeFormat(this)" class="text-entry" style="display: none;"/>
<label for="repetitions"></label><input name="repetitions" id="ssrepetitions" value="25" type="text" onblur="validateTimeFormat(this)" class="text-entry" style="display: none;"/>
<button id="ssPrepButton" onclick="PrepSprint()" class="button-prep2 pure-button" style="display: block; margin: 0 auto;">Prep Set</button>
<button id="ssStartButton" onclick="StartSprint()" class="button-prep2 pure-button" style="display: none; margin: 0 auto;">Start Set</button>
</div>
<div id="ledcontrols" style="display:none">
<nav>
<ul>
<li><button onclick="goBack()" class="button-prep2 pure-button">Return</button></li>
<li><button onclick="callApi('/LightStrand')" class="button-prep2 pure-button">Light the Strand</button></li>
<li><button onclick="callApi('/LightSegment')" class="button-prep2 pure-button">Light the Segment</button></li>
<li><button onclick="showdiv('controlapixel')" class="button-prep2 pure-button">Control a Pixel</button></li>
<li><button onclick="callApi('/ClearStrand')" class="button-prep2 pure-button">Clear the Strand</button></li>
</ul>
</nav>
</div>
<div id="controlapixel" style="display:none; text-align: center;">
<button id="cpReturnButton" onclick="goBack()" class="button-prep2 pure-button" style="display: inline-block">Return</button>
<br>
<label>Increment</label><br>
<label for="ledlocationslide"></label><input type="range" id="ledlocationslide" name="ledlocation" min="0" max="910" value="0"
onchange="ledlocationchange(this)" style="width:100%"><br>
<label for="ledlocationtext"></label><input type="number" step="1" pattern="\d+" id="ledlocationtext" name="fname" value="0"
onchange="ledlocationchange(this)"><br>
<button id="plus" onclick="adjustLedLocation(1)" class="button-prep2 pure-button" >+</button>
<button id="minux" onclick="adjustLedLocation(-1)" class="button-prep2 pure-button" >-</button>
<button id="setlastled" onclick="saveaslastled()" class="button-prep2 pure-button" >Set as last LED</button>
</div>
</body>
</html>