@@ -47,7 +47,7 @@ class CIPETreeItem extends BaseRecentCIPETreeItem implements Disposable {
47
47
48
48
constructor (
49
49
public cipe : CIPEInfo ,
50
- private treeDataProvider : AbstractTreeProvider < BaseRecentCIPETreeItem >
50
+ private treeDataProvider : AbstractTreeProvider < BaseRecentCIPETreeItem > ,
51
51
) {
52
52
let title = cipe . branch ;
53
53
if ( cipe . commitTitle ) {
@@ -71,7 +71,7 @@ class CIPETreeItem extends BaseRecentCIPETreeItem implements Disposable {
71
71
}
72
72
73
73
this . description = formatMillis (
74
- ( cipe . completedAt ?? Date . now ( ) ) - cipe . createdAt
74
+ ( cipe . completedAt ?? Date . now ( ) ) - cipe . createdAt ,
75
75
) ;
76
76
77
77
this . id = cipe . ciPipelineExecutionId ;
@@ -92,17 +92,17 @@ class CIPETreeItem extends BaseRecentCIPETreeItem implements Disposable {
92
92
if ( this . cipe . status === 'SUCCEEDED' ) {
93
93
this . iconPath = new ThemeIcon (
94
94
'pass' ,
95
- new ThemeColor ( 'notebookStatusSuccessIcon.foreground' )
95
+ new ThemeColor ( 'notebookStatusSuccessIcon.foreground' ) ,
96
96
) ;
97
97
} else if ( isFailedStatus ( this . cipe . status ) ) {
98
98
this . iconPath = new ThemeIcon (
99
99
'error' ,
100
- new ThemeColor ( 'notebookStatusErrorIcon.foreground' )
100
+ new ThemeColor ( 'notebookStatusErrorIcon.foreground' ) ,
101
101
) ;
102
102
} else {
103
103
this . iconPath = new ThemeIcon (
104
104
'loading~spin' ,
105
- new ThemeColor ( 'notebookStatusRunningIcon.foreground' )
105
+ new ThemeColor ( 'notebookStatusRunningIcon.foreground' ) ,
106
106
) ;
107
107
}
108
108
}
@@ -136,8 +136,8 @@ class CIPETreeItem extends BaseRecentCIPETreeItem implements Disposable {
136
136
runGroup . runs
137
137
. filter ( ( run ) => run . status && isFailedStatus ( run . status ) )
138
138
. map (
139
- ( run ) => new RunTreeItem ( run , this . cipe . ciPipelineExecutionId )
140
- )
139
+ ( run ) => new RunTreeItem ( run , this . cipe . ciPipelineExecutionId ) ,
140
+ ) ,
141
141
) ,
142
142
] ;
143
143
}
@@ -152,7 +152,7 @@ class CIPETreeItem extends BaseRecentCIPETreeItem implements Disposable {
152
152
153
153
if ( this . cipe . runGroups . length === 1 ) {
154
154
return this . cipe . runGroups [ 0 ] . runs . map (
155
- ( run ) => new RunTreeItem ( run , this . cipe . ciPipelineExecutionId )
155
+ ( run ) => new RunTreeItem ( run , this . cipe . ciPipelineExecutionId ) ,
156
156
) ;
157
157
} else {
158
158
return this . cipe . runGroups . map ( ( runGroup ) => {
@@ -169,7 +169,10 @@ class CIPETreeItem extends BaseRecentCIPETreeItem implements Disposable {
169
169
class RunGroupTreeItem extends BaseRecentCIPETreeItem {
170
170
type = 'runGroup' as const ;
171
171
172
- constructor ( public runGroup : CIPERunGroup , public cipeId : string ) {
172
+ constructor (
173
+ public runGroup : CIPERunGroup ,
174
+ public cipeId : string ,
175
+ ) {
173
176
super ( runGroup . ciExecutionEnv ?? runGroup . runGroup ) ;
174
177
175
178
this . collapsibleState = TreeItemCollapsibleState . Expanded ;
@@ -196,11 +199,14 @@ class RunGroupTreeItem extends BaseRecentCIPETreeItem {
196
199
class RunTreeItem extends BaseRecentCIPETreeItem {
197
200
type = 'run' as const ;
198
201
199
- constructor ( public run : CIPERun , public cipeId : string ) {
202
+ constructor (
203
+ public run : CIPERun ,
204
+ public cipeId : string ,
205
+ ) {
200
206
super ( run . command ) ;
201
207
202
208
this . collapsibleState = TreeItemCollapsibleState . None ;
203
- this . id = `${ cipeId } -${ run . linkId } ` ;
209
+ this . id = `${ cipeId } -${ run . linkId ?? run . executionId } ` ;
204
210
this . setIcon ( ) ;
205
211
this . contextValue = 'run' ;
206
212
}
@@ -213,17 +219,17 @@ class RunTreeItem extends BaseRecentCIPETreeItem {
213
219
) {
214
220
this . iconPath = new ThemeIcon (
215
221
'loading~spin' ,
216
- new ThemeColor ( 'notebookStatusRunningIcon.foreground' )
222
+ new ThemeColor ( 'notebookStatusRunningIcon.foreground' ) ,
217
223
) ;
218
224
} else if ( this . run . status === 'SUCCEEDED' ) {
219
225
this . iconPath = new ThemeIcon (
220
226
'pass' ,
221
- new ThemeColor ( 'notebookStatusSuccessIcon.foreground' )
227
+ new ThemeColor ( 'notebookStatusSuccessIcon.foreground' ) ,
222
228
) ;
223
229
} else if ( isFailedStatus ( this . run . status ) ) {
224
230
this . iconPath = new ThemeIcon (
225
231
'error' ,
226
- new ThemeColor ( 'notebookStatusErrorIcon.foreground' )
232
+ new ThemeColor ( 'notebookStatusErrorIcon.foreground' ) ,
227
233
) ;
228
234
}
229
235
}
@@ -255,7 +261,7 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
255
261
256
262
constructor (
257
263
actor : ActorRef < any , EventObject > ,
258
- private fileDecorationProvider : CIPEFileDecorationProvider
264
+ private fileDecorationProvider : CIPEFileDecorationProvider ,
259
265
) {
260
266
super ( ) ;
261
267
@@ -273,7 +279,7 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
273
279
} ) ;
274
280
}
275
281
override getChildren (
276
- element ?: BaseRecentCIPETreeItem | undefined
282
+ element ?: BaseRecentCIPETreeItem | undefined ,
277
283
) : ProviderResult < BaseRecentCIPETreeItem [ ] > {
278
284
if ( ! this . recentCIPEInfo ) {
279
285
return undefined ;
@@ -295,19 +301,19 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
295
301
return element . getChildren ( ) ;
296
302
}
297
303
override getParent (
298
- element : BaseRecentCIPETreeItem
304
+ element : BaseRecentCIPETreeItem ,
299
305
) : ProviderResult < BaseRecentCIPETreeItem | null | undefined > {
300
306
return undefined ;
301
307
}
302
308
303
309
static create (
304
310
extensionContext : ExtensionContext ,
305
- actor : ActorRef < any , EventObject >
311
+ actor : ActorRef < any , EventObject > ,
306
312
) {
307
313
const fileDecorationProvider = new CIPEFileDecorationProvider ( ) ;
308
314
const recentCIPEProvider = new CloudRecentCIPEProvider (
309
315
actor ,
310
- fileDecorationProvider
316
+ fileDecorationProvider ,
311
317
) ;
312
318
313
319
extensionContext . subscriptions . push (
@@ -325,7 +331,7 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
325
331
source : 'cloud-view' ,
326
332
} ) ;
327
333
commands . executeCommand ( 'vscode.open' , treeItem . cipe . cipeUrl ) ;
328
- }
334
+ } ,
329
335
) ,
330
336
commands . registerCommand (
331
337
'nxCloud.showRunInApp' ,
@@ -337,7 +343,7 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
337
343
source : 'cloud-view' ,
338
344
} ) ;
339
345
commands . executeCommand ( 'vscode.open' , treeItem . run . runUrl ) ;
340
- }
346
+ } ,
341
347
) ,
342
348
commands . registerCommand (
343
349
'nxCloud.showCommitForCIPE' ,
@@ -351,14 +357,14 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
351
357
} ) ;
352
358
commands . executeCommand ( 'vscode.open' , treeItem . cipe . commitUrl ) ;
353
359
}
354
- }
360
+ } ,
355
361
) ,
356
362
commands . registerCommand ( 'nxCloud.openApp' , async ( ) => {
357
363
if ( recentCIPEProvider . workspaceUrl ) {
358
364
getTelemetry ( ) . logUsage ( 'cloud.open-app' ) ;
359
365
commands . executeCommand (
360
366
'vscode.open' ,
361
- recentCIPEProvider . workspaceUrl
367
+ recentCIPEProvider . workspaceUrl ,
362
368
) ;
363
369
} else {
364
370
// this shouldn't happen but as a fallback, we try to guess the cloud url
@@ -373,11 +379,11 @@ export class CloudRecentCIPEProvider extends AbstractTreeProvider<BaseRecentCIPE
373
379
commands . executeCommand ( 'vscode.open' , cloudUrlWithTracking ) ;
374
380
} else {
375
381
showErrorMessageWithOpenLogs (
376
- 'Something went wrong while retrieving the Nx Cloud URL.'
382
+ 'Something went wrong while retrieving the Nx Cloud URL.' ,
377
383
) ;
378
384
}
379
385
}
380
- } )
386
+ } ) ,
381
387
) ;
382
388
}
383
389
}
@@ -395,11 +401,11 @@ class CIPEFileDecorationProvider implements FileDecorationProvider {
395
401
396
402
const failedTasks = runGroup ?. runs . reduce (
397
403
( total , run ) => total + ( run . numFailedTasks ?? 0 ) ,
398
- 0
404
+ 0 ,
399
405
) ;
400
406
const totalTasks = runGroup ?. runs . reduce (
401
407
( total , run ) => total + ( run . numTasks ?? 0 ) ,
402
- 0
408
+ 0 ,
403
409
) ;
404
410
405
411
if ( failedTasks && failedTasks > 0 ) {
0 commit comments