summaryrefslogtreecommitdiff
path: root/kvmd/web/index.html
blob: 8766aae5d64912f2d4584a0f9cb90e3375b9148b (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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>Pi-KVM</title>

	<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
	<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
	<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">

	<link rel="stylesheet" href="css/vars.css">
	<link rel="stylesheet" href="css/main.css">
	<link rel="stylesheet" href="css/windows.css">
	<link rel="stylesheet" href="css/leds.css">
	<link rel="stylesheet" href="css/stream.css">
	<link rel="stylesheet" href="css/msd.css">
	<link rel="stylesheet" href="css/keyboard.css">
</head>

<script src="js/tools.js"></script>
<script src="js/stream.js"></script>
<script src="js/atx.js"></script>
<script src="js/keyboard.js"></script>
<script src="js/mouse.js"></script>
<script src="js/hid.js"></script>
<script src="js/msd.js"></script>
<script src="js/session.js"></script>
<script src="js/ui.js"></script>
<script src="js/main.js"></script>

<script>window.onload = main;</script>

<body>
	<ul id="ctl">
		<li class="ctl-logo"><img id="logo" src="svg/logo.svg" alt="&pi;-kvm" /></li>

		<li class="ctl-right-actions">
			<div class="ctl-dropdown">
				<a class="ctl-item" href="#">
					<img data-dont-hide-menu id="stream-led" class="led-off" src="svg/stream-led.svg" />
					<img data-dont-hide-menu id="hid-keyboard-led" class="led-off" src="svg/hid-keyboard-led.svg" />
					<img data-dont-hide-menu id="hid-mouse-led" class="led-off" src="svg/hid-mouse-led.svg" />
					System &#8628;
				</a>
				<div class="ctl-dropdown-content" style="display:none">
					<button disabled id="stream-reset-button" onclick="stream.clickResetButton();">&bull; Reset stream</button>
				</div>
			</div>
		</li>

		<li class="ctl-right-actions">
			<div class="ctl-dropdown">
				<a class="ctl-item" href="#">
					<img data-dont-hide-menu id="atx-power-led" class="led-off" src="svg/atx-power-led.svg" />
					<img data-dont-hide-menu id="atx-hdd-led" class="led-off" src="svg/atx-hdd-led.svg" />
					ATX &#8628;
				</a>
				<div class="ctl-dropdown-content" style="display:none">
					<button disabled id="atx-power-button" onclick="atx.clickButton(this);">&bull; Click Power <sup><i>short</i></sup></button>
					<button disabled id="atx-power-button-long" onclick="atx.clickButton(this);">&bull; Click Power <sup><i>long</i></sup></button>
					<hr>
					<button disabled id="atx-reset-button" onclick="atx.clickButton(this);">&bull; Click Reset</button>
				</div>
			</div>
		</li>

		<li class="ctl-right-actions">
			<div class="ctl-dropdown">
				<a class="ctl-item" href="#">
					<img data-dont-hide-menu id="msd-led" class="led-off" src="svg/msd-led.svg" />
					Mass Storage &#8628;
				</a>
				<div data-dont-hide-menu id="msd-menu" class="ctl-dropdown-content" style="display:none">
					<div id="msd-not-in-operate" style="display:none">
						<div class="ctl-dropdown-content-text">
							<table>
								<tr>
									<td><img src="svg/warning.svg" /></td>
									<td><b>Mass Storage Device is not operational</b></td>
								</tr>
							</table>
						</div>
						<hr>
					</div>

					<div id="msd-current-image-broken" style="display:none">
						<div class="ctl-dropdown-content-text">
							<table>
								<tr>
									<td><img src="svg/warning.svg" /></td>
									<td><b>Current image is broken!</b><br><sub>Perhaps uploading was interrupted</sub></td>
								</tr>
							</table>
						</div>
						<hr>
					</div>

					<div id="msd-another-another-user-uploads" style="display:none">
						<div class="ctl-dropdown-content-text">
							<table>
								<tr>
									<td><img src="svg/info.svg" /></td>
									<td><b>Another user uploads an image</b></td>
								</tr>
							</table>
						</div>
						<hr>
					</div>

					<table id="msd-info">
						<tr>
							<td>Status: </td>
							<td id="msd-status"></td>
						</tr>
					</table>
					<hr>

					<table id="msd-info">
						<tr>
							<td>Current image:</td>
							<td id="msd-current-image-name"></td>
						</tr>
						<tr>
							<td>Image size:</td>
							<td id="msd-current-image-size"></td>
						</tr>
							<td>Storage size:</td>
							<td id="msd-storage-size"></td>
						</tr>
					</table>
					<hr>

					<input type="file" id="msd-select-new-image-file" style="display:none;" onchange="msd.selectNewImageFile()" />
					<div class="buttons-row">
						<button disabled id="msd-select-new-image-button" class="row50" onclick="document.getElementById('msd-select-new-image-file').click();">Upload new image</button>
						<button disabled id="msd-upload-new-image-button" class="row25" onclick="msd.clickButton(this);">Start</button>
						<button disabled id="msd-abort-uploading-button" class="row25" onclick="msd.clickButton(this);">Abort</button>
					</div>
					<hr>

					<div id="msd-new-image" style="display:none">
						<table id="msd-info">
							<tr>
								<td>New name:</td>
								<td id="msd-new-image-name"></td>
							</tr>
							<tr>
								<td>Upload size:</td>
								<td id="msd-new-image-size"></td>
							</tr>
						</table>
						<hr>
						<div class="ctl-dropdown-content-text">
							<div id="msd-progress">
								<span id="msd-progress-value"></span>
							</div>
						</div>
						<hr>
					</div>

					<div class="buttons-row">
						<button disabled data-force-hide-menu id="msd-switch-to-kvm-button" class="row50" onclick="msd.clickButton(this);">&bull; Switch drive to KVM</button>
						<button disabled data-force-hide-menu id="msd-switch-to-server-button" class="row50" onclick="msd.clickButton(this);">&bull; Switch drive to Server</button>
					</div>
				</div>
			</div>
		</li>

		<li class="ctl-right-actions">
			<div class="ctl-dropdown">
				<a class="ctl-item" href="#">
					Shortcuts &#8628;
				</a>
				<div class="ctl-dropdown-content" style="display:none">
					<button onclick="hid.emitShortcut('ControlLeft', 'AltLeft', 'Delete');">&bull; Ctrl+Alt+Del</button>
					<hr>
					<button onclick="hid.emitShortcut('ControlLeft', 'Escape');">&bull; Ctrl+Esc</button>
					<button onclick="hid.emitShortcut('AltLeft', 'Tab');">&bull; Alt+Tab</button>
					<button onclick="hid.emitShortcut('AltLeft', 'Escape');">&bull; Alt+Escape</button>
					<button onclick="hid.emitShortcut('AltLeft', 'Space');">&bull; Alt+Space</button>
					<button onclick="hid.emitShortcut('AltLeft', 'Enter');">&bull; Alt+Enter</button>
					<button onclick="hid.emitShortcut('AltLeft', 'F4');">&bull; Alt+F4</button>
					<hr>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen');">&bull; Alt+PrtSc</button>
					<button onclick="hid.emitShortcut('PrintScreen');">&bull; PrtSc</button>
					<hr>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen', 'KeyR');">&bull; Alt+SysRq+R</button>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen', 'KeyE');">&bull; Alt+SysRq+E</button>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen', 'KeyI');">&bull; Alt+SysRq+I</button>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen', 'KeyS');">&bull; Alt+SysRq+S</button>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen', 'KeyU');">&bull; Alt+SysRq+U</button>
					<button onclick="hid.emitShortcut('AltLeft', 'PrintScreen', 'KeyB');">&bull; Alt+SysRq+B</button>
				</div>
			</div>
		</li>
	</ul>

	<div class="window" style="left:50%; top:70px">
		<div class="window-header">Stream</div>
		<!-- <hr class="window-sep"> -->
		<img id="stream-image" class="stream-image-inactive" alt="Loading..." src="/streamer/?action=stream"/>
	</div>

	<div class="window" style="left:75%; top:60%">
		<div class="window-header">Virtual Keyboard</div>
		<hr class="window-sep">
		<div id="keyboard">
			<div class="keyboard-block">
				<div class="keyboard-row">
					<div id="Escape" class="key small"><p>Esc</p></div>
					<div class="empty-key" style="width:24px"></div>
					<div id="F1" class="key small"><p>F1</p></div>
					<div id="F2" class="key small"><p>F2</p></div>
					<div id="F3" class="key small"><p>F3</p></div>
					<div id="F4" class="key small"><p>F4</p></div>
					<div class="empty-key" style="width:10px"></div>
					<div id="F5" class="key small"><p>F5</p></div>
					<div id="F6" class="key small"><p>F6</p></div>
					<div id="F7" class="key small"><p>F7</p></div>
					<div id="F8" class="key small"><p>F8</p></div>
					<div class="empty-key" style="width:10px"></div>
					<div id="F9" class="key small"><p>F9</p></div>
					<div id="F10" class="key small"><p>F10</p></div>
					<div id="F11" class="key small"><p>F11</p></div>
					<div id="F12" class="key small"><p>F12</p></div>
				</div>
				<div class="keyboard-row">
					<div id="Backquote" class="key"><p>~<br>`</p></div>
					<div id="Digit1" class="key"><p>!<br>1</p></div>
					<div id="Digit2" class="key"><p>@<br>2</p></div>
					<div id="Digit3" class="key"><p>#<br>3</p></div>
					<div id="Digit4" class="key"><p>$<br>4</p></div>
					<div id="Digit5" class="key"><p>%<br>5</p></div>
					<div id="Digit6" class="key"><p>^<br>6</p></div>
					<div id="Digit7" class="key"><p>&amp;<br>7</p></div>
					<div id="Digit8" class="key"><p>*<br>8</p></div>
					<div id="Digit9" class="key"><p>(<br>9</p></div>
					<div id="Digit0" class="key"><p>)<br>0</p></div>
					<div id="Minus" class="key"><p>_<br>-</p></div>
					<div id="Equal" class="key"><p>+<br>=</p></div>
					<div id="Backspace" class="key wide-2 right"><p>&#8612;</p></div>
				</div>
				<div class="keyboard-row">
					<div id="Tab" class="key wide-2 left"><p>&#8676;<br>&#8677;</p></div>
					<div id="KeyQ" class="key single"><p>Q</p></div>
					<div id="KeyW" class="key single"><p>W</p></div>
					<div id="KeyE" class="key single"><p>E</p></div>
					<div id="KeyR" class="key single"><p>R</p></div>
					<div id="KeyT" class="key single"><p>T</p></div>
					<div id="KeyY" class="key single"><p>Y</p></div>
					<div id="KeyU" class="key single"><p>U</p></div>
					<div id="KeyI" class="key single"><p>I</p></div>
					<div id="KeyO" class="key single"><p>O</p></div>
					<div id="KeyP" class="key single"><p>P</p></div>
					<div id="BracketLeft" class="key"><p>{<br>[</p></div>
					<div id="BracketRight" class="key"><p>}<br>]</p></div>
					<div id="Backslash" class="key"><p>|<br>\</p></div>
				</div>
				<div class="keyboard-row">
					<div id="CapsLock" class="key wide-3 left small"><p>Caps Lock</p></div>
					<div id="KeyA" class="key single"><p>A</p></div>
					<div id="KeyS" class="key single"><p>S</p></div>
					<div id="KeyD" class="key single"><p>D</p></div>
					<div id="KeyF" class="key single"><p>F</p></div>
					<div id="KeyG" class="key single"><p>G</p></div>
					<div id="KeyH" class="key single"><p>H</p></div>
					<div id="KeyJ" class="key single"><p>J</p></div>
					<div id="KeyK" class="key single"><p>K</p></div>
					<div id="KeyL" class="key single"><p>L</p></div>
					<div id="Semicolon" class="key"><p>:<br>;</p></div>
					<div id="Quote" class="key"><p>"<br>'</p></div>
					<div id="Enter" class="key wide-3 right small"><p>Enter<br>&crarr;</p></div>
				</div>
				<div class="keyboard-row">
					<div id="ShiftLeft" class="modifier wide-4 left small"><p><b>&bull;</b><br>Shift</p></div>
					<div id="KeyZ" class="key single"><p>Z</p></div>
					<div id="KeyX" class="key single"><p>X</p></div>
					<div id="KeyC" class="key single"><p>C</p></div>
					<div id="KeyV" class="key single"><p>V</p></div>
					<div id="KeyB" class="key single"><p>B</p></div>
					<div id="KeyN" class="key single"><p>N</p></div>
					<div id="KeyM" class="key single"><p>M</p></div>
					<div id="Comma" class="key"><p>&lt;<br>,</p></div>
					<div id="Period" class="key"><p>&gt;<br>.</p></div>
					<div id="Slash" class="key"><p>?<br>/</p></div>
					<div id="ShiftRight" class="modifier wide-4 right small"><p><b>&bull;</b><br>Shift</p></div>
				</div>
				<div class="keyboard-row">
					<div id="ControlLeft" class="modifier wide-1 left small"><p><b>&bull;</b><br>Ctrl</p></div>
					<div id="MetaLeft" class="modifier wide-1 left small"><p><b>&bull;</b><br>Win</p></div>
					<div id="AltLeft" class="modifier wide-1 left small"><p><b>&bull;</b><br>Alt</p></div>
					<div id="Space" class="key wide-5"></div>
					<div id="AltRight" class="modifier wide-1 right small"><p><b>&bull;</b><br>Alt</p></div>
					<div id="MetaRight" class="modifier wide-1 right small"><p><b>&bull;</b><br>Win</p></div>
					<div id="ControlRight" class="modifier wide-1 right small"><p><b>&bull;</b><br>Ctrl</p></div>
				</div>
			</div>
			<div class="keyboard-block">
				<div class="keyboard-row">
					<div id="PrintScreen" class="modifier small"><p><b>&bull;</b><br>Pt/Sq</p></div>
					<div id="ScrollLock" class="key small"><p>ScrLk</p></div>
					<div id="Pause" class="key small"><p>P/Brk</p></div>
				</div>
				<div class="keyboard-row">
					<div id="Insert" class="key small"><p>Ins</p></div>
					<div id="Home" class="key small"><p>Home</p></div>
					<div id="PageUp" class="key small"><p>PgUp</p></div>
				</div>
				<div class="keyboard-row">
					<div id="Delete" class="key small"><p>Del</p></div>
					<div id="End" class="key small"><p>End</p></div>
					<div id="PageDown" class="key small"><p>PgDn</p></div>
				</div>
				<div class="keyboard-row"></div>
				<div class="keyboard-row">
					<div class="empty-key"></div>
					<div id="ArrowUp" class="key"><p>&uarr;</p></div>
					<div class="empty-key"></div>
				</div>
				<div class="keyboard-row">
					<div id="ArrowLeft" class="key"><p>&larr;</p></div>
					<div id="ArrowDown" class="key"><p>&darr;</p></div>
					<div id="ArrowRight" class="key"><p>&rarr;</p></div>
				</div>
			</div>
		</div>
	</div>

	<ul id="footer">
		<li id="kvmd-version" class="footer-left"></li>
		<li class="footer-right"><a target="_blank" href="https://github.com/pi-kvm">Pi-KVM Project</a></li>
	</ul>
</body>
</html>