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

93.67% Statements 74/79
87.5% Branches 14/16
72.72% Functions 8/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    5849x 2921x   7x 1218x   7x 2921x   5842x   6x   2364x 14x   6x 1168x     7x   5842x     2370x   6x   12x 6x 2364x 1182x 6x 6x 6x 6x 6x 6x   6x 1182x   6x   6x     5842x   643x 632x 11x 65x 7223x 65x   11x     5842x 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"
            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>