From b1b1de5addb8ea3ffbe23a6e242b6950f6d2e76c Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Tue, 25 Oct 2022 18:06:23 -0700 Subject: [PATCH] lnd open channels page layout --- .../channel-open-table.component.html | 70 ++++++++++++++++++- .../channel-open-table.component.scss | 4 +- .../channel-open-table.component.ts | 1 + src/app/shared/models/lndModels.ts | 1 + .../shared/services/consts-enums-functions.ts | 4 +- 5 files changed, 75 insertions(+), 5 deletions(-) diff --git a/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.html b/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.html index b8a93764..c9561556 100644 --- a/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.html +++ b/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.html @@ -25,15 +25,83 @@ Peer -
+
{{channel.remote_alias || channel.remote_pubkey}}
+ + Pubkey + +
+ {{channel.remote_pubkey}} +
+ +
+ + Channel Point + +
+ {{channel.channel_point}} +
+ +
+ + Channel Id + +
+ {{channel.chan_id}} +
+ +
+ + Initiator + {{channel.initiator ? 'Yes' : 'No'}} + + + Static Remote Key + {{channel.static_remote_key ? 'Yes' : 'No'}} + Uptime ({{timeUnit}}) {{channel.uptime_str}} + + Lifetime ({{timeUnit}}) + {{channel.lifetime_str}} + + + Commit Fee (Sats) + {{channel.commit_fee | number}} + + + Commit Weight + {{channel.commit_weight | number}} + + + Fee/KW + {{channel.fee_per_kw | number}} + + + Updates + {{channel.num_updates | number}} + + + Unsettled Balance (Sats) + {{channel.unsettled_balance | number}} + + + Capacity (Sats) + {{channel.capacity | number}} + + + Local Reserve (Sats) + {{channel.local_chan_reserve_sat | number}} + + + Remote Reserve (Sats) + {{channel.remote_chan_reserve_sat | number}} + Sats Sent {{channel.total_satoshis_sent | number}} diff --git a/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.scss b/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.scss index 4cfc14d8..c80054aa 100644 --- a/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.scss +++ b/src/app/lnd/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.scss @@ -1,6 +1,6 @@ @import "../../../../../shared/theme/styles/mixins.scss"; -.mat-column-remote_alias { +.mat-column-remote_alias, .mat-column-remote_pubkey, .mat-column-channel_point, .mat-column-chan_id { flex: 0 0 15%; width: 15%; & .ellipsis-parent { @@ -21,7 +21,7 @@ } } -.mat-column-uptime, .mat-column-local_balance, .mat-column-remote_balance, .mat-column-total_satoshis_sent, .mat-column-total_satoshis_received { +.mat-column-uptime, .mat-column-lifetime, .mat-column-local_balance, .mat-column-remote_balance, .mat-column-total_satoshis_sent, .mat-column-total_satoshis_received { flex: 1 1 10%; width: 10%; white-space: nowrap; 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 daf311be..ad4d2778 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 @@ -361,6 +361,7 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr } channels.forEach((channel) => { channel.uptime_str = channel.uptime ? (this.decimalPipe.transform(Math.floor(+channel.uptime / maxDivider), '2.0-0') + ':' + this.decimalPipe.transform(Math.round((+channel.uptime % maxDivider) / minDivider), '2.0-0')) : '---'; + channel.lifetime_str = channel.lifetime ? (this.decimalPipe.transform(Math.floor(+channel.lifetime / maxDivider), '2.0-0') + ':' + this.decimalPipe.transform(Math.round((+channel.lifetime % maxDivider) / minDivider), '2.0-0')) : '---'; }); return channels; } diff --git a/src/app/shared/models/lndModels.ts b/src/app/shared/models/lndModels.ts index 5a3bd7a9..bbb0c31b 100644 --- a/src/app/shared/models/lndModels.ts +++ b/src/app/shared/models/lndModels.ts @@ -80,6 +80,7 @@ export interface Channel { uptime?: string; uptime_str?: string; lifetime?: string; + lifetime_str?: string; static_remote_key?: boolean; balancedness?: number; // Between 0-1-0 } diff --git a/src/app/shared/services/consts-enums-functions.ts b/src/app/shared/services/consts-enums-functions.ts index 9f0d87f8..19b1fdd8 100644 --- a/src/app/shared/services/consts-enums-functions.ts +++ b/src/app/shared/services/consts-enums-functions.ts @@ -946,8 +946,8 @@ export const LND_TABLES_DEF = { }, peers_channels: { open: { - maxColumns: 7, - allowedColumns: ['remote_alias', 'uptime', 'total_satoshis_sent', 'total_satoshis_received', 'local_balance', 'remote_balance', 'balancedness'] + maxColumns: 8, + allowedColumns: ['remote_alias', 'remote_pubkey', 'channel_point', 'chan_id', 'initiator', 'static_remote_key', 'uptime', 'lifetime', 'commit_fee', 'commit_weight', 'fee_per_kw', 'num_updates', 'unsettled_balance', 'capacity', 'local_chan_reserve_sat', 'remote_chan_reserve_sat', 'total_satoshis_sent', 'total_satoshis_received', 'local_balance', 'remote_balance', 'balancedness'] }, pending_open: { maxColumns: 7,