@@ -216,13 +216,10 @@ async function loadData() {
216
216
}
217
217
218
218
function populateUIData(responseData : SelfProfileResponse , state : Selector ) {
219
- if (! responseData .base_profile_delta ) {
220
- showDelta .value = false ;
221
- }
222
-
223
- if (! state .scenario .includes (" incr-" )) {
224
- showIncr .value = false ;
225
- }
219
+ showDelta .value =
220
+ responseData .base_profile_delta !== undefined &&
221
+ responseData .base_profile_delta !== null ;
222
+ showIncr .value = state .scenario .includes (" incr-" );
226
223
}
227
224
228
225
function changeSortParameters(
@@ -399,7 +396,7 @@ loadData();
399
396
</p >
400
397
<p >Executions do not include cached executions.</p >
401
398
402
- <table :class = " {'hide-incr': !showIncr, 'hide-delta': !showDelta} " >
399
+ <table >
403
400
<thead >
404
401
<tr id =" table-header" >
405
402
<th :class =" getHeaderClass('label')" >
@@ -421,7 +418,7 @@ loadData();
421
418
>Time (s)</a
422
419
>
423
420
</th >
424
- <th :class =" {[ getHeaderClass('timeDelta')]: true, delta: true} " >
421
+ <th v-if = " showDelta " :class =" getHeaderClass('timeDelta')" >
425
422
<a
426
423
href =" #"
427
424
@click.prevent =" changeSortParameters('timeDelta', 'desc')"
@@ -435,20 +432,16 @@ loadData();
435
432
>Executions</a
436
433
>
437
434
</th >
438
- <th
439
- :class =" {[getHeaderClass('executionsDelta')]: true, delta: true}"
440
- >
435
+ <th v-if =" showDelta" :class =" getHeaderClass('executionsDelta')" >
441
436
<a
442
437
href =" #"
443
438
@click.prevent =" changeSortParameters('executionsDelta', 'desc')"
444
439
>Executions delta</a
445
440
>
446
441
</th >
447
442
<th
448
- :class =" {
449
- [getHeaderClass('incrementalLoading')]: true,
450
- incr: true,
451
- }"
443
+ v-if =" showIncr"
444
+ :class =" getHeaderClass('incrementalLoading')"
452
445
title =" Incremental loading time"
453
446
>
454
447
<a
@@ -460,11 +453,8 @@ loadData();
460
453
>
461
454
</th >
462
455
<th
463
- :class =" {
464
- [getHeaderClass('incrementalLoadingDelta')]: true,
465
- incr: true,
466
- delta: true,
467
- }"
456
+ v-if =" showIncr && showDelta"
457
+ :class =" getHeaderClass('incrementalLoadingDelta')"
468
458
>
469
459
<a
470
460
href =" #"
@@ -487,15 +477,15 @@ loadData();
487
477
{{ row.timePercent.formatted }}
488
478
</td >
489
479
<td >{{ row.timeSeconds.toFixed(3) }}</td >
490
- <td class = " delta " >
480
+ <td v-if = " showDelta " >
491
481
<DeltaComponent :delta =" row.timeDelta" />
492
482
</td >
493
483
<td >{{ row.executions }}</td >
494
- <td class = " delta " >
484
+ <td v-if = " showDelta " >
495
485
<DeltaComponent :delta =" row.executionsDelta" />
496
486
</td >
497
- <td class = " incr " >{{ row.incrementalLoading.toFixed(3) }}</td >
498
- <td class = " incr delta " >
487
+ <td v-if = " showIncr " >{{ row.incrementalLoading.toFixed(3) }}</td >
488
+ <td v-if = " showDelta && showIncr " >
499
489
<DeltaComponent :delta =" row.incrementalLoadingDelta" />
500
490
</td >
501
491
</tr >
@@ -514,22 +504,6 @@ thead th {
514
504
padding-left : 1em ;
515
505
}
516
506
517
- :global(body .hide-incr ) .incr {
518
- display : none ;
519
- }
520
-
521
- :global(body .hide-delta ) .delta {
522
- display : none ;
523
- }
524
-
525
- .hide-incr .incr {
526
- display : none ;
527
- }
528
-
529
- .hide-delta .delta {
530
- display : none ;
531
- }
532
-
533
507
.positive {
534
508
color : red ;
535
509
font-weight : bold ;
0 commit comments