diff --git a/components/dashboard/src/start/StartWorkspace.tsx b/components/dashboard/src/start/StartWorkspace.tsx index 352ae2bb43aeca..3397d789558c3c 100644 --- a/components/dashboard/src/start/StartWorkspace.tsx +++ b/components/dashboard/src/start/StartWorkspace.tsx @@ -201,7 +201,7 @@ export default class StartWorkspace extends React.Component this.startWorkspace(true, true)} />; + return ; // Pending means the workspace does not yet consume resources in the cluster, but rather is looking for // some space within the cluster. If for example the cluster needs to scale up to accomodate the @@ -267,7 +267,11 @@ export default class StartWorkspace extends React.Component this.startWorkspace(true, true)} phase={phase} error={error} />; + const restartWithDefaultImage = (event: React.MouseEvent) => { + (event.target as HTMLButtonElement).disabled = true; + this.startWorkspace(true, true); + } + return ; } if (!isHeadless && this.state.workspaceInstance.status.conditions.timeout) { title = 'Timed Out'; @@ -297,7 +301,7 @@ export default class StartWorkspace extends React.Component void; + onStartWithDefaultImage?: (event: React.MouseEvent) => void; phase?: StartPhase; error?: StartWorkspaceError; } @@ -329,7 +333,7 @@ function ImageBuildView(props: ImageBuildViewProps) { }> - + {!!props.onStartWithDefaultImage && } ; }