File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
site/src/pages/WorkspacePage Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,16 @@ type Story = StoryObj<typeof Workspace>;
6363
6464export const Running : Story = {
6565 args : {
66- workspace : Mocks . MockWorkspace ,
66+ workspace : {
67+ ...Mocks . MockWorkspace ,
68+ latest_build : {
69+ ...Mocks . MockWorkspace . latest_build ,
70+ matched_provisioners : {
71+ count : 0 ,
72+ available : 0 ,
73+ } ,
74+ } ,
75+ } ,
6776 handleStart : action ( "start" ) ,
6877 handleStop : action ( "stop" ) ,
6978 buildInfo : Mocks . MockBuildInfo ,
Original file line number Diff line number Diff line change @@ -110,13 +110,13 @@ export const Workspace: FC<WorkspaceProps> = ({
110110 ( r ) => resourceOptionValue ( r ) === resourcesNav . value ,
111111 ) ;
112112
113- const shouldDisplayBuildLogs =
114- ( buildLogs ?? [ ] ) . length > 0 && workspace . latest_build . status !== "running" ;
115-
113+ const workspaceRunning = workspace . latest_build . status === "running" ;
114+ const haveBuildLogs = ( buildLogs ?? [ ] ) . length > 0 ;
116115 const provisionersHealthy =
117116 ( workspace . latest_build . matched_provisioners ?. available ?? 0 ) > 0 ;
117+ const shouldDisplayBuildLogs = haveBuildLogs && ! workspaceRunning ;
118118 const shouldShowProvisionerAlert =
119- ! provisionersHealthy && ( ! buildLogs || buildLogs . length === 0 ) ;
119+ ! workspaceRunning && ! haveBuildLogs && ! provisionersHealthy ;
120120
121121 return (
122122 < div
You can’t perform that action at this time.
0 commit comments