Skip to content

feat: add the server monitor view #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web-antd/src/adapter/vxe-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ setupVbenVxeTable({
columnConfig: {
resizable: true,
},
minHeight: 320,
minHeight: 180,
formConfig: {
// 全局禁用vxe-table的表单配置,使用formOptions
enabled: false,
Expand Down
73 changes: 50 additions & 23 deletions apps/web-antd/src/locales/langs/en-US/page.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,8 @@
"sysRole": "System Role",
"sysUser": "System User"
},
"table": {
"created_time": "Create Time",
"id": "ID",
"mark": "Mark",
"operation": "Operation",
"updated_time": "Update time"
},
"monitor": {
"redis": {
"desc": {
"title": "Basic Information"
},
"cards": {
"commands": {
"title": "Command Statistics"
Expand All @@ -55,29 +45,66 @@
"title": "Memory Status"
}
},
"stats": {
"title": {
"used_memory": "Used Memory"
}
"desc": {
"title": "Basic Information"
},
"info": {
"title": "Basic Info",
"version": "Version",
"mode": "Mode",
"os": "OS",
"arch": "Arch",
"uptime": "Uptime",
"clients": "Connections",
"memory_human": "Allocated Memory",
"connections_received": "Connections Received",
"commands_processed": "Commands Processed",
"rejected_connections": "Rejected Connections",
"connections_received": "Connections Received",
"keys_command_stats": "Keys Stats",
"keys_num": "Keys Num",
"memory_human": "Allocated Memory",
"mode": "Mode",
"os": "OS",
"rejected_connections": "Rejected Connections",
"role": "Role",
"title": "Basic Info",
"uptime": "Uptime",
"used_cpu": "Used CPU",
"used_cpu_children": "Used CPU Children",
"keys_num": "Keys Num"
"version": "Version"
},
"stats": {
"title": {
"used_memory": "Used Memory"
}
}
},
"server": {
"cpu": {
"current_freq": "Current Freq",
"logical_num": "Logical Num",
"physical_num": "Physical Num",
"usage": "Usage"
},
"disk": {
"device": "Device",
"dir": "Dir",
"free": "Free",
"title": "Disk",
"total": "Total",
"type": "Type",
"usage": "Usage",
"used": "Used"
},
"memory": {
"free": "Free",
"title": "Memory",
"total": "Total",
"usage": "Usage",
"used": "Used"
},
"service": "Service",
"system": "System"
}
},
"table": {
"created_time": "Created Time",
"id": "ID",
"mark": "Mark",
"operation": "Operation",
"updated_time": "Updated time"
}
}
73 changes: 50 additions & 23 deletions apps/web-antd/src/locales/langs/zh-CN/page.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,8 @@
"sysRole": "系统角色",
"sysUser": "系统角色"
},
"table": {
"created_time": "创建时间",
"id": "序号",
"mark": "备注",
"operation": "操作",
"updated_time": "更新时间"
},
"monitor": {
"redis": {
"desc": {
"title": "基本信息"
},
"cards": {
"commands": {
"title": "命令统计"
Expand All @@ -55,29 +45,66 @@
"title": "内存情况"
}
},
"stats": {
"title": {
"used_memory": "已使用内存"
}
"desc": {
"title": "基本信息"
},
"info": {
"title": "基础信息",
"version": "版本",
"mode": "模式",
"os": "操作系统",
"arch": "架构",
"uptime": "运行时间",
"clients": "连接数",
"memory_human": "已分配内存",
"connections_received": "可接受连接数",
"commands_processed": "已执行命令",
"rejected_connections": "已拒绝连接",
"connections_received": "可接受连接数",
"keys_command_stats": "查询次数",
"keys_num": "Keys 数量",
"memory_human": "已分配内存",
"mode": "模式",
"os": "操作系统",
"rejected_connections": "已拒绝连接",
"role": "角色",
"title": "基础信息",
"uptime": "运行时间",
"used_cpu": "CPU 消耗",
"used_cpu_children": "后台 CPU 占用",
"keys_num": "Keys 数量"
"version": "版本"
},
"stats": {
"title": {
"used_memory": "已使用内存"
}
}
},
"server": {
"cpu": {
"current_freq": "当前频率",
"logical_num": "逻辑核心数",
"physical_num": "物理核心数",
"usage": "使用率"
},
"disk": {
"device": "设备",
"dir": "路径",
"free": "空闲",
"title": "磁盘",
"total": "总计",
"type": "类型",
"usage": "使用率",
"used": "已使用"
},
"memory": {
"free": "空闲",
"title": "内存",
"total": "总量",
"usage": "使用率",
"used": "已使用"
},
"service": "服务",
"system": "系统"
}
},
"table": {
"created_time": "创建时间",
"id": "序号",
"mark": "备注",
"operation": "操作",
"updated_time": "更新时间"
}
}
10 changes: 5 additions & 5 deletions apps/web-antd/src/views/monitor/redis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ watch(redisInfo, (val) => {
</script>

<template>
<div class="container mx-auto p-4">
<div class="mb-2 rounded-lg p-2 shadow-md">
<div class="flex flex-col items-center px-4">
<div class="mt-4 w-full">
<a-card :title="$t('page.monitor.redis.desc.title')" :loading="loading">
<a-descriptions>
<a-descriptions-item
Expand All @@ -119,16 +119,16 @@ watch(redisInfo, (val) => {
</a-descriptions>
</a-card>
</div>
<div class="flex flex-col gap-2 md:flex-row">
<div class="rounded-lg p-2 shadow-md md:w-1/2">
<div class="mt-4 flex w-full space-x-4">
<div class="flex-1">
<a-card
:title="$t('page.monitor.redis.cards.commands.title')"
:loading="loading"
>
<CommandsSeries :stats="redisStats" />
</a-card>
</div>
<div class="rounded-lg p-2 shadow-md md:w-1/2">
<div class="flex-1">
<a-card
:title="$t('page.monitor.redis.cards.memory.title')"
:loading="loading"
Expand Down
Loading