Skip to content

Commit

Permalink
feat: update version to v1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
amuluze committed Apr 28, 2024
1 parent 4f34578 commit 40875e9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
6 changes: 3 additions & 3 deletions configs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# http监听地址
Host = "0.0.0.0"
# http监听端口
Port = 9527
Port = 8000
# http优雅关闭等待超时时长(单位秒)
ShutdownTimeout = 30
SeverHeader = "probe"
Expand Down Expand Up @@ -44,11 +44,11 @@ SSLMode = ""

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

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

[Task]
# 主机监控数据的采集频率
Expand Down
2 changes: 0 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@iconify-json/ep": "^1.1.15",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.11.30",
"@types/numeral": "^2.0.5",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-vue": "^5.0.4",
Expand All @@ -35,7 +34,6 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.23.0",
"numeral": "^2.0.6",
"prettier": "^3.2.5",
"sass": "^1.72.0",
"terser": "^5.30.3",
Expand Down
32 changes: 31 additions & 1 deletion web/src/components/Echarts/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const cpuOptions: EChartsOption = {
trigger: 'axis',
formatter: function (params: any) {
params = params[0]
return params.value[1] + '%'
return params.value + '%'
},
axisPointer: {
type: 'cross',
Expand Down Expand Up @@ -62,6 +62,10 @@ export const cpuOptions: EChartsOption = {
export const memOptions: EChartsOption = {
tooltip: {
trigger: 'axis',
formatter: function (params: any) {
params = params[0]
return params.value + '%'
},
axisPointer: {
type: 'cross',
label: {
Expand Down Expand Up @@ -112,6 +116,19 @@ export const diskOptions: EChartsOption = {
// },
tooltip: {
trigger: 'axis',
formatter: function (params: any): string {
let res = ''
params.forEach((item: any) => {
const units = ['B', 'KB', 'MB', 'GB', 'TB']
let unitIndex = 0
while (item.value >= 1024 && unitIndex < units.length - 1) {
item.value /= 1024
unitIndex++
}
res += item.seriesName + ': ' + item.value.toFixed(2) + ' ' + units[unitIndex] + '<br/>'
})
return res
},
axisPointer: {
type: 'cross',
label: {
Expand Down Expand Up @@ -179,6 +196,19 @@ export const netOptions: EChartsOption = {
// },
tooltip: {
trigger: 'axis',
formatter: function (params: any): string {
let res = ''
params.forEach((item: any) => {
const units = ['B', 'KB', 'MB', 'GB', 'TB']
let unitIndex = 0
while (item.value >= 1024 && unitIndex < units.length - 1) {
item.value /= 1024
unitIndex++
}
res += item.seriesName + ': ' + item.value.toFixed(2) + ' ' + units[unitIndex] + '<br/>'
})
return res
},
axisPointer: {
type: 'cross',
label: {
Expand Down

0 comments on commit 40875e9

Please sign in to comment.