diff --git a/gateway/scripts/dashboard.py b/gateway/scripts/dashboard.py index e1d91cc..b3f6a57 100644 --- a/gateway/scripts/dashboard.py +++ b/gateway/scripts/dashboard.py @@ -564,7 +564,7 @@ def api_agent_restart(agent_id): PLATFORM_SERVICES = [ {"id": "wechat_bridge", "name": "莫荷微信 (Linux :3001)", "type": "ChannelBridge", "desc": "246 Docker wechatbot-webhook → 微信收发 + webhook 触发 → Hermes Gateway", - "health_url": "http://192.168.1.246:3001/", "host": "192.168.1.246", "port": 3001}, + "host": "192.168.1.246", "port": 3001}, {"id": "article_processor", "name": "文章抓取服务 (5810)", "type": "wechat-fetch", "desc": "fetches wechat article content + OCR (DrissionPage)", "host": "192.168.1.16", "health_url": "http://192.168.1.16:5810/health"}, @@ -953,10 +953,16 @@ def api_expected(): for agent in agents: display = agent.get("display_name", agent["name"]) host = agent.get("host", "127.0.0.1") + bot_type = agent.get("bot_type", "xmpp") for svc in agent.get("services", []): svc_type = svc["type"] + # hermes 协议 agent 不跑独立 xmpp_bot,跳过 + if bot_type == "hermes" and svc_type == "xmpp_bot": + continue port = svc.get("port") - entry = {"name": f"{display}({host}):{svc_type}", "host": host, "expected": "running", "critical": True} + # key 供前端 M 映射表查找友好标签 + key = svc_type + entry = {"name": f"{display}({host}):{svc_type}", "key": key, "host": host, "expected": "running", "critical": True} if port: entry["port"] = port entry["check"] = "tcp" @@ -969,7 +975,7 @@ def api_expected(): # 2. 从 PLATFORM_SERVICES 生成平台服务的期望 for ps in PLATFORM_SERVICES: - entry = {"name": f"{ps['name']} ({ps['id']})", "host": ps.get("host", "127.0.0.1"), "expected": "running", "critical": True} + entry = {"name": f"{ps['name']} ({ps['id']})", "key": ps["id"], "host": ps.get("host", "127.0.0.1"), "expected": "running", "critical": True} if ps.get("health_url"): entry["health_url"] = ps["health_url"] entry["check"] = "health_url" diff --git a/gateway/scripts/templates/dashboard.html b/gateway/scripts/templates/dashboard.html index b2a61dd..ddc103a 100644 --- a/gateway/scripts/templates/dashboard.html +++ b/gateway/scripts/templates/dashboard.html @@ -160,14 +160,14 @@ async function fHealth(){try{ var M={}; M.ejabberd={n:'XMPP服务器',l:'通信层',i:'所有XMPP连接不可用'}; M.xmpp_bot={n:'XMPP消息收发',l:'通信层',i:'所有Agent消息收发中断'}; - M.gateway_mohe={n:'Gateway-莫荷',l:'AI网关',i:'莫荷智能体不可用'}; - M.gateway_zhiwei={n:'Gateway-知微',l:'AI网关',i:'知微智能体不可用'}; + M.hermes_gateway={n:'Hermes AI网关',l:'AI网关',i:'Hermes Agent不可用'}; M.article_processor={n:'微信全文抓取',l:'辅助服务',i:'微信长文章无法读取'}; + M.wechat_bridge={n:'莫荷微信桥接',l:'通信层',i:'微信消息收发中断'}; + M.omlx_server={n:'OMLX推理服务',l:'AI网关',i:'本地推理服务不可用'}; M.dashboard={n:'管理门户',l:'辅助服务',i:'Dashboard无法访问'}; M.watchdog={n:'进程看门狗',l:'辅助服务',i:'异常进程无自动恢复'}; M['agents-health-check']={n:'健康检查(5min)',l:'定时任务',i:'5分钟级健康检测未运行'}; M['agents-daily-health']={n:'日报健康检查(每日)',l:'定时任务',i:'日报统计未运行'}; - M['agents-todo-executor']={n:'待办执行器(10min)',l:'定时任务',i:'定时待办任务未执行'}; var layerOrder=['通信层','AI网关','辅助服务','定时任务']; var h='