Skip to content

Commit

Permalink
Fix logs number
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrelefevre committed Dec 14, 2023
1 parent 8c2cbd5 commit 83555b9
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/pages/edit/deployments/LogsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const LogsView = ({ deployment }) => {
() => {
if (logs.length > 1000) {
setViewableLogs(logs.slice(logs.length - 1000, logs.length));
}else{
} else {
setViewableLogs(logs);
}

Expand All @@ -133,7 +133,26 @@ export const LogsView = ({ deployment }) => {

return (
<Card sx={{ boxShadow: 20 }}>
<CardHeader title={t("logs")} subheader={t("logs-subheader") + logs.length} />
<CardHeader
title={t("logs")}
subheader={
<>
{t("logs-subheader") +
" " +
t("admin-showing") +
" " +
viewableLogs.length +
"/" +
logs.length}{" "}
{logs.length > 1000 && (
<>
<br />
{t("logs-truncated")}
</>
)}
</>
}
/>

<CardContent>
<Stack direction="column" spacing={2}>
Expand Down

0 comments on commit 83555b9

Please sign in to comment.