File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ private void UpdateFromRpcModel(RpcModel rpcModel)
207207 // For every stopped workspace that doesn't have any agents, add a
208208 // dummy agent row.
209209 foreach ( var workspace in rpcModel . Workspaces . Where ( w =>
210- w . Status == Workspace . Types . Status . Stopped && ! workspacesWithAgents . Contains ( w . Id ) ) )
210+ ShouldShowDummy ( w ) && ! workspacesWithAgents . Contains ( w . Id ) ) )
211211 {
212212 if ( ! Uuid . TryFrom ( workspace . Id . Span , out var uuid ) )
213213 continue ;
@@ -372,4 +372,21 @@ public void Exit()
372372 {
373373 _ = ( ( App ) Application . Current ) . ExitApplication ( ) ;
374374 }
375+
376+ private static bool ShouldShowDummy ( Workspace workspace )
377+ {
378+ switch ( workspace . Status )
379+ {
380+ case Workspace . Types . Status . Unknown :
381+ case Workspace . Types . Status . Pending :
382+ case Workspace . Types . Status . Starting :
383+ case Workspace . Types . Status . Stopping :
384+ case Workspace . Types . Status . Stopped :
385+ return true ;
386+ // TODO: should we include and show a different color than Gray for workspaces that are
387+ // failed, canceled or deleting?
388+ default :
389+ return false ;
390+ }
391+ }
375392}
You can’t perform that action at this time.
0 commit comments