diff --git a/src/app/cln/reports/transactions/transactions-report.component.ts b/src/app/cln/reports/transactions/transactions-report.component.ts index 617d6960..2c9d986a 100644 --- a/src/app/cln/reports/transactions/transactions-report.component.ts +++ b/src/app/cln/reports/transactions/transactions-report.component.ts @@ -54,19 +54,11 @@ export class CLNTransactionsReportComponent implements OnInit, OnDestroy { this.showYAxisLabel = !(this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM); this.store.select(clnPageSettings).pipe(takeUntil(this.unSubs[0])). subscribe((settings: { pageSettings: PageSettings[], apiCallStatus: ApiCallStatusPayload }) => { - if (settings.apiCallStatus.status === APICallStatusEnum.ERROR) { - if (this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM) { - this.displayedColumns = ['date', 'amount_paid', 'amount_received']; - } else { - this.displayedColumns = ['date', 'amount_paid', 'num_payments', 'amount_received', 'num_invoices']; - } + 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.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 = JSON.parse(JSON.stringify(this.tableSetting.columnSelection)); } this.displayedColumns.push('actions'); this.logger.info(this.displayedColumns); diff --git a/src/app/eclair/reports/transactions/transactions-report.component.ts b/src/app/eclair/reports/transactions/transactions-report.component.ts index 5e76c85a..379eda71 100644 --- a/src/app/eclair/reports/transactions/transactions-report.component.ts +++ b/src/app/eclair/reports/transactions/transactions-report.component.ts @@ -54,19 +54,11 @@ export class ECLTransactionsReportComponent implements OnInit, OnDestroy { this.showYAxisLabel = !(this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM); this.store.select(eclPageSettings).pipe(takeUntil(this.unSubs[0])). subscribe((settings: { pageSettings: PageSettings[], apiCallStatus: ApiCallStatusPayload }) => { - if (settings.apiCallStatus.status === APICallStatusEnum.ERROR) { - if (this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM) { - this.displayedColumns = ['date', 'amount_paid', 'amount_received']; - } else { - this.displayedColumns = ['date', 'amount_paid', 'num_payments', 'amount_received', 'num_invoices']; - } + this.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || ECL_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.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || ECL_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 = JSON.parse(JSON.stringify(this.tableSetting.columnSelection)); } this.displayedColumns.push('actions'); this.logger.info(this.displayedColumns); diff --git a/src/app/lnd/peers-channels/peers/peers.component.html b/src/app/lnd/peers-channels/peers/peers.component.html index 690cd38d..33b03dd2 100644 --- a/src/app/lnd/peers-channels/peers/peers.component.html +++ b/src/app/lnd/peers-channels/peers/peers.component.html @@ -17,25 +17,44 @@ - + - + + + + + + + + + + + + + + + + + + + + + - - + + - - + - - + diff --git a/src/app/lnd/peers-channels/peers/peers.component.scss b/src/app/lnd/peers-channels/peers/peers.component.scss index 742bdbab..880d2262 100644 --- a/src/app/lnd/peers-channels/peers/peers.component.scss +++ b/src/app/lnd/peers-channels/peers/peers.component.scss @@ -1,23 +1,10 @@ -.mat-column-alias { - flex: 1 1 25%; +.mat-column-alias, .mat-column-address, .mat-column-pub_key { + flex: 1 1 20%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.mat-column-pub_key { - flex: 1 1 35%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 2rem; -} - .mat-column-actions { min-height: 4.8rem; } - -.mat-column-sat_sent, .mat-column-sat_recv, .mat-column-ping_time { - flex: 1 1 13%; - width: 13%; -} diff --git a/src/app/lnd/reports/transactions/transactions-report.component.ts b/src/app/lnd/reports/transactions/transactions-report.component.ts index a778623d..8af7a391 100644 --- a/src/app/lnd/reports/transactions/transactions-report.component.ts +++ b/src/app/lnd/reports/transactions/transactions-report.component.ts @@ -59,19 +59,11 @@ export class TransactionsReportComponent implements OnInit, OnDestroy { this.showYAxisLabel = !(this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM); this.store.select(clnPageSettings).pipe(takeUntil(this.unSubs[0])). subscribe((settings: { pageSettings: PageSettings[], apiCallStatus: ApiCallStatusPayload }) => { - if (settings.apiCallStatus.status === APICallStatusEnum.ERROR) { - if (this.screenSize === ScreenSizeEnum.XS || this.screenSize === ScreenSizeEnum.SM) { - this.displayedColumns = ['date', 'amount_paid', 'amount_received']; - } else { - this.displayedColumns = ['date', 'amount_paid', 'num_payments', 'amount_received', 'num_invoices']; - } + this.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || LND_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.tableSetting = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSetting.tableId) || LND_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 = JSON.parse(JSON.stringify(this.tableSetting.columnSelection)); } this.displayedColumns.push('actions'); this.logger.info(this.displayedColumns); diff --git a/src/app/shared/services/consts-enums-functions.ts b/src/app/shared/services/consts-enums-functions.ts index 73f841c4..9f0d87f8 100644 --- a/src/app/shared/services/consts-enums-functions.ts +++ b/src/app/shared/services/consts-enums-functions.ts @@ -974,8 +974,8 @@ export const LND_TABLES_DEF = { allowedColumns: ['amount', 'incoming', 'expiration_height', 'hash_lock'] }, peers: { - maxColumns: 3, - allowedColumns: ['alias', 'pub_key', 'sat_sent', 'sat_recv', 'ping_time'] + maxColumns: 8, + allowedColumns: ['alias', 'pub_key', 'address', 'sync_type', 'inbound', 'bytes_sent', 'bytes_recv', 'sat_sent', 'sat_recv', 'ping_time'] } }, transactions: {
Alias {{peer?.alias}} {{peer?.alias}} Public Key {{peer?.pub_key}} {{peer?.pub_key}} Address {{peer?.address}} Sync Type {{peer?.sync_type | camelcaseWithReplace:'sync':'_'}} Inbound {{peer?.inbound ? 'Yes' : 'No'}} Bytes Sent {{peer?.bytes_sent | number}} Bytes Received {{peer?.bytes_recv | number}} - Sats Sent {{peer?.sat_sent | number}} Sats Sent {{peer?.sat_sent | number}} + Sats Received {{peer?.sat_recv | number}} {{peer?.sat_recv | number}} Ping Time (µs) {{peer?.ping_time | number}} + Ping Time (µs) {{peer?.ping_time | number}}