mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 06:50:49 +08:00
feat(ume): OClaw forwarder runtime task and i18n status codes
Register oclaw_alarm_forwarder in background tasks with pause/resume, emit rt:/ws:/fwd: codes for last_error, and translate them in the UI for English and Chinese. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
5a00736f23
commit
ba1a40f725
10 changed files with 380 additions and 37 deletions
|
|
@ -342,6 +342,7 @@ const en = {
|
|||
wsConnected: "connected",
|
||||
wsDisconnected: "disconnected",
|
||||
wsDisabled: "disabled",
|
||||
wsPaused: "paused",
|
||||
publishedOk: "published ok",
|
||||
publishedFail: "published fail",
|
||||
queue: "queue",
|
||||
|
|
@ -409,6 +410,48 @@ const en = {
|
|||
intervalTitle: "Configured sleep between loop iterations (clamped at process start)",
|
||||
lastRunTitle: "Last finished sync for scheduled tasks; refreshed at each loop tick",
|
||||
deletedTitle: "Reconcile deletes: inventory = NE rows; alarms_current = current alarm rows",
|
||||
lastErrorCol: "last_error",
|
||||
runtimeError: {
|
||||
startup_alarm_sync_before_ws: "Starting up: syncing current alarms (WSS connects after completion)…",
|
||||
startup_gate_waiting: "Startup REST snapshot pending; scheduled REST and WSS on standby",
|
||||
wss_active_skip_rest: "WSS receiving live alarms; REST sync skipped",
|
||||
pulling_alarms_current: "Pulling UME current alarms…",
|
||||
alarms_sync_in_progress_skip: "Another current-alarm REST sync in progress; skipped",
|
||||
pulling_inventory: "Pulling UME inventory…",
|
||||
ume_ws_disabled_no_base_url: "Disabled or UME_BASE_URL not configured",
|
||||
oclaw_fwd_disabled: "Disabled or NETX_OCLAW_ALARM_WS / token / url not configured",
|
||||
resumed_sync_soon: "Resumed: skipping debounce wait, sync soon",
|
||||
resumed_wss_reconnect: "Resumed: reconnecting WSS soon",
|
||||
resumed_oclaw_wss_reconnect: "Resumed: reconnecting OClaw WSS soon",
|
||||
resumed: "Resumed",
|
||||
keepalive_failed: "Token keepalive failed",
|
||||
},
|
||||
wsState: {
|
||||
init: "Initializing",
|
||||
connected: "Connected",
|
||||
connecting: "Connecting",
|
||||
disconnected: "Disconnected",
|
||||
no_subscription: "No subscription",
|
||||
waiting_token: "Waiting for token",
|
||||
paused: "Paused",
|
||||
error: "Connection error",
|
||||
reconnecting: "Reconnecting",
|
||||
subscription_lost: "UME subscription lost",
|
||||
disabled_no_base_url: "Disabled or UME_BASE_URL not configured",
|
||||
},
|
||||
fwdState: {
|
||||
paused: "Paused",
|
||||
disabled: "Disabled",
|
||||
connecting: "Connecting",
|
||||
connected: "Connected",
|
||||
},
|
||||
runtimeTask: {
|
||||
token_keepalive: "UME token keepalive",
|
||||
alarms_current_auto_sync: "Current alarms auto sync",
|
||||
alarms_current_ws_consumer: "UME alarm WSS",
|
||||
oclaw_alarm_forwarder: "OClaw key-alert WSS",
|
||||
inventory_auto_sync: "Inventory auto sync",
|
||||
},
|
||||
},
|
||||
syncStatus: {
|
||||
title: "Sync history",
|
||||
|
|
|
|||
|
|
@ -340,6 +340,7 @@ const zh = {
|
|||
wsConnected: "已连接",
|
||||
wsDisconnected: "未连接",
|
||||
wsDisabled: "未启用",
|
||||
wsPaused: "已暂停",
|
||||
publishedOk: "发布成功",
|
||||
publishedFail: "发布失败",
|
||||
queue: "待发队列",
|
||||
|
|
@ -407,6 +408,48 @@ const zh = {
|
|||
intervalTitle: "Configured sleep between loop iterations (clamped at process start)",
|
||||
lastRunTitle: "Last finished sync for scheduled tasks; refreshed at each loop tick",
|
||||
deletedTitle: "全量对账删除条数:inventory 为网元行,alarms_current 为当前告警行,其余域多为 0",
|
||||
lastErrorCol: "last_error",
|
||||
runtimeError: {
|
||||
startup_alarm_sync_before_ws: "启动中:正在同步当前告警(完成后连接 WSS)…",
|
||||
startup_gate_waiting: "启动 REST 全量同步未完成,定时 REST 与 WSS 均待命",
|
||||
wss_active_skip_rest: "WSS 实时接收中,已跳过 REST 同步",
|
||||
pulling_alarms_current: "正在拉取 UME 当前告警…",
|
||||
alarms_sync_in_progress_skip: "另一条当前告警 REST 同步进行中,已跳过",
|
||||
pulling_inventory: "正在拉取 UME 网元清单…",
|
||||
ume_ws_disabled_no_base_url: "未启用或未配置 UME_BASE_URL",
|
||||
oclaw_fwd_disabled: "未启用或未配置 NETX_OCLAW_ALARM_WS / token / url",
|
||||
resumed_sync_soon: "已恢复:将跳过本轮周期等待并尽快同步",
|
||||
resumed_wss_reconnect: "已恢复:将尽快重连 WSS",
|
||||
resumed_oclaw_wss_reconnect: "已恢复:将尽快重连 OClaw WSS",
|
||||
resumed: "已恢复",
|
||||
keepalive_failed: "Token 保活失败",
|
||||
},
|
||||
wsState: {
|
||||
init: "初始化",
|
||||
connected: "已连接",
|
||||
connecting: "连接中",
|
||||
disconnected: "已断开",
|
||||
no_subscription: "无订阅",
|
||||
waiting_token: "等待 token",
|
||||
paused: "已暂停",
|
||||
error: "连接异常",
|
||||
reconnecting: "重连等待",
|
||||
subscription_lost: "UME 订阅已丢失",
|
||||
disabled_no_base_url: "未启用或未配置 UME_BASE_URL",
|
||||
},
|
||||
fwdState: {
|
||||
paused: "已暂停",
|
||||
disabled: "未启用",
|
||||
connecting: "连接中",
|
||||
connected: "已连接",
|
||||
},
|
||||
runtimeTask: {
|
||||
token_keepalive: "UME Token 保活",
|
||||
alarms_current_auto_sync: "当前告警定时同步",
|
||||
alarms_current_ws_consumer: "UME 告警 WSS",
|
||||
oclaw_alarm_forwarder: "OClaw 关键告警 WSS",
|
||||
inventory_auto_sync: "Inventory 定时同步",
|
||||
},
|
||||
},
|
||||
syncStatus: {
|
||||
title: "同步状态",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue