mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 21:50:47 +08:00
Move integration health into active tasks and fix dark topology labels.
Drop header netx-api/oclaw pills, restore UME/OClaw runtime rows in ops tasks, and raise node/edge label contrast on the dark canvas. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4dd121b42f
commit
83acb5eef1
10 changed files with 106 additions and 128 deletions
|
|
@ -10,7 +10,7 @@ const POLL_MS = 4000;
|
|||
function statusTone(status: string): string {
|
||||
const s = status.toLowerCase();
|
||||
if (s === "collecting" || s === "running" || s === "connecting" || s === "testing") return "running";
|
||||
if (s === "ready") return "ok";
|
||||
if (s === "ready" || s === "idle") return "ok";
|
||||
if (s === "paused" || s === "pending" || s === "detached") return "paused";
|
||||
if (s === "failed" || s === "error") return "stopped";
|
||||
return "other";
|
||||
|
|
@ -36,9 +36,20 @@ function triggerLabel(trigger: string, t: (k: string, vars?: Record<string, stri
|
|||
return tr === key ? raw : tr;
|
||||
}
|
||||
|
||||
function runtimeTaskSubject(
|
||||
taskId: string,
|
||||
t: (k: string, vars?: Record<string, string | number>) => string,
|
||||
): string {
|
||||
const key = `ume.tasks.runtimeTask.${taskId}`;
|
||||
const label = t(key);
|
||||
return label === key ? taskId : label;
|
||||
}
|
||||
|
||||
function taskTitle(row: OpsTaskItem, t: (k: string, vars?: Record<string, string | number>) => string): string {
|
||||
const kind = kindLabel(row.kind, t);
|
||||
const subject = String(row.title || "").trim();
|
||||
const subjectRaw = String(row.title || row.id || "").trim();
|
||||
const subject =
|
||||
row.kind === "ume_runtime" && subjectRaw ? runtimeTaskSubject(subjectRaw, t) : subjectRaw;
|
||||
if (!subject) return kind;
|
||||
// Avoid "Kind · Kind · x" if an old backend still prefixed the localized kind.
|
||||
if (subject === kind || subject.startsWith(`${kind} · `) || subject.startsWith(`${kind}·`)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue