功能模块: - 仪表盘: 模型/GPU/CPU统计、开源/闭源分布、快速操作 - 模型管理: 查看模型列表、筛选搜索、添加新模型 - GPU管理: 查看GPU列表、厂商筛选、添加新GPU - CPU管理: 查看CPU列表 - 数据导出: 导出模型/GPU数据为JSON 技术: - Flask + Tailwind CSS - 解析TypeScript数据文件 - 端口: 19006
94 lines
4.7 KiB
HTML
94 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>CPU管理 - 参数百科后台</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-gray-50 min-h-screen">
|
|
<div class="flex">
|
|
<aside class="w-64 bg-slate-800 min-h-screen fixed left-0 top-0">
|
|
<div class="p-6">
|
|
<h1 class="text-white text-xl font-bold flex items-center gap-2">
|
|
<i class="ri-database-2-line text-2xl text-blue-400"></i>
|
|
参数百科后台
|
|
</h1>
|
|
</div>
|
|
<nav class="mt-6">
|
|
<a href="/" class="flex items-center gap-3 px-6 py-3 text-slate-300 hover:bg-slate-700 hover:text-white">
|
|
<i class="ri-dashboard-line"></i><span>仪表盘</span>
|
|
</a>
|
|
<a href="/models" class="flex items-center gap-3 px-6 py-3 text-slate-300 hover:bg-slate-700 hover:text-white">
|
|
<i class="ri-cpu-line"></i><span>模型管理</span>
|
|
</a>
|
|
<a href="/gpus" class="flex items-center gap-3 px-6 py-3 text-slate-300 hover:bg-slate-700 hover:text-white">
|
|
<i class="ri-dashboard-3-line"></i><span>GPU管理</span>
|
|
</a>
|
|
<a href="/cpus" class="flex items-center gap-3 px-6 py-3 bg-slate-700 text-white">
|
|
<i class="ri-cpu-line"></i><span>CPU管理</span>
|
|
</a>
|
|
</nav>
|
|
</aside>
|
|
|
|
<main class="ml-64 flex-1 p-8">
|
|
<h1 class="text-2xl font-bold text-gray-800 mb-6">CPU管理</h1>
|
|
|
|
<!-- CPU列表 -->
|
|
<div class="bg-white rounded-xl border border-gray-100 overflow-x-auto">
|
|
<table class="w-full min-w-[1000px]">
|
|
<thead class="bg-gray-50 border-b border-gray-100">
|
|
<tr>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">CPU名称</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">厂商</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">架构</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">核心/线程</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">频率</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">缓存</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">功耗</th>
|
|
<th class="px-4 py-3 text-left text-sm font-medium text-gray-500">价格</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="cpuTable">
|
|
<tr><td colspan="8" class="px-6 py-8 text-center text-gray-500">加载中...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
async function loadCpus() {
|
|
const res = await fetch('/api/cpus');
|
|
const cpus = await res.json();
|
|
|
|
const tbody = document.getElementById('cpuTable');
|
|
|
|
if (cpus.length === 0) {
|
|
tbody.innerHTML = '<tr><td colspan="8" class="px-6 py-8 text-center text-gray-500">暂无CPU数据</td></tr>';
|
|
return;
|
|
}
|
|
|
|
tbody.innerHTML = cpus.map(c => `
|
|
<tr class="border-b border-gray-50 hover:bg-gray-50">
|
|
<td class="px-4 py-3 font-medium text-gray-800">${c.name}</td>
|
|
<td class="px-4 py-3">
|
|
<span class="px-2 py-1 rounded text-xs ${c.manufacturer === 'AMD' ? 'bg-red-100 text-red-600' : 'bg-blue-100 text-blue-600'}">
|
|
${c.manufacturer}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-gray-600">${c.architecture || '-'}</td>
|
|
<td class="px-4 py-3">${c.cores}核 / ${c.threads}线程</td>
|
|
<td class="px-4 py-3">${c.baseClockGhz || '-'} / ${c.boostClockGhz || '-'} GHz</td>
|
|
<td class="px-4 py-3">${c.l3CacheMb ? c.l3CacheMb + 'MB' : '-'}</td>
|
|
<td class="px-4 py-3">${c.tdpWatts ? c.tdpWatts + 'W' : '-'}</td>
|
|
<td class="px-4 py-3 text-blue-600">${c.priceUsd ? '$' + c.priceUsd.toLocaleString() : '-'}</td>
|
|
</tr>
|
|
`).join('');
|
|
}
|
|
|
|
loadCpus();
|
|
</script>
|
|
</body>
|
|
</html> |