File tree 1 file changed +9
-1
lines changed
src/main/kotlin/com/coder/gateway/views
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -158,9 +158,17 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
158
158
recentWorkspacesContentPanel.viewport.view =
159
159
panel {
160
160
connectionsByDeployment.forEach { (deploymentURL, connectionsByWorkspace) ->
161
+ var first = true
161
162
val deployment = deployments[deploymentURL.toString()]
162
163
val deploymentError = deployment?.error
163
164
connectionsByWorkspace.forEach { (workspaceName, connections) ->
165
+ // Show the error at the top of each deployment list.
166
+ val showError = if (first) {
167
+ first = false
168
+ true
169
+ } else {
170
+ false
171
+ }
164
172
val workspaceWithAgent = deployment?.items?.firstOrNull { it.workspace.name == workspaceName }
165
173
val status =
166
174
if (deploymentError != null ) {
@@ -246,7 +254,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
246
254
},
247
255
)
248
256
}.topGap(gap)
249
- if (gap == TopGap . NONE ) { // Show the error once at the top.
257
+ if (showError ) {
250
258
row {
251
259
// There must be a way to make this properly wrap?
252
260
label(" <html><body style='width:350px;'>" + status.third + " </html>" ).applyToComponent {
You can’t perform that action at this time.
0 commit comments