mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(site): add restart button when workspace is unhealthy (#8765)
This commit is contained in:
@@ -220,7 +220,20 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
|
|||||||
{cancellationError}
|
{cancellationError}
|
||||||
{workspace.latest_build.status === "running" &&
|
{workspace.latest_build.status === "running" &&
|
||||||
!workspace.health.healthy && (
|
!workspace.health.healthy && (
|
||||||
<Alert severity="warning">
|
<Alert
|
||||||
|
severity="warning"
|
||||||
|
actions={
|
||||||
|
<Button
|
||||||
|
variant="text"
|
||||||
|
size="small"
|
||||||
|
onClick={() => {
|
||||||
|
handleRestart()
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Restart
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
>
|
||||||
<AlertTitle>Workspace is unhealthy</AlertTitle>
|
<AlertTitle>Workspace is unhealthy</AlertTitle>
|
||||||
<AlertDetail>
|
<AlertDetail>
|
||||||
Your workspace is running but{" "}
|
Your workspace is running but{" "}
|
||||||
|
|||||||
Reference in New Issue
Block a user