优化显示

This commit is contained in:
CN-JS-HuiBai
2026-04-05 20:20:02 +08:00
parent d67815c7b6
commit d5b70edd11
2 changed files with 128 additions and 10 deletions

View File

@@ -1083,21 +1083,41 @@
wrapperDiv.style.display = 'none'; // Hide the chart canvas
summaryDiv.innerHTML = `
<div class="network-summary-grid">
<div class="summary-stat-item">
<span class="summary-stat-label">24h 接收总量</span>
<span class="summary-stat-value">${formatBytes(stats.rxTotal)}</span>
<div class="summary-stat-item stat-rx">
<div class="stat-icon-wrapper">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M7 10l5 5 5-5M12 15V3"></path><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"></path></svg>
</div>
<div class="stat-info">
<span class="summary-stat-label">24h 接收总量</span>
<span class="summary-stat-value">${formatBytes(stats.rxTotal)}</span>
</div>
</div>
<div class="summary-stat-item">
<span class="summary-stat-label">24h 发送总量</span>
<span class="summary-stat-value">${formatBytes(stats.txTotal)}</span>
<div class="summary-stat-item stat-tx">
<div class="stat-icon-wrapper">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M17 14l-5-5-5 5M12 9v12"></path><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"></path></svg>
</div>
<div class="stat-info">
<span class="summary-stat-label">24h 发送总量</span>
<span class="summary-stat-value">${formatBytes(stats.txTotal)}</span>
</div>
</div>
<div class="summary-stat-item stat-p95">
<span class="summary-stat-label">95计费 (上行)</span>
<span class="summary-stat-value">${formatBandwidth(stats.p95)}</span>
<div class="stat-icon-wrapper">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M16 8l-8 8M12 7v10M7 12h10"></path></svg>
</div>
<div class="stat-info">
<span class="summary-stat-label">95计费 (上行)</span>
<span class="summary-stat-value">${formatBandwidth(stats.p95)}</span>
</div>
</div>
<div class="summary-stat-item stat-total">
<span class="summary-stat-label">24h 网络总流量</span>
<span class="summary-stat-value">${formatBytes(stats.total)}</span>
<div class="stat-icon-wrapper">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>
</div>
<div class="stat-info">
<span class="summary-stat-label">24h 网络总流量</span>
<span class="summary-stat-value">${formatBytes(stats.total)}</span>
</div>
</div>
</div>
`;