mirror of
https://github.com/coder/coder.git
synced 2026-10-29 17:44:33 +08:00
@@ -21,7 +21,6 @@ const Language = {
|
|||||||
resourceLabel: "Resource",
|
resourceLabel: "Resource",
|
||||||
agentsLabel: "Agents",
|
agentsLabel: "Agents",
|
||||||
agentLabel: "Agent",
|
agentLabel: "Agent",
|
||||||
statusLabel: "Status",
|
|
||||||
accessLabel: "Access",
|
accessLabel: "Access",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +56,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
|
|||||||
</Stack>
|
</Stack>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{canUpdateWorkspace && <TableCell>{Language.accessLabel}</TableCell>}
|
{canUpdateWorkspace && <TableCell>{Language.accessLabel}</TableCell>}
|
||||||
<TableCell>{Language.statusLabel}</TableCell>
|
|
||||||
</TableHeaderRow>
|
</TableHeaderRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
@@ -82,6 +80,7 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const agentStatus = getDisplayAgentStatus(theme, agent)
|
||||||
return (
|
return (
|
||||||
<TableRow key={`${resource.id}-${agent.id}`}>
|
<TableRow key={`${resource.id}-${agent.id}`}>
|
||||||
{/* We only want to display the name in the first row because we are using rowSpan */}
|
{/* 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
|
|||||||
<TableCell className={styles.agentColumn}>
|
<TableCell className={styles.agentColumn}>
|
||||||
{agent.name}
|
{agent.name}
|
||||||
<span className={styles.operatingSystem}>{agent.operating_system}</span>
|
<span className={styles.operatingSystem}>{agent.operating_system}</span>
|
||||||
|
<span style={{ color: agentStatus.color }}>{agentStatus.status}</span>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{canUpdateWorkspace && (
|
{canUpdateWorkspace && (
|
||||||
<TableCell>
|
<TableCell>
|
||||||
@@ -121,11 +121,6 @@ export const Resources: FC<ResourcesProps> = ({ resources, getResourcesError, wo
|
|||||||
</Stack>
|
</Stack>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
)}
|
)}
|
||||||
<TableCell>
|
|
||||||
<span style={{ color: getDisplayAgentStatus(theme, agent).color }}>
|
|
||||||
{getDisplayAgentStatus(theme, agent).status}
|
|
||||||
</span>
|
|
||||||
</TableCell>
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user