优化布局

This commit is contained in:
CN-JS-HuiBai
2026-04-04 23:41:10 +08:00
parent 3d4b926b16
commit ded8d1b18d
2 changed files with 9 additions and 11 deletions

View File

@@ -66,13 +66,6 @@
</div>
<h1 class="logo-text" id="logoText">数据可视化展示大屏</h1>
</div>
<div class="header-meta">
<span class="server-count" id="serverCount">
<span class="dot dot-pulse"></span>
<span id="serverCountText">0 台服务器</span>
</span>
<span class="source-count" id="sourceCount">0 个数据源</span>
</div>
</div>
<div class="header-right">
@@ -293,6 +286,13 @@
<option value="100">100</option>
</select>
<span></span>
<div class="header-meta" style="margin-left: 20px; padding-left: 20px; border-left: 1px solid var(--border-color);">
<span class="server-count" id="serverCount">
<span class="dot dot-pulse"></span>
<span id="serverCountText">0 台服务器</span>
</span>
<span class="source-count" id="sourceCount">0 个数据源</span>
</div>
</div>
<div class="pagination-controls" id="paginationControls">
<!-- Pagination buttons will be injected here -->

View File

@@ -553,15 +553,13 @@
<div style="display: flex; flex-direction: column; align-items: flex-end; gap: 2px;">
<span style="font-weight: 700;">${formatPercent(data.cpuBusy)}</span>
<div style="font-size: 0.65rem; color: var(--text-secondary); display: flex; gap: 6px; font-weight: normal;">
<span>Sys: ${data.cpuSystem.toFixed(1)}%</span>
<span>User: ${data.cpuUser.toFixed(1)}%</span>
<span>Wait: ${data.cpuIowait.toFixed(1)}%</span>
<span>I/O Wait: ${data.cpuIowait.toFixed(1)}%</span>
</div>
</div>
`;
const metrics = [
{ key: 'cpuBusy', label: 'CPU 使用率 (Busy Breakdown)', value: cpuValueHtml },
{ key: 'cpuBusy', label: 'CPU 使用率 (Busy / IO Wait)', value: cpuValueHtml },
{ key: 'sysLoad', label: '系统负载 (Load)', value: data.sysLoad.toFixed(1) + '%' },
{ key: 'memUsedPct', label: '内存使用率 (RAM)', value: formatPercent(data.memUsedPct) },
{ key: 'swapUsedPct', label: 'SWAP 使用率', value: formatPercent(data.swapUsedPct) },