diff --git a/backend/controllers/lnd/channels.js b/backend/controllers/lnd/channels.js index 21936d3f..dbdc4726 100644 --- a/backend/controllers/lnd/channels.js +++ b/backend/controllers/lnd/channels.js @@ -38,7 +38,6 @@ export const getAllChannels = (req, res, next) => { channel.balancedness = (total === 0) ? 1 : (1 - Math.abs((local - remote) / total)).toFixed(3); return getAliasForChannel(req.session.selectedNode, channel); })).then((values) => { - body.channels = common.sortDescByKey(body.channels, 'balancedness'); logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Sorted Channels List Received', data: body }); return res.status(200).json(body); }).catch((errRes) => { @@ -110,7 +109,6 @@ export const getClosedChannels = (req, res, next) => { channel.close_type = (!channel.close_type) ? 'COOPERATIVE_CLOSE' : channel.close_type; return getAliasForChannel(req.session.selectedNode, channel); })).then((values) => { - body.channels = common.sortDescByKey(body.channels, 'close_height'); logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Closed Channels List Received', data: body }); return res.status(200).json(body); }).catch((errRes) => { diff --git a/backend/controllers/lnd/invoices.js b/backend/controllers/lnd/invoices.js index 2823d053..5fac0ebc 100644 --- a/backend/controllers/lnd/invoices.js +++ b/backend/controllers/lnd/invoices.js @@ -46,7 +46,6 @@ export const listInvoices = (req, res, next) => { invoice.r_hash = invoice.r_hash ? Buffer.from(invoice.r_hash, 'base64').toString('hex') : ''; invoice.description_hash = invoice.description_hash ? Buffer.from(invoice.description_hash, 'base64').toString('hex') : null; }); - body.invoices = common.sortDescByKey(body.invoices, 'creation_date'); } logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Invoice', msg: 'Sorted Invoices List Received', data: body }); res.status(200).json(body); diff --git a/backend/controllers/lnd/payments.js b/backend/controllers/lnd/payments.js index 6bfca966..70e850b4 100644 --- a/backend/controllers/lnd/payments.js +++ b/backend/controllers/lnd/payments.js @@ -58,10 +58,6 @@ export const getPayments = (req, res, next) => { options.url = req.session.selectedNode.ln_server_url + '/v1/payments?max_payments=' + req.query.max_payments + '&index_offset=' + req.query.index_offset + '&reversed=' + req.query.reversed; request(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Payments', msg: 'Payment List Received', data: body }); - if (body.payments && body.payments.length > 0) { - body.payments = common.sortDescByKey(body.payments, 'creation_date'); - } - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Payments', msg: 'Sorted Payments List Received', data: body }); res.status(200).json(body); }).catch((errRes) => { const err = common.handleError(errRes, 'Payments', 'List Payments Error', req.session.selectedNode); diff --git a/backend/controllers/lnd/peers.js b/backend/controllers/lnd/peers.js index fb905eab..b268631c 100644 --- a/backend/controllers/lnd/peers.js +++ b/backend/controllers/lnd/peers.js @@ -26,10 +26,6 @@ export const getPeers = (req, res, next) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Peers', msg: 'Peers List Received', data: body }); const peers = !body.peers ? [] : body.peers; return Promise.all(peers === null || peers === void 0 ? void 0 : peers.map((peer) => getAliasForPeers(req.session.selectedNode, peer))).then((values) => { - logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Peers', msg: 'Peers with Alias before Sort', data: body }); - if (body.peers) { - body.peers = common.sortDescByStrKey(body.peers, 'alias'); - } logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Peers', msg: 'Sorted Peers List Received', data: body.peers }); res.status(200).json(body.peers); }); @@ -56,7 +52,6 @@ export const postPeer = (req, res, next) => { const peers = (!body.peers) ? [] : body.peers; return Promise.all(peers === null || peers === void 0 ? void 0 : peers.map((peer) => getAliasForPeers(req.session.selectedNode, peer))).then((values) => { if (body.peers) { - body.peers = common.sortDescByStrKey(body.peers, 'alias'); body.peers = common.newestOnTop(body.peers, 'pub_key', req.body.pubkey); logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Peers', msg: 'Peers List after Connect Received', data: body }); } diff --git a/backend/controllers/lnd/switch.js b/backend/controllers/lnd/switch.js index 51827f41..fb16f1d4 100644 --- a/backend/controllers/lnd/switch.js +++ b/backend/controllers/lnd/switch.js @@ -46,9 +46,6 @@ export const getAllForwardingEvents = (req, start, end, offset, caller, callback } if (!body.last_offset_index || body.last_offset_index < offset + num_max_events) { responseData[caller].last_offset_index = body.last_offset_index ? body.last_offset_index : 0; - if (responseData[caller].forwarding_events) { - responseData[caller].forwarding_events = common.sortDescByKey(responseData[caller].forwarding_events, 'timestamp'); - } return callback(responseData[caller]); } else { diff --git a/backend/controllers/lnd/transactions.js b/backend/controllers/lnd/transactions.js index 8c42775b..0b4684d8 100644 --- a/backend/controllers/lnd/transactions.js +++ b/backend/controllers/lnd/transactions.js @@ -13,10 +13,6 @@ export const getTransactions = (req, res, next) => { options.url = req.session.selectedNode.ln_server_url + '/v1/transactions'; request(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Transactions', msg: 'Transactions List Received', data: body }); - if (body.transactions && body.transactions.length > 0) { - body.transactions = common.sortDescByKey(body.transactions, 'time_stamp'); - } - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Transactions', msg: 'Sorted Transactions List Received', data: body.transactions }); res.status(200).json(body.transactions); }).catch((errRes) => { const err = common.handleError(errRes, 'Transactions', 'List Transactions Error', req.session.selectedNode); diff --git a/backend/controllers/shared/loop.js b/backend/controllers/shared/loop.js index 2fd33b3d..290817fb 100644 --- a/backend/controllers/shared/loop.js +++ b/backend/controllers/shared/loop.js @@ -216,10 +216,6 @@ export const swaps = (req, res, next) => { options.url = options.url + '/v1/loop/swaps'; request(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Loop', msg: 'Loop Swaps Received', data: body }); - if (body.swaps && body.swaps.length > 0) { - body.swaps = common.sortDescByKey(body.swaps, 'initiation_time'); - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Loop', msg: 'Sorted Loop Swaps List Received', data: body }); - } res.status(200).json(body.swaps); }).catch((errRes) => { const err = common.handleError(errRes, 'Loop', 'List Swaps Error', req.session.selectedNode); diff --git a/server/controllers/lnd/channels.ts b/server/controllers/lnd/channels.ts index 5eda1bbd..3963d63c 100644 --- a/server/controllers/lnd/channels.ts +++ b/server/controllers/lnd/channels.ts @@ -40,7 +40,6 @@ export const getAllChannels = (req, res, next) => { return getAliasForChannel(req.session.selectedNode, channel); }) ).then((values) => { - body.channels = common.sortDescByKey(body.channels, 'balancedness'); logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Sorted Channels List Received', data: body }); return res.status(200).json(body); }).catch((errRes) => { @@ -109,7 +108,6 @@ export const getClosedChannels = (req, res, next) => { return getAliasForChannel(req.session.selectedNode, channel); }) ).then((values) => { - body.channels = common.sortDescByKey(body.channels, 'close_height'); logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Channels', msg: 'Closed Channels List Received', data: body }); return res.status(200).json(body); }).catch((errRes) => { diff --git a/server/controllers/lnd/invoices.ts b/server/controllers/lnd/invoices.ts index bcb2f92c..bb79d789 100644 --- a/server/controllers/lnd/invoices.ts +++ b/server/controllers/lnd/invoices.ts @@ -44,7 +44,6 @@ export const listInvoices = (req, res, next) => { invoice.r_hash = invoice.r_hash ? Buffer.from(invoice.r_hash, 'base64').toString('hex') : ''; invoice.description_hash = invoice.description_hash ? Buffer.from(invoice.description_hash, 'base64').toString('hex') : null; }); - body.invoices = common.sortDescByKey(body.invoices, 'creation_date'); } logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Invoice', msg: 'Sorted Invoices List Received', data: body }); res.status(200).json(body); diff --git a/server/controllers/lnd/payments.ts b/server/controllers/lnd/payments.ts index 11ebb78a..6122bbdd 100644 --- a/server/controllers/lnd/payments.ts +++ b/server/controllers/lnd/payments.ts @@ -57,10 +57,6 @@ export const getPayments = (req, res, next) => { options.url = req.session.selectedNode.ln_server_url + '/v1/payments?max_payments=' + req.query.max_payments + '&index_offset=' + req.query.index_offset + '&reversed=' + req.query.reversed; request(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Payments', msg: 'Payment List Received', data: body }); - if (body.payments && body.payments.length > 0) { - body.payments = common.sortDescByKey(body.payments, 'creation_date'); - } - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Payments', msg: 'Sorted Payments List Received', data: body }); res.status(200).json(body); }).catch((errRes) => { const err = common.handleError(errRes, 'Payments', 'List Payments Error', req.session.selectedNode); diff --git a/server/controllers/lnd/peers.ts b/server/controllers/lnd/peers.ts index a40bddfe..747d6b45 100644 --- a/server/controllers/lnd/peers.ts +++ b/server/controllers/lnd/peers.ts @@ -27,10 +27,6 @@ export const getPeers = (req, res, next) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Peers', msg: 'Peers List Received', data: body }); const peers = !body.peers ? [] : body.peers; return Promise.all(peers?.map((peer) => getAliasForPeers(req.session.selectedNode, peer))).then((values) => { - logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Peers', msg: 'Peers with Alias before Sort', data: body }); - if (body.peers) { - body.peers = common.sortDescByStrKey(body.peers, 'alias'); - } logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Peers', msg: 'Sorted Peers List Received', data: body.peers }); res.status(200).json(body.peers); }); @@ -56,7 +52,6 @@ export const postPeer = (req, res, next) => { const peers = (!body.peers) ? [] : body.peers; return Promise.all(peers?.map((peer) => getAliasForPeers(req.session.selectedNode, peer))).then((values) => { if (body.peers) { - body.peers = common.sortDescByStrKey(body.peers, 'alias'); body.peers = common.newestOnTop(body.peers, 'pub_key', req.body.pubkey); logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Peers', msg: 'Peers List after Connect Received', data: body }); } diff --git a/server/controllers/lnd/switch.ts b/server/controllers/lnd/switch.ts index 04477887..6d634e9f 100644 --- a/server/controllers/lnd/switch.ts +++ b/server/controllers/lnd/switch.ts @@ -40,9 +40,6 @@ export const getAllForwardingEvents = (req, start, end, offset, caller, callback } if (!body.last_offset_index || body.last_offset_index < offset + num_max_events) { responseData[caller].last_offset_index = body.last_offset_index ? body.last_offset_index : 0; - if (responseData[caller].forwarding_events) { - responseData[caller].forwarding_events = common.sortDescByKey(responseData[caller].forwarding_events, 'timestamp'); - } return callback(responseData[caller]); } else { return getAllForwardingEvents(req, start, end, offset + num_max_events, caller, callback); diff --git a/server/controllers/lnd/transactions.ts b/server/controllers/lnd/transactions.ts index 65f400d9..688ddb78 100644 --- a/server/controllers/lnd/transactions.ts +++ b/server/controllers/lnd/transactions.ts @@ -12,10 +12,6 @@ export const getTransactions = (req, res, next) => { options.url = req.session.selectedNode.ln_server_url + '/v1/transactions'; request(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Transactions', msg: 'Transactions List Received', data: body }); - if (body.transactions && body.transactions.length > 0) { - body.transactions = common.sortDescByKey(body.transactions, 'time_stamp'); - } - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Transactions', msg: 'Sorted Transactions List Received', data: body.transactions }); res.status(200).json(body.transactions); }).catch((errRes) => { const err = common.handleError(errRes, 'Transactions', 'List Transactions Error', req.session.selectedNode); diff --git a/server/controllers/shared/loop.ts b/server/controllers/shared/loop.ts index 84d8953b..ab13fa5a 100644 --- a/server/controllers/shared/loop.ts +++ b/server/controllers/shared/loop.ts @@ -219,10 +219,6 @@ export const swaps = (req, res, next) => { options.url = options.url + '/v1/loop/swaps'; request(options).then((body) => { logger.log({ selectedNode: req.session.selectedNode, level: 'DEBUG', fileName: 'Loop', msg: 'Loop Swaps Received', data: body }); - if (body.swaps && body.swaps.length > 0) { - body.swaps = common.sortDescByKey(body.swaps, 'initiation_time'); - logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Loop', msg: 'Sorted Loop Swaps List Received', data: body }); - } res.status(200).json(body.swaps); }).catch((errRes) => { const err = common.handleError(errRes, 'Loop', 'List Swaps Error', req.session.selectedNode); diff --git a/src/app/lnd/backup/channel-backup-table/channel-backup-table.component.html b/src/app/lnd/backup/channel-backup-table/channel-backup-table.component.html index eab6f3de..9d1e5a20 100644 --- a/src/app/lnd/backup/channel-backup-table/channel-backup-table.component.html +++ b/src/app/lnd/backup/channel-backup-table/channel-backup-table.component.html @@ -31,7 +31,9 @@
+ |
+
+ |
+ Transaction ID | -
-
- 0 && dustUtxos.length > 0 && !isDustUTXO">
-
- | + {{utxo.outpoint.txid_str}} | @@ -29,8 +32,12 @@Label | -{{utxo?.label}} | +Label | ++ + {{utxo?.label}} + + | Amount (Sats) | diff --git a/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.scss b/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.scss index c41e2e91..c173bb1c 100644 --- a/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.scss +++ b/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.scss @@ -1,12 +1,8 @@ -.mat-column-label { - padding-left: 1rem; - flex: 1 1 15%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; +.mat-column-is_dust { + width: 2rem; } -.mat-column-tx_id { +.mat-column-label, .mat-column-tx_id { flex: 1 1 15%; & .ellipsis-child { white-space: nowrap; diff --git a/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.ts b/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.ts index 7ada8279..487032a5 100644 --- a/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.ts +++ b/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.ts @@ -1,4 +1,5 @@ import { Component, ViewChild, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; import { DecimalPipe } from '@angular/common'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -9,7 +10,7 @@ import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { UTXO } from '../../../../shared/models/lndModels'; -import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, WALLET_ADDRESS_TYPE, APICallStatusEnum } from '../../../../shared/services/consts-enums-functions'; +import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, WALLET_ADDRESS_TYPE, APICallStatusEnum, SortOrderEnum, LND_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'; @@ -19,7 +20,8 @@ import { OnChainLabelModalComponent } from '../../on-chain-label-modal/on-chain- import { RTLEffects } from '../../../../store/rtl.effects'; import { RTLState } from '../../../../store/rtl.state'; import { openAlert, openConfirmation } from '../../../../store/rtl.actions'; -import { utxos } from '../../../store/lnd.selector'; +import { lndPageSettings, utxos } from '../../../store/lnd.selector'; +import { PageSettings, TableSetting } from '../../../../shared/models/pageSettings'; @Component({ selector: 'rtl-on-chain-utxos', @@ -34,10 +36,13 @@ export class OnChainUTXOsComponent implements OnInit, OnChanges, OnDestroy { @ViewChild(MatSort, { static: false }) sort: MatSort | undefined; @ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined; @Input() isDustUTXO = false; + public faMoneyBillWave = faMoneyBillWave; + public DUST_AMOUNT = 1000; + public PAGE_ID = 'on_chain'; + public tableSetting: TableSetting = { tableId: 'utxos', recordsPerPage: PAGE_SIZE, sortBy: 'tx_id', sortOrder: SortOrderEnum.DESCENDING }; public utxos: UTXO[]; public dustUtxos: UTXO[]; public addressType = WALLET_ADDRESS_TYPE; - faMoneyBillWave = faMoneyBillWave; public displayedColumns: any[] = []; public listUTXOs: any; public pageSize = PAGE_SIZE; @@ -48,23 +53,34 @@ export class OnChainUTXOsComponent implements OnInit, OnChanges, OnDestroy { public selFilter = ''; public apiCallStatus: ApiCallStatusPayload | null = null; public apiCallStatusEnum = APICallStatusEnum; - private unSubs: Array
---|
+ | + + + | ++ |
+ |
+ Peer |
-
-
-
|
diff --git a/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts b/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts
index 85d0f119..daf311be 100644
--- a/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts
+++ b/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts
@@ -12,7 +12,7 @@ import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
import { ChannelInformationComponent } from '../../channel-information-modal/channel-information.component';
import { SelNodeChild } from '../../../../../shared/models/RTLconfig';
import { BlockchainBalance, Channel, ChannelsSummary, GetInfo, LightningBalance, Peer } from '../../../../../shared/models/lndModels';
-import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, UserPersonaEnum, LoopTypeEnum, APICallStatusEnum, UI_MESSAGES } from '../../../../../shared/services/consts-enums-functions';
+import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel, AlertTypeEnum, DataTypeEnum, ScreenSizeEnum, UserPersonaEnum, LoopTypeEnum, APICallStatusEnum, UI_MESSAGES, SortOrderEnum, LND_DEFAULT_PAGE_SETTINGS } from '../../../../../shared/services/consts-enums-functions';
import { ApiCallStatusPayload } from '../../../../../shared/models/apiCallsPayload';
import { LoggerService } from '../../../../../shared/services/logger.service';
import { LoopService } from '../../../../../shared/services/loop.service';
@@ -26,7 +26,8 @@ import { RTLEffects } from '../../../../../store/rtl.effects';
import { RTLState } from '../../../../../store/rtl.state';
import { openAlert, openConfirmation } from '../../../../../store/rtl.actions';
import { channelLookup, fetchChannels, updateChannel } from '../../../../store/lnd.actions';
-import { blockchainBalance, channels, lndNodeInformation, lndNodeSettings, peers } from '../../../../store/lnd.selector';
+import { blockchainBalance, channels, lndNodeInformation, lndNodeSettings, lndPageSettings, peers } from '../../../../store/lnd.selector';
+import { PageSettings, TableSetting } from '../../../../../shared/models/pageSettings';
@Component({
selector: 'rtl-channel-open-table',
@@ -40,6 +41,8 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
+ public PAGE_ID = 'peers_channels';
+ public tableSetting: TableSetting = { tableId: 'open', recordsPerPage: PAGE_SIZE, sortBy: 'balancedness', sortOrder: SortOrderEnum.DESCENDING };
public timeUnit = 'mins:secs';
public userPersonaEnum = UserPersonaEnum;
public selNode: SelNodeChild | null = {};
@@ -66,15 +69,6 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
constructor(private logger: LoggerService, private store: Store{{nonRPeer.remote_balance | number}} | Actions | -+ |
+ Actions
+ |
+ {{rPeer.total_amount | number}} | Actions | +
+ Actions
+ |
@@ -75,12 +77,6 @@ | Total Amount (Sats) | {{rPeer.total_amount | number}} | Actions | -- - | -
No outgoing routing peer available. diff --git a/src/app/lnd/routing/routing-peers/routing-peers.component.ts b/src/app/lnd/routing/routing-peers/routing-peers.component.ts index e678b116..683d6da1 100644 --- a/src/app/lnd/routing/routing-peers/routing-peers.component.ts +++ b/src/app/lnd/routing/routing-peers/routing-peers.component.ts @@ -7,13 +7,14 @@ import { MatTableDataSource } from '@angular/material/table'; import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator'; import { ForwardingEvent, RoutingPeers, SwitchRes } from '../../../shared/models/lndModels'; -import { AlertTypeEnum, APICallStatusEnum, DataTypeEnum, getPaginatorLabel, PAGE_SIZE, PAGE_SIZE_OPTIONS, ScreenSizeEnum } from '../../../shared/services/consts-enums-functions'; +import { AlertTypeEnum, APICallStatusEnum, DataTypeEnum, getPaginatorLabel, LND_DEFAULT_PAGE_SETTINGS, PAGE_SIZE, PAGE_SIZE_OPTIONS, ScreenSizeEnum, SortOrderEnum } 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'; import { openAlert } from '../../../store/rtl.actions'; import { RTLState } from '../../../store/rtl.state'; -import { forwardingHistory } from '../../store/lnd.selector'; +import { forwardingHistory, lndPageSettings } from '../../store/lnd.selector'; +import { PageSettings, TableSetting } from '../../../shared/models/pageSettings'; @Component({ selector: 'rtl-routing-peers', @@ -29,6 +30,8 @@ export class RoutingPeersComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild('tableOut', { read: MatSort, static: false }) sortOut: MatSort; @ViewChild('paginatorIn', { static: false }) paginatorIn: MatPaginator | undefined; @ViewChild('paginatorOut', { static: false }) paginatorOut: MatPaginator | undefined; + public PAGE_ID = 'routing'; + public tableSetting: TableSetting = { tableId: 'routing_peers', recordsPerPage: PAGE_SIZE, sortBy: 'total_amount', sortOrder: SortOrderEnum.DESCENDING }; public routingPeersData: any[] = []; public displayedColumns: any[] = []; public RoutingPeersIncoming = new MatTableDataSource
|
---|