Skip to content

Commit 65870e6

Browse files
authored
feat: Move agent status (coder#2593)
* Move agent status * Format
1 parent ac557e0 commit 65870e6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

site/src/components/Resources/Resources.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const Language = {
2121
resourceLabel: "Resource",
2222
agentsLabel: "Agents",
2323
agentLabel: "Agent",
24-
statusLabel: "Status",
2524
accessLabel: "Access",
2625
}
2726

@@ -57,7 +56,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
5756
</Stack>
5857
</TableCell>
5958
{canUpdateWorkspace && <TableCell>{Language.accessLabel}</TableCell>}
60-
<TableCell>{Language.statusLabel}</TableCell>
6159
</TableHeaderRow>
6260
</TableHead>
6361
<TableBody>
@@ -82,6 +80,7 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
8280
)
8381
}
8482

83+
const agentStatus = getDisplayAgentStatus(theme, agent)
8584
return (
8685
<TableRow key={`${resource.id}-${agent.id}`}>
8786
{/* We only want to display the name in the first row because we are using rowSpan */}
@@ -96,6 +95,7 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
9695
<TableCell className={styles.agentColumn}>
9796
{agent.name}
9897
<span className={styles.operatingSystem}>{agent.operating_system}</span>
98+
<span style={{ color: agentStatus.color }}>{agentStatus.status}</span>
9999
</TableCell>
100100
{canUpdateWorkspace && (
101101
<TableCell>
@@ -121,11 +121,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
121121
</Stack>
122122
</TableCell>
123123
)}
124-
<TableCell>
125-
<span style={{ color: getDisplayAgentStatus(theme, agent).color }}>
126-
{getDisplayAgentStatus(theme, agent).status}
127-
</span>
128-
</TableCell>
129124
</TableRow>
130125
)
131126
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy