diff --git a/backend/cron/job/monitor.go b/backend/cron/job/monitor.go index be27e9cb4..e91a8b054 100644 --- a/backend/cron/job/monitor.go +++ b/backend/cron/job/monitor.go @@ -118,6 +118,9 @@ func loadNetIO() { netStatAll2, _ := net.IOCounters(false) for _, net2 := range netStatAll2 { for _, net1 := range netStatAll { + if net1.BytesSent == 0 || net1.BytesRecv == 0 { + continue + } if net2.Name == net1.Name { var itemNet model.MonitorNetwork itemNet.Name = net1.Name diff --git a/frontend/src/views/host/monitor/index.vue b/frontend/src/views/host/monitor/index.vue index 899b87d79..64ce9f9e4 100644 --- a/frontend/src/views/host/monitor/index.vue +++ b/frontend/src/views/host/monitor/index.vue @@ -21,7 +21,7 @@ :start-placeholder="$t('commons.search.timeStart')" :end-placeholder="$t('commons.search.timeEnd')" :shortcuts="shortcuts" - style="float: right; width: 330px" + style="float: right; width: 360px" >
@@ -41,7 +41,7 @@ :start-placeholder="$t('commons.search.timeStart')" :end-placeholder="$t('commons.search.timeEnd')" :shortcuts="shortcuts" - style="float: right; width: 330px" + style="float: right; width: 360px" > @@ -59,7 +59,7 @@ :start-placeholder="$t('commons.search.timeStart')" :end-placeholder="$t('commons.search.timeEnd')" :shortcuts="shortcuts" - style="float: right; width: 330px" + style="float: right; width: 360px" > @@ -79,7 +79,7 @@ :start-placeholder="$t('commons.search.timeStart')" :end-placeholder="$t('commons.search.timeEnd')" :shortcuts="shortcuts" - style="float: right; width: 330px" + style="float: right; width: 360px" > @@ -114,7 +114,7 @@ :start-placeholder="$t('commons.search.timeStart')" :end-placeholder="$t('commons.search.timeEnd')" :shortcuts="shortcuts" - style="float: right; width: 330px" + style="float: right; width: 360px" >