Skip to content

Commit

Permalink
fix logs not showing when under 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrelefevre committed Dec 14, 2023
1 parent 805f6ec commit 8c2cbd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/edit/deployments/LogsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export const LogsView = ({ deployment }) => {
() => {
if (logs.length > 1000) {
setViewableLogs(logs.slice(logs.length - 1000, logs.length));
}else{
setViewableLogs(logs);
}

if (autoScroll && last && last.current) {
Expand All @@ -131,7 +133,7 @@ export const LogsView = ({ deployment }) => {

return (
<Card sx={{ boxShadow: 20 }}>
<CardHeader title={t("logs")} subheader={t("logs-subheader")} />
<CardHeader title={t("logs")} subheader={t("logs-subheader") + logs.length} />

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

0 comments on commit 8c2cbd5

Please sign in to comment.