mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 09:50:36 +01:00
Transaction Query Routes
Transaction Query Routes
This commit is contained in:
parent
259c5de623
commit
d746147280
File diff suppressed because one or more lines are too long
@ -12,5 +12,5 @@
|
||||
<link rel="stylesheet" href="styles.72af09d2752fe39920ba.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script src="runtime.660e7d8ad0ea662c0efc.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.8a8efbaecb55a11ab3f9.js"></script></body>
|
||||
<script src="runtime.0c285080646976a8be5f.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.a5b80ff2c34bfc900dc4.js"></script></body>
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"50859d501eab13ab41b8",6:"62086d585c2ead0254d2",7:"fdc70b63fa397b86320a"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
|
||||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"50859d501eab13ab41b8",6:"638c166260ccd0ba5f28",7:"fdc70b63fa397b86320a"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
|
@ -12,7 +12,7 @@ import { AuthGuard } from './shared/services/auth.guard';
|
||||
export const routes: Routes = [
|
||||
{ path: 'lnd', loadChildren: () => import('./lnd/lnd.module').then(childModule => childModule.LNDModule), canActivate: [AuthGuard] },
|
||||
{ path: 'cl', loadChildren: () => import('./clightning/cl.module').then(childModule => childModule.CLModule), canActivate: [AuthGuard] },
|
||||
{ path: 'sconfig', component: ServerConfigComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'advanced', component: ServerConfigComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'settings', component: AppSettingsComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'help', component: HelpComponent },
|
||||
{ path: 'login', component: SigninComponent },
|
||||
|
@ -21,13 +21,14 @@ import { ChannelPendingTableComponent } from './peers-channels/channels/channels
|
||||
import { ChannelClosedTableComponent } from './peers-channels/channels/channels-tables/channel-closed-table/channel-closed-table.component';
|
||||
import { TransactionsComponent } from './transactions/transactions.component';
|
||||
import { LookupsComponent } from './lookups/lookups.component';
|
||||
import { ForwardingHistoryComponent } from './switch/forwarding-history.component';
|
||||
import { RoutingPeersComponent } from './routing-peers/routing-peers.component';
|
||||
import { RoutingComponent } from './routing/routing.component';
|
||||
import { ForwardingHistoryComponent } from './routing/forwarding-history/forwarding-history.component';
|
||||
import { RoutingPeersComponent } from './routing/routing-peers/routing-peers.component';
|
||||
import { ChannelLookupComponent } from './lookups/channel-lookup/channel-lookup.component';
|
||||
import { NodeLookupComponent } from './lookups/node-lookup/node-lookup.component';
|
||||
import { ChannelBackupTableComponent } from './peers-channels/channels/channels-tables/channel-backup-table/channel-backup-table.component';
|
||||
import { ChannelRestoreTableComponent } from './peers-channels/channels/channels-tables/channel-restore-table/channel-restore-table.component';
|
||||
import { QueryRoutesComponent } from './payments/query-routes/query-routes.component';
|
||||
import { QueryRoutesComponent } from './transactions/query-routes/query-routes.component';
|
||||
|
||||
import { LoggerService, ConsoleLoggerService } from '../shared/services/logger.service';
|
||||
import { LNDUnlockedGuard } from '../shared/services/auth.guard';
|
||||
@ -54,6 +55,7 @@ import { InitializeWalletComponent } from './wallet/initialize/initialize.compon
|
||||
ChannelClosedTableComponent,
|
||||
TransactionsComponent,
|
||||
LookupsComponent,
|
||||
RoutingComponent,
|
||||
ForwardingHistoryComponent,
|
||||
RoutingPeersComponent,
|
||||
ChannelLookupComponent,
|
||||
|
@ -6,10 +6,9 @@ import { HomeComponent } from './home/home.component';
|
||||
import { PeersChannelsComponent } from './peers-channels/peers-channels.component';
|
||||
import { WalletComponent } from './wallet/wallet.component';
|
||||
import { TransactionsComponent } from './transactions/transactions.component';
|
||||
import { QueryRoutesComponent } from './payments/query-routes/query-routes.component';
|
||||
import { LookupsComponent } from './lookups/lookups.component';
|
||||
import { ForwardingHistoryComponent } from './switch/forwarding-history.component';
|
||||
import { RoutingPeersComponent } from './routing-peers/routing-peers.component';
|
||||
import { RoutingComponent } from './routing/routing.component';
|
||||
import { RoutingPeersComponent } from './routing/routing-peers/routing-peers.component';
|
||||
import { OnChainComponent } from './on-chain/on-chain.component';
|
||||
|
||||
import { AuthGuard, LNDUnlockedGuard } from '../shared/services/auth.guard';
|
||||
@ -23,9 +22,7 @@ export const LndRoutes: Routes = [
|
||||
{ path: 'peerschannels', component: PeersChannelsComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'transactions', component: TransactionsComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'onchain', component: OnChainComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'queryroutes', component: QueryRoutesComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'forwardinghistory', component: ForwardingHistoryComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'routingpeers', component: RoutingPeersComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'routing', component: RoutingComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'lookups', component: LookupsComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: '**', component: NotFoundComponent }
|
||||
]}
|
||||
|
@ -1,79 +0,0 @@
|
||||
<div fxLayout="column">
|
||||
<div class="padding-gap">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-subtitle>
|
||||
<h2>Query Routes</h2>
|
||||
</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<form fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap"
|
||||
(ngSubmit)="queryRoutesForm.form.valid && onQueryRoutes()" #queryRoutesForm="ngForm">
|
||||
<mat-form-field fxFlex="50" fxLayoutAlign="start end">
|
||||
<input matInput placeholder="Destination Pubkey" name="destinationPubkey" [(ngModel)]="destinationPubkey"
|
||||
tabindex="1" required #destPubkey="ngModel">
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex="20" 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="15" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="primary"
|
||||
[disabled]="destPubkey.invalid || destAmount.invalid" type="submit" tabindex="3">
|
||||
<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</p>
|
||||
</ng-template>
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="15" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="4" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div class="padding-gap">
|
||||
<mat-card>
|
||||
<mat-card-content class="table-card-content">
|
||||
<div perfectScrollbar class="table-container">
|
||||
<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> Node </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 (msats) </th>
|
||||
<td mat-cell *matCellDef="let hop"><span fxLayoutAlign="end center"> {{hop?.amt_to_forward_msat | number}}
|
||||
</span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="fee_msat">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Fee (msat) </th>
|
||||
<td mat-cell *matCellDef="let hop"><span fxLayoutAlign="end center"> {{hop?.fee_msat | number}} </span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="onHopClick(row, $event)"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
@ -1,3 +0,0 @@
|
||||
table {
|
||||
width:100%;
|
||||
}
|
@ -5,12 +5,12 @@ import { Store } from '@ngrx/store';
|
||||
import { Actions } from '@ngrx/effects';
|
||||
|
||||
import { MatTableDataSource, MatSort } from '@angular/material';
|
||||
import { ForwardingEvent } from '../../shared/models/lndModels';
|
||||
import { LoggerService } from '../../shared/services/logger.service';
|
||||
import { ForwardingEvent } from '../../../shared/models/lndModels';
|
||||
import { LoggerService } from '../../../shared/services/logger.service';
|
||||
|
||||
import * as RTLActions from '../../store/rtl.actions';
|
||||
import * as fromRTLReducer from '../../store/rtl.reducers';
|
||||
import { AlertTypeEnum, DataTypeEnum } from '../../shared/services/consts-enums-functions';
|
||||
import * as RTLActions from '../../../store/rtl.actions';
|
||||
import * as fromRTLReducer from '../../../store/rtl.reducers';
|
||||
import { AlertTypeEnum, DataTypeEnum } from '../../../shared/services/consts-enums-functions';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-forwarding-history',
|
@ -5,13 +5,13 @@ import { Store } from '@ngrx/store';
|
||||
import { Actions } from '@ngrx/effects';
|
||||
|
||||
import { MatTableDataSource, MatSort } from '@angular/material';
|
||||
import { ForwardingEvent, RoutingPeers } from '../../shared/models/lndModels';
|
||||
import { LoggerService } from '../../shared/services/logger.service';
|
||||
import { CommonService } from '../../shared/services/common.service';
|
||||
import { ForwardingEvent, RoutingPeers } from '../../../shared/models/lndModels';
|
||||
import { LoggerService } from '../../../shared/services/logger.service';
|
||||
import { CommonService } from '../../../shared/services/common.service';
|
||||
|
||||
import * as RTLActions from '../../store/rtl.actions';
|
||||
import * as fromRTLReducer from '../../store/rtl.reducers';
|
||||
import { AlertTypeEnum, DataTypeEnum } from '../../shared/services/consts-enums-functions';
|
||||
import * as RTLActions from '../../../store/rtl.actions';
|
||||
import * as fromRTLReducer from '../../../store/rtl.reducers';
|
||||
import { AlertTypeEnum, DataTypeEnum } from '../../../shared/services/consts-enums-functions';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-routing-peers',
|
18
src/app/lnd/routing/routing.component.html
Normal file
18
src/app/lnd/routing/routing.component.html
Normal file
@ -0,0 +1,18 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faProjectDiagram" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Routing</span>
|
||||
</div>
|
||||
<div fxLayout="column" class="padding-gap-x">
|
||||
<mat-card>
|
||||
<mat-card-content fxLayout="column">
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Forwarding History">
|
||||
<rtl-forwarding-history></rtl-forwarding-history>
|
||||
</mat-tab>
|
||||
<mat-tab label="Routing Peers">
|
||||
<rtl-routing-peers></rtl-routing-peers>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
0
src/app/lnd/routing/routing.component.scss
Normal file
0
src/app/lnd/routing/routing.component.scss
Normal file
25
src/app/lnd/routing/routing.component.spec.ts
Normal file
25
src/app/lnd/routing/routing.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RoutingComponent } from './routing.component';
|
||||
|
||||
describe('RoutingComponent', () => {
|
||||
let component: RoutingComponent;
|
||||
let fixture: ComponentFixture<RoutingComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ RoutingComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RoutingComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
17
src/app/lnd/routing/routing.component.ts
Normal file
17
src/app/lnd/routing/routing.component.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { faProjectDiagram } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-routing',
|
||||
templateUrl: './routing.component.html',
|
||||
styleUrls: ['./routing.component.scss']
|
||||
})
|
||||
export class RoutingComponent implements OnInit {
|
||||
faProjectDiagram = faProjectDiagram;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
<div fxLayout="column">
|
||||
<form fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" (ngSubmit)="queryRoutesForm.form.valid && onQueryRoutes()" #queryRoutesForm="ngForm">
|
||||
<mat-form-field fxFlex="50" fxLayoutAlign="start end">
|
||||
<input matInput placeholder="Destination Pubkey" name="destinationPubkey" [(ngModel)]="destinationPubkey" tabindex="1" required #destPubkey="ngModel">
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex="20" 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="30" 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 (mSats) </th>
|
||||
<td mat-cell *matCellDef="let hop"><span fxLayoutAlign="end center"> {{hop?.amt_to_forward_msat | 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>
|
@ -0,0 +1,4 @@
|
||||
.mat-column-actions {
|
||||
flex: 0 0 5%;
|
||||
width: 5%;
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
|
||||
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil, take } from 'rxjs/operators';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Actions } from '@ngrx/effects';
|
||||
import { faRoute } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
import { MatTableDataSource, MatSort } from '@angular/material';
|
||||
import { Hop } from '../../../shared/models/lndModels';
|
||||
import { LoggerService } from '../../../shared/services/logger.service';
|
||||
|
||||
import { LNDEffects } from '../../store/lnd.effects';
|
||||
import * as RTLActions from '../../../store/rtl.actions';
|
||||
@ -27,26 +25,28 @@ export class QueryRoutesComponent implements OnInit, OnDestroy {
|
||||
public flgSticky = false;
|
||||
public displayedColumns = [];
|
||||
public flgLoading: Array<Boolean | 'error'> = [false]; // 0: peers
|
||||
public faRoute = faRoute;
|
||||
// public faRoad = faRoad;
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
|
||||
|
||||
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private lndEffects: LNDEffects, private actions$: Actions) {
|
||||
constructor(private store: Store<fromRTLReducer.RTLState>, private lndEffects: LNDEffects) {
|
||||
switch (true) {
|
||||
case (window.innerWidth <= 415):
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'fee_msat'];
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'fee_msat', 'actions'];
|
||||
break;
|
||||
case (window.innerWidth > 415 && window.innerWidth <= 730):
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_id', 'fee_msat'];
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'fee_msat', 'actions'];
|
||||
break;
|
||||
case (window.innerWidth > 730 && window.innerWidth <= 1024):
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_id', 'chan_capacity', 'amt_to_forward_msat', 'fee_msat'];
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_capacity', 'amt_to_forward_msat', 'fee_msat', 'actions'];
|
||||
break;
|
||||
case (window.innerWidth > 1024 && window.innerWidth <= 1280):
|
||||
this.flgSticky = true;
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_id', 'chan_capacity', 'amt_to_forward_msat', 'fee_msat'];
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_capacity', 'amt_to_forward_msat', 'fee_msat', 'actions'];
|
||||
break;
|
||||
default:
|
||||
this.flgSticky = true;
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_id', 'chan_capacity', 'amt_to_forward_msat', 'fee_msat'];
|
||||
this.displayedColumns = ['hop_sequence', 'pubkey_alias', 'chan_capacity', 'amt_to_forward_msat', 'fee_msat', 'actions'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -84,10 +84,16 @@ export class QueryRoutesComponent implements OnInit, OnDestroy {
|
||||
return hop.hop_sequence === selRow.hop_sequence;
|
||||
})[0];
|
||||
const reorderedHop = [
|
||||
[{key: 'active', value: selHop.active, title: 'Active', width: 100, type: DataTypeEnum.NUMBER}]
|
||||
// 'hop_sequence', 'pubkey_alias', 'pub_key', 'chan_id', 'chan_capacity', 'expiry', 'amt_to_forward', 'amt_to_forward_msat', 'fee_msat'
|
||||
[{key: 'hop_sequence', value: selHop.hop_sequence, title: 'Sequence', width: 30, type: DataTypeEnum.NUMBER},
|
||||
{key: 'amt_to_forward', value: selHop.amt_to_forward, title: 'Amount To Forward (Sats)', width: 30, type: DataTypeEnum.NUMBER},
|
||||
{key: 'fee', value: selHop.fee, title: 'Fee (Sats)', width: 40, type: DataTypeEnum.NUMBER}],
|
||||
[{key: 'pubkey_alias', value: selHop.pubkey_alias, title: 'Peer Alias', width: 30, type: DataTypeEnum.STRING},
|
||||
{key: 'pub_key', value: selHop.pub_key, title: 'Peer Pubkey', width: 70, type: DataTypeEnum.STRING}],
|
||||
[{key: 'expiry', value: selHop.expiry, title: 'Expiry', width: 30, type: DataTypeEnum.NUMBER},
|
||||
{key: 'chan_id', value: selHop.chan_id, title: 'Channel ID', width: 30, type: DataTypeEnum.STRING},
|
||||
{key: 'chan_capacity', value: selHop.chan_capacity, title: 'Channel Capacity', width: 40, type: DataTypeEnum.NUMBER}],
|
||||
// amt_to_forward_msat, fee_msat
|
||||
];
|
||||
|
||||
this.store.dispatch(new RTLActions.OpenAlert({ width: '55%', data: {
|
||||
type: AlertTypeEnum.INFORMATION,
|
||||
alertTitle: 'Route Information',
|
@ -19,6 +19,7 @@
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Payments"><rtl-lightning-payments></rtl-lightning-payments></mat-tab>
|
||||
<mat-tab label="Invoices"><rtl-lightning-invoices></rtl-lightning-invoices></mat-tab>
|
||||
<mat-tab label="Query Routes"><rtl-query-routes></rtl-query-routes></mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
@ -5,7 +5,6 @@ import { Store } from '@ngrx/store';
|
||||
import { faExchangeAlt, faChartPie } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
import { LoggerService } from '../../shared/services/logger.service';
|
||||
|
||||
import * as fromRTLReducer from '../../store/rtl.reducers';
|
||||
|
||||
@Component({
|
||||
|
@ -7,7 +7,7 @@
|
||||
<mat-card-content fxLayout="column" class="card-content-gap">
|
||||
<div fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign.gt-sm="space-between center" fxLayoutAlign="center space-between">
|
||||
<div fxLayout="row" fxFlex="100" fxLayoutAlign="space-between center">
|
||||
<div fxFlex="25" *ngIf="appConfig.nodes.length && appConfig.nodes.length > 1">
|
||||
<div fxFlex="33" *ngIf="appConfig.nodes.length && appConfig.nodes.length > 1">
|
||||
<div fxFlex.gt-md="50" fxFlex="80">
|
||||
<h4>Default Selected Node</h4>
|
||||
<mat-select [(ngModel)]="appConfig.defaultNodeIndex" placeholder="Default Node" tabindex="1" required name="defaultNode">
|
||||
@ -17,7 +17,7 @@
|
||||
</mat-select>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25">
|
||||
<div fxFlex="33">
|
||||
<div fxFlex.gt-md="30" fxFlex="70">
|
||||
<h4>Currency Unit</h4>
|
||||
<mat-select [(ngModel)]="selNode.settings.currencyUnit" placeholder="Currency Unit" (selectionChange)="onCurrencyChange($event)" tabindex="1" required name="currencyUnit">
|
||||
@ -27,7 +27,7 @@
|
||||
</mat-select>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="50" *ngIf="selNode.lnImplementation !== 'CLT'">
|
||||
<div fxFlex="33" *ngIf="selNode.lnImplementation !== 'CLT'">
|
||||
<div fxFlex="60">
|
||||
<h4>BTC</h4>
|
||||
<div fxLayoutAlign="start center">
|
||||
|
@ -8,9 +8,9 @@ export const MENU_DATA: MenuRootNode = {
|
||||
{id: 31, parentId: 3, name: 'Peers/Channels', iconType: 'FA', icon: faUsers, link: '/lnd/peerschannels'},
|
||||
{id: 32, parentId: 3, name: 'Transactions', iconType: 'FA', icon: faExchangeAlt, link: '/lnd/transactions'},
|
||||
{id: 33, parentId: 3, name: 'Lookup', iconType: 'FA', icon: faSearch, link: '/lnd/lookups'},
|
||||
{id: 34, parentId: 3, name: 'Routing', iconType: 'FA', icon: faProjectDiagram, link: '/lnd/routingpeers'}
|
||||
{id: 34, parentId: 3, name: 'Routing', iconType: 'FA', icon: faProjectDiagram, link: '/lnd/routing'}
|
||||
]},
|
||||
{id: 4, parentId: 0, name: 'Advanced', iconType: 'FA', icon: faCog, link: '/sconfig'},
|
||||
{id: 4, parentId: 0, name: 'Advanced', iconType: 'FA', icon: faCog, link: '/advanced'},
|
||||
{id: 5, parentId: 0, name: 'Settings', iconType: 'FA', icon: faTools, link: '/settings'},
|
||||
{id: 6, parentId: 0, name: 'Help', iconType: 'FA', icon: faQuestion, link: '/help'}
|
||||
],
|
||||
@ -21,9 +21,9 @@ export const MENU_DATA: MenuRootNode = {
|
||||
{id: 31, parentId: 3, name: 'Peers/Channels', iconType: 'FA', icon: faUsers, link: '/cl/peers'},
|
||||
{id: 32, parentId: 3, name: 'Transactions', iconType: 'FA', icon: faExchangeAlt, link: '/cl/chnlmanage'},
|
||||
{id: 33, parentId: 3, name: 'Lookup', iconType: 'FA', icon: faSearch, link: '/cl/lookups'},
|
||||
{id: 34, parentId: 3, name: 'Routing', iconType: 'FA', icon: faProjectDiagram, link: '/cl/queryroutes'}
|
||||
{id: 34, parentId: 3, name: 'Routing', iconType: 'FA', icon: faProjectDiagram, link: '/cl/routing'}
|
||||
]},
|
||||
{id: 4, parentId: 0, name: 'Advanced', iconType: 'FA', icon: faCog, link: '/sconfig'},
|
||||
{id: 4, parentId: 0, name: 'Advanced', iconType: 'FA', icon: faCog, link: '/advanced'},
|
||||
{id: 5, parentId: 0, name: 'Settings', iconType: 'FA', icon: faTools, link: '/settings'},
|
||||
{id: 6, parentId: 0, name: 'Help', iconType: 'FA', icon: faQuestion, link: '/help'}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user