Skip to content

Commit 40875e9

Browse files
committed
feat: update version to v1.3.3
1 parent 4f34578 commit 40875e9

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

configs/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# http监听地址
33
Host = "0.0.0.0"
44
# http监听端口
5-
Port = 9527
5+
Port = 8000
66
# http优雅关闭等待超时时长(单位秒)
77
ShutdownTimeout = 30
88
SeverHeader = "probe"
@@ -44,11 +44,11 @@ SSLMode = ""
4444

4545
[Disk]
4646
# 需要监控的磁盘设备,可以根据 lsblk 命令查看
47-
Devices = ["sda", "sdb2"]
47+
Devices = ["vda2"]
4848

4949
[Ethernet]
5050
# 需要监控的网口,可以通过 ifconfig 命令查看
51-
Names = ["mgmt"]
51+
Names = ["eth0"]
5252

5353
[Task]
5454
# 主机监控数据的采集频率

web/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"@iconify-json/ep": "^1.1.15",
2727
"@types/lodash-es": "^4.17.12",
2828
"@types/node": "^20.11.30",
29-
"@types/numeral": "^2.0.5",
3029
"@typescript-eslint/eslint-plugin": "^7.3.1",
3130
"@typescript-eslint/parser": "^7.3.1",
3231
"@vitejs/plugin-vue": "^5.0.4",
@@ -35,7 +34,6 @@
3534
"eslint-plugin-import": "^2.29.1",
3635
"eslint-plugin-prettier": "^5.1.3",
3736
"eslint-plugin-vue": "^9.23.0",
38-
"numeral": "^2.0.6",
3937
"prettier": "^3.2.5",
4038
"sass": "^1.72.0",
4139
"terser": "^5.30.3",

web/src/components/Echarts/line.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const cpuOptions: EChartsOption = {
1313
trigger: 'axis',
1414
formatter: function (params: any) {
1515
params = params[0]
16-
return params.value[1] + '%'
16+
return params.value + '%'
1717
},
1818
axisPointer: {
1919
type: 'cross',
@@ -62,6 +62,10 @@ export const cpuOptions: EChartsOption = {
6262
export const memOptions: EChartsOption = {
6363
tooltip: {
6464
trigger: 'axis',
65+
formatter: function (params: any) {
66+
params = params[0]
67+
return params.value + '%'
68+
},
6569
axisPointer: {
6670
type: 'cross',
6771
label: {
@@ -112,6 +116,19 @@ export const diskOptions: EChartsOption = {
112116
// },
113117
tooltip: {
114118
trigger: 'axis',
119+
formatter: function (params: any): string {
120+
let res = ''
121+
params.forEach((item: any) => {
122+
const units = ['B', 'KB', 'MB', 'GB', 'TB']
123+
let unitIndex = 0
124+
while (item.value >= 1024 && unitIndex < units.length - 1) {
125+
item.value /= 1024
126+
unitIndex++
127+
}
128+
res += item.seriesName + ': ' + item.value.toFixed(2) + ' ' + units[unitIndex] + '<br/>'
129+
})
130+
return res
131+
},
115132
axisPointer: {
116133
type: 'cross',
117134
label: {
@@ -179,6 +196,19 @@ export const netOptions: EChartsOption = {
179196
// },
180197
tooltip: {
181198
trigger: 'axis',
199+
formatter: function (params: any): string {
200+
let res = ''
201+
params.forEach((item: any) => {
202+
const units = ['B', 'KB', 'MB', 'GB', 'TB']
203+
let unitIndex = 0
204+
while (item.value >= 1024 && unitIndex < units.length - 1) {
205+
item.value /= 1024
206+
unitIndex++
207+
}
208+
res += item.seriesName + ': ' + item.value.toFixed(2) + ' ' + units[unitIndex] + '<br/>'
209+
})
210+
return res
211+
},
182212
axisPointer: {
183213
type: 'cross',
184214
label: {

0 commit comments

Comments
 (0)