feat: 运行的容器行内显示安装时间
This commit is contained in:
1 parent
270f01d0eb
commit
71525a74f9
4 files changed
+17
-1
No files matched your search
@@ -1,5 +1,12 @@
|
||||
# 更新日志
|
||||
|
||||
## 2026-10-27 → ✨ 运行的容器行内显示安装时间
|
||||
|
||||
- ✨ 每个容器行的操作按钮左侧新增「安装 / 10-26 23:33」两行小字(灰色标签 + 时间),悬停显示完整时间 `2026/10/26 23:33:12`
|
||||
- 🔧 定为 76px 定宽列,不挤压名称与指标;1100 / 1280 / 1440 三种宽度实测 **0 行溢出、无横向滚动**
|
||||
- 🔧 副标题保持原样(`项目: xxx · 已运行 5小时41分`),安装时间不再塞进副标题,避免被截断
|
||||
- ✅ 实测:61 行全部显示安装时间,最早 `10-26 09:40`、最新 `10-26 23:33`,与「最新安装」排序一致
|
||||
|
||||
## 2026-10-27 → ✨ 本地镜像支持批量「启动运行」
|
||||
|
||||
- ✨ 本地镜像批量条新增「启动运行 N 个」:勾选镜像 → 弹窗设置重启策略 / 网络 / 端口映射 / 环境变量 → 一次为每个镜像创建并启动容器
|
||||
|
||||
@@ -114,7 +114,7 @@ bash install.sh
|
||||
| 概览(默认) | 纯仪表盘:应用总数/异常/注意/资源/运行容器统计条、**性能趋势三图并列**(流量 / CPU / 内存,今天·昨天·近30天·近12个月 + 查某一天,按小时记账落盘)、**CPU 与内存占用 Top 5**、优化建议、**需要关注的应用**(仅异常/注意,最多 6 个,卡片可直接启停)、最近事件;右上「查看全部应用」进入完整列表 |
|
||||
| 全部应用 | 完整应用卡片列表(50 个):筛选(全部·有问题·已停止·高占用)、排序、状态胶囊、CPU/内存/网络、端口、已运行时长、可用率、重启次数、卡片内启停与详情;顶部可返回概览 |
|
||||
| 应用详情 | 应用级指标 + 全部容器表格(状态/健康/CPU/内存/网络/重启/运行时长/单容器操作)+ 三个标签页:容器、聚合日志(多容器合并、按容器名加前缀)、事件;顶部可整应用启停重启 |
|
||||
| 运行的容器 | 只列运行中容器;**默认按最新安装排序**(可选 CPU/内存/网络/磁盘IO/进程数/名称,按页面记忆)、搜索;行内启停/重启/删除/详情/打开端口;有限制的容器显示 `限 0.3核/96M` 角标 |
|
||||
| 运行的容器 | 只列运行中容器;**默认按最新安装排序**(可选 CPU/内存/网络/磁盘IO/进程数/名称,按页面记忆)、搜索;行内显示**安装时间**、启停/重启/删除/详情/打开端口;有限制的容器显示 `限 0.3核/96M` 角标 |
|
||||
| (停止的容器) | 侧栏已隐藏该入口;页面代码保留,含「有镜像但未启动的应用」批量启动/删除与已停止容器批量删除 |
|
||||
| 本地镜像 | 使用情况(运行中/已停止引用/未使用)、**单个/批量导出 tar.gz**(保留 tag)、**导入 tar/tar.gz**、**批量删除**(被占用自动跳过)、**批量启动运行**(弹窗设重启策略/网络/端口/环境变量)、清理悬空镜像 |
|
||||
| 镜像仓库 | 拉取镜像(流式进度);**批量 Compose 部署**:`# 目录:` / `# 项目:` / `# ENV: KEY=VALUE` + `---` 分隔多项目,可加安装目录前缀 |
|
||||
|
||||
@@ -696,6 +696,10 @@ async function renderContainers(silent, mode = 'running') {
|
||||
<div class="metric"><div class="k">网络</div><div class="net"><span class="up">↑${fmtRate(s.txBps)}</span> <span class="dn">↓${fmtRate(s.rxBps)}</span></div></div>
|
||||
<div class="metric"><div class="k">磁盘 IO</div><div class="net">R ${fmtRate(s.rdBps)} / W ${fmtRate(s.wrBps)}</div></div>
|
||||
</div>
|
||||
<div class="inst" title="${c.created ? '安装于 ' + new Date(c.created * 1000).toLocaleString('zh-CN') : ''}">
|
||||
<span class="k">安装</span>
|
||||
<span class="v">${c.created ? (() => { const d = new Date(c.created * 1000); return `${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')} ${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`; })() : '—'}</span>
|
||||
</div>
|
||||
<div class="acts">
|
||||
${linkBtn}
|
||||
<span class="ico-btn" title="${c.state === 'running' ? '停止' : '启动'}" data-act="toggle">${icon('power')}</span>
|
||||
|
||||
@@ -402,3 +402,8 @@ table.tb th.num{text-align:right}
|
||||
.m-row select,.m-row input{height:30px;padding:0 9px;border:1px solid #dfe6ef;border-radius:8px;font-size:12.5px;flex:1}
|
||||
.m-row textarea{min-height:74px;padding:8px;border:1px solid #dfe6ef;border-radius:8px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;resize:vertical}
|
||||
.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid #eef2f7;background:#fbfdff}
|
||||
|
||||
/* 容器行:安装时间 */
|
||||
.row .inst{flex-shrink:0;width:76px;text-align:right;line-height:1.3}
|
||||
.row .inst .k{display:block;font-size:10.5px;color:#9aa4b5}
|
||||
.row .inst .v{display:block;font-size:11.5px;color:#3d4859;font-variant-numeric:tabular-nums}
|
||||
Reference in new issue
Block a user