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..ab3052a --- /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/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..ee5c18b --- /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/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..7f6ca03 --- /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/index.vue b/src/views/ops/pages/dc/pc/index.vue index b08a17c..44c1801 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 @@ -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('正在发送重启指令...') },