-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.html
More file actions
74 lines (68 loc) · 3.66 KB
/
dashboard.html
File metadata and controls
74 lines (68 loc) · 3.66 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>eFDO 商业主权看板</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
body { background: #0d1117; color: #c9d1d9; font-family: 'JetBrains Mono', monospace; }
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; }
</style>
</head>
<body class="p-10 flex flex-col items-center justify-center min-h-screen">
<div id="app" class="w-full max-w-4xl">
<header class="flex justify-between items-center mb-8 border-b border-gray-800 pb-4">
<h1 class="text-3xl font-bold text-white">eFDO Commercial Node</h1>
<div class="text-xs text-gray-500 font-mono">EIS-2026 STANDARD</div>
</header>
<div id="content" class="card p-10 shadow-2xl relative overflow-hidden">
<p class="animate-pulse text-center">正在连接主权金库...</p>
</div>
</div>
<script>
async function refresh() {
try {
const r = await fetch('specimen.json');
const d = await r.json();
const lic = d.license_status || { status: 'UNKNOWN', token: '---', ui_color: 'gray' };
const el = document.getElementById('content');
// 动态边框颜色
el.style.borderLeft = `8px solid ${lic.ui_color === 'red' ? '#ff4d4d' : '#238636'}`;
el.innerHTML = `
<div class="flex justify-between items-start mb-10">
<div>
<p class="text-sm text-gray-500 uppercase tracking-widest mb-1">License Status</p>
<h2 class="text-4xl font-black ${lic.ui_color === 'red' ? 'text-red-500' : 'text-green-400'}">
${lic.status}
</h2>
</div>
<div class="text-right">
<p class="text-sm text-gray-500 uppercase tracking-widest mb-1">Fatigue Index</p>
<p class="text-4xl font-mono text-white">${((d.fatigue_index||0)*100).toFixed(1)}%</p>
</div>
</div>
<div class="bg-black/50 p-6 rounded-lg border border-gray-700 font-mono text-sm mb-8 flex justify-between items-center">
<span class="text-gray-400">ACCESS TOKEN:</span>
<span class="text-yellow-400 font-bold tracking-wider">${lic.token}</span>
</div>
<div class="grid grid-cols-3 gap-6 text-center">
<div class="p-4 bg-[#0d1117] rounded">
<div class="text-xs text-gray-500 uppercase">Torque</div>
<div class="text-xl font-bold text-blue-400">${d.industrial_metrics?.joint_torque_nm || 0} Nm</div>
</div>
<div class="p-4 bg-[#0d1117] rounded">
<div class="text-xs text-gray-500 uppercase">Temp</div>
<div class="text-xl font-bold text-orange-400">${d.industrial_metrics?.motor_temp_c || 0} °C</div>
</div>
<div class="p-4 bg-[#0d1117] rounded">
<div class="text-xs text-gray-500 uppercase">Generation</div>
<div class="text-xl font-bold text-purple-400">${d.generation || 0}</div>
</div>
</div>
`;
} catch(e) {}
}
setInterval(refresh, 1000); refresh();
</script>
</body>
</html>