-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·496 lines (458 loc) · 33.9 KB
/
Copy pathindex.html
File metadata and controls
executable file
·496 lines (458 loc) · 33.9 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
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>R-SCUAD TECH · Base Station</title>
<meta name="description" content="Basestation Robot RSCUAD">
<meta name="author" content="Danu Andrean">
<link rel="stylesheet" href="/assets/css/tailwind.css">
</head>
<body>
<!-- ============================== TOP BAR ============================== -->
<header class="sticky top-0 z-40 flex flex-wrap items-center gap-4 border-b border-white/10 bg-slate-950/80 px-5 py-3 backdrop-blur-xl">
<div class="flex min-w-0 items-center gap-3">
<div class="grid size-11 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-sky-400 to-indigo-400 font-mono text-[15px] font-bold text-slate-950 shadow-lg shadow-sky-500/25">RS</div>
<div>
<h1 class="text-[15px] font-bold tracking-[0.16em] whitespace-nowrap">BASE STATION</h1>
<span class="mt-0.5 block text-[10.5px] tracking-[0.14em] text-slate-500 uppercase">R-SCUAD · Robot Control Center</span>
</div>
</div>
<div class="flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.02] p-1.5" id="fleetStrip" title="Status ringkas seluruh robot">
<div class="fleet-chip" id="fleet1" data-state="idle"><span class="fleet-dot"></span>R1</div>
<div class="fleet-chip" id="fleet2" data-state="idle"><span class="fleet-dot"></span>R2</div>
<div class="fleet-chip" id="fleet3" data-state="idle"><span class="fleet-dot"></span>R3</div>
<div class="fleet-chip" id="fleet4" data-state="idle"><span class="fleet-dot"></span>R4</div>
<div class="fleet-chip" id="fleet5" data-state="idle"><span class="fleet-dot"></span>R5</div>
</div>
<div class="ml-auto flex items-center gap-2.5">
<button type="button" id="myBtn" title="Keterangan game state (G)"
class="flex cursor-pointer items-center gap-2.5 rounded-full border border-amber-500/40 bg-amber-500/10 px-4 py-2 font-mono text-amber-400 transition hover:bg-amber-500/20 active:scale-95">
<span class="text-[9.5px] tracking-[0.16em] text-slate-500">GAME STATE</span>
<span id="refree" class="text-[13px] font-bold tracking-[0.16em]">NONE</span>
</button>
<div class="flex items-center gap-2 rounded-full border border-white/10 bg-white/[0.02] px-4 py-2 font-mono text-[11px] tracking-[0.14em] text-red-400" id="linkStatus">
<div id="state"></div>
<span id="linkText">OFFLINE</span>
</div>
<div class="hidden rounded-full border border-white/10 bg-white/[0.02] px-3 py-2 font-mono text-[12px] tracking-wider text-slate-400 tabular-nums lg:block" id="clock">--:--:--</div>
</div>
</header>
<!-- ================================ TABS =============================== -->
<nav class="mx-auto flex w-full max-w-[1700px] gap-2 overflow-x-auto px-5 pt-4" role="tablist">
<button type="button" class="tab active" role="tab" data-tab="robot" aria-selected="true">ROBOT <kbd>1</kbd></button>
<button type="button" class="tab" role="tab" data-tab="stream" aria-selected="false">STREAM <kbd>2</kbd></button>
<button type="button" class="tab" role="tab" data-tab="position" aria-selected="false">POSITION <kbd>3</kbd></button>
</nav>
<main class="mx-auto w-full max-w-[1700px] px-5 pt-4 pb-10">
<!-- ------------------------------ ROBOT ------------------------------ -->
<section class="panel active" id="panel-robot" role="tabpanel">
<div class="mb-4 grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6">
<div class="kpi">
<span class="kpi-icon bg-emerald-500/12 text-emerald-400">▲</span>
<span class="min-w-0">
<span class="label-mono block">ACTIVE</span>
<span class="kpi-value text-emerald-400 mt-1 block" id="kpiActive">—</span>
</span>
</div>
<div class="kpi">
<span class="kpi-icon bg-amber-500/12 text-amber-400">❙❙</span>
<span class="min-w-0">
<span class="label-mono block">STANDBY</span>
<span class="kpi-value text-amber-400 mt-1 block" id="kpiStandby">—</span>
</span>
</div>
<div class="kpi">
<span class="kpi-icon bg-red-500/12 text-red-400">✕</span>
<span class="min-w-0">
<span class="label-mono block">OFFLINE</span>
<span class="kpi-value text-red-400 mt-1 block" id="kpiOffline">—</span>
</span>
</div>
<div class="kpi">
<span class="kpi-icon bg-sky-500/12 text-sky-400">≋</span>
<span class="min-w-0">
<span class="label-mono block">TELEMETRY</span>
<span class="kpi-value text-sky-400 mt-1 block" id="kpiRate">—</span>
</span>
</div>
<div class="kpi">
<span class="kpi-icon bg-indigo-500/12 text-indigo-300">◷</span>
<span class="min-w-0">
<span class="label-mono block">LINK UPTIME</span>
<span class="kpi-value text-indigo-300 mt-1 block" id="kpiUptime">—</span>
</span>
</div>
<div class="kpi">
<span class="kpi-icon bg-white/6 text-slate-100">⚑</span>
<span class="min-w-0">
<span class="label-mono block">GAME STATE</span>
<span class="kpi-value text-slate-100 mt-1 block" id="kpiState">—</span>
</span>
</div>
</div>
<div class="mb-3 flex flex-wrap items-baseline gap-x-3 gap-y-1 px-1">
<h2 class="font-mono text-[12px] tracking-[0.2em]">FLEET TELEMETRY</h2>
<p class="text-[11.5px] text-slate-500">Parameter tiap robot diperbarui ±10×/detik lewat websocket.</p>
</div>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5" id="draw">
<article class="robot-card" id="r1" data-robot="1" style="--accent: var(--color-r1); animation-delay: 0ms">
<div class="flex items-center gap-2.5 px-4 pt-4 pb-3">
<span class="grid size-7 shrink-0 place-items-center rounded-lg border font-mono text-[11px] font-bold"
style="color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent)">01</span>
<h3 class="text-[13px] font-semibold tracking-[0.12em] uppercase">Robot 1</h3>
<span class="rc-badge ml-auto"><span class="badge-dot"></span><span id="badge1">IDLE</span></span>
</div>
<div class="relative flex items-center gap-3 px-4 pb-4">
<div class="rc-halo"></div>
<div class="rc-visual relative grid w-24 shrink-0 place-items-center">
<img class="draw" id="rr1" src="/assets/image/robot-standby.png" alt="Robot 1">
</div>
<div class="relative flex min-w-0 flex-1 flex-col gap-3">
<div class="metric"><span class="metric-label">TILT</span><span class="metric-track"><i class="metric-fill" data-fill="tilt_1"></i></span><input type="text" class="metric-value" id="tilt_1" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">PAN</span><span class="metric-track"><i class="metric-fill" data-fill="pan_1"></i></span><input type="text" class="metric-value" id="pan_1" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">GYRO</span><span class="metric-track"><i class="metric-fill" data-fill="gyro_1"></i></span><input type="text" class="metric-value" id="gyro_1" placeholder="—" readonly></div>
</div>
</div>
<div class="grid grid-cols-3 gap-1.5 px-4 pb-4">
<div class="chip" data-flag="ball_1"><span class="chip-label">BALL</span><input type="text" class="chip-value" id="ball_1" placeholder="—" readonly></div>
<div class="chip" data-flag="limit_1" data-flag-style="alert"><span class="chip-label">LIMIT</span><input type="text" class="chip-value" id="limit_1" placeholder="—" readonly></div>
<div class="chip"><span class="chip-label">CNT</span><input type="text" class="chip-value" id="count_1" placeholder="—" readonly></div>
</div>
<div class="mt-auto border-t border-white/8 bg-slate-950/40 px-4 py-3">
<div class="mb-2 flex items-center justify-between">
<span class="label-mono">Packet Activity</span>
<span class="font-mono text-[10px] text-slate-400"><span id="hz1" class="text-slate-200 tabular-nums">0.0</span> Hz</span>
</div>
<div class="spark" id="spark1"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
<div class="mt-3 grid grid-cols-2 gap-2">
<div class="flex items-center justify-between gap-2"><span class="label-mono">Send</span><input type="text" class="metric-value w-14" id="send_1" placeholder="—" readonly></div>
<div class="flex items-center justify-between gap-2"><span class="label-mono">Recv</span><input type="text" class="metric-value w-14" id="recv_1" placeholder="—" readonly></div>
</div>
</div>
</article>
<article class="robot-card" id="r2" data-robot="2" style="--accent: var(--color-r2); animation-delay: 70ms">
<div class="flex items-center gap-2.5 px-4 pt-4 pb-3">
<span class="grid size-7 shrink-0 place-items-center rounded-lg border font-mono text-[11px] font-bold"
style="color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent)">02</span>
<h3 class="text-[13px] font-semibold tracking-[0.12em] uppercase">Robot 2</h3>
<span class="rc-badge ml-auto"><span class="badge-dot"></span><span id="badge2">IDLE</span></span>
</div>
<div class="relative flex items-center gap-3 px-4 pb-4">
<div class="rc-halo"></div>
<div class="rc-visual relative grid w-24 shrink-0 place-items-center">
<img class="draw" id="rr2" src="/assets/image/robot-standby.png" alt="Robot 2">
</div>
<div class="relative flex min-w-0 flex-1 flex-col gap-3">
<div class="metric"><span class="metric-label">TILT</span><span class="metric-track"><i class="metric-fill" data-fill="tilt_2"></i></span><input type="text" class="metric-value" id="tilt_2" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">PAN</span><span class="metric-track"><i class="metric-fill" data-fill="pan_2"></i></span><input type="text" class="metric-value" id="pan_2" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">GYRO</span><span class="metric-track"><i class="metric-fill" data-fill="gyro_2"></i></span><input type="text" class="metric-value" id="gyro_2" placeholder="—" readonly></div>
</div>
</div>
<div class="grid grid-cols-3 gap-1.5 px-4 pb-4">
<div class="chip" data-flag="ball_2"><span class="chip-label">BALL</span><input type="text" class="chip-value" id="ball_2" placeholder="—" readonly></div>
<div class="chip" data-flag="limit_2" data-flag-style="alert"><span class="chip-label">LIMIT</span><input type="text" class="chip-value" id="limit_2" placeholder="—" readonly></div>
<div class="chip"><span class="chip-label">CNT</span><input type="text" class="chip-value" id="count_2" placeholder="—" readonly></div>
</div>
<div class="mt-auto border-t border-white/8 bg-slate-950/40 px-4 py-3">
<div class="mb-2 flex items-center justify-between">
<span class="label-mono">Packet Activity</span>
<span class="font-mono text-[10px] text-slate-400"><span id="hz2" class="text-slate-200 tabular-nums">0.0</span> Hz</span>
</div>
<div class="spark" id="spark2"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
<div class="mt-3 grid grid-cols-2 gap-2">
<div class="flex items-center justify-between gap-2"><span class="label-mono">Send</span><input type="text" class="metric-value w-14" id="send_2" placeholder="—" readonly></div>
<div class="flex items-center justify-between gap-2"><span class="label-mono">Recv</span><input type="text" class="metric-value w-14" id="recv_2" placeholder="—" readonly></div>
</div>
</div>
</article>
<article class="robot-card" id="r3" data-robot="3" style="--accent: var(--color-r3); animation-delay: 140ms">
<div class="flex items-center gap-2.5 px-4 pt-4 pb-3">
<span class="grid size-7 shrink-0 place-items-center rounded-lg border font-mono text-[11px] font-bold"
style="color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent)">03</span>
<h3 class="text-[13px] font-semibold tracking-[0.12em] uppercase">Robot 3</h3>
<span class="rc-badge ml-auto"><span class="badge-dot"></span><span id="badge3">IDLE</span></span>
</div>
<div class="relative flex items-center gap-3 px-4 pb-4">
<div class="rc-halo"></div>
<div class="rc-visual relative grid w-24 shrink-0 place-items-center">
<img class="draw" id="rr3" src="/assets/image/robot-standby.png" alt="Robot 3">
</div>
<div class="relative flex min-w-0 flex-1 flex-col gap-3">
<div class="metric"><span class="metric-label">TILT</span><span class="metric-track"><i class="metric-fill" data-fill="tilt_3"></i></span><input type="text" class="metric-value" id="tilt_3" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">PAN</span><span class="metric-track"><i class="metric-fill" data-fill="pan_3"></i></span><input type="text" class="metric-value" id="pan_3" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">GYRO</span><span class="metric-track"><i class="metric-fill" data-fill="gyro_3"></i></span><input type="text" class="metric-value" id="gyro_3" placeholder="—" readonly></div>
</div>
</div>
<div class="grid grid-cols-3 gap-1.5 px-4 pb-4">
<div class="chip" data-flag="ball_3"><span class="chip-label">BALL</span><input type="text" class="chip-value" id="ball_3" placeholder="—" readonly></div>
<div class="chip" data-flag="limit_3" data-flag-style="alert"><span class="chip-label">LIMIT</span><input type="text" class="chip-value" id="limit_3" placeholder="—" readonly></div>
<div class="chip"><span class="chip-label">CNT</span><input type="text" class="chip-value" id="count_3" placeholder="—" readonly></div>
</div>
<div class="mt-auto border-t border-white/8 bg-slate-950/40 px-4 py-3">
<div class="mb-2 flex items-center justify-between">
<span class="label-mono">Packet Activity</span>
<span class="font-mono text-[10px] text-slate-400"><span id="hz3" class="text-slate-200 tabular-nums">0.0</span> Hz</span>
</div>
<div class="spark" id="spark3"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
<div class="mt-3 grid grid-cols-2 gap-2">
<div class="flex items-center justify-between gap-2"><span class="label-mono">Send</span><input type="text" class="metric-value w-14" id="send_3" placeholder="—" readonly></div>
<div class="flex items-center justify-between gap-2"><span class="label-mono">Recv</span><input type="text" class="metric-value w-14" id="recv_3" placeholder="—" readonly></div>
</div>
</div>
</article>
<article class="robot-card" id="r4" data-robot="4" style="--accent: var(--color-r4); animation-delay: 210ms">
<div class="flex items-center gap-2.5 px-4 pt-4 pb-3">
<span class="grid size-7 shrink-0 place-items-center rounded-lg border font-mono text-[11px] font-bold"
style="color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent)">04</span>
<h3 class="text-[13px] font-semibold tracking-[0.12em] uppercase">Robot 4</h3>
<span class="rc-badge ml-auto"><span class="badge-dot"></span><span id="badge4">IDLE</span></span>
</div>
<div class="relative flex items-center gap-3 px-4 pb-4">
<div class="rc-halo"></div>
<div class="rc-visual relative grid w-24 shrink-0 place-items-center">
<img class="draw" id="rr4" src="/assets/image/robot-standby.png" alt="Robot 4">
</div>
<div class="relative flex min-w-0 flex-1 flex-col gap-3">
<div class="metric"><span class="metric-label">TILT</span><span class="metric-track"><i class="metric-fill" data-fill="tilt_4"></i></span><input type="text" class="metric-value" id="tilt_4" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">PAN</span><span class="metric-track"><i class="metric-fill" data-fill="pan_4"></i></span><input type="text" class="metric-value" id="pan_4" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">GYRO</span><span class="metric-track"><i class="metric-fill" data-fill="gyro_4"></i></span><input type="text" class="metric-value" id="gyro_4" placeholder="—" readonly></div>
</div>
</div>
<div class="grid grid-cols-3 gap-1.5 px-4 pb-4">
<div class="chip" data-flag="ball_4"><span class="chip-label">BALL</span><input type="text" class="chip-value" id="ball_4" placeholder="—" readonly></div>
<div class="chip" data-flag="limit_4" data-flag-style="alert"><span class="chip-label">LIMIT</span><input type="text" class="chip-value" id="limit_4" placeholder="—" readonly></div>
<div class="chip"><span class="chip-label">CNT</span><input type="text" class="chip-value" id="count_4" placeholder="—" readonly></div>
</div>
<div class="mt-auto border-t border-white/8 bg-slate-950/40 px-4 py-3">
<div class="mb-2 flex items-center justify-between">
<span class="label-mono">Packet Activity</span>
<span class="font-mono text-[10px] text-slate-400"><span id="hz4" class="text-slate-200 tabular-nums">0.0</span> Hz</span>
</div>
<div class="spark" id="spark4"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
<div class="mt-3 grid grid-cols-2 gap-2">
<div class="flex items-center justify-between gap-2"><span class="label-mono">Send</span><input type="text" class="metric-value w-14" id="send_4" placeholder="—" readonly></div>
<div class="flex items-center justify-between gap-2"><span class="label-mono">Recv</span><input type="text" class="metric-value w-14" id="recv_4" placeholder="—" readonly></div>
</div>
</div>
</article>
<article class="robot-card" id="r5" data-robot="5" style="--accent: var(--color-r5); animation-delay: 280ms">
<div class="flex items-center gap-2.5 px-4 pt-4 pb-3">
<span class="grid size-7 shrink-0 place-items-center rounded-lg border font-mono text-[11px] font-bold"
style="color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent)">05</span>
<h3 class="text-[13px] font-semibold tracking-[0.12em] uppercase">Robot 5</h3>
<span class="rc-badge ml-auto"><span class="badge-dot"></span><span id="badge5">IDLE</span></span>
</div>
<div class="relative flex items-center gap-3 px-4 pb-4">
<div class="rc-halo"></div>
<div class="rc-visual relative grid w-24 shrink-0 place-items-center">
<img class="draw" id="rr5" src="/assets/image/robot-standby.png" alt="Robot 5">
</div>
<div class="relative flex min-w-0 flex-1 flex-col gap-3">
<div class="metric"><span class="metric-label">TILT</span><span class="metric-track"><i class="metric-fill" data-fill="tilt_5"></i></span><input type="text" class="metric-value" id="tilt_5" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">PAN</span><span class="metric-track"><i class="metric-fill" data-fill="pan_5"></i></span><input type="text" class="metric-value" id="pan_5" placeholder="—" readonly></div>
<div class="metric"><span class="metric-label">GYRO</span><span class="metric-track"><i class="metric-fill" data-fill="gyro_5"></i></span><input type="text" class="metric-value" id="gyro_5" placeholder="—" readonly></div>
</div>
</div>
<div class="grid grid-cols-3 gap-1.5 px-4 pb-4">
<div class="chip" data-flag="ball_5"><span class="chip-label">BALL</span><input type="text" class="chip-value" id="ball_5" placeholder="—" readonly></div>
<div class="chip" data-flag="limit_5" data-flag-style="alert"><span class="chip-label">LIMIT</span><input type="text" class="chip-value" id="limit_5" placeholder="—" readonly></div>
<div class="chip"><span class="chip-label">CNT</span><input type="text" class="chip-value" id="count_5" placeholder="—" readonly></div>
</div>
<div class="mt-auto border-t border-white/8 bg-slate-950/40 px-4 py-3">
<div class="mb-2 flex items-center justify-between">
<span class="label-mono">Packet Activity</span>
<span class="font-mono text-[10px] text-slate-400"><span id="hz5" class="text-slate-200 tabular-nums">0.0</span> Hz</span>
</div>
<div class="spark" id="spark5"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
<div class="mt-3 grid grid-cols-2 gap-2">
<div class="flex items-center justify-between gap-2"><span class="label-mono">Send</span><input type="text" class="metric-value w-14" id="send_5" placeholder="—" readonly></div>
<div class="flex items-center justify-between gap-2"><span class="label-mono">Recv</span><input type="text" class="metric-value w-14" id="recv_5" placeholder="—" readonly></div>
</div>
</div>
</article>
</div>
<div class="surface mt-4 overflow-hidden">
<div class="flex items-center gap-3 border-b border-white/10 px-4 py-3">
<span class="label-mono">System Log</span>
<span class="ml-auto font-mono text-[10px] text-slate-600">peristiwa terbaru</span>
</div>
<div id="logList" class="max-h-56 overflow-y-auto"></div>
</div>
</section>
<!-- ------------------------------ STREAM ----------------------------- -->
<section class="panel" id="panel-stream" role="tabpanel">
<div class="mb-3 flex flex-wrap items-baseline gap-x-3 gap-y-1 px-1">
<h2 class="font-mono text-[12px] tracking-[0.2em]">CAMERA STREAM</h2>
<p class="text-[11.5px] text-slate-500">Label berubah menjadi LIVE saat frame diterima; FPS dihitung tiap detik.</p>
</div>
<div class="flex flex-wrap justify-center gap-4">
<article class="stream-card w-full max-w-[560px] min-w-[min(380px,100%)] flex-1" id="stream1" style="--accent: var(--color-r1); animation-delay: 0ms">
<div class="flex items-center gap-2.5 border-b border-white/10 px-4 py-3">
<span class="size-2 rounded-full" style="background: var(--accent)"></span>
<span class="font-mono text-[11px] tracking-[0.16em]">ROBOT 1</span>
<span class="ml-auto flex items-center gap-3">
<span class="font-mono text-[10px] text-slate-500"><span id="fps1" class="tabular-nums">0</span> FPS</span>
<span class="sc-signal">NO SIGNAL</span>
</span>
</div>
<div class="sc-view">
<img id="video1" src="" alt="Video Stream Robot 1">
<div class="sc-placeholder relative text-center font-mono text-[10.5px] tracking-[0.18em] text-slate-600">
MENUNGGU FRAME
<span class="mt-2 block animate-pulse text-2xl opacity-40">◍</span>
</div>
</div>
</article>
<article class="stream-card w-full max-w-[560px] min-w-[min(380px,100%)] flex-1" id="stream2" style="--accent: var(--color-r2); animation-delay: 60ms">
<div class="flex items-center gap-2.5 border-b border-white/10 px-4 py-3">
<span class="size-2 rounded-full" style="background: var(--accent)"></span>
<span class="font-mono text-[11px] tracking-[0.16em]">ROBOT 2</span>
<span class="ml-auto flex items-center gap-3">
<span class="font-mono text-[10px] text-slate-500"><span id="fps2" class="tabular-nums">0</span> FPS</span>
<span class="sc-signal">NO SIGNAL</span>
</span>
</div>
<div class="sc-view">
<img id="video2" src="" alt="Video Stream Robot 2">
<div class="sc-placeholder relative text-center font-mono text-[10.5px] tracking-[0.18em] text-slate-600">
MENUNGGU FRAME
<span class="mt-2 block animate-pulse text-2xl opacity-40">◍</span>
</div>
</div>
</article>
<article class="stream-card w-full max-w-[560px] min-w-[min(380px,100%)] flex-1" id="stream3" style="--accent: var(--color-r3); animation-delay: 120ms">
<div class="flex items-center gap-2.5 border-b border-white/10 px-4 py-3">
<span class="size-2 rounded-full" style="background: var(--accent)"></span>
<span class="font-mono text-[11px] tracking-[0.16em]">ROBOT 3</span>
<span class="ml-auto flex items-center gap-3">
<span class="font-mono text-[10px] text-slate-500"><span id="fps3" class="tabular-nums">0</span> FPS</span>
<span class="sc-signal">NO SIGNAL</span>
</span>
</div>
<div class="sc-view">
<img id="video3" src="" alt="Video Stream Robot 3">
<div class="sc-placeholder relative text-center font-mono text-[10.5px] tracking-[0.18em] text-slate-600">
MENUNGGU FRAME
<span class="mt-2 block animate-pulse text-2xl opacity-40">◍</span>
</div>
</div>
</article>
<article class="stream-card w-full max-w-[560px] min-w-[min(380px,100%)] flex-1" id="stream4" style="--accent: var(--color-r4); animation-delay: 180ms">
<div class="flex items-center gap-2.5 border-b border-white/10 px-4 py-3">
<span class="size-2 rounded-full" style="background: var(--accent)"></span>
<span class="font-mono text-[11px] tracking-[0.16em]">ROBOT 4</span>
<span class="ml-auto flex items-center gap-3">
<span class="font-mono text-[10px] text-slate-500"><span id="fps4" class="tabular-nums">0</span> FPS</span>
<span class="sc-signal">NO SIGNAL</span>
</span>
</div>
<div class="sc-view">
<img id="video4" src="" alt="Video Stream Robot 4">
<div class="sc-placeholder relative text-center font-mono text-[10.5px] tracking-[0.18em] text-slate-600">
MENUNGGU FRAME
<span class="mt-2 block animate-pulse text-2xl opacity-40">◍</span>
</div>
</div>
</article>
<article class="stream-card w-full max-w-[560px] min-w-[min(380px,100%)] flex-1" id="stream5" style="--accent: var(--color-r5); animation-delay: 240ms">
<div class="flex items-center gap-2.5 border-b border-white/10 px-4 py-3">
<span class="size-2 rounded-full" style="background: var(--accent)"></span>
<span class="font-mono text-[11px] tracking-[0.16em]">ROBOT 5</span>
<span class="ml-auto flex items-center gap-3">
<span class="font-mono text-[10px] text-slate-500"><span id="fps5" class="tabular-nums">0</span> FPS</span>
<span class="sc-signal">NO SIGNAL</span>
</span>
</div>
<div class="sc-view">
<img id="video5" src="" alt="Video Stream Robot 5">
<div class="sc-placeholder relative text-center font-mono text-[10.5px] tracking-[0.18em] text-slate-600">
MENUNGGU FRAME
<span class="mt-2 block animate-pulse text-2xl opacity-40">◍</span>
</div>
</div>
</article>
</div>
</section>
<!-- ----------------------------- POSITION ---------------------------- -->
<section class="panel" id="panel-position" role="tabpanel">
<div class="mb-3 flex flex-wrap items-baseline gap-x-3 gap-y-1 px-1">
<h2 class="font-mono text-[12px] tracking-[0.2em]">FIELD POSITION</h2>
<p class="text-[11.5px] text-slate-500">Posisi robot di lapangan berdasarkan koordinat pada tiap paket.</p>
</div>
<div class="grid grid-cols-1 items-start gap-4 xl:grid-cols-[minmax(0,1fr)_300px]">
<div class="surface p-4">
<div class="relative mx-auto overflow-hidden rounded-xl" id="fieldViewport">
<div class="field-background" id="fieldBackground"></div>
</div>
</div>
<aside class="surface overflow-hidden">
<h3 class="label-mono border-b border-white/10 px-4 py-3">Koordinat (X, Y)</h3>
<div class="flex items-center gap-3 border-b border-white/5 px-4 py-3 last:border-0" style="--accent: var(--color-r1)">
<span class="size-3 shrink-0 rounded-full" style="background: var(--accent); box-shadow: 0 0 10px var(--accent)"></span>
<span class="text-[12.5px] tracking-wide">Robot 1</span>
<span class="ml-auto flex items-center gap-2">
<span class="rounded-md border border-white/10 px-1.5 py-0.5 font-mono text-[9px] tracking-[0.12em] text-slate-500" id="legendState1">IDLE</span>
<span class="w-20 text-right font-mono text-[11px] text-slate-300 tabular-nums" id="coord1">—</span>
</span>
</div>
<div class="flex items-center gap-3 border-b border-white/5 px-4 py-3 last:border-0" style="--accent: var(--color-r2)">
<span class="size-3 shrink-0 rounded-full" style="background: var(--accent); box-shadow: 0 0 10px var(--accent)"></span>
<span class="text-[12.5px] tracking-wide">Robot 2</span>
<span class="ml-auto flex items-center gap-2">
<span class="rounded-md border border-white/10 px-1.5 py-0.5 font-mono text-[9px] tracking-[0.12em] text-slate-500" id="legendState2">IDLE</span>
<span class="w-20 text-right font-mono text-[11px] text-slate-300 tabular-nums" id="coord2">—</span>
</span>
</div>
<div class="flex items-center gap-3 border-b border-white/5 px-4 py-3 last:border-0" style="--accent: var(--color-r3)">
<span class="size-3 shrink-0 rounded-full" style="background: var(--accent); box-shadow: 0 0 10px var(--accent)"></span>
<span class="text-[12.5px] tracking-wide">Robot 3</span>
<span class="ml-auto flex items-center gap-2">
<span class="rounded-md border border-white/10 px-1.5 py-0.5 font-mono text-[9px] tracking-[0.12em] text-slate-500" id="legendState3">IDLE</span>
<span class="w-20 text-right font-mono text-[11px] text-slate-300 tabular-nums" id="coord3">—</span>
</span>
</div>
<div class="flex items-center gap-3 border-b border-white/5 px-4 py-3 last:border-0" style="--accent: var(--color-r4)">
<span class="size-3 shrink-0 rounded-full" style="background: var(--accent); box-shadow: 0 0 10px var(--accent)"></span>
<span class="text-[12.5px] tracking-wide">Robot 4</span>
<span class="ml-auto flex items-center gap-2">
<span class="rounded-md border border-white/10 px-1.5 py-0.5 font-mono text-[9px] tracking-[0.12em] text-slate-500" id="legendState4">IDLE</span>
<span class="w-20 text-right font-mono text-[11px] text-slate-300 tabular-nums" id="coord4">—</span>
</span>
</div>
<div class="flex items-center gap-3 border-b border-white/5 px-4 py-3 last:border-0" style="--accent: var(--color-r5)">
<span class="size-3 shrink-0 rounded-full" style="background: var(--accent); box-shadow: 0 0 10px var(--accent)"></span>
<span class="text-[12.5px] tracking-wide">Robot 5</span>
<span class="ml-auto flex items-center gap-2">
<span class="rounded-md border border-white/10 px-1.5 py-0.5 font-mono text-[9px] tracking-[0.12em] text-slate-500" id="legendState5">IDLE</span>
<span class="w-20 text-right font-mono text-[11px] text-slate-300 tabular-nums" id="coord5">—</span>
</span>
</div>
</aside>
</div>
</section>
</main>
<!-- =============================== MODAL =============================== -->
<div id="myModal" class="modals">
<div class="modal-contents">
<span class="close" role="button" title="Tutup">×</span>
<h3 class="font-mono text-[14px] tracking-[0.16em]">PACKAGE IDENTITY</h3>
<p class="mt-1 mb-5 text-[11.5px] text-slate-500">Kode game state yang dikirim referee box.</p>
<div class="grid gap-1.5">
<div class="flex items-center gap-3 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2.5"><b class="grid size-6 place-items-center rounded-md bg-sky-500/15 font-mono text-[11px] font-normal text-sky-400">0</b><span class="font-mono text-[11.5px] tracking-[0.14em]">INIT</span><small class="ml-auto text-[11px] text-slate-500">persiapan awal</small></div>
<div class="flex items-center gap-3 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2.5"><b class="grid size-6 place-items-center rounded-md bg-sky-500/15 font-mono text-[11px] font-normal text-sky-400">1</b><span class="font-mono text-[11.5px] tracking-[0.14em]">READY</span><small class="ml-auto text-[11px] text-slate-500">robot menuju posisi</small></div>
<div class="flex items-center gap-3 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2.5"><b class="grid size-6 place-items-center rounded-md bg-sky-500/15 font-mono text-[11px] font-normal text-sky-400">2</b><span class="font-mono text-[11.5px] tracking-[0.14em]">SET</span><small class="ml-auto text-[11px] text-slate-500">siap kick-off</small></div>
<div class="flex items-center gap-3 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2.5"><b class="grid size-6 place-items-center rounded-md bg-sky-500/15 font-mono text-[11px] font-normal text-sky-400">3</b><span class="font-mono text-[11.5px] tracking-[0.14em]">PLAY</span><small class="ml-auto text-[11px] text-slate-500">pertandingan berjalan</small></div>
<div class="flex items-center gap-3 rounded-lg border border-white/10 bg-white/[0.02] px-3 py-2.5"><b class="grid size-6 place-items-center rounded-md bg-sky-500/15 font-mono text-[11px] font-normal text-sky-400">4</b><span class="font-mono text-[11.5px] tracking-[0.14em]">FINISH</span><small class="ml-auto text-[11px] text-slate-500">babak selesai</small></div>
</div>
<div class="mt-5 grid gap-2 border-t border-white/10 pt-4 text-[11.5px] text-slate-400">
<div class="flex items-center gap-2"><kbd>1</kbd><kbd>2</kbd><kbd>3</kbd> Pindah tab Robot / Stream / Position</div>
<div class="flex items-center gap-2"><kbd>G</kbd> Buka panel ini</div>
<div class="flex items-center gap-2"><kbd>Esc</kbd> Tutup panel</div>
</div>
</div>
</div>
<script src="/assets/client.js"></script>
<script src="/assets/js/ui.js"></script>
</body>
</html>