节点监控图表流量使用秒来计算

This commit is contained in:
GoEdgeLab
2021-05-20 10:38:46 +08:00
parent 59564f5702
commit ce3c0f409a
2 changed files with 4 additions and 4 deletions

View File

@@ -55,8 +55,8 @@ func (this *TrafficInAction) RunPost(params struct {
if ok {
result = append(result, maps.Map{
"label": timeutil.FormatTime("H:i", timestamp),
"value": total,
"text": numberutils.FormatBytes(total),
"value": total / 60,
"text": numberutils.FormatBytes(total / 60),
})
} else {
result = append(result, maps.Map{

View File

@@ -55,8 +55,8 @@ func (this *TrafficOutAction) RunPost(params struct {
if ok {
result = append(result, maps.Map{
"label": timeutil.FormatTime("H:i", timestamp),
"value": total,
"text": numberutils.FormatBytes(total),
"value": total / 60,
"text": numberutils.FormatBytes(total / 60),
})
} else {
result = append(result, maps.Map{