fix:修改服务器监控页面

This commit is contained in:
orgin 2024-01-03 16:19:58 +08:00
parent 271ce33e16
commit f819b4fa0c
2 changed files with 11 additions and 10 deletions

View File

@ -329,8 +329,8 @@
<div class="gauge-content" id="memory"></div> <div class="gauge-content" id="memory"></div>
</a-col> </a-col>
<a-col class="gutter-row" :span="8"> <a-col class="gutter-row" :span="8">
<BoxTitle title="LOADS"></BoxTitle> <BoxTitle title="RESPONSE"></BoxTitle>
<div class="gauge-content" id="loads"></div> <div class="gauge-content" id="responseSuccessRate"></div>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
@ -488,11 +488,11 @@ export default {
this.$message.warning('This operation fails. Contact your system administrator') this.$message.warning('This operation fails. Contact your system administrator')
} }
}) })
this.$nextTick(() => { // this.$nextTick(() => {
setTimeout(() => { // setTimeout(() => {
this.drawGuageLoads() // this.drawGuageLoads()
}, 0) // }, 0)
}) // })
}, },
methods: { methods: {
// Echarts (线) // Echarts (线)
@ -614,6 +614,7 @@ export default {
this.drawGuageCpu() this.drawGuageCpu()
this.drawGuageMemory() this.drawGuageMemory()
this.drawDisk() this.drawDisk()
this.drawGuageLoads()
} else { } else {
this.$message.warning('This operation fails. Contact your system administrator') this.$message.warning('This operation fails. Contact your system administrator')
} }
@ -1077,7 +1078,7 @@ export default {
}) })
}, },
drawGuageLoads() { drawGuageLoads() {
this.guageLoads = echarts.init(document.getElementById('loads')) this.guageLoads = echarts.init(document.getElementById('responseSuccessRate'))
let option = { let option = {
series: [ series: [
{ {
@ -1130,7 +1131,7 @@ export default {
}, },
data: [ data: [
{ {
value: 20, value: this.detailInfo.responseSuccessRate || 0,
}, },
], ],
}, },

View File

@ -154,7 +154,7 @@ export default {
this.chartDatas.forEach(async (item) => { this.chartDatas.forEach(async (item) => {
const params = { const params = {
itemId: item.value, itemId: item.value,
itemType: 0, itemType: item.valueType,
start: this.queryParams.startDate, start: this.queryParams.startDate,
end: this.queryParams.endDate, end: this.queryParams.endDate,
} }