@@ -216,13 +216,10 @@ async function loadData() {
216216}
217217
218218function 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-" );
226223}
227224
228225function changeSortParameters(
@@ -399,7 +396,7 @@ loadData();
399396 </p >
400397 <p >Executions do not include cached executions.</p >
401398
402- <table :class = " {'hide-incr': !showIncr, 'hide-delta': !showDelta} " >
399+ <table >
403400 <thead >
404401 <tr id =" table-header" >
405402 <th :class =" getHeaderClass('label')" >
@@ -421,7 +418,7 @@ loadData();
421418 >Time (s)</a
422419 >
423420 </th >
424- <th :class =" {[ getHeaderClass('timeDelta')]: true, delta: true} " >
421+ <th v-if = " showDelta " :class =" getHeaderClass('timeDelta')" >
425422 <a
426423 href =" #"
427424 @click.prevent =" changeSortParameters('timeDelta', 'desc')"
@@ -435,20 +432,16 @@ loadData();
435432 >Executions</a
436433 >
437434 </th >
438- <th
439- :class =" {[getHeaderClass('executionsDelta')]: true, delta: true}"
440- >
435+ <th v-if =" showDelta" :class =" getHeaderClass('executionsDelta')" >
441436 <a
442437 href =" #"
443438 @click.prevent =" changeSortParameters('executionsDelta', 'desc')"
444439 >Executions delta</a
445440 >
446441 </th >
447442 <th
448- :class =" {
449- [getHeaderClass('incrementalLoading')]: true,
450- incr: true,
451- }"
443+ v-if =" showIncr"
444+ :class =" getHeaderClass('incrementalLoading')"
452445 title =" Incremental loading time"
453446 >
454447 <a
@@ -460,11 +453,8 @@ loadData();
460453 >
461454 </th >
462455 <th
463- :class =" {
464- [getHeaderClass('incrementalLoadingDelta')]: true,
465- incr: true,
466- delta: true,
467- }"
456+ v-if =" showIncr && showDelta"
457+ :class =" getHeaderClass('incrementalLoadingDelta')"
468458 >
469459 <a
470460 href =" #"
@@ -487,15 +477,15 @@ loadData();
487477 {{ row.timePercent.formatted }}
488478 </td >
489479 <td >{{ row.timeSeconds.toFixed(3) }}</td >
490- <td class = " delta " >
480+ <td v-if = " showDelta " >
491481 <DeltaComponent :delta =" row.timeDelta" />
492482 </td >
493483 <td >{{ row.executions }}</td >
494- <td class = " delta " >
484+ <td v-if = " showDelta " >
495485 <DeltaComponent :delta =" row.executionsDelta" />
496486 </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 " >
499489 <DeltaComponent :delta =" row.incrementalLoadingDelta" />
500490 </td >
501491 </tr >
@@ -514,22 +504,6 @@ thead th {
514504 padding-left : 1em ;
515505}
516506
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-
533507.positive {
534508 color : red ;
535509 font-weight : bold ;
0 commit comments