fix: 解决监控时间控件显示不全的问题 (#348)

fix: 解决监控时间控件显示不全的问题
This commit is contained in:
ssongliu 2023-03-21 18:48:27 +08:00 committed by GitHub
parent 2601135225
commit a3a1e17849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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"
></el-date-picker>
</template>
<div id="loadLoadChart" style="width: 100%; height: 400px"></div>
@ -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"
></el-date-picker>
</template>
<div id="loadCPUChart" style="width: 100%; height: 400px"></div>
@ -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"
></el-date-picker>
</template>
<div id="loadMemoryChart" style="width: 100%; height: 400px"></div>
@ -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"
></el-date-picker>
</template>
<div id="loadIOChart" style="width: 100%; height: 400px"></div>
@ -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"
></el-date-picker>
</template>
<div id="loadNetworkChart" style="width: 100%; height: 400px"></div>