优化布局

This commit is contained in:
CN-JS-HuiBai
2026-04-05 19:45:05 +08:00
parent 5e40c19ef1
commit 8c25f1735d
3 changed files with 47 additions and 2 deletions

View File

@@ -93,7 +93,8 @@
detailPartitionsContainer: document.getElementById('detailPartitionsContainer'),
detailPartitionsList: document.getElementById('detailPartitionsList'),
partitionSummary: document.getElementById('partitionSummary'),
partitionHeader: document.getElementById('partitionHeader')
partitionHeader: document.getElementById('partitionHeader'),
detailTraffic24h: document.getElementById('detailTraffic24h')
};
// ---- State ----
@@ -915,6 +916,11 @@
dom.detailDiskTotal.textContent = formatBytes(totalDiskSize);
}
// 24h Traffic Total
if (dom.detailTraffic24h && data.traffic24h) {
dom.detailTraffic24h.textContent = formatBytes((data.traffic24h.rx || 0) + (data.traffic24h.tx || 0));
}
// Define metrics to show
const cpuValueHtml = `
<div style="display: flex; align-items: baseline; gap: 8px;">
@@ -930,7 +936,7 @@
{ key: 'rootFsUsedPct', label: '根分区使用率 (/)', value: formatPercent(data.rootFsUsedPct) },
{ key: 'netRx', label: '网络接收速率 (RX)', value: formatBandwidth(data.netRx) },
{ key: 'netTx', label: '网络发送速率 (TX)', value: formatBandwidth(data.netTx) },
{ key: 'networkTrend', label: '网络流量趋势 (24h)', value: '<span style="font-size: 0.75rem; color: var(--accent-indigo);">查看实时趋势线</span>' },
{ key: 'networkTrend', label: '网络流量趋势 (24h)', value: '' },
{ key: 'sockstatTcp', label: 'TCP 链接数 (Sockstat)', value: data.sockstatTcp.toFixed(0) },
{ key: 'sockstatTcpMem', label: 'TCP 内存占用', value: formatBytes(data.sockstatTcpMem) }
];