@@ -182,101 +182,97 @@ export const Workspace: FC<WorkspaceProps> = ({
182
182
< HistorySidebar workspace = { workspace } />
183
183
) }
184
184
185
- < div css = { styles . content } >
186
- < div css = { styles . dotBackground } >
187
- { selectedResource && (
188
- < ResourceMetadata
189
- resource = { selectedResource }
190
- css = { { margin : "-48px 0 24px -48px" } }
185
+ < div css = { [ styles . content , styles . dotsBackground ] } >
186
+ { selectedResource && (
187
+ < ResourceMetadata
188
+ resource = { selectedResource }
189
+ css = { { margin : "-32px -32px 0 -32px" , marginBottom : 24 } }
190
+ />
191
+ ) }
192
+ < div
193
+ css = { {
194
+ display : "flex" ,
195
+ flexDirection : "column" ,
196
+ gap : 24 ,
197
+ maxWidth : 24 * 50 ,
198
+ margin : "auto" ,
199
+ } }
200
+ >
201
+ { workspace . latest_build . status === "deleted" && (
202
+ < WorkspaceDeletedBanner
203
+ handleClick = { ( ) => navigate ( `/templates` ) }
191
204
/>
192
205
) }
193
- < div
194
- css = { {
195
- display : "flex" ,
196
- flexDirection : "column" ,
197
- gap : 24 ,
198
- maxWidth : 24 * 50 ,
199
- margin : "auto" ,
200
- } }
201
- >
202
- { workspace . latest_build . status === "deleted" && (
203
- < WorkspaceDeletedBanner
204
- handleClick = { ( ) => navigate ( `/templates` ) }
205
- />
206
- ) }
207
206
208
- { workspace . latest_build . job . error && (
209
- < Alert
210
- severity = "error"
211
- actions = {
212
- < Button
213
- onClick = {
214
- canRetryDebugMode
215
- ? handleBuildRetryDebug
216
- : handleBuildRetry
217
- }
218
- variant = "text"
219
- size = "small"
220
- >
221
- Retry{ canRetryDebugMode && " in debug mode" }
222
- </ Button >
223
- }
224
- >
225
- < AlertTitle > Workspace build failed</ AlertTitle >
226
- < AlertDetail > { workspace . latest_build . job . error } </ AlertDetail >
227
- </ Alert >
228
- ) }
207
+ { workspace . latest_build . job . error && (
208
+ < Alert
209
+ severity = "error"
210
+ actions = {
211
+ < Button
212
+ onClick = {
213
+ canRetryDebugMode ? handleBuildRetryDebug : handleBuildRetry
214
+ }
215
+ variant = "text"
216
+ size = "small"
217
+ >
218
+ Retry{ canRetryDebugMode && " in debug mode" }
219
+ </ Button >
220
+ }
221
+ >
222
+ < AlertTitle > Workspace build failed</ AlertTitle >
223
+ < AlertDetail > { workspace . latest_build . job . error } </ AlertDetail >
224
+ </ Alert >
225
+ ) }
229
226
230
- { transitionStats !== undefined && (
231
- < WorkspaceBuildProgress
232
- workspace = { workspace }
233
- transitionStats = { transitionStats }
234
- />
235
- ) }
227
+ { transitionStats !== undefined && (
228
+ < WorkspaceBuildProgress
229
+ workspace = { workspace }
230
+ transitionStats = { transitionStats }
231
+ />
232
+ ) }
236
233
237
- { buildLogs }
234
+ { buildLogs }
238
235
239
- { selectedResource && (
240
- < section
241
- css = { { display : "flex" , flexDirection : "column" , gap : 24 } }
242
- >
243
- { selectedResource . agents ?. map ( ( agent ) => (
244
- < AgentRow
245
- key = { agent . id }
246
- agent = { agent }
247
- workspace = { workspace }
248
- sshPrefix = { sshPrefix }
249
- showApps = { permissions . updateWorkspace }
250
- showBuiltinApps = { permissions . updateWorkspace }
251
- hideSSHButton = { hideSSHButton }
252
- hideVSCodeDesktopButton = { hideVSCodeDesktopButton }
253
- serverVersion = { buildInfo ?. version || "" }
254
- serverAPIVersion = { buildInfo ?. agent_api_version || "" }
255
- onUpdateAgent = { handleUpdate } // On updating the workspace the agent version is also updated
256
- />
257
- ) ) }
236
+ { selectedResource && (
237
+ < section
238
+ css = { { display : "flex" , flexDirection : "column" , gap : 24 } }
239
+ >
240
+ { selectedResource . agents ?. map ( ( agent ) => (
241
+ < AgentRow
242
+ key = { agent . id }
243
+ agent = { agent }
244
+ workspace = { workspace }
245
+ sshPrefix = { sshPrefix }
246
+ showApps = { permissions . updateWorkspace }
247
+ showBuiltinApps = { permissions . updateWorkspace }
248
+ hideSSHButton = { hideSSHButton }
249
+ hideVSCodeDesktopButton = { hideVSCodeDesktopButton }
250
+ serverVersion = { buildInfo ?. version || "" }
251
+ serverAPIVersion = { buildInfo ?. agent_api_version || "" }
252
+ onUpdateAgent = { handleUpdate } // On updating the workspace the agent version is also updated
253
+ />
254
+ ) ) }
258
255
259
- { ( ! selectedResource . agents ||
260
- selectedResource . agents ?. length === 0 ) && (
261
- < div
262
- css = { {
263
- display : "flex" ,
264
- justifyContent : "center" ,
265
- alignItems : "center" ,
266
- width : "100%" ,
267
- height : "100%" ,
268
- } }
269
- >
270
- < div >
271
- < h4 css = { { fontSize : 16 , fontWeight : 500 } } >
272
- No agents are currently assigned to this resource.
273
- </ h4 >
274
- </ div >
256
+ { ( ! selectedResource . agents ||
257
+ selectedResource . agents ?. length === 0 ) && (
258
+ < div
259
+ css = { {
260
+ display : "flex" ,
261
+ justifyContent : "center" ,
262
+ alignItems : "center" ,
263
+ width : "100%" ,
264
+ height : "100%" ,
265
+ } }
266
+ >
267
+ < div >
268
+ < h4 css = { { fontSize : 16 , fontWeight : 500 } } >
269
+ No agents are currently assigned to this resource.
270
+ </ h4 >
275
271
</ div >
276
- ) }
277
- </ section >
278
- ) }
279
- </ div >
272
+ </ div >
273
+ ) }
274
+ </ section >
275
+ ) }
280
276
</ div >
281
277
</ div >
282
278
</ div >
@@ -289,26 +285,24 @@ const countAgents = (resource: TypesGen.WorkspaceResource) => {
289
285
290
286
const styles = {
291
287
content : {
292
- padding : 24 ,
288
+ padding : 32 ,
293
289
gridArea : "content" ,
294
290
overflowY : "auto" ,
295
291
position : "relative" ,
296
292
} ,
297
293
298
- dotBackground : ( theme ) => ( {
299
- minHeight : "100%" ,
300
- padding : 23 ,
294
+ dotsBackground : ( theme ) => ( {
301
295
"--d" : "1px" ,
302
296
background : `
303
297
radial-gradient(
304
298
circle at
305
299
var(--d)
306
300
var(--d),
307
301
308
- ${ theme . palette . text . secondary } calc(var(--d) - 1px),
302
+ ${ theme . palette . dots } calc(var(--d) - 1px),
309
303
${ theme . palette . background . default } var(--d)
310
304
)
311
- 0 0 / 24px 24px
305
+ -2px -2px / 16px 16px
312
306
` ,
313
307
} ) ,
314
308
0 commit comments