diff --git a/src/views/ops/pages/dc/database/components/Detail.vue b/src/views/ops/pages/dc/database/components/Detail.vue new file mode 100644 index 0000000..a40f3e8 --- /dev/null +++ b/src/views/ops/pages/dc/database/components/Detail.vue @@ -0,0 +1,705 @@ + + + + + {{ record.name || '办公PC详情' }} + + {{ getStatusText(record.status) }} + {{ record.server_type || '未知类型' }} + {{ record.os || '未知系统' }} + + + + + + + + 远程登录 + + + + + + 重启 + + + + + + + + {{ record.unique_id || '-' }} + {{ record.name || '-' }} + {{ record.os || '-' }} + {{ record.location || '-' }} + {{ record.tags || '-' }} + {{ record.ip || '-' }} + {{ record.remote_port || '-' }} + {{ record.agent_url || '-' }} + + + {{ record.data_collection ? '已开启' : '未开启' }} + + + {{ record.collection_interval ? `${record.collection_interval}分钟` : '-' }} + {{ record.remark || '-' }} + + + + + + + + 1小时 + 3小时 + 6小时 + 12小时 + 1天 + 3天 + 7天 + 14天 + 自定义 + + + + + + + + CPU使用率_宿主机视角 (%) + + + 平均值 + 最大值 + 最小值 + + + + + + + (ECS)CPU使用率_平均值 + (ECS)CPU使用率_最小值 + (ECS)CPU使用率_最大值 + + + + + + + + 总带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 内网流入带宽 + 内网流出带宽 + + + + + + + + 公网带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 公网流入带宽 + 公网流出带宽 + + + + + + + + + + 公网流出带宽使用率 (%) + + + 平均值 + 最大值 + + + + + + + (ECS)公网流出带宽使用率 + + + + + + + + 磁盘读取写入BPS (bytes/s) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘读取BPS + (ECS)所有磁盘写入BPS + + + + + + + + 磁盘读取写入IOPS (Count/Second) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘每秒读取次数 + (ECS)所有磁盘每秒写入次数 + + + + + + + + + + 同时连接数 (Count) + + + 平均值 + 最大值 + + + + + + + 同时连接数 + + + + + + + + RDMA流量使用信息 (bit/s) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + RDMA资源使用信息 (Count) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/database/components/FormDialog.vue b/src/views/ops/pages/dc/database/components/FormDialog.vue new file mode 100644 index 0000000..d9b9e14 --- /dev/null +++ b/src/views/ops/pages/dc/database/components/FormDialog.vue @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + Windows + Linux + 其它 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1分钟 + 5分钟 + 10分钟 + 30分钟 + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/database/components/QuickConfigDialog.vue b/src/views/ops/pages/dc/database/components/QuickConfigDialog.vue new file mode 100644 index 0000000..6e26b54 --- /dev/null +++ b/src/views/ops/pages/dc/database/components/QuickConfigDialog.vue @@ -0,0 +1,90 @@ + + + + + + + 为空则不可远程访问 + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/database/components/RemoteControl.vue b/src/views/ops/pages/dc/database/components/RemoteControl.vue new file mode 100644 index 0000000..09c60fc --- /dev/null +++ b/src/views/ops/pages/dc/database/components/RemoteControl.vue @@ -0,0 +1,310 @@ + + + + + + {{ record.name || '远程控制' }} + {{ getStatusText(record.status) }} + + + + 关闭 + + + + + + + + + + SSH + 免密连接 + + + + + + + + + + + + + + + + + + + + + + + + + + + 连接 + + 取消 + + + + + + + + + 已连接: {{ loginForm.username }}@{{ loginForm.host }}:{{ loginForm.port }} + + 断开 + 全屏 + + + + + {{ line.prompt }} + {{ line.content }} + + + {{ prompt }} + + + + + + + + + + diff --git a/src/views/ops/pages/dc/database/config/columns.ts b/src/views/ops/pages/dc/database/config/columns.ts new file mode 100644 index 0000000..e835509 --- /dev/null +++ b/src/views/ops/pages/dc/database/config/columns.ts @@ -0,0 +1,92 @@ +export const columns = [ + { + dataIndex: 'id', + title: 'ID', + width: 80, + slotName: 'id', + }, + { + dataIndex: 'unique_id', + title: '唯一标识', + width: 150, + }, + { + dataIndex: 'name', + title: '名称', + width: 150, + }, + { + dataIndex: 'type', + title: '类型', + width: 120, + }, + { + dataIndex: 'os', + title: '操作系统', + width: 150, + }, + { + dataIndex: 'location', + title: '位置信息', + width: 150, + }, + { + dataIndex: 'tags', + title: '标签', + width: 120, + }, + { + dataIndex: 'ip', + title: 'IP地址', + width: 150, + }, + { + dataIndex: 'remote_access', + title: '远程访问', + width: 100, + slotName: 'remote_access', + }, + { + dataIndex: 'agent_config', + title: 'Agent配置', + width: 150, + slotName: 'agent_config', + }, + { + dataIndex: 'cpu', + title: 'CPU使用率', + width: 150, + slotName: 'cpu', + }, + { + dataIndex: 'memory', + title: '内存使用率', + width: 150, + slotName: 'memory', + }, + { + dataIndex: 'disk', + title: '硬盘使用率', + width: 150, + slotName: 'disk', + }, + { + dataIndex: 'data_collection', + title: '数据采集', + width: 100, + slotName: 'data_collection', + }, + { + dataIndex: 'status', + title: '状态', + width: 100, + slotName: 'status', + }, + { + dataIndex: 'actions', + title: '操作', + width: 180, + fixed: 'right' as const, + slotName: 'actions', + }, +] diff --git a/src/views/ops/pages/dc/database/config/search-form.ts b/src/views/ops/pages/dc/database/config/search-form.ts new file mode 100644 index 0000000..af2affe --- /dev/null +++ b/src/views/ops/pages/dc/database/config/search-form.ts @@ -0,0 +1,40 @@ +import type { FormItem } from '@/components/search-form/types' + +export const searchFormConfig: FormItem[] = [ + { + field: 'keyword', + label: '关键词', + type: 'input', + placeholder: '请输入服务器名称、编码或IP', + span: 6, + }, + { + field: 'datacenter_id', + label: '数据中心', + type: 'select', + placeholder: '请选择数据中心', + options: [], // 需要动态加载 + span: 6, + }, + { + field: 'rack_id', + label: '机柜', + type: 'select', + placeholder: '请选择机柜', + options: [], // 需要动态加载 + span: 6, + }, + { + field: 'status', + label: '状态', + type: 'select', + placeholder: '请选择状态', + options: [ + { label: '在线', value: 'online' }, + { label: '离线', value: 'offline' }, + { label: '维护中', value: 'maintenance' }, + { label: '已退役', value: 'retired' }, + ], + span: 6, + }, +] diff --git a/src/views/ops/pages/dc/database/index.vue b/src/views/ops/pages/dc/database/index.vue new file mode 100644 index 0000000..269aacf --- /dev/null +++ b/src/views/ops/pages/dc/database/index.vue @@ -0,0 +1,676 @@ + + + + + + + + + 新增数据库 + + + + + + {{ record.id }} + + + + + + {{ record.remote_access ? '已开启' : '未开启' }} + + + + + + + {{ record.agent_config ? '已配置' : '未配置' }} + + + + + + + + CPU + {{ record.cpu_info?.value || 0 }}% + + + + + + + + + + 内存 + {{ record.memory_info?.value || 0 }}% + + + + + + + + + + 硬盘 + {{ record.disk_info?.value || 0 }}% + + + + + + + + + {{ record.data_collection ? '已启用' : '未启用' }} + + + + + + + {{ getStatusText(record.status) }} + + + + + + + + + + + 快捷配置 + + + + 管理 + + + + + + + + 重启 + + + + + + 详情 + + + + + + 编辑 + + + + + + 远程控制 + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/middleware/components/Detail.vue b/src/views/ops/pages/dc/middleware/components/Detail.vue new file mode 100644 index 0000000..a40f3e8 --- /dev/null +++ b/src/views/ops/pages/dc/middleware/components/Detail.vue @@ -0,0 +1,705 @@ + + + + + {{ record.name || '办公PC详情' }} + + {{ getStatusText(record.status) }} + {{ record.server_type || '未知类型' }} + {{ record.os || '未知系统' }} + + + + + + + + 远程登录 + + + + + + 重启 + + + + + + + + {{ record.unique_id || '-' }} + {{ record.name || '-' }} + {{ record.os || '-' }} + {{ record.location || '-' }} + {{ record.tags || '-' }} + {{ record.ip || '-' }} + {{ record.remote_port || '-' }} + {{ record.agent_url || '-' }} + + + {{ record.data_collection ? '已开启' : '未开启' }} + + + {{ record.collection_interval ? `${record.collection_interval}分钟` : '-' }} + {{ record.remark || '-' }} + + + + + + + + 1小时 + 3小时 + 6小时 + 12小时 + 1天 + 3天 + 7天 + 14天 + 自定义 + + + + + + + + CPU使用率_宿主机视角 (%) + + + 平均值 + 最大值 + 最小值 + + + + + + + (ECS)CPU使用率_平均值 + (ECS)CPU使用率_最小值 + (ECS)CPU使用率_最大值 + + + + + + + + 总带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 内网流入带宽 + 内网流出带宽 + + + + + + + + 公网带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 公网流入带宽 + 公网流出带宽 + + + + + + + + + + 公网流出带宽使用率 (%) + + + 平均值 + 最大值 + + + + + + + (ECS)公网流出带宽使用率 + + + + + + + + 磁盘读取写入BPS (bytes/s) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘读取BPS + (ECS)所有磁盘写入BPS + + + + + + + + 磁盘读取写入IOPS (Count/Second) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘每秒读取次数 + (ECS)所有磁盘每秒写入次数 + + + + + + + + + + 同时连接数 (Count) + + + 平均值 + 最大值 + + + + + + + 同时连接数 + + + + + + + + RDMA流量使用信息 (bit/s) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + RDMA资源使用信息 (Count) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/middleware/components/FormDialog.vue b/src/views/ops/pages/dc/middleware/components/FormDialog.vue new file mode 100644 index 0000000..d9b9e14 --- /dev/null +++ b/src/views/ops/pages/dc/middleware/components/FormDialog.vue @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + Windows + Linux + 其它 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1分钟 + 5分钟 + 10分钟 + 30分钟 + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/middleware/components/QuickConfigDialog.vue b/src/views/ops/pages/dc/middleware/components/QuickConfigDialog.vue new file mode 100644 index 0000000..6e26b54 --- /dev/null +++ b/src/views/ops/pages/dc/middleware/components/QuickConfigDialog.vue @@ -0,0 +1,90 @@ + + + + + + + 为空则不可远程访问 + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/middleware/components/RemoteControl.vue b/src/views/ops/pages/dc/middleware/components/RemoteControl.vue new file mode 100644 index 0000000..09c60fc --- /dev/null +++ b/src/views/ops/pages/dc/middleware/components/RemoteControl.vue @@ -0,0 +1,310 @@ + + + + + + {{ record.name || '远程控制' }} + {{ getStatusText(record.status) }} + + + + 关闭 + + + + + + + + + + SSH + 免密连接 + + + + + + + + + + + + + + + + + + + + + + + + + + + 连接 + + 取消 + + + + + + + + + 已连接: {{ loginForm.username }}@{{ loginForm.host }}:{{ loginForm.port }} + + 断开 + 全屏 + + + + + {{ line.prompt }} + {{ line.content }} + + + {{ prompt }} + + + + + + + + + + diff --git a/src/views/ops/pages/dc/middleware/config/columns.ts b/src/views/ops/pages/dc/middleware/config/columns.ts new file mode 100644 index 0000000..e835509 --- /dev/null +++ b/src/views/ops/pages/dc/middleware/config/columns.ts @@ -0,0 +1,92 @@ +export const columns = [ + { + dataIndex: 'id', + title: 'ID', + width: 80, + slotName: 'id', + }, + { + dataIndex: 'unique_id', + title: '唯一标识', + width: 150, + }, + { + dataIndex: 'name', + title: '名称', + width: 150, + }, + { + dataIndex: 'type', + title: '类型', + width: 120, + }, + { + dataIndex: 'os', + title: '操作系统', + width: 150, + }, + { + dataIndex: 'location', + title: '位置信息', + width: 150, + }, + { + dataIndex: 'tags', + title: '标签', + width: 120, + }, + { + dataIndex: 'ip', + title: 'IP地址', + width: 150, + }, + { + dataIndex: 'remote_access', + title: '远程访问', + width: 100, + slotName: 'remote_access', + }, + { + dataIndex: 'agent_config', + title: 'Agent配置', + width: 150, + slotName: 'agent_config', + }, + { + dataIndex: 'cpu', + title: 'CPU使用率', + width: 150, + slotName: 'cpu', + }, + { + dataIndex: 'memory', + title: '内存使用率', + width: 150, + slotName: 'memory', + }, + { + dataIndex: 'disk', + title: '硬盘使用率', + width: 150, + slotName: 'disk', + }, + { + dataIndex: 'data_collection', + title: '数据采集', + width: 100, + slotName: 'data_collection', + }, + { + dataIndex: 'status', + title: '状态', + width: 100, + slotName: 'status', + }, + { + dataIndex: 'actions', + title: '操作', + width: 180, + fixed: 'right' as const, + slotName: 'actions', + }, +] diff --git a/src/views/ops/pages/dc/middleware/config/search-form.ts b/src/views/ops/pages/dc/middleware/config/search-form.ts new file mode 100644 index 0000000..af2affe --- /dev/null +++ b/src/views/ops/pages/dc/middleware/config/search-form.ts @@ -0,0 +1,40 @@ +import type { FormItem } from '@/components/search-form/types' + +export const searchFormConfig: FormItem[] = [ + { + field: 'keyword', + label: '关键词', + type: 'input', + placeholder: '请输入服务器名称、编码或IP', + span: 6, + }, + { + field: 'datacenter_id', + label: '数据中心', + type: 'select', + placeholder: '请选择数据中心', + options: [], // 需要动态加载 + span: 6, + }, + { + field: 'rack_id', + label: '机柜', + type: 'select', + placeholder: '请选择机柜', + options: [], // 需要动态加载 + span: 6, + }, + { + field: 'status', + label: '状态', + type: 'select', + placeholder: '请选择状态', + options: [ + { label: '在线', value: 'online' }, + { label: '离线', value: 'offline' }, + { label: '维护中', value: 'maintenance' }, + { label: '已退役', value: 'retired' }, + ], + span: 6, + }, +] diff --git a/src/views/ops/pages/dc/middleware/index.vue b/src/views/ops/pages/dc/middleware/index.vue new file mode 100644 index 0000000..9cd9a0d --- /dev/null +++ b/src/views/ops/pages/dc/middleware/index.vue @@ -0,0 +1,676 @@ + + + + + + + + + 新增中间件 + + + + + + {{ record.id }} + + + + + + {{ record.remote_access ? '已开启' : '未开启' }} + + + + + + + {{ record.agent_config ? '已配置' : '未配置' }} + + + + + + + + CPU + {{ record.cpu_info?.value || 0 }}% + + + + + + + + + + 内存 + {{ record.memory_info?.value || 0 }}% + + + + + + + + + + 硬盘 + {{ record.disk_info?.value || 0 }}% + + + + + + + + + {{ record.data_collection ? '已启用' : '未启用' }} + + + + + + + {{ getStatusText(record.status) }} + + + + + + + + + + + 快捷配置 + + + + 管理 + + + + + + + + 重启 + + + + + + 详情 + + + + + + 编辑 + + + + + + 远程控制 + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/network/components/Detail.vue b/src/views/ops/pages/dc/network/components/Detail.vue new file mode 100644 index 0000000..a40f3e8 --- /dev/null +++ b/src/views/ops/pages/dc/network/components/Detail.vue @@ -0,0 +1,705 @@ + + + + + {{ record.name || '办公PC详情' }} + + {{ getStatusText(record.status) }} + {{ record.server_type || '未知类型' }} + {{ record.os || '未知系统' }} + + + + + + + + 远程登录 + + + + + + 重启 + + + + + + + + {{ record.unique_id || '-' }} + {{ record.name || '-' }} + {{ record.os || '-' }} + {{ record.location || '-' }} + {{ record.tags || '-' }} + {{ record.ip || '-' }} + {{ record.remote_port || '-' }} + {{ record.agent_url || '-' }} + + + {{ record.data_collection ? '已开启' : '未开启' }} + + + {{ record.collection_interval ? `${record.collection_interval}分钟` : '-' }} + {{ record.remark || '-' }} + + + + + + + + 1小时 + 3小时 + 6小时 + 12小时 + 1天 + 3天 + 7天 + 14天 + 自定义 + + + + + + + + CPU使用率_宿主机视角 (%) + + + 平均值 + 最大值 + 最小值 + + + + + + + (ECS)CPU使用率_平均值 + (ECS)CPU使用率_最小值 + (ECS)CPU使用率_最大值 + + + + + + + + 总带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 内网流入带宽 + 内网流出带宽 + + + + + + + + 公网带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 公网流入带宽 + 公网流出带宽 + + + + + + + + + + 公网流出带宽使用率 (%) + + + 平均值 + 最大值 + + + + + + + (ECS)公网流出带宽使用率 + + + + + + + + 磁盘读取写入BPS (bytes/s) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘读取BPS + (ECS)所有磁盘写入BPS + + + + + + + + 磁盘读取写入IOPS (Count/Second) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘每秒读取次数 + (ECS)所有磁盘每秒写入次数 + + + + + + + + + + 同时连接数 (Count) + + + 平均值 + 最大值 + + + + + + + 同时连接数 + + + + + + + + RDMA流量使用信息 (bit/s) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + RDMA资源使用信息 (Count) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/network/components/FormDialog.vue b/src/views/ops/pages/dc/network/components/FormDialog.vue new file mode 100644 index 0000000..d9b9e14 --- /dev/null +++ b/src/views/ops/pages/dc/network/components/FormDialog.vue @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + Windows + Linux + 其它 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1分钟 + 5分钟 + 10分钟 + 30分钟 + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/network/components/QuickConfigDialog.vue b/src/views/ops/pages/dc/network/components/QuickConfigDialog.vue new file mode 100644 index 0000000..6e26b54 --- /dev/null +++ b/src/views/ops/pages/dc/network/components/QuickConfigDialog.vue @@ -0,0 +1,90 @@ + + + + + + + 为空则不可远程访问 + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/network/components/RemoteControl.vue b/src/views/ops/pages/dc/network/components/RemoteControl.vue new file mode 100644 index 0000000..09c60fc --- /dev/null +++ b/src/views/ops/pages/dc/network/components/RemoteControl.vue @@ -0,0 +1,310 @@ + + + + + + {{ record.name || '远程控制' }} + {{ getStatusText(record.status) }} + + + + 关闭 + + + + + + + + + + SSH + 免密连接 + + + + + + + + + + + + + + + + + + + + + + + + + + + 连接 + + 取消 + + + + + + + + + 已连接: {{ loginForm.username }}@{{ loginForm.host }}:{{ loginForm.port }} + + 断开 + 全屏 + + + + + {{ line.prompt }} + {{ line.content }} + + + {{ prompt }} + + + + + + + + + + diff --git a/src/views/ops/pages/dc/network/config/columns.ts b/src/views/ops/pages/dc/network/config/columns.ts new file mode 100644 index 0000000..e835509 --- /dev/null +++ b/src/views/ops/pages/dc/network/config/columns.ts @@ -0,0 +1,92 @@ +export const columns = [ + { + dataIndex: 'id', + title: 'ID', + width: 80, + slotName: 'id', + }, + { + dataIndex: 'unique_id', + title: '唯一标识', + width: 150, + }, + { + dataIndex: 'name', + title: '名称', + width: 150, + }, + { + dataIndex: 'type', + title: '类型', + width: 120, + }, + { + dataIndex: 'os', + title: '操作系统', + width: 150, + }, + { + dataIndex: 'location', + title: '位置信息', + width: 150, + }, + { + dataIndex: 'tags', + title: '标签', + width: 120, + }, + { + dataIndex: 'ip', + title: 'IP地址', + width: 150, + }, + { + dataIndex: 'remote_access', + title: '远程访问', + width: 100, + slotName: 'remote_access', + }, + { + dataIndex: 'agent_config', + title: 'Agent配置', + width: 150, + slotName: 'agent_config', + }, + { + dataIndex: 'cpu', + title: 'CPU使用率', + width: 150, + slotName: 'cpu', + }, + { + dataIndex: 'memory', + title: '内存使用率', + width: 150, + slotName: 'memory', + }, + { + dataIndex: 'disk', + title: '硬盘使用率', + width: 150, + slotName: 'disk', + }, + { + dataIndex: 'data_collection', + title: '数据采集', + width: 100, + slotName: 'data_collection', + }, + { + dataIndex: 'status', + title: '状态', + width: 100, + slotName: 'status', + }, + { + dataIndex: 'actions', + title: '操作', + width: 180, + fixed: 'right' as const, + slotName: 'actions', + }, +] diff --git a/src/views/ops/pages/dc/network/config/search-form.ts b/src/views/ops/pages/dc/network/config/search-form.ts new file mode 100644 index 0000000..af2affe --- /dev/null +++ b/src/views/ops/pages/dc/network/config/search-form.ts @@ -0,0 +1,40 @@ +import type { FormItem } from '@/components/search-form/types' + +export const searchFormConfig: FormItem[] = [ + { + field: 'keyword', + label: '关键词', + type: 'input', + placeholder: '请输入服务器名称、编码或IP', + span: 6, + }, + { + field: 'datacenter_id', + label: '数据中心', + type: 'select', + placeholder: '请选择数据中心', + options: [], // 需要动态加载 + span: 6, + }, + { + field: 'rack_id', + label: '机柜', + type: 'select', + placeholder: '请选择机柜', + options: [], // 需要动态加载 + span: 6, + }, + { + field: 'status', + label: '状态', + type: 'select', + placeholder: '请选择状态', + options: [ + { label: '在线', value: 'online' }, + { label: '离线', value: 'offline' }, + { label: '维护中', value: 'maintenance' }, + { label: '已退役', value: 'retired' }, + ], + span: 6, + }, +] diff --git a/src/views/ops/pages/dc/network/index.vue b/src/views/ops/pages/dc/network/index.vue new file mode 100644 index 0000000..7471e91 --- /dev/null +++ b/src/views/ops/pages/dc/network/index.vue @@ -0,0 +1,676 @@ + + + + + + + + + 新增网络设备 + + + + + + {{ record.id }} + + + + + + {{ record.remote_access ? '已开启' : '未开启' }} + + + + + + + {{ record.agent_config ? '已配置' : '未配置' }} + + + + + + + + CPU + {{ record.cpu_info?.value || 0 }}% + + + + + + + + + + 内存 + {{ record.memory_info?.value || 0 }}% + + + + + + + + + + 硬盘 + {{ record.disk_info?.value || 0 }}% + + + + + + + + + {{ record.data_collection ? '已启用' : '未启用' }} + + + + + + + {{ getStatusText(record.status) }} + + + + + + + + + + + 快捷配置 + + + + 管理 + + + + + + + + 重启 + + + + + + 详情 + + + + + + 编辑 + + + + + + 远程控制 + + + + + + 删除 + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/pc/components/Detail.vue b/src/views/ops/pages/dc/pc/components/Detail.vue new file mode 100644 index 0000000..a40f3e8 --- /dev/null +++ b/src/views/ops/pages/dc/pc/components/Detail.vue @@ -0,0 +1,705 @@ + + + + + {{ record.name || '办公PC详情' }} + + {{ getStatusText(record.status) }} + {{ record.server_type || '未知类型' }} + {{ record.os || '未知系统' }} + + + + + + + + 远程登录 + + + + + + 重启 + + + + + + + + {{ record.unique_id || '-' }} + {{ record.name || '-' }} + {{ record.os || '-' }} + {{ record.location || '-' }} + {{ record.tags || '-' }} + {{ record.ip || '-' }} + {{ record.remote_port || '-' }} + {{ record.agent_url || '-' }} + + + {{ record.data_collection ? '已开启' : '未开启' }} + + + {{ record.collection_interval ? `${record.collection_interval}分钟` : '-' }} + {{ record.remark || '-' }} + + + + + + + + 1小时 + 3小时 + 6小时 + 12小时 + 1天 + 3天 + 7天 + 14天 + 自定义 + + + + + + + + CPU使用率_宿主机视角 (%) + + + 平均值 + 最大值 + 最小值 + + + + + + + (ECS)CPU使用率_平均值 + (ECS)CPU使用率_最小值 + (ECS)CPU使用率_最大值 + + + + + + + + 总带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 内网流入带宽 + 内网流出带宽 + + + + + + + + 公网带宽 (bit/s) + + + 平均值 + 最大值 + + + + + + + 公网流入带宽 + 公网流出带宽 + + + + + + + + + + 公网流出带宽使用率 (%) + + + 平均值 + 最大值 + + + + + + + (ECS)公网流出带宽使用率 + + + + + + + + 磁盘读取写入BPS (bytes/s) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘读取BPS + (ECS)所有磁盘写入BPS + + + + + + + + 磁盘读取写入IOPS (Count/Second) + + + 平均值 + 最大值 + + + + + + + (ECS)所有磁盘每秒读取次数 + (ECS)所有磁盘每秒写入次数 + + + + + + + + + + 同时连接数 (Count) + + + 平均值 + 最大值 + + + + + + + 同时连接数 + + + + + + + + RDMA流量使用信息 (bit/s) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + RDMA资源使用信息 (Count) + + + 平均值 + 最大值 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/pc/components/FormDialog.vue b/src/views/ops/pages/dc/pc/components/FormDialog.vue new file mode 100644 index 0000000..d9b9e14 --- /dev/null +++ b/src/views/ops/pages/dc/pc/components/FormDialog.vue @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + Windows + Linux + 其它 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1分钟 + 5分钟 + 10分钟 + 30分钟 + + + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/pc/index.vue b/src/views/ops/pages/dc/pc/index.vue index b08a17c..062064b 100644 --- a/src/views/ops/pages/dc/pc/index.vue +++ b/src/views/ops/pages/dc/pc/index.vue @@ -7,7 +7,7 @@ :columns="columns" :loading="loading" :pagination="pagination" - title="服务器及PC管理" + title="办公PC管理" search-button-text="查询" reset-button-text="重置" @update:form-model="handleFormModelUpdate" @@ -21,7 +21,7 @@ - 新增 + 新增办公PC @@ -156,8 +156,8 @@ - @@ -194,9 +194,9 @@ import { fetchPCList, deletePC, } from '@/api/ops/pc' -import ServerFormDialog from './components/ServerFormDialog.vue' +import FormDialog from './components/FormDialog.vue' import QuickConfigDialog from './components/QuickConfigDialog.vue' -import ServerDetail from './components/ServerDetail.vue' +import Detail from './components/Detail.vue' const router = useRouter() @@ -334,7 +334,7 @@ const formModel = ref({ status: undefined, }) -const formDialogVisible = ref(false) +const dialogVisible = ref(false) const quickConfigVisible = ref(false) const currentRecord = ref(null) @@ -460,7 +460,7 @@ const handleRefresh = () => { // 新增PC const handleAdd = () => { currentRecord.value = null - formDialogVisible.value = true + dialogVisible.value = true } // 快捷配置 @@ -472,7 +472,7 @@ const handleQuickConfig = (record: any) => { // 编辑PC const handleEdit = (record: any) => { currentRecord.value = record - formDialogVisible.value = true + dialogVisible.value = true } // 详情 - 在当前窗口打开 @@ -492,7 +492,7 @@ const handleDetail = (record: any) => { const handleRestart = (record: any) => { Modal.confirm({ title: '确认重启', - content: `确认重启服务器/PC ${record.name} 吗?`, + content: `确认重启办公PC ${record.name} 吗?`, onOk: () => { Message.info('正在发送重启指令...') }, diff --git a/src/views/ops/pages/dc/server/components/QuickConfigDialog.vue b/src/views/ops/pages/dc/server/components/QuickConfigDialog.vue new file mode 100644 index 0000000..6e26b54 --- /dev/null +++ b/src/views/ops/pages/dc/server/components/QuickConfigDialog.vue @@ -0,0 +1,90 @@ + + + + + + + 为空则不可远程访问 + + + + + + + + + + + diff --git a/src/views/ops/pages/dc/server/components/RemoteControl.vue b/src/views/ops/pages/dc/server/components/RemoteControl.vue new file mode 100644 index 0000000..09c60fc --- /dev/null +++ b/src/views/ops/pages/dc/server/components/RemoteControl.vue @@ -0,0 +1,310 @@ + + + + + + {{ record.name || '远程控制' }} + {{ getStatusText(record.status) }} + + + + 关闭 + + + + + + + + + + SSH + 免密连接 + + + + + + + + + + + + + + + + + + + + + + + + + + + 连接 + + 取消 + + + + + + + + + 已连接: {{ loginForm.username }}@{{ loginForm.host }}:{{ loginForm.port }} + + 断开 + 全屏 + + + + + {{ line.prompt }} + {{ line.content }} + + + {{ prompt }} + + + + + + + + + + diff --git a/src/views/ops/pages/dc/pc/components/ServerDetail.vue b/src/views/ops/pages/dc/server/components/ServerDetail.vue similarity index 100% rename from src/views/ops/pages/dc/pc/components/ServerDetail.vue rename to src/views/ops/pages/dc/server/components/ServerDetail.vue diff --git a/src/views/ops/pages/dc/pc/components/ServerFormDialog.vue b/src/views/ops/pages/dc/server/components/ServerFormDialog.vue similarity index 100% rename from src/views/ops/pages/dc/pc/components/ServerFormDialog.vue rename to src/views/ops/pages/dc/server/components/ServerFormDialog.vue diff --git a/src/views/ops/pages/dc/server/index.vue b/src/views/ops/pages/dc/server/index.vue index 4435c7c..869d064 100644 --- a/src/views/ops/pages/dc/server/index.vue +++ b/src/views/ops/pages/dc/server/index.vue @@ -195,8 +195,8 @@ import { import type { FormItem } from '@/components/search-form/types' import SearchTable from '@/components/search-table/index.vue' import { searchFormConfig } from './config/search-form' -import ServerFormDialog from '../pc/components/ServerFormDialog.vue' -import QuickConfigDialog from '../pc/components/QuickConfigDialog.vue' +import ServerFormDialog from './components/ServerFormDialog.vue' +import QuickConfigDialog from './components/QuickConfigDialog.vue' import { columns as columnsConfig } from './config/columns' import { fetchServerList,