优化 K8s 页面布局与 local 模式部署收尾

P0-P1:
- Dockerfile.embed 启用 CGO 支持 SQLite+redka
- K8s scale>1 时警告 local 模式数据不共享

K8s UI:
- 移除侧边栏资源用量/容量分析及资源页横向 Tab 栏
- 修复事件路由(/workloads/events)与 Deployment 事件过滤
- 网络/配置/存储统一 YamlViewer 编辑,加大编辑弹窗
This commit is contained in:
Logan.Li committed 2026-06-26 13:36:27 +08:00
1 parent 859db427a4
commit 339b24a579
12 files changed
+87 -90

No files matched your search

@@ -85,6 +85,14 @@ export default function EventsPage() {
// Filter events by selected reason/kind from aggregation click
const displayEvents = useMemo(() => {
let filtered = events;
const hours = parseInt(timeWindow, 10);
if (hours > 0) {
const since = Date.now() - hours * 3600 * 1000;
filtered = filtered.filter((e) => {
const ts = e.last_time || e.lastTime || e.last_timestamp;
return !ts || new Date(ts).getTime() >= since;
});
}
if (selectedReason) {
filtered = filtered.filter(e => e.reason === selectedReason);
}
@@ -92,7 +100,7 @@ export default function EventsPage() {
filtered = filtered.filter(e => (e.object || '').startsWith(selectedKind + '/'));
}
return filtered;
}, [events, selectedReason, selectedKind]);
}, [events, selectedReason, selectedKind, timeWindow]);
const warningCount = useMemo(() => events.filter(e => e.type === 'Warning').length, [events]);
const normalCount = useMemo(() => events.filter(e => e.type === 'Normal').length, [events]);