All files / src/app/components/phases-graph phases-graph.component.html

85% Statements 68/80
75% Branches 12/16
36.36% Functions 4/11
97.56% Lines 40/41

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67    4831x     2412x   7x 1098x   7x 2412x   4824x   5x   2078x 18x   5x 1021x     7x   4824x     2083x   5x   10x 5x 2078x 1039x 5x 5x 5x 5x 5x 5x   5x 1039x   5x   5x     4824x   569x 558x 11x 69x 6875x 69x   11x     4824x 7x  
<div class="phases-graph">
    <div class="graph-setup">
        <p-multiselect class="phases-selector" [(ngModel)]="selectedPhases" [options]="displayCampaigns"
            [group]="true" optionLabel="name" optionGroupChildren="phases"
            [filter]="true" filterMatchMode="contains"
            [lazy]="false" [virtualScroll]="true" [virtualScrollItemSize]="40"
            placeholder="Select phases to compare">
            <ng-template #group let-group>
                <span class="select-group">{{ group.campaignName }}</span>
            </ng-template>
        </p-multiselect>
        <app-multi-select-signals #signalsMultiSelect [isLive]="false" [postProcessingMode]="true">
        </app-multi-select-signals>
        @if (selectedPhases.length > 0 && selectedSignalIds.length > 0)
        {
            <p-button id="loadData" (click)="loadGraphData()">Load</p-button>
 
            @if (isDownloading) {
                <p-splitbutton icon="pi pi-spinner pi-spin" [model]="exports" severity="secondary" />
            }
            @else {
                <p-splitbutton icon="pi pi-download" [model]="exports" severity="secondary" />
            }
        }
    </div>
 
    @if (selectedPhases.length > 0 && selectedSignalIds.length > 0)
    {
        <div class="phase-modifying">
            <p-select class="phase-selector" [(ngModel)]="phaseToModify" [options]="selectedPhases" optionLabel="name"
                placeholder="Phase to modify">
            </p-select>
            <div>
                <p-button id="offset-phase-left" icon="pi pi-chevron-left" severity="secondary" title="Shift to the left"
                    (onClick)="movePhaseLeft()" />
                <p-inputnumber class="offset-input" [inputStyle]="{ width: '5rem' }" [(ngModel)]="phaseOffset"
                    [maxFractionDigits]="3" suffix=" s" placeholder="Offset">
                </p-inputnumber>
                <p-button id="offset-phase-right" icon="pi pi-chevron-right" severity="secondary" title="Shift to the right"
                    (onClick)="movePhaseRight()" />
            </div>
            <p-button id="reset-phase" icon="pi pi-undo" label="Reset" severity="secondary" (onClick)="resetPhaseMove()" />
        </div>
 
        <app-signals-graph #phasesGraph
            [signalIdsToPlot]="[]" [isLive]="false" [relativeMode]="true"
            (replayWindowMiddleChange)="onWindowMiddleChange($event)"
            (replayWindowLengthChange)="onWindowLengthChange($event)">
 
        </app-signals-graph>
    }
 
    @if (dataLoaded)
    {
        <p-listbox [(ngModel)]="selectedDataSets" [options]="dataSets" optionLabel="name"
            [multiple]="true" [metaKeySelection]="true">
            <ng-template #item let-dataset>
                <div class="data-set-item" (contextmenu)="onContextMenu($event, dataset)">
                    {{ dataset.name }}
                </div>
            </ng-template>
        </p-listbox>
    }
 
    <p-contextmenu #contextMenu [model]="items" />
</div>