Skip to content

Commit 99e9cff

Browse files
committed
Move agent status
1 parent caf9c41 commit 99e9cff

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

site/src/components/Resources/Resources.tsx

Lines changed: 5 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 */}
@@ -90,12 +89,16 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
9089
<TableCell className={styles.resourceNameCell} rowSpan={agents.length}>
9190
{resource.name}
9291
<span className={styles.resourceType}>{resource.type}</span>
92+
9393
</TableCell>
9494
)}
9595

9696
<TableCell className={styles.agentColumn}>
9797
{agent.name}
9898
<span className={styles.operatingSystem}>{agent.operating_system}</span>
99+
<span style={{ color: agentStatus.color }}>
100+
{agentStatus.status}
101+
</span>
99102
</TableCell>
100103
{canUpdateWorkspace && (
101104
<TableCell>
@@ -121,11 +124,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
121124
</Stack>
122125
</TableCell>
123126
)}
124-
<TableCell>
125-
<span style={{ color: getDisplayAgentStatus(theme, agent).color }}>
126-
{getDisplayAgentStatus(theme, agent).status}
127-
</span>
128-
</TableCell>
129127
</TableRow>
130128
)
131129
})

0 commit comments

Comments
 (0)