Skip to content

Commit e85b88c

Browse files
feat(site): add restart button when workspace is unhealthy (coder#8765)
1 parent f54d385 commit e85b88c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

site/src/components/Workspace/Workspace.tsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,20 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
220220
{cancellationError}
221221
{workspace.latest_build.status === "running" &&
222222
!workspace.health.healthy && (
223-
<Alert severity="warning">
223+
<Alert
224+
severity="warning"
225+
actions={
226+
<Button
227+
variant="text"
228+
size="small"
229+
onClick={() => {
230+
handleRestart()
231+
}}
232+
>
233+
Restart
234+
</Button>
235+
}
236+
>
224237
<AlertTitle>Workspace is unhealthy</AlertTitle>
225238
<AlertDetail>
226239
Your workspace is running but{" "}

0 commit comments

Comments
 (0)