feat(client): unify section headers on /logs and group titles with their tables
- Apply the eyebrow variant to "Runtime stats" and "Memory & CPU" so /logs sections share the same uppercase header style as Job queue - Pair each section's heading + explainer with its table in a tighter sub-stack so the big gap only sits between sections, not under the explainer - Restore the missing useTheme() call inside TableFailedJobs and TableLogs so the monospace token resolves
This commit is contained in:
1 parent
fc31c53321
commit
71b8fd90b0
4 files changed
+61
-55
No files matched your search
@@ -23,8 +23,8 @@ export const TabDiagnostics = () => {
|
|||||||
<Stack gap={theme.spacing(4)}>
|
<Stack gap={theme.spacing(4)}>
|
||||||
<Stack gap={theme.spacing(1)}>
|
<Stack gap={theme.spacing(1)}>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h6"
|
variant="eyebrow"
|
||||||
sx={{ textTransform: "uppercase" }}
|
color="text.secondary"
|
||||||
>
|
>
|
||||||
{t("pages.logs.diagnostics.sections.runtimeStats.title")}
|
{t("pages.logs.diagnostics.sections.runtimeStats.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -37,8 +37,8 @@ export const TabDiagnostics = () => {
|
|||||||
<Stack gap={theme.spacing(4)}>
|
<Stack gap={theme.spacing(4)}>
|
||||||
<Stack gap={theme.spacing(1)}>
|
<Stack gap={theme.spacing(1)}>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h6"
|
variant="eyebrow"
|
||||||
sx={{ textTransform: "uppercase" }}
|
color="text.secondary"
|
||||||
>
|
>
|
||||||
{t("pages.logs.diagnostics.sections.memoryCpu.title")}
|
{t("pages.logs.diagnostics.sections.memoryCpu.title")}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -43,61 +43,65 @@ export const TabQueue = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack gap={theme.spacing(8)}>
|
<Stack gap={theme.spacing(16)}>
|
||||||
<Metrics metrics={metrics} />
|
<Metrics metrics={metrics} />
|
||||||
<Stack gap={theme.spacing(1)}>
|
<Stack gap={theme.spacing(3)}>
|
||||||
<Typography
|
<Stack gap={theme.spacing(1)}>
|
||||||
variant="eyebrow"
|
<Typography
|
||||||
color="text.secondary"
|
variant="eyebrow"
|
||||||
>
|
color="text.secondary"
|
||||||
{t("pages.logs.jobQueue")}
|
>
|
||||||
</Typography>
|
{t("pages.logs.jobQueue")}
|
||||||
<Typography
|
</Typography>
|
||||||
sx={{
|
<Typography
|
||||||
fontSize: 13,
|
sx={{
|
||||||
color: theme.palette.text.secondary,
|
fontSize: 13,
|
||||||
}}
|
color: theme.palette.text.secondary,
|
||||||
>
|
|
||||||
<Trans
|
|
||||||
i18nKey="pages.logs.jobQueueExplainer"
|
|
||||||
components={{
|
|
||||||
highlight: (
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={{
|
|
||||||
backgroundColor:
|
|
||||||
theme.palette.mode === "dark"
|
|
||||||
? "rgba(19, 113, 91, 0.18)"
|
|
||||||
: "#ECF7F2",
|
|
||||||
color: theme.palette.text.primary,
|
|
||||||
px: 1,
|
|
||||||
py: 0.25,
|
|
||||||
borderRadius: 0.5,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
</Typography>
|
<Trans
|
||||||
|
i18nKey="pages.logs.jobQueueExplainer"
|
||||||
|
components={{
|
||||||
|
highlight: (
|
||||||
|
<Box
|
||||||
|
component="span"
|
||||||
|
sx={{
|
||||||
|
backgroundColor:
|
||||||
|
theme.palette.mode === "dark"
|
||||||
|
? "rgba(19, 113, 91, 0.18)"
|
||||||
|
: "#ECF7F2",
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
px: 1,
|
||||||
|
py: 0.25,
|
||||||
|
borderRadius: 0.5,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
<TableJobs jobs={jobs} />
|
||||||
</Stack>
|
</Stack>
|
||||||
<TableJobs jobs={jobs} />
|
<Stack gap={theme.spacing(3)}>
|
||||||
<Stack gap={theme.spacing(1)}>
|
<Stack gap={theme.spacing(1)}>
|
||||||
<Typography
|
<Typography
|
||||||
variant="eyebrow"
|
variant="eyebrow"
|
||||||
color="text.secondary"
|
color="text.secondary"
|
||||||
>
|
>
|
||||||
{t("pages.logs.failedJobs")}
|
{t("pages.logs.failedJobs")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("pages.logs.failedJobsExplainer")}
|
{t("pages.logs.failedJobsExplainer")}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
<TableFailedJobs metrics={metrics} />
|
||||||
</Stack>
|
</Stack>
|
||||||
<TableFailedJobs metrics={metrics} />
|
|
||||||
<Stack alignItems={"flex-end"}>
|
<Stack alignItems={"flex-end"}>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ interface TableFailedJobsProps {
|
|||||||
}
|
}
|
||||||
export const TableFailedJobs = ({ metrics }: TableFailedJobsProps) => {
|
export const TableFailedJobs = ({ metrics }: TableFailedJobsProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const theme = useTheme();
|
||||||
if (!metrics) {
|
if (!metrics) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ const LevelBadge = ({ level }: { level: LogLevel }) => {
|
|||||||
|
|
||||||
export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) => {
|
export const TableLogs = ({ logs, logCount, page, setPage }: TableLogsProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const theme = useTheme();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const rowsPerPage = useSelector(
|
const rowsPerPage = useSelector(
|
||||||
(state: RootState) => state?.ui?.logs?.rowsPerPage ?? 15
|
(state: RootState) => state?.ui?.logs?.rowsPerPage ?? 15
|
||||||
|
|||||||
Reference in new issue
Block a user