@@ -105,6 +105,7 @@ data class CoderWorkspacesStepSelection(
105
105
// Pass along the latest workspaces so we can configure the CLI a bit
106
106
// faster, otherwise this step would have to fetch the workspaces again.
107
107
val workspaces : List <Workspace >,
108
+ val remoteProjectPath : String? = null
108
109
)
109
110
110
111
/* *
@@ -147,7 +148,8 @@ class CoderWorkspacesStepView :
147
148
setEmptyState(CoderGatewayBundle .message(" gateway.connector.view.coder.workspaces.connect.text.disconnected" ))
148
149
setSelectionMode(ListSelectionModel .SINGLE_SELECTION )
149
150
selectionModel.addListSelectionListener {
150
- nextButton.isEnabled = selectedObject?.status?.ready() == true && selectedObject?.agent?.operatingSystem == OS .LINUX
151
+ nextButton.isEnabled =
152
+ selectedObject?.status?.ready() == true && selectedObject?.agent?.operatingSystem == OS .LINUX
151
153
if (selectedObject?.status?.ready() == true && selectedObject?.agent?.operatingSystem != OS .LINUX ) {
152
154
notificationBanner.apply {
153
155
component.isVisible = true
@@ -343,22 +345,26 @@ class CoderWorkspacesStepView :
343
345
val maxWait = Duration .ofMinutes(10 )
344
346
while (isActive) { // Wait for the workspace to fully stop.
345
347
delay(timeout.toMillis())
346
- val found = tableOfWorkspaces.items.firstOrNull { it.workspace.id == workspace.id }
348
+ val found =
349
+ tableOfWorkspaces.items.firstOrNull { it.workspace.id == workspace.id }
347
350
when (val status = found?.workspace?.latestBuild?.status) {
348
351
WorkspaceStatus .PENDING , WorkspaceStatus .STOPPING , WorkspaceStatus .RUNNING -> {
349
352
logger.info(" Still waiting for ${workspace.name} to stop before updating" )
350
353
}
354
+
351
355
WorkspaceStatus .STARTING , WorkspaceStatus .FAILED ,
352
356
WorkspaceStatus .CANCELING , WorkspaceStatus .CANCELED ,
353
357
WorkspaceStatus .DELETING , WorkspaceStatus .DELETED ,
354
- -> {
358
+ -> {
355
359
logger.warn(" Canceled ${workspace.name} update due to status change to $status " )
356
360
break
357
361
}
362
+
358
363
null -> {
359
364
logger.warn(" Canceled ${workspace.name} update because it no longer exists" )
360
365
break
361
366
}
367
+
362
368
WorkspaceStatus .STOPPED -> {
363
369
logger.info(" ${workspace.name} has stopped; updating now" )
364
370
c.updateWorkspace(workspace)
@@ -560,7 +566,10 @@ class CoderWorkspacesStepView :
560
566
deploymentURL.host,
561
567
)
562
568
tableOfWorkspaces.setEmptyState(
563
- CoderGatewayBundle .message(" gateway.connector.view.coder.workspaces.connect.text.connecting" , deploymentURL.host),
569
+ CoderGatewayBundle .message(
570
+ " gateway.connector.view.coder.workspaces.connect.text.connecting" ,
571
+ deploymentURL.host
572
+ ),
564
573
)
565
574
566
575
tableOfWorkspaces.listTableModel.items = emptyList()
@@ -600,7 +609,10 @@ class CoderWorkspacesStepView :
600
609
client = authedClient
601
610
602
611
tableOfWorkspaces.setEmptyState(
603
- CoderGatewayBundle .message(" gateway.connector.view.coder.workspaces.connect.text.connected" , deploymentURL.host),
612
+ CoderGatewayBundle .message(
613
+ " gateway.connector.view.coder.workspaces.connect.text.connected" ,
614
+ deploymentURL.host
615
+ ),
604
616
)
605
617
tfUrlComment?.text =
606
618
CoderGatewayBundle .message(
@@ -788,7 +800,8 @@ class WorkspacesTableModel :
788
800
WorkspaceVersionColumnInfo (" Version" ),
789
801
WorkspaceStatusColumnInfo (" Status" ),
790
802
) {
791
- private class WorkspaceIconColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
803
+ private class WorkspaceIconColumnInfo (columnName : String ) :
804
+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
792
805
override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.workspace?.templateName
793
806
794
807
override fun getRenderer (item : WorkspaceAgentListModel ? ): TableCellRenderer {
@@ -820,7 +833,8 @@ class WorkspacesTableModel :
820
833
}
821
834
}
822
835
823
- private class WorkspaceNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
836
+ private class WorkspaceNameColumnInfo (columnName : String ) :
837
+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
824
838
override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.name
825
839
826
840
override fun getComparator (): Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
@@ -850,7 +864,8 @@ class WorkspacesTableModel :
850
864
}
851
865
}
852
866
853
- private class WorkspaceOwnerColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
867
+ private class WorkspaceOwnerColumnInfo (columnName : String ) :
868
+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
854
869
override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.workspace?.ownerName
855
870
856
871
override fun getComparator (): Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
@@ -880,7 +895,8 @@ class WorkspacesTableModel :
880
895
}
881
896
}
882
897
883
- private class WorkspaceTemplateNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
898
+ private class WorkspaceTemplateNameColumnInfo (columnName : String ) :
899
+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
884
900
override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.workspace?.templateName
885
901
886
902
override fun getComparator (): java.util.Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
@@ -909,7 +925,8 @@ class WorkspacesTableModel :
909
925
}
910
926
}
911
927
912
- private class WorkspaceVersionColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
928
+ private class WorkspaceVersionColumnInfo (columnName : String ) :
929
+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
913
930
override fun valueOf (workspace : WorkspaceAgentListModel ? ): String? = if (workspace == null ) {
914
931
" Unknown"
915
932
} else if (workspace.workspace.outdated) {
@@ -940,7 +957,8 @@ class WorkspacesTableModel :
940
957
}
941
958
}
942
959
943
- private class WorkspaceStatusColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
960
+ private class WorkspaceStatusColumnInfo (columnName : String ) :
961
+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
944
962
override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.status?.label
945
963
946
964
override fun getComparator (): java.util.Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
0 commit comments