Skip to content

feat: Move agent status #2593

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 2 commits into from
Jun 23, 2022
Merged
Changes from all commits
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
9 changes: 2 additions & 7 deletions site/src/components/Resources/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const Language = {
resourceLabel: "Resource",
agentsLabel: "Agents",
agentLabel: "Agent",
statusLabel: "Status",
accessLabel: "Access",
}

Expand Down Expand Up @@ -57,7 +56,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
</Stack>
</TableCell>
{canUpdateWorkspace && <TableCell>{Language.accessLabel}</TableCell>}
<TableCell>{Language.statusLabel}</TableCell>
</TableHeaderRow>
</TableHead>
<TableBody>
Expand All @@ -82,6 +80,7 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
)
}

const agentStatus = getDisplayAgentStatus(theme, agent)
return (
<TableRow key={`${resource.id}-${agent.id}`}>
{/* We only want to display the name in the first row because we are using rowSpan */}
Expand All @@ -96,6 +95,7 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
<TableCell className={styles.agentColumn}>
{agent.name}
<span className={styles.operatingSystem}>{agent.operating_system}</span>
<span style={{ color: agentStatus.color }}>{agentStatus.status}</span>
</TableCell>
{canUpdateWorkspace && (
<TableCell>
Expand All @@ -121,11 +121,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
</Stack>
</TableCell>
)}
<TableCell>
<span style={{ color: getDisplayAgentStatus(theme, agent).color }}>
{getDisplayAgentStatus(theme, agent).status}
</span>
</TableCell>
</TableRow>
)
})
Expand Down