From 7d91d9e28b26d770c4747503abd991fa5c5afc7d Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Sat, 25 Apr 2026 23:27:50 -0400 Subject: [PATCH] fix(client): job queue table layout + theme-aware running-row tint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TableJobs: - Cut from 11 to 7 columns, dropping active / runCount / failCount / lastFinishedAt (covered by Failed jobs table or by lastRun + lastRunTook). - All cells get whiteSpace:nowrap + textOverflow:ellipsis + maxWidth so long timestamps and IDs no longer wrap and inflate row height; full value visible via title tooltip. - Running-row tint: was theme.palette.success.light (too saturated in light, drowns white text in dark). Now #ECF7F2 in light, an 18%-alpha green in dark — readable in both modes. TabQueue: - One-line explainer above the Job queue heading, with the words "Highlighted rows" wrapped in the same green tint so the meaning is immediately associated. - One-line explainer above Failed jobs heading too. --- .../src/Pages/Logs/components/TableJobs.tsx | 85 +++++++++++-------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/client/src/Pages/Logs/components/TableJobs.tsx b/client/src/Pages/Logs/components/TableJobs.tsx index 660a5df4f..0a1ff3098 100644 --- a/client/src/Pages/Logs/components/TableJobs.tsx +++ b/client/src/Pages/Logs/components/TableJobs.tsx @@ -22,77 +22,92 @@ export const TableJobs = ({ jobs }: TableJobsProps) => { id: job.monitorId, })); + const cellSx = { + whiteSpace: "nowrap" as const, + overflow: "hidden", + textOverflow: "ellipsis", + maxWidth: 220, + }; + const headers: Header[] = [ { id: "id", content: t("common.table.headers.monitorId"), - render: (row) => {row.monitorId}, + render: (row) => ( + + {row.monitorId} + + ), }, { id: "url", content: t("common.table.headers.url"), - render: (row) => {row.monitorUrl}, - }, - { - id: "interval", - content: t("common.table.headers.interval"), render: (row) => ( - {prettyMilliseconds(row.monitorInterval ?? 0)} + + {row.monitorUrl} + ), }, { id: "type", content: t("common.table.headers.type"), - render: (row) => {row.monitorType}, + render: (row) => {row.monitorType}, }, { - id: "active", - content: t("common.table.headers.active"), - render: (row) => {row.active.toString()}, - }, - { - id: "runCount", - content: t("pages.logs.table.headers.runCount"), - render: (row) => {row.runCount}, - }, - { - id: "failCount", - content: t("pages.logs.table.headers.failCount"), - render: (row) => {row.failCount}, + id: "interval", + content: t("common.table.headers.interval"), + render: (row) => ( + {prettyMilliseconds(row.monitorInterval ?? 0)} + ), }, { id: "lastRun", content: t("pages.logs.table.headers.lastRunAt"), - render: (row) => {formatTimestamp(row.lastRunAt)}, - }, - { - id: "lockedAt", - content: t("pages.logs.table.headers.lockedAt"), - render: (row) => {formatTimestamp(row.lockedAt)}, - }, - - { - id: "lastFinish", - content: t("pages.logs.table.headers.lastFinishedAt"), - render: (row) => {formatTimestamp(row.lastFinishedAt)}, + render: (row) => { + const v = formatTimestamp(row.lastRunAt) ?? "-"; + return ( + + {v} + + ); + }, }, { id: "lastRunTook", content: t("pages.logs.table.headers.lastRunTook"), render: (row) => { const value = row.lastRunTook ? prettyMilliseconds(row.lastRunTook) : "-"; - return {value}; + return {value}; + }, + }, + { + id: "lockedAt", + content: t("pages.logs.table.headers.lockedAt"), + render: (row) => { + const v = formatTimestamp(row.lockedAt) ?? "-"; + return ( + + {v} + + ); }, }, ]; + const isDark = theme.palette.mode === "dark"; + const runningBg = isDark ? "rgba(19, 113, 91, 0.18)" : "#ECF7F2"; + return ( ({ ...(row.lockedAt && { - "& td": { backgroundColor: theme.palette.success.light }, + "& td": { backgroundColor: runningBg }, }), })} />