@@ -321,20 +321,34 @@ export class WorkflowRunJobComponent implements OnInit, OnDestroy {
321
321
return DurationService . duration ( fromM . toDate ( ) , to ? to . toDate ( ) : moment ( ) . toDate ( ) ) ;
322
322
}
323
323
324
- async clickExpandStepDown ( index : number ) {
324
+ async clickExpandStepDown ( index : number , event : MouseEvent ) {
325
325
let step = this . steps [ index ] ;
326
+
327
+ let limit = `${ this . expandLoadLinesCount } ` ;
328
+ if ( event . shiftKey ) {
329
+ limit = '0' ;
330
+ }
331
+
326
332
let result = await this . _workflowService . getLogLines ( step . link ,
327
- { offset : `${ step . lines [ step . lines . length - 1 ] . number + 1 } ` , limit : ` ${ this . expandLoadLinesCount } ` }
333
+ { offset : `${ step . lines [ step . lines . length - 1 ] . number + 1 } ` , limit : limit }
328
334
) . toPromise ( ) ;
329
335
this . steps [ index ] . totalLinesCount = result . totalCount ;
330
336
this . steps [ index ] . lines = step . lines . concat ( result . lines . filter ( l => ! step . endLines . find ( line => line . number === l . number ) ) ) ;
331
337
this . _cd . markForCheck ( ) ;
332
338
}
333
339
334
- async clickExpandStepUp ( index : number ) {
340
+ async clickExpandStepUp ( index : number , event : MouseEvent ) {
335
341
let step = this . steps [ index ] ;
342
+
343
+ let offset = `-${ step . endLines . length + this . expandLoadLinesCount } ` ;
344
+ let limit = `${ this . expandLoadLinesCount } ` ;
345
+ if ( event . shiftKey ) {
346
+ offset = `${ step . lines [ step . lines . length - 1 ] . number + 1 } ` ;
347
+ limit = '0' ;
348
+ }
349
+
336
350
let result = await this . _workflowService . getLogLines ( step . link ,
337
- { offset : `- ${ step . endLines . length + this . expandLoadLinesCount } ` , limit : ` ${ this . expandLoadLinesCount } ` }
351
+ { offset : offset , limit : limit }
338
352
) . toPromise ( ) ;
339
353
this . steps [ index ] . totalLinesCount = result . totalCount ;
340
354
this . steps [ index ] . endLines = result . lines . filter ( l => ! step . lines . find ( line => line . number === l . number )
0 commit comments