diff --git a/src/app/cln/routing/failed-transactions/failed-transactions.component.html b/src/app/cln/routing/failed-transactions/failed-transactions.component.html
index b2fa4009..3df0125f 100644
--- a/src/app/cln/routing/failed-transactions/failed-transactions.component.html
+++ b/src/app/cln/routing/failed-transactions/failed-transactions.component.html
@@ -24,13 +24,29 @@
{{(fhEvent?.resolved_time * 1000) | date:'dd/MMM/y HH:mm'}} |
+ In Channel Id |
+ {{fhEvent?.in_channel}} |
+
+
In Channel |
- {{fhEvent?.in_channel_alias}} |
+
+
+ {{fhEvent?.in_channel_alias}}
+
+ |
- Out Channel |
- {{fhEvent?.out_channel_alias}} |
+ Out Channel Id |
+ {{fhEvent?.out_channel}} |
+
+ Out Channel |
+
+
+ {{fhEvent?.out_channel_alias}}
+
+ |
+
Amount In (Sats) |
{{fhEvent?.in_msatoshi/1000 | number:fhEvent?.in_msatoshi < 1000 ? '1.0-4' : '1.0-0'}} |
diff --git a/src/app/cln/routing/failed-transactions/failed-transactions.component.scss b/src/app/cln/routing/failed-transactions/failed-transactions.component.scss
index 0ad983c7..7582584c 100644
--- a/src/app/cln/routing/failed-transactions/failed-transactions.component.scss
+++ b/src/app/cln/routing/failed-transactions/failed-transactions.component.scss
@@ -1,3 +1,11 @@
+.mat-column-in_channel_alias, .mat-column-out_channel_alias {
+ flex: 0 0 10%;
+ width: 10%;
+ & .ellipsis-parent {
+ display: flex;
+ }
+}
+
.mat-column-actions {
min-height: 4.8rem;
}
diff --git a/src/app/cln/routing/failed-transactions/failed-transactions.component.ts b/src/app/cln/routing/failed-transactions/failed-transactions.component.ts
index 99ebf207..9e43000f 100644
--- a/src/app/cln/routing/failed-transactions/failed-transactions.component.ts
+++ b/src/app/cln/routing/failed-transactions/failed-transactions.component.ts
@@ -9,7 +9,7 @@ import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { ForwardingEvent, ListForwards } from '../../../shared/models/clnModels';
-import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, APICallStatusEnum, CLNForwardingEventsStatusEnum } from '../../../shared/services/consts-enums-functions';
+import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, APICallStatusEnum, CLNForwardingEventsStatusEnum, SortOrderEnum, CLN_DEFAULT_PAGE_SETTINGS } from '../../../shared/services/consts-enums-functions';
import { ApiCallStatusPayload } from '../../../shared/models/apiCallsPayload';
import { LoggerService } from '../../../shared/services/logger.service';
import { CommonService } from '../../../shared/services/common.service';
@@ -17,8 +17,9 @@ import { CommonService } from '../../../shared/services/common.service';
import { RTLState } from '../../../store/rtl.state';
import { openAlert } from '../../../store/rtl.actions';
import { getForwardingHistory } from '../../store/cln.actions';
-import { failedForwardingHistory } from '../../store/cln.selector';
+import { clnPageSettings, failedForwardingHistory } from '../../store/cln.selector';
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
+import { PageSettingsCLN, TableSetting } from '../../../shared/models/pageSettings';
@Component({
selector: 'rtl-cln-failed-history',
@@ -32,6 +33,8 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
+ public PAGE_ID = 'routing';
+ public tableSetting: TableSetting = { tableId: 'failed', recordsPerPage: PAGE_SIZE, sortBy: 'received_time', sortOrder: SortOrderEnum.DESCENDING };
public faExclamationTriangle = faExclamationTriangle;
public failedEvents: any;
public errorMessage = '';
@@ -49,20 +52,30 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On
constructor(private logger: LoggerService, private commonService: CommonService, private store: Store, private datePipe: DatePipe, private router: Router) {
this.screenSize = this.commonService.getScreenSize();
- if (this.screenSize === ScreenSizeEnum.XS) {
- this.displayedColumns = ['received_time', 'in_channel', 'in_msatoshi', 'actions'];
- } else if (this.screenSize === ScreenSizeEnum.SM || this.screenSize === ScreenSizeEnum.MD) {
- this.displayedColumns = ['received_time', 'in_channel', 'out_channel', 'in_msatoshi', 'out_msatoshi', 'actions'];
- } else {
- this.displayedColumns = ['received_time', 'resolved_time', 'in_channel', 'out_channel', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
- }
}
ngOnInit() {
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
this.router.onSameUrlNavigation = 'reload';
this.store.dispatch(getForwardingHistory({ payload: { status: CLNForwardingEventsStatusEnum.FAILED } }));
- this.store.select(failedForwardingHistory).pipe(takeUntil(this.unSubs[0])).
+ this.store.select(clnPageSettings).pipe(takeUntil(this.unSubs[0])).
+ subscribe((settings: { pageSettings: PageSettingsCLN[], apiCallStatus: ApiCallStatusPayload }) => {
+ this.errorMessage = '';
+ this.apiCallStatus = settings.apiCallStatus;
+ if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
+ this.errorMessage = this.apiCallStatus.message || '';
+ }
+ this.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || CLN_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId)!;
+ if (this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM) {
+ this.displayedColumns = JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM));
+ } else {
+ this.displayedColumns = JSON.parse(JSON.stringify(this.tableSetting.columnSelection));
+ }
+ this.displayedColumns.push('actions');
+ this.pageSize = this.tableSetting.recordsPerPage ? +this.tableSetting.recordsPerPage : PAGE_SIZE;
+ this.logger.info(this.displayedColumns);
+ });
+ this.store.select(failedForwardingHistory).pipe(takeUntil(this.unSubs[1])).
subscribe((ffhSeletor: { failedForwardingHistory: ListForwards, apiCallStatus: ApiCallStatusPayload }) => {
this.errorMessage = '';
this.apiCallStatus = ffhSeletor.apiCallStatus;
@@ -112,6 +125,7 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On
this.failedForwardingEvents = new MatTableDataSource([...forwardingEvents]);
this.failedForwardingEvents.sort = this.sort;
this.failedForwardingEvents.sortingDataAccessor = (data: any, sortHeaderId: string) => ((data[sortHeaderId] && isNaN(data[sortHeaderId])) ? data[sortHeaderId].toLocaleLowerCase() : data[sortHeaderId] ? +data[sortHeaderId] : null);
+ this.failedForwardingEvents.sort?.sort({ id: this.tableSetting.sortBy, start: this.tableSetting.sortOrder, disableClear: true });
this.failedForwardingEvents.filterPredicate = (event: ForwardingEvent, fltr: string) => {
const newEvent =
(event.received_time ? this.datePipe.transform(new Date(event.received_time * 1000), 'dd/MMM/YYYY HH:mm')!.toLowerCase() : '') +
diff --git a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html
index f9a44419..35d2f2ef 100644
--- a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html
+++ b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html
@@ -20,16 +20,28 @@
{{(fhEvent?.received_time * 1000) | date:'dd/MMM/y HH:mm'}} |
+ In Channel Id |
+ {{fhEvent?.in_channel}} |
+
+
In Channel |
- {{fhEvent?.in_channel_alias}} |
+
+
+ {{fhEvent?.in_channel_alias}}
+
+ |
Amount In (Sats) |
{{fhEvent?.in_msatoshi/1000 | number:fhEvent?.in_msatoshi < 1000 ? '1.0-4' : '1.0-0'}} |
+
+ Style |
+ {{fhEvent?.style}} |
+
- Fail Reason |
- {{CLNFailReason[fhEvent?.failreason]}} |
+ Fail Reason |
+ {{CLNFailReason[fhEvent?.failreason]}} |
diff --git a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.scss b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.scss
index 0ad983c7..cfcb854f 100644
--- a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.scss
+++ b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.scss
@@ -1,3 +1,11 @@
+.mat-column-in_channel_alias {
+ flex: 0 0 10%;
+ width: 10%;
+ & .ellipsis-parent {
+ display: flex;
+ }
+}
+
.mat-column-actions {
min-height: 4.8rem;
}
diff --git a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts
index 59be952b..f2e3179d 100644
--- a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts
+++ b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts
@@ -9,7 +9,7 @@ import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { ListForwards, LocalFailedEvent } from '../../../shared/models/clnModels';
-import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, APICallStatusEnum, CLNFailReason, CLNForwardingEventsStatusEnum } from '../../../shared/services/consts-enums-functions';
+import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, APICallStatusEnum, CLNFailReason, CLNForwardingEventsStatusEnum, SortOrderEnum, CLN_DEFAULT_PAGE_SETTINGS } from '../../../shared/services/consts-enums-functions';
import { ApiCallStatusPayload } from '../../../shared/models/apiCallsPayload';
import { LoggerService } from '../../../shared/services/logger.service';
import { CommonService } from '../../../shared/services/common.service';
@@ -17,8 +17,9 @@ import { CommonService } from '../../../shared/services/common.service';
import { RTLState } from '../../../store/rtl.state';
import { openAlert } from '../../../store/rtl.actions';
import { getForwardingHistory } from '../../store/cln.actions';
-import { localFailedForwardingHistory } from '../../store/cln.selector';
+import { clnPageSettings, localFailedForwardingHistory } from '../../store/cln.selector';
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
+import { PageSettingsCLN, TableSetting } from '../../../shared/models/pageSettings';
@Component({
selector: 'rtl-cln-local-failed-history',
@@ -33,6 +34,8 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
public faExclamationTriangle = faExclamationTriangle;
+ public PAGE_ID = 'routing';
+ public tableSetting: TableSetting = { tableId: 'local_failed', recordsPerPage: PAGE_SIZE, sortBy: 'received_time', sortOrder: SortOrderEnum.DESCENDING };
public CLNFailReason = CLNFailReason;
public failedLocalEvents: any;
public errorMessage = '';
@@ -50,20 +53,30 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni
constructor(private logger: LoggerService, private commonService: CommonService, private store: Store, private datePipe: DatePipe, private router: Router) {
this.screenSize = this.commonService.getScreenSize();
- if (this.screenSize === ScreenSizeEnum.XS) {
- this.displayedColumns = ['received_time', 'in_channel', 'in_msatoshi', 'actions'];
- } else if (this.screenSize === ScreenSizeEnum.SM || this.screenSize === ScreenSizeEnum.MD) {
- this.displayedColumns = ['received_time', 'in_channel', 'in_msatoshi', 'actions'];
- } else {
- this.displayedColumns = ['received_time', 'in_channel', 'in_msatoshi', 'failreason', 'actions'];
- }
}
ngOnInit() {
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
this.router.onSameUrlNavigation = 'reload';
this.store.dispatch(getForwardingHistory({ payload: { status: CLNForwardingEventsStatusEnum.LOCAL_FAILED } }));
- this.store.select(localFailedForwardingHistory).pipe(takeUntil(this.unSubs[0])).
+ this.store.select(clnPageSettings).pipe(takeUntil(this.unSubs[0])).
+ subscribe((settings: { pageSettings: PageSettingsCLN[], apiCallStatus: ApiCallStatusPayload }) => {
+ this.errorMessage = '';
+ this.apiCallStatus = settings.apiCallStatus;
+ if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
+ this.errorMessage = this.apiCallStatus.message || '';
+ }
+ this.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || CLN_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId)!;
+ if (this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM) {
+ this.displayedColumns = JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM));
+ } else {
+ this.displayedColumns = JSON.parse(JSON.stringify(this.tableSetting.columnSelection));
+ }
+ this.displayedColumns.push('actions');
+ this.pageSize = this.tableSetting.recordsPerPage ? +this.tableSetting.recordsPerPage : PAGE_SIZE;
+ this.logger.info(this.displayedColumns);
+ });
+ this.store.select(localFailedForwardingHistory).pipe(takeUntil(this.unSubs[1])).
subscribe((lffhSeletor: { localFailedForwardingHistory: ListForwards, apiCallStatus: ApiCallStatusPayload }) => {
this.errorMessage = '';
this.apiCallStatus = lffhSeletor.apiCallStatus;
@@ -105,13 +118,6 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni
loadLocalfailedLocalEventsTable(forwardingEvents: LocalFailedEvent[]) {
this.failedLocalForwardingEvents = new MatTableDataSource([...forwardingEvents]);
- this.failedLocalForwardingEvents.filterPredicate = (event: LocalFailedEvent, fltr: string) => {
- const newEvent = (event.received_time ? this.datePipe.transform(new Date(event.received_time * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') +
- (event.in_channel_alias ? event.in_channel_alias.toLowerCase() : '') +
- ((event.failreason && this.CLNFailReason[event.failreason]) ? this.CLNFailReason[event.failreason].toLowerCase() : '') +
- (event.in_msatoshi ? (event.in_msatoshi / 1000) : '');
- return newEvent?.includes(fltr) || false;
- };
this.failedLocalForwardingEvents.sort = this.sort;
this.failedLocalForwardingEvents.sortingDataAccessor = (data: LocalFailedEvent, sortHeaderId: string) => {
switch (sortHeaderId) {
@@ -122,6 +128,14 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni
return (data[sortHeaderId] && isNaN(data[sortHeaderId])) ? data[sortHeaderId].toLocaleLowerCase() : data[sortHeaderId] ? +data[sortHeaderId] : null;
}
};
+ this.failedLocalForwardingEvents.sort?.sort({ id: this.tableSetting.sortBy, start: this.tableSetting.sortOrder, disableClear: true });
+ this.failedLocalForwardingEvents.filterPredicate = (event: LocalFailedEvent, fltr: string) => {
+ const newEvent = (event.received_time ? this.datePipe.transform(new Date(event.received_time * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') +
+ (event.in_channel_alias ? event.in_channel_alias.toLowerCase() : '') +
+ ((event.failreason && this.CLNFailReason[event.failreason]) ? this.CLNFailReason[event.failreason].toLowerCase() : '') +
+ (event.in_msatoshi ? (event.in_msatoshi / 1000) : '');
+ return newEvent?.includes(fltr) || false;
+ };
this.failedLocalForwardingEvents.paginator = this.paginator;
this.applyFilter();
this.logger.info(this.failedLocalForwardingEvents);
diff --git a/src/app/cln/routing/routing-peers/routing-peers.component.ts b/src/app/cln/routing/routing-peers/routing-peers.component.ts
index bb35f0fa..586656b4 100644
--- a/src/app/cln/routing/routing-peers/routing-peers.component.ts
+++ b/src/app/cln/routing/routing-peers/routing-peers.component.ts
@@ -1,19 +1,21 @@
import { Component, OnInit, AfterViewInit, ViewChild, OnDestroy, Input, SimpleChanges, OnChanges } from '@angular/core';
import { Subject } from 'rxjs';
-import { takeUntil } from 'rxjs/operators';
+import { take, takeUntil } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { MatSort } from '@angular/material/sort';
import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator';
import { MatTableDataSource } from '@angular/material/table';
-import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, ScreenSizeEnum, APICallStatusEnum } from '../../../shared/services/consts-enums-functions';
+import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, ScreenSizeEnum, APICallStatusEnum, SortOrderEnum, CLN_DEFAULT_PAGE_SETTINGS, CLNForwardingEventsStatusEnum } from '../../../shared/services/consts-enums-functions';
import { ForwardingEvent, ListForwards, RoutingPeer } from '../../../shared/models/clnModels';
import { ApiCallStatusPayload } from '../../../shared/models/apiCallsPayload';
import { LoggerService } from '../../../shared/services/logger.service';
import { CommonService } from '../../../shared/services/common.service';
import { RTLState } from '../../../store/rtl.state';
-import { forwardingHistory } from '../../store/cln.selector';
+import { clnPageSettings, forwardingHistory } from '../../store/cln.selector';
+import { PageSettingsCLN, TableSetting } from '../../../shared/models/pageSettings';
+import { getForwardingHistory } from '../../store/cln.actions';
@Component({
selector: 'rtl-cln-routing-peers',
@@ -31,6 +33,8 @@ export class CLNRoutingPeersComponent implements OnInit, OnChanges, AfterViewIni
@ViewChild('paginatorOut', { static: false }) paginatorOut: MatPaginator | undefined;
@Input() eventsData = [];
@Input() filterValue = '';
+ public PAGE_ID = 'routing';
+ public tableSetting: TableSetting = { tableId: 'routing_peers', recordsPerPage: PAGE_SIZE, sortBy: 'total_fee', sortOrder: SortOrderEnum.DESCENDING };
public successfulEvents: ForwardingEvent[] = [];
public displayedColumns: any[] = [];
public RoutingPeersIncoming: any = [];
@@ -48,19 +52,31 @@ export class CLNRoutingPeersComponent implements OnInit, OnChanges, AfterViewIni
constructor(private logger: LoggerService, private commonService: CommonService, private store: Store) {
this.screenSize = this.commonService.getScreenSize();
- if (this.screenSize === ScreenSizeEnum.XS) {
- this.displayedColumns = ['alias', 'total_fee'];
- } else if (this.screenSize === ScreenSizeEnum.SM) {
- this.displayedColumns = ['alias', 'events', 'total_fee'];
- } else if (this.screenSize === ScreenSizeEnum.MD) {
- this.displayedColumns = ['alias', 'events', 'total_amount', 'total_fee'];
- } else {
- this.displayedColumns = ['channel_id', 'alias', 'events', 'total_amount', 'total_fee'];
- }
}
ngOnInit() {
- this.store.select(forwardingHistory).pipe(takeUntil(this.unSubs[0])).
+ this.store.pipe(take(1)).subscribe((state) => {
+ if (state.cln.apisCallStatus.FetchForwardingHistoryS.status === APICallStatusEnum.UN_INITIATED && !state.cln.forwardingHistory.listForwards?.length) {
+ this.store.dispatch(getForwardingHistory({ payload: { status: CLNForwardingEventsStatusEnum.SETTLED } }));
+ }
+ });
+ this.store.select(clnPageSettings).pipe(takeUntil(this.unSubs[0])).
+ subscribe((settings: { pageSettings: PageSettingsCLN[], apiCallStatus: ApiCallStatusPayload }) => {
+ this.errorMessage = '';
+ this.apiCallStatus = settings.apiCallStatus;
+ if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
+ this.errorMessage = this.apiCallStatus.message || '';
+ }
+ this.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || CLN_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId)!;
+ if (this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM) {
+ this.displayedColumns = JSON.parse(JSON.stringify(this.tableSetting.columnSelectionSM));
+ } else {
+ this.displayedColumns = JSON.parse(JSON.stringify(this.tableSetting.columnSelection));
+ }
+ this.pageSize = this.tableSetting.recordsPerPage ? +this.tableSetting.recordsPerPage : PAGE_SIZE;
+ this.logger.info(this.displayedColumns);
+ });
+ this.store.select(forwardingHistory).pipe(takeUntil(this.unSubs[1])).
subscribe((fhSeletor: { forwardingHistory: ListForwards, apiCallStatus: ApiCallStatusPayload }) => {
if (this.eventsData.length <= 0) {
this.errorMessage = '';
@@ -99,11 +115,13 @@ export class CLNRoutingPeersComponent implements OnInit, OnChanges, AfterViewIni
const results = this.groupRoutingPeers(events);
this.RoutingPeersIncoming = new MatTableDataSource(results[0]);
this.RoutingPeersIncoming.sort = this.sortIn;
+ this.RoutingPeersIncoming.sort?.sort({ id: this.tableSetting.sortBy, start: this.tableSetting.sortOrder, disableClear: true });
this.RoutingPeersIncoming.filterPredicate = (rpIn: RoutingPeer, fltr: string) => JSON.stringify(rpIn).toLowerCase().includes(fltr);
this.RoutingPeersIncoming.paginator = this.paginatorIn;
this.logger.info(this.RoutingPeersIncoming);
this.RoutingPeersOutgoing = new MatTableDataSource(results[1]);
this.RoutingPeersOutgoing.sort = this.sortOut;
+ this.RoutingPeersOutgoing.sort?.sort({ id: this.tableSetting.sortBy, start: this.tableSetting.sortOrder, disableClear: true });
this.RoutingPeersOutgoing.filterPredicate = (rpOut: RoutingPeer, fltr: string) => JSON.stringify(rpOut).toLowerCase().includes(fltr);
this.RoutingPeersOutgoing.paginator = this.paginatorOut;
this.logger.info(this.RoutingPeersOutgoing);
diff --git a/src/app/shared/services/consts-enums-functions.ts b/src/app/shared/services/consts-enums-functions.ts
index fe38b6fa..b1eaa341 100644
--- a/src/app/shared/services/consts-enums-functions.ts
+++ b/src/app/shared/services/consts-enums-functions.ts
@@ -716,16 +716,16 @@ export const CLN_DEFAULT_PAGE_SETTINGS: PageSettingsCLN[] = [
{ pageId: 'routing', tables: [
{ tableId: 'forwarding_history', recordsPerPage: PAGE_SIZE, sortBy: 'received_time', sortOrder: SortOrderEnum.DESCENDING,
columnSelectionSM: ['received_time', 'in_msatoshi', 'out_msatoshi'],
- columnSelection: ['received_time', 'resolved_time', 'in_channel_alias', 'out_channel_alias', 'in_msatoshi', 'out_msatoshi', 'fee'] }
- // { tableId: 'routing_peers', recordsPerPage: PAGE_SIZE, sortBy: 'expires_at', sortOrder: SortOrderEnum.DESCENDING,
- // columnSelectionSM: ['expires_at', 'msatoshi'],
- // columnSelection: ['expires_at', 'paid_at', 'type', 'description', 'msatoshi', 'msatoshi_received'] },
- // { tableId: 'failed', recordsPerPage: PAGE_SIZE, sortBy: 'offer_id', sortOrder: SortOrderEnum.DESCENDING,
- // columnSelectionSM: ['offer_id', 'single_use'],
- // columnSelection: ['offer_id', 'single_use', 'used'] },
- // { tableId: 'local_failed', recordsPerPage: PAGE_SIZE, sortBy: 'lastUpdatedAt', sortOrder: SortOrderEnum.DESCENDING,
- // columnSelectionSM: ['lastUpdatedAt', 'amountMSat'],
- // columnSelection: ['lastUpdatedAt', 'title', 'amountMSat', 'description'] }
+ columnSelection: ['received_time', 'resolved_time', 'in_channel_alias', 'out_channel_alias', 'in_msatoshi', 'out_msatoshi', 'fee'] },
+ { tableId: 'routing_peers', recordsPerPage: PAGE_SIZE, sortBy: 'total_fee', sortOrder: SortOrderEnum.DESCENDING,
+ columnSelectionSM: ['alias', 'events', 'total_fee'],
+ columnSelection: ['channel_id', 'alias', 'events', 'total_amount', 'total_fee'] },
+ { tableId: 'failed', recordsPerPage: PAGE_SIZE, sortBy: 'received_time', sortOrder: SortOrderEnum.DESCENDING,
+ columnSelectionSM: ['received_time', 'in_channel_alias', 'in_msatoshi'],
+ columnSelection: ['received_time', 'resolved_time', 'in_channel_alias', 'out_channel_alias', 'in_msatoshi', 'out_msatoshi', 'fee'] },
+ { tableId: 'local_failed', recordsPerPage: PAGE_SIZE, sortBy: 'received_time', sortOrder: SortOrderEnum.DESCENDING,
+ columnSelectionSM: ['received_time', 'in_channel_alias', 'in_msatoshi'],
+ columnSelection: ['received_time', 'in_channel_alias', 'in_msatoshi', 'style', 'failreason'] }
] }
];
@@ -773,5 +773,17 @@ export const CLN_TABLES_DEF = {
forwarding_history: {
maxColumns: 8,
allowedColumns: ['received_time', 'resolved_time', 'in_channel', 'in_channel_alias', 'out_channel', 'out_channel_alias', 'payment_hash', 'in_msatoshi', 'out_msatoshi', 'fee']
+ },
+ routing_peers: {
+ maxColumns: 5,
+ allowedColumns: ['channel_id', 'alias', 'events', 'total_amount', 'total_fee']
+ },
+ failed: {
+ maxColumns: 7,
+ allowedColumns: ['received_time', 'resolved_time', 'in_channel', 'in_channel_alias', 'out_channel', 'out_channel_alias', 'in_msatoshi', 'out_msatoshi', 'fee']
+ },
+ local_failed: {
+ maxColumns: 6,
+ allowedColumns: ['received_time', 'in_channel', 'in_channel_alias', 'in_msatoshi', 'style', 'failreason']
}
};
|