You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
4.0 KiB
HTML
63 lines
4.0 KiB
HTML
<div fxLayout="column" fxFlex="100" class="padding-gap">
|
|
<form fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" (ngSubmit)="queryRoutesForm.form.valid && onQueryRoutes()" #queryRoutesForm="ngForm">
|
|
<mat-form-field fxFlex="49" fxLayoutAlign="start end">
|
|
<input matInput placeholder="Destination Pubkey" name="destinationPubkey" [(ngModel)]="destinationPubkey" tabindex="1" required #destPubkey="ngModel">
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="19" fxLayoutAlign="start end">
|
|
<input matInput placeholder="Amount (Sats)" name="amount" [(ngModel)]="amount" tabindex="2" type="number" step="1000" min="0" required #destAmount="ngModel">
|
|
</mat-form-field>
|
|
<div fxFlex="29" fxLayoutAlign="space-between start">
|
|
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="3" type="reset" (click)="resetData()">Clear</button>
|
|
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="primary" [disabled]="destPubkey.invalid || destAmount.invalid" type="submit" tabindex="4">
|
|
<p *ngIf="(destPubkey.invalid && (destPubkey.dirty || destPubkey.touched) || (destAmount.invalid && (destAmount.dirty || destAmount.touched))); else queryText">Invalid Pubkey/Amount</p>
|
|
<ng-template #queryText><p>Query Route</p></ng-template>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-sub-title-container mt-2">
|
|
<div fxFlex="70">
|
|
<fa-icon [icon]="faRoute" class="page-title-img mr-1"></fa-icon>
|
|
<span class="page-title">Transaction Route</span>
|
|
</div>
|
|
</div>
|
|
<div perfectScrollbar class="table-container mb-6">
|
|
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
|
|
<table mat-table #table [dataSource]="qrHops" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
|
|
<ng-container matColumnDef="hop_sequence">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Hop </th>
|
|
<td mat-cell *matCellDef="let hop"> {{hop?.hop_sequence}} </td>
|
|
</ng-container>
|
|
<ng-container matColumnDef="pubkey_alias">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Peer </th>
|
|
<td mat-cell *matCellDef="let hop"> {{hop?.pubkey_alias}} </td>
|
|
</ng-container>
|
|
<ng-container matColumnDef="chan_id">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel </th>
|
|
<td mat-cell *matCellDef="let hop"> {{hop?.chan_id}} </td>
|
|
</ng-container>
|
|
<ng-container matColumnDef="chan_capacity">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Capacity (Sats) </th>
|
|
<td mat-cell *matCellDef="let hop"><span fxLayoutAlign="end center"> {{hop?.chan_capacity | number}}</span></td>
|
|
</ng-container>
|
|
<ng-container matColumnDef="amt_to_forward_msat">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Amount To Fwd (Sats) </th>
|
|
<td mat-cell *matCellDef="let hop"><span fxLayoutAlign="end center"> {{hop?.amt_to_forward | number}}
|
|
</span></td>
|
|
</ng-container>
|
|
<ng-container matColumnDef="fee_msat">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Fee (mSats) </th>
|
|
<td mat-cell *matCellDef="let hop"><span fxLayoutAlign="end center"> {{hop?.fee_msat | number}} </span>
|
|
</td>
|
|
</ng-container>
|
|
<ng-container matColumnDef="actions">
|
|
<th mat-header-cell *matHeaderCellDef class="pl-4 pr-3"><span fxLayoutAlign="end center">Actions</span></th>
|
|
<td mat-cell *matCellDef="let hop" class="pl-4">
|
|
<button mat-stroked-button color="primary" type="button" tabindex="4" (click)="onHopClick(hop, $event)">View Info</button>
|
|
</td>
|
|
</ng-container>
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
|
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|