服务列表带宽使用新的算法

This commit is contained in:
GoEdgeLab
2022-08-27 18:37:44 +08:00
parent 836e03a144
commit 6dee389dbc
2 changed files with 3 additions and 6 deletions

View File

@@ -217,11 +217,8 @@ func (this *IndexAction) RunGet(params struct {
// 统计数据
var bandwidth = ""
if server.LatestServerDailyStat != nil {
var bytesPerSecond = server.LatestServerDailyStat.Bytes / 300
if bytesPerSecond > 0 {
bandwidth = numberutils.FormatBytes(bytesPerSecond)
}
if server.BandwidthBytes > 0 {
bandwidth = numberutils.FormatBytes(server.BandwidthBytes)
}
serverMaps = append(serverMaps, maps.Map{

View File

@@ -63,7 +63,7 @@
<th>部署集群</th>
<th>域名</th>
<th>端口</th>
<th class="center" style="width: 8em">下行带宽<tip-icon content="最近5分钟平均带宽每5分钟更新一次"></tip-icon><sort-arrow name="trafficOutOrder"></sort-arrow></th>
<th class="center" style="width: 8em">下行带宽<tip-icon content="最近5分钟峰值带宽每5分钟更新一次"></tip-icon><sort-arrow name="trafficOutOrder"></sort-arrow></th>
<th class="two wide center">状态</th>
<th class="two op">操作</th>
</tr>