Skip to content

fix: reduce spacing when agent metadata doesn't exist #6937

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 5 commits into from
Mar 31, 2023
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
Next Next commit
fix: reduce spacing when agent metadata doesn't exist
  • Loading branch information
kylecarbs committed Mar 31, 2023
commit 4ad9003d90e3de9b93aa0cfe15c34d49b294269e
13 changes: 12 additions & 1 deletion site/src/components/Resources/AgentMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,16 @@ export const AgentMetadata: FC<{
}, [agent.id, watchAgentMetadata])

if (metadata === undefined) {
return <CircularProgress size={16} />
return (
<div
style={{
marginTop: 16,
marginBottom: 16,
}}
>
<CircularProgress size={16} />
</div>
)
}

return <AgentMetadataView metadata={metadata} />
Expand All @@ -264,6 +273,8 @@ const useStyles = makeStyles((theme) => ({
border: `2px dashed ${theme.palette.divider}`,
borderRadius: theme.shape.borderRadius,
width: "100%",
marginTop: theme.spacing(2),
marginBottom: theme.spacing(2),
},
metadataHeader: {
padding: "8px",
Expand Down
8 changes: 2 additions & 6 deletions site/src/components/Resources/AgentRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,7 @@ export const AgentRow: FC<AgentRowProps> = ({
<div className={styles.agentStatusWrapper}>
<AgentStatus agent={agent} />
</div>
<Stack
direction="column"
alignItems="flex-start"
key={agent.id}
spacing={2}
<div
style={{
flex: 1,
}}
Expand Down Expand Up @@ -364,7 +360,7 @@ export const AgentRow: FC<AgentRowProps> = ({
</Popover>
</Stack>
)}
</Stack>
</div>
</Stack>
{showStartupLogs && (
<AutoSizer disableHeight>
Expand Down