feat(site): add restart button when workspace is unhealthy (#8765)

This commit is contained in:
Bruno Quaresma
2023-07-27 09:20:24 -03:00
committed by GitHub
parent f54d385266
commit e85b88ca90

View File

@ -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{" "}