From 94569f4bb48e65c5284cf6e7a742d3f5e0e3c693 Mon Sep 17 00:00:00 2001 From: jinghui <181050043@qq.com> Date: Mon, 26 Oct 2026 22:49:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BE=A7=E6=A0=8F=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E3=80=8C=E5=81=9C=E6=AD=A2=E7=9A=84=E5=AE=B9=E5=99=A8=E3=80=8D?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ README.md | 3 +-- public/app.js | 7 +++++-- public/index.html | 1 - 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a931cc..5a0dd59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # 更新日志 +## 2026-10-26 → 🔧 侧栏去掉「停止的容器」入口 + +- 🔧 侧栏菜单精简为:概览 / 运行的容器 / 本地镜像 / 镜像仓库 / 网络 / 备份与恢复 / 告警设置 +- 🔧 角标更新逻辑加空值保护,避免菜单移除后 `#navStopped` 报错 +- ℹ️ 页面代码与接口(有镜像但未启动应用的批量启动/删除、已停止容器批量删除)全部保留,仅入口隐藏;需要时可随时挂回或并入其他页面 +- ✅ 实测:侧栏 7 项渲染正常,概览/运行的容器/本地镜像/网络/备份与恢复/告警设置逐个切换无报错、无空白页 + ## 2026-10-26 → ✨ 本地镜像支持批量删除 - ✨ 本地镜像批量条新增「删除选中 N 个」:与「导出选中」「导入镜像」并排,勾选后一次清理多个镜像 diff --git a/README.md b/README.md index 8cc821a..5cc3096 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ Docker 自带面板和 Portainer 都是按「容器」管理:六十多个容 **容器与项目** - 运行的容器:只列运行中,可按 CPU/内存/网络/磁盘IO/进程数/名称排序,显示已运行时长 -- 停止的容器:已停止容器 + **有镜像但未启动的应用**(一键 `docker compose up -d`) - 本地镜像(可清理悬空镜像)、镜像仓库拉取、网络 **备份与恢复** @@ -112,7 +111,7 @@ bash install.sh | 全部应用 | 完整应用卡片列表(50 个):筛选(全部·有问题·已停止·高占用)、排序、状态胶囊、CPU/内存/网络、端口、已运行时长、可用率、重启次数、卡片内启停与详情;顶部可返回概览 | | 应用详情 | 应用级指标 + 全部容器表格(状态/健康/CPU/内存/网络/重启/运行时长/单容器操作)+ 三个标签页:容器、聚合日志(多容器合并、按容器名加前缀)、事件;顶部可整应用启停重启 | | 容器 | 只列运行中容器,可排序(CPU/内存/网络/磁盘IO/进程数/名称)、搜索;行内启停/重启/删除/详情/打开端口 | -| 停止的容器 | 两个部分:**有镜像但未启动的应用**(compose 项目存在、本地有镜像、但一个容器都没有,可一键 `docker compose up -d`)+ 已停止/退出的容器(启动/删除/详情,支持**复选框批量删除**,运行中的容器会被跳过) | +| (停止的容器) | 侧栏已隐藏该入口;页面代码保留,含「有镜像但未启动的应用」批量启动/删除与已停止容器批量删除 | | 本地镜像 | 按大小排序、删除、清理悬空镜像 | | 镜像仓库 | 拉取镜像(流式进度) | | 网络 | 名称/驱动/子网/网关/容器数 | diff --git a/public/app.js b/public/app.js index 33bb7c1..b3cd64f 100644 --- a/public/app.js +++ b/public/app.js @@ -202,8 +202,11 @@ async function refreshHost() { } $('#hostMini').innerHTML = `${esc(h.hostname)}
${h.cpus} 核 · 内存 ${fmtBytes(h.memTotal)}
运行 ${h.running} / 共 ${h.containers} 容器`; $('#navRunning').textContent = h.running; - $('#navStopped').textContent = (h.stopped || 0) + (h.pending || 0); - $('#navStopped').title = `已停止容器 ${h.stopped || 0} 个 · 有镜像未启动的应用 ${h.pending || 0} 个`; + const ns = $('#navStopped'); + if (ns) { + ns.textContent = (h.stopped || 0) + (h.pending || 0); + ns.title = `已停止容器 ${h.stopped || 0} 个 · 有镜像未启动的应用 ${h.pending || 0} 个`; + } return h; } diff --git a/public/index.html b/public/index.html index 1b58199..c15ba01 100644 --- a/public/index.html +++ b/public/index.html @@ -18,7 +18,6 @@