Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
75 lines (67 loc) · 2.7 KB
/
Copy pathindex.html
File metadata and controls
75 lines (67 loc) · 2.7 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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Dashboard de mediciones de SpeedTest con filtros por fecha y hora." />
<title>SpeedTest Monitor</title>
<!-- Chart.js y adaptador de fechas -->
<script src="https://cdn.jsdelivr.net/npm/chart.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns" defer></script>
<!-- Opcional: plugin de zoom (Ctrl+rueda y pan con Shift) -->
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom" defer></script>
<link rel="stylesheet" href="dashboard.css" />
<style>
/* Fallback basico por si no carga dashboard.css */
:root { color-scheme: light dark; }
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 16px;
background-color: #f8f8f8;
color: #333;
}
header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
header h1 { margin: 0; font-size: 1.8rem; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.controls label { font-weight: 600; }
main { margin-top: 16px; }
#ultimoResultado { background: #e9e9e9; padding: 16px; border-radius: 8px; }
.chart-container { margin-top: 16px; background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.chart-container canvas { width: 100%; height: 520px; }
footer { margin: 16px 0; text-align: center; font-size: 0.85rem; color: #666; }
/* Modo oscuro basico */
body.dark-mode { background-color: #121212; color: #e6e6e6; }
body.dark-mode #ultimoResultado { background: #1c1c1c; }
body.dark-mode .chart-container { background: #1c1c1c; }
</style>
</head>
<body>
<header>
<h1>SpeedTest Monitor</h1>
<div class="controls">
<label for="startDateTime">Desde:</label>
<input type="datetime-local" id="startDateTime" step="1" />
<label for="endDateTime">Hasta:</label>
<input type="datetime-local" id="endDateTime" step="1" />
<button onclick="filtrarDatos()">Filtrar</button>
<button onclick="resetearFiltro()">Reset</button>
<button onclick="resetearZoom()">Reset Zoom</button>
<button onclick="toggleModoOscuro()">Modo oscuro</button>
</div>
</header>
<main>
<section id="ultimoResultado">
<h2>Ultimo Resultado</h2>
<p id="ultimoDetalle">Cargando...</p>
</section>
<section class="chart-container">
<canvas id="speedChart"></canvas>
</section>
</main>
<footer>
<small>Desarrollado por Mario</small>
</footer>
<script src="dashboard.js"></script>
</body>
</html>