diff --git a/src/router/index.ts b/src/router/index.ts index ad5745b..535a98c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -3,14 +3,7 @@ import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router"; import Layout from "@/components/Layout.vue"; import { Components } from "ant-design-vue/es/date-picker/generatePicker"; -const HomeView = () => import("@/views/home/index.vue"); -const FileStore = () => import("@/views/controlPanel/fileStore/index.vue"); -// 账号安全 -const AccountSecurity = () => - import("@/views/controlPanel/account/security/index.vue"); -// 访问记录 -const AccountHistory = () => - import("@/views/controlPanel/account/history/index.vue"); + const routes: RouteRecordRaw[] = [ { @@ -57,6 +50,16 @@ const routes: RouteRecordRaw[] = [ name: "AdminHome", component: () => import("@/views/admin/home/index.vue"), }, + { + path: "instance", + name: "Instance", + component: () => import("@/views/admin/instance/index.vue"), + }, + { + path: "instanceCreate", + name: "InstanceCreate", + component: () => import("@/views/admin/instanceCreate/index.vue"), + }, { path: "fileStore", name: "FileStore", diff --git a/src/views/admin/index.vue b/src/views/admin/index.vue index 44e2a31..508cd86 100644 --- a/src/views/admin/index.vue +++ b/src/views/admin/index.vue @@ -43,7 +43,7 @@ interface MenuItem { const menuItems: MenuItem[] = [ { path: '/layout/overview', name: '总览', icon: HomeOutlined }, - { path: '/layout/container', name: '容器实例', icon: ConsoleSqlOutlined }, + { path: '/layout/admin/instance', name: '容器实例', icon: ConsoleSqlOutlined }, { path: '/layout/admin/fileStore', name: '文件存储', icon: FolderOpenOutlined }, { path: '/layout/admin/image', name: '镜像', icon: GlobalOutlined }, { path: '/layout/publicData', name: '公开数据', icon: LaptopOutlined }, diff --git a/src/views/admin/instance/index.vue b/src/views/admin/instance/index.vue new file mode 100644 index 0000000..af523dc --- /dev/null +++ b/src/views/admin/instance/index.vue @@ -0,0 +1,518 @@ + + + + + + + 容器实例 + + + 实例连续关机15天会释放实例,实例释放会导致数据清空且不可恢复,释放前实例在数据在。 + + + + + + + + 租用新实例 + + + + + + + + 全部标签 + 运行中 + 已停止 + + + + + + + + + + + + + + + 暂无数据 + 当前没有实例数据,您可以租用新实例开始使用 + + + + + + + + + 共 {{ total }} 条 + + + + + + 前往 + + 页 + + + + + + + + \ No newline at end of file diff --git a/src/views/admin/instanceCreate/index.vue b/src/views/admin/instanceCreate/index.vue new file mode 100644 index 0000000..a4974ed --- /dev/null +++ b/src/views/admin/instanceCreate/index.vue @@ -0,0 +1,1248 @@ + + + + + + 容器实例 + + 创建实例 + + + + + + + + + + 按量计费 + 包日 + 包周 + 包月 + + 计费规则 + + + 创建完主机后仍然可以转换计费方式。如选择按量计费,价格发生变动以实例开机时的价格为准 + + + + + + + + + 选择地区: + + + + {{ region.label }} + {{ region.tag.text + }} + + + + + + + + 二级专区: + + + + {{ zone.label }} + + + + + + + + GPU型号: + + + 全部 + + {{ model.label }} + ({{ model.available }}/{{ model.total }}) + + + + + + + + GPU数量: + + + + {{ count }} + + + + + + + + + + 选择主机: + 共 {{ filteredMachineList.length }} 台可用主机 + + + + + handleSelectMachine(record.id)" /> + + + + {{ record.gpuModel }} + {{ record.gpuMemory }} + + + + + {{ record.freeGpu }} + / + {{ record.totalGpu }} + + + + + CPU:{{ record.cpuCores }}核 + 内存:{{ record.memory }}GB + + + + + 数据盘:{{ record.dataDisk }}GB + 可扩容:{{ record.expandableDisk }}GB + + + + + 驱动:{{ record.driver }} + CUDA:{{ record.cuda }} + + + + + + ¥{{ getPrice(record) }}/{{ billingUnit }} + + + ¥{{ getOriginalPrice(record) }}/{{ billingUnit }} + + + + + + + + + + + + + + + + + + 免费50GB SSD + 需要扩容 + + + 扩容大小: + + 最大可扩容 {{ maxExpandSize }}GB + + + + + + + + + GPU型号 + {{ selectedGpuModelLabel }} * {{ gpuCount }}卡 + + + CPU + {{ cpuCores }}核心 + + + 内存 + {{ memory }}GB + + + 系统盘 + 30GB + + + 数据盘 + {{ totalDiskSize }}GB SSD + + + + + + + + + + 基础镜像 + + 社区镜像 + hot + + 我的镜像 + + 没有我要的环境? + + + + + + 基础镜像包含常用基本软件,如:深度学习框架、Miniconda等。如需其他软件可创建后安装 + + + + 创建完成后仍然可以更换其他镜像 + + + + + + + + + 不使用优惠券 + + {{ coupon.name }} - ¥{{ coupon.amount }} + + + + 可用优惠券:{{ availableCoupons.length }} 张 + + + + + + + + + + + + \ No newline at end of file