mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-21 09:27:57 +00:00
feat: Phase C 完成 — ModelRouter 风格 UI 重设计 + 模拟 frps 测试 + lastSync 修复 + 集群作坊搭建
- 主题: sakura×frost 玻璃拟态 (theme.css) + SCSS 变量重映射 - 侧栏: 玻璃侧栏 246px + 渐变品牌区 + 面包屑导航 - 状态页: 玻璃 KPI 卡 + 远程节点/本地服务卡片网格 - 集群页: 英雄玻璃卡 + 横向环拓扑链 + 待办命令/活跃拓扑/日志区 - 令牌环: 新增 lastSync 上次同步时间替代周期计数 - 模拟 frps: frps2/frps3 容器 + test-forward.sh 全链路验证脚本 - 修复: BinaryPath 空导致 worker 不启动, 撤销仅撤第一个 link, 任务复活风暴 (published 追踪)
This commit is contained in:
@ -77,10 +77,19 @@ func (h *Handler) saveCanvas(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
} else if h.Ring != nil {
|
||||
if fwd, _ := s.LinksForLocal(old.Name); len(fwd) > 0 {
|
||||
if rem, ok := s.GetRemote(fwd[0].Remote); ok {
|
||||
h.Ring.RevokeTask(old, rem, store.Link{Local: old.Name, Remote: rem.Name, RemotePort: fwd[0].RemotePort})
|
||||
// Publish a REVOKE task for EVERY link of the removed local —
|
||||
// a local may fan out to several remotes, and revoking only the
|
||||
// first (fwd[0]) left the rest as orphan workers running on
|
||||
// their owning cluster nodes.
|
||||
fwd, _ := s.LinksForLocal(old.Name)
|
||||
for _, ln := range fwd {
|
||||
rem, ok := s.GetRemote(ln.Remote)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
h.Ring.RevokeTask(old, rem, store.Link{
|
||||
Local: old.Name, Remote: rem.Name, RemotePort: ln.RemotePort,
|
||||
})
|
||||
}
|
||||
}
|
||||
_ = s.DeleteLocal(old.Name)
|
||||
|
||||
Reference in New Issue
Block a user