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)
207
207
// For every stopped workspace that doesn't have any agents, add a
208
208
// dummy agent row.
209
209
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 ) ) )
211
211
{
212
212
if ( ! Uuid . TryFrom ( workspace . Id . Span , out var uuid ) )
213
213
continue ;
@@ -372,4 +372,21 @@ public void Exit()
372
372
{
373
373
_ = ( ( App ) Application . Current ) . ExitApplication ( ) ;
374
374
}
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
+ }
375
392
}
You can’t perform that action at this time.
0 commit comments