[codex] Add local mock dashboard mode#28
Draft
podcctv wants to merge 72 commits into
Draft
Conversation
优化卡片高度并修复资源占用显示与进度条渐变
…d-redesign Fix dynamic usage bars and refresh card/latency visuals
feat: add reflective gloss to active cards and make offline cards non-interactive
修复 TCP 延迟数据解析并优化详情面板与移动适配
Revamp status panel to 24‑hour blocks and improve latency parsing
修复节点 id 冲突导致详情页无数据与在线状态错误
Embed TCP ping in node cards
Smooth card ping refresh
…rd-ping Refine detail status and card ping
Style TCPing as segmented card
- FleetTcpPingPanel: 24竖条=24小时延迟热力图, 绿(≤80ms)/黄(80-150ms)/红(>150ms) - useFleetTcpPing: 新增小时级分桶计算 computeHourlyBuckets - NodeCard: flex布局修复卡片不等高问题, h-full撑满网格单元格
- global.css: 深黑背景+CRT扫描线+网格+霓虹青/品红色系 - Orbitron+Share Tech Mono字体, 终端质感 - Navbar: 霓虹发光站名, 赛博导航条 - Footer/RegionFilter/TagFilter: 统一赛博芯片按钮风格 - Search: 霓虹边框终端输入框 - 锁定暗色模式, 移除ThemeToggle - 卡片边框脉冲动画, 扫描光效, 全息边框
- 配色: 去除全部荧光/霓虹色, 恢复深蓝灰底+靛蓝色系传统暗色主题 - 卡片: 提高背景辨识度 hsl(224 22% 9%), 更好的边框对比度 - 字体: 去除Google Fonts外部加载, 恢复系统字体 - 组件: 恢复ThemeToggle/Search/Filter等原始样式 - 性能: ping数据延迟3秒加载, 优先渲染主要节点数据
- 延迟颜色更细粒度: 采用彩虹渐变色 (100ms及以下绿色, 150黄色, 200橙色, 300及以上红色) 更直观分辨延迟差异 - 新增24小时在线状态条: 在卡片底部增加紧凑版24h在线状态带,直观展示VPS近期掉线情况 - 修复CPU溢出: 进度条限制最大显示100%,防止超过100%时进度条UI溢出,同时文本仍显示实际值
- useFleetTcpPing: 使用合并历史数据的方式更新状态,防止因后端返回数据截断导致旧记录在自动刷新后消失 - NodeCard: 当节点离线时,仅对内部卡片内容应用 grayscale 和透明度,而底部红色的 OFFLINE 状态文本保持鲜亮醒目
- 之前改为全局查询虽然缓解了后端压力,但后端对查询结果的总数量有限制(如只返回最近几千条),导致历史数据无法完整加载,随着页面刷新也会被丢弃。 - 现在的解决方案是恢复成【按 UUID 请求数据】,并加入 executeBatched 异步并发控制器。这保证了即时加载出完整的 24h 历史,又将并发请求数严格控制在 15 个以内,避免了一次性发起几百个请求压垮后端。
- 使用原生 IndexedDB 存储全量历史 TCPing 数据 (由于数据量可能超过 localStorage 5MB 限制) - 页面加载时瞬间读取本地缓存渲染历史数据,后台再增量拉取新数据并无缝合并,极大提升每次页面刷新的加载体验
- 修改 .cyber-card 使用 css 变量以适应主题切换 - 将卡片内硬编码的黑色半透明背景替换为 \�g-black/5 dark:bg-black/xx\ 的响应式类 - 修复亮色模式下 offline 状态边框和背景的异常表现
- 将 CPU/内存/磁盘 传统进度条改为 20 格细条纹阵列(类似 TCPing 热力图风格) - 引入新的颜色系统: - 常规负载使用黑/白色(自动适配日夜间主题),舍弃之前的青色 - 负载 70%~100% 根据区间使用渐变警告色 - 负载突破 100% 时(如超卖机型 CPU 飙升),触发专属高亮鲜红 + 红色光晕特效
- 将卡片内部包裹层背景由 bg-black/5 修改为 bg-slate-50,彻底消除灰色朦胧感,更显白净 - 进度条和热力图的空白底槽加深为 bg-slate-200,保证格子轮廓清晰 - 文字颜色整体换用更深色系的 text-slate-500 和 text-slate-600 - 警告色在亮色模式下替换为对比度更高的 text-amber-600 和 text-rose-600
… keep custom TCPing features
… page, Footer upgrade; keep cyberpunk cards + TCPing + IndexedDB cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
Notes