Skip to content

feat(site): show previous agent scripts logs #12233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor visual tweaks
  • Loading branch information
BrunoQuaresma committed Feb 20, 2024
commit 67bf84b2fe8a7caca017c864ecb68beb08628d5f
2 changes: 1 addition & 1 deletion site/src/modules/workspaces/WorkspaceBuildLogs/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const styles = {
height: "auto",
// Whitespace is significant in terminal output for alignment
whiteSpace: "pre",
padding: `0 ${DEFAULT_LOG_LINE_SIDE_PADDING}px`,
padding: `0 var(--log-line-side-padding, ${DEFAULT_LOG_LINE_SIDE_PADDING}px)`,

"&.error": {
backgroundColor: theme.roles.error.background,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ const styles = {
header: (theme) => ({
fontSize: 13,
fontWeight: 600,
padding: `4px ${DEFAULT_LOG_LINE_SIDE_PADDING}px`,
padding: `12px var(--log-line-side-padding, ${DEFAULT_LOG_LINE_SIDE_PADDING}px)`,
display: "flex",
alignItems: "center",
fontFamily: BODY_FONT_FAMILY,
borderBottom: `1px solid ${theme.palette.divider}`,
background: theme.palette.background.default,
lineHeight: "1",

"&:last-child": {
borderBottom: 0,
Expand Down
13 changes: 12 additions & 1 deletion site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,18 @@ const BuildLogsContent: FC<{ logs?: ProvisionerJobLog[] }> = ({ logs }) => {
}

return (
<WorkspaceBuildLogs css={{ border: 0 }} logs={sortLogsByCreatedAt(logs)} />
<WorkspaceBuildLogs
css={{
border: 0,
"--log-line-side-padding": "16px",
// Add extra spacing to the first log header to prevent it from being
// too close to the tabs
"& .logs-header:first-of-type": {
paddingTop: 16,
},
}}
logs={sortLogsByCreatedAt(logs)}
/>
);
};

Expand Down