mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 13:50:44 +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
|
|
@ -334,7 +334,7 @@ export function UmePage() {
|
|||
setKeyAlertNeTypes([]);
|
||||
showOk(t("ume.keyAlert.addOk"));
|
||||
await queryClient.invalidateQueries({ queryKey: queryKeys.umeKeyAlertMonitorAll });
|
||||
await queryClient.invalidateQueries({ queryKey: queryKeys.integrationsStatus });
|
||||
await queryClient.invalidateQueries({ queryKey: ["opsTasks"] });
|
||||
},
|
||||
onError: (err) => {
|
||||
const msg = String(err);
|
||||
|
|
@ -349,7 +349,7 @@ export function UmePage() {
|
|||
onSuccess: async () => {
|
||||
showOk(t("ume.keyAlert.deleteOk"));
|
||||
await queryClient.invalidateQueries({ queryKey: queryKeys.umeKeyAlertMonitorAll });
|
||||
await queryClient.invalidateQueries({ queryKey: queryKeys.integrationsStatus });
|
||||
await queryClient.invalidateQueries({ queryKey: ["opsTasks"] });
|
||||
},
|
||||
onError: (err) => {
|
||||
const msg = String(err);
|
||||
|
|
|
|||
|
|
@ -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}·`)) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ export function ParallelEdge({
|
|||
markerEnd,
|
||||
label,
|
||||
labelStyle,
|
||||
labelBgStyle,
|
||||
data,
|
||||
selected,
|
||||
}: EdgeProps) {
|
||||
|
|
@ -41,7 +40,6 @@ export function ParallelEdge({
|
|||
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
||||
pointerEvents: "none",
|
||||
...labelStyle,
|
||||
...(labelBgStyle || {}),
|
||||
}}
|
||||
>
|
||||
{label}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue