From c0186918997707b56a6d5837611206a1f6dc6b0c Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 2 Aug 2023 14:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=AF=A6=E6=83=85=E4=B8=AD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=A3=81=E7=9B=98=E9=A2=84=E4=BC=B0=E5=86=99?= =?UTF-8?q?=E5=85=A5=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/utils/json.go | 2 +- .../web/actions/default/clusters/cluster/node/detail.go | 1 + web/views/@default/clusters/cluster/node/detail.html | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/utils/json.go b/internal/utils/json.go index d5f00c9b..cb96b16c 100644 --- a/internal/utils/json.go +++ b/internal/utils/json.go @@ -24,7 +24,7 @@ func JSONClone(v interface{}) (interface{}, error) { return nv, nil } -// 判断JSON数据是否为null +// JSONIsNull 判断JSON数据是否为null func JSONIsNull(jsonData []byte) bool { return len(jsonData) == 0 || bytes.Equal(jsonData, []byte("null")) } diff --git a/internal/web/actions/default/clusters/cluster/node/detail.go b/internal/web/actions/default/clusters/cluster/node/detail.go index e9754e60..0e4b5d92 100644 --- a/internal/web/actions/default/clusters/cluster/node/detail.go +++ b/internal/web/actions/default/clusters/cluster/node/detail.go @@ -389,6 +389,7 @@ func (this *DetailAction) RunGet(params struct { "exePath": status.ExePath, "apiSuccessPercent": status.APISuccessPercent, "apiAvgCostSeconds": status.APIAvgCostSeconds, + "diskWritingSpeedMB": status.DiskWritingSpeedMB, }, "group": groupMap, diff --git a/web/views/@default/clusters/cluster/node/detail.html b/web/views/@default/clusters/cluster/node/detail.html index eeb12807..c0dd754f 100644 --- a/web/views/@default/clusters/cluster/node/detail.html +++ b/web/views/@default/clusters/cluster/node/detail.html @@ -180,6 +180,15 @@ + + 磁盘预估写入最大速度 + + -> {{node.status.diskWritingSpeedMB}} + MB/s 极快 + MB/s 快 + MB/s 一般 + + 缓存内存容量