2D 地图路由修复:
服务器详情体验增强:
This commit is contained in:
@@ -477,6 +477,10 @@ class MetricChart {
|
||||
} else {
|
||||
label = v.toFixed(0) + this.unit;
|
||||
}
|
||||
} else if (this.unit === '%' && this.totalValue) {
|
||||
// 当提供了总量时,将百分比转换为实际数值显示(例如内存显示 2GB 而非 25%)
|
||||
const absVal = v * (this.totalValue / 100);
|
||||
label = window.formatBytes ? window.formatBytes(absVal) : absVal.toFixed(0);
|
||||
} else {
|
||||
label = (v >= 1000 ? (v / 1000).toFixed(1) + 'k' : v.toFixed(v < 10 && v > 0 ? 1 : 0)) + this.unit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user