@@ -105,6 +105,7 @@ data class CoderWorkspacesStepSelection(
105105 // Pass along the latest workspaces so we can configure the CLI a bit
106106 // faster, otherwise this step would have to fetch the workspaces again.
107107 val workspaces : List <Workspace >,
108+ val remoteProjectPath : String? = null
108109)
109110
110111/* *
@@ -147,7 +148,8 @@ class CoderWorkspacesStepView :
147148 setEmptyState(CoderGatewayBundle .message(" gateway.connector.view.coder.workspaces.connect.text.disconnected" ))
148149 setSelectionMode(ListSelectionModel .SINGLE_SELECTION )
149150 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
151153 if (selectedObject?.status?.ready() == true && selectedObject?.agent?.operatingSystem != OS .LINUX ) {
152154 notificationBanner.apply {
153155 component.isVisible = true
@@ -343,22 +345,26 @@ class CoderWorkspacesStepView :
343345 val maxWait = Duration .ofMinutes(10 )
344346 while (isActive) { // Wait for the workspace to fully stop.
345347 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 }
347350 when (val status = found?.workspace?.latestBuild?.status) {
348351 WorkspaceStatus .PENDING , WorkspaceStatus .STOPPING , WorkspaceStatus .RUNNING -> {
349352 logger.info(" Still waiting for ${workspace.name} to stop before updating" )
350353 }
354+
351355 WorkspaceStatus .STARTING , WorkspaceStatus .FAILED ,
352356 WorkspaceStatus .CANCELING , WorkspaceStatus .CANCELED ,
353357 WorkspaceStatus .DELETING , WorkspaceStatus .DELETED ,
354- -> {
358+ -> {
355359 logger.warn(" Canceled ${workspace.name} update due to status change to $status " )
356360 break
357361 }
362+
358363 null -> {
359364 logger.warn(" Canceled ${workspace.name} update because it no longer exists" )
360365 break
361366 }
367+
362368 WorkspaceStatus .STOPPED -> {
363369 logger.info(" ${workspace.name} has stopped; updating now" )
364370 c.updateWorkspace(workspace)
@@ -560,7 +566,10 @@ class CoderWorkspacesStepView :
560566 deploymentURL.host,
561567 )
562568 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+ ),
564573 )
565574
566575 tableOfWorkspaces.listTableModel.items = emptyList()
@@ -600,7 +609,10 @@ class CoderWorkspacesStepView :
600609 client = authedClient
601610
602611 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+ ),
604616 )
605617 tfUrlComment?.text =
606618 CoderGatewayBundle .message(
@@ -788,7 +800,8 @@ class WorkspacesTableModel :
788800 WorkspaceVersionColumnInfo (" Version" ),
789801 WorkspaceStatusColumnInfo (" Status" ),
790802 ) {
791- private class WorkspaceIconColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
803+ private class WorkspaceIconColumnInfo (columnName : String ) :
804+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
792805 override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.workspace?.templateName
793806
794807 override fun getRenderer (item : WorkspaceAgentListModel ? ): TableCellRenderer {
@@ -820,7 +833,8 @@ class WorkspacesTableModel :
820833 }
821834 }
822835
823- private class WorkspaceNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
836+ private class WorkspaceNameColumnInfo (columnName : String ) :
837+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
824838 override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.name
825839
826840 override fun getComparator (): Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
@@ -850,7 +864,8 @@ class WorkspacesTableModel :
850864 }
851865 }
852866
853- private class WorkspaceOwnerColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
867+ private class WorkspaceOwnerColumnInfo (columnName : String ) :
868+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
854869 override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.workspace?.ownerName
855870
856871 override fun getComparator (): Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
@@ -880,7 +895,8 @@ class WorkspacesTableModel :
880895 }
881896 }
882897
883- private class WorkspaceTemplateNameColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
898+ private class WorkspaceTemplateNameColumnInfo (columnName : String ) :
899+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
884900 override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.workspace?.templateName
885901
886902 override fun getComparator (): java.util.Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
@@ -909,7 +925,8 @@ class WorkspacesTableModel :
909925 }
910926 }
911927
912- private class WorkspaceVersionColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
928+ private class WorkspaceVersionColumnInfo (columnName : String ) :
929+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
913930 override fun valueOf (workspace : WorkspaceAgentListModel ? ): String? = if (workspace == null ) {
914931 " Unknown"
915932 } else if (workspace.workspace.outdated) {
@@ -940,7 +957,8 @@ class WorkspacesTableModel :
940957 }
941958 }
942959
943- private class WorkspaceStatusColumnInfo (columnName : String ) : ColumnInfo<WorkspaceAgentListModel, String>(columnName) {
960+ private class WorkspaceStatusColumnInfo (columnName : String ) :
961+ ColumnInfo <WorkspaceAgentListModel , String >(columnName) {
944962 override fun valueOf (item : WorkspaceAgentListModel ? ): String? = item?.status?.label
945963
946964 override fun getComparator (): java.util.Comparator <WorkspaceAgentListModel > = Comparator { a, b ->
0 commit comments