2022-10-18 21:51:20 +00:00
< div fxLayout = "column" >
2021-04-24 19:08:44 +00:00
< div fxLayout = "column" fxLayout . gt-xs = "row" fxLayoutAlign . gt-xs = "start center" fxLayoutAlign = "start stretch" class = "page-sub-title-container" >
2020-01-03 20:04:00 +00:00
< div fxFlex = "70" > < / div >
2022-11-02 01:33:13 +00:00
< div fxFlex = "30" fxLayoutAlign . gt-xs = "space-between center" fxLayout = "row" fxLayoutAlign = "space-between stretch" >
< mat-form-field fxFlex = "49" >
< mat-select placeholder = "Filter By" tabindex = "1" [ ( ngModel ) ] = " selFilterBy " ( selectionChange ) = " selFilter = '' ; applyFilter ( ) " name = "filterBy" >
2022-11-02 22:59:37 +00:00
< mat-option * ngFor = "let column of ['all'].concat(displayedColumns.slice(0, -1))" [ value ] = " column " > {{getLabel(column)}}< / mat-option >
2022-11-02 01:33:13 +00:00
< / mat-select >
< / mat-form-field >
< mat-form-field fxFlex = "49" >
< input matInput [ ( ngModel ) ] = " selFilter " ( input ) = " applyFilter ( ) " ( keyup ) = " applyFilter ( ) " name = "filter" placeholder = "Filter" >
< / mat-form-field >
< / div >
2020-01-03 20:04:00 +00:00
< / div >
2021-12-29 23:08:41 +00:00
< mat-progress-bar * ngIf = "apiCallStatus.status === apiCallStatusEnum.INITIATED" mode = "indeterminate" > < / mat-progress-bar >
2020-12-20 23:36:04 +00:00
< div [ perfectScrollbar ] fxLayout = "row" fxLayoutAlign = "start center" fxFlex = "100" class = "table-container w-100" >
2021-08-28 21:03:18 +00:00
< table mat-table # table [ dataSource ] = " channels " matSort [ ngClass ] = " { ' overflow-auto error-border ' : errorMessage ! = = ' ' , ' overflow-auto ' : true } " >
2022-10-18 21:51:20 +00:00
< ng-container matColumnDef = "private" >
2022-11-02 22:59:37 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header matTooltip = "Private" > < / th >
2020-08-06 23:47:19 +00:00
< td mat-cell * matCellDef = "let channel" >
2022-10-18 21:51:20 +00:00
< span * ngIf = "channel.private" class = "mr-1" matTooltip = "Private" matTooltipPosition = "right" > < fa-icon [ icon ] = " faEyeSlash " > < / fa-icon > < / span >
< span * ngIf = "!channel.private" class = "mr-1" matTooltip = "Public" matTooltipPosition = "right" > < fa-icon [ icon ] = " faEye " > < / fa-icon > < / span >
< / td >
< / ng-container >
< ng-container matColumnDef = "short_channel_id" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > Short Channel ID< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" >
2022-11-02 01:33:13 +00:00
< div class = "ellipsis-parent" [ ngStyle ] = " { ' width ' : ( screenSize = == screenSizeEnum . XS ) ? ' 10rem ' : colWidth } " >
2020-08-06 23:47:19 +00:00
< span class = "ellipsis-child" > {{channel?.short_channel_id}}< / span >
< / div >
< / td >
2020-01-04 01:06:36 +00:00
< / ng-container >
< ng-container matColumnDef = "alias" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > Alias< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" >
2022-11-02 01:33:13 +00:00
< div class = "ellipsis-parent" [ ngStyle ] = " { ' width ' : ( screenSize = == screenSizeEnum . XS ) ? ' 10rem ' : colWidth } " >
2021-02-21 19:02:31 +00:00
< span class = "ellipsis-child" > {{channel?.alias}}< / span >
< / div >
< / td >
2020-01-04 01:06:36 +00:00
< / ng-container >
2022-10-18 21:51:20 +00:00
< ng-container matColumnDef = "id" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > ID< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" >
2022-11-02 01:33:13 +00:00
< div class = "ellipsis-parent" [ ngStyle ] = " { ' width ' : ( screenSize = == screenSizeEnum . XS ) ? ' 10rem ' : colWidth } " >
2022-10-18 21:51:20 +00:00
< span class = "ellipsis-child" > {{channel?.id}}< / span >
< / div >
< / td >
< / ng-container >
< ng-container matColumnDef = "channel_id" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > Channel ID< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" >
2022-11-02 01:33:13 +00:00
< div class = "ellipsis-parent" [ ngStyle ] = " { ' width ' : ( screenSize = == screenSizeEnum . XS ) ? ' 10rem ' : colWidth } " >
2022-10-18 21:51:20 +00:00
< span class = "ellipsis-child" > {{channel?.channel_id}}< / span >
< / div >
< / td >
< / ng-container >
< ng-container matColumnDef = "funding_txid" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > Funding Transaction ID< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" >
2022-11-02 01:33:13 +00:00
< div class = "ellipsis-parent" [ ngStyle ] = " { ' width ' : ( screenSize = == screenSizeEnum . XS ) ? ' 10rem ' : colWidth } " >
2022-10-18 21:51:20 +00:00
< span class = "ellipsis-child" > {{channel?.funding_txid}}< / span >
< / div >
< / td >
< / ng-container >
2020-01-04 01:06:36 +00:00
< ng-container matColumnDef = "connected" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > Connected< / th >
< td mat-cell * matCellDef = "let channel" > {{(channel?.connected) ? 'Connected' : 'Disconnected'}}< / td >
2020-01-04 01:06:36 +00:00
< / ng-container >
2022-10-18 21:51:20 +00:00
< ng-container matColumnDef = "our_channel_reserve_satoshis" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header arrowPosition = "before" > Local Reserve (Sats)< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" > < span fxLayoutAlign = "end center" >
2022-10-18 21:51:20 +00:00
{{channel?.our_channel_reserve_satoshis | number:'1.0-0'}} < / span > < / td >
< / ng-container >
< ng-container matColumnDef = "their_channel_reserve_satoshis" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header arrowPosition = "before" > Remote Reserve (Sats)< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" > < span fxLayoutAlign = "end center" >
2022-10-18 21:51:20 +00:00
{{channel?.their_channel_reserve_satoshis | number:'1.0-0'}} < / span > < / td >
2020-01-03 20:04:00 +00:00
< / ng-container >
2022-10-18 21:51:20 +00:00
< ng-container matColumnDef = "msatoshi_total" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header arrowPosition = "before" > Total (Sats)< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" > < span fxLayoutAlign = "end center" >
2022-10-18 21:51:20 +00:00
{{channel?.msatoshi_total/1000 | number:channel?.msatoshi_to_us < 1000 ? ' 1 . 0-4 ' : ' 1 . 0-0 ' } } < / span > < / td >
< / ng-container >
< ng-container matColumnDef = "spendable_msatoshi" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header arrowPosition = "before" > Spendable (Sats)< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" > < span fxLayoutAlign = "end center" >
2022-10-18 21:51:20 +00:00
{{channel?.spendable_msatoshi/1000 | number:channel?.msatoshi_to_us < 1000 ? ' 1 . 0-4 ' : ' 1 . 0-0 ' } } < / span > < / td >
2020-01-03 20:04:00 +00:00
< / ng-container >
2020-01-04 01:06:36 +00:00
< ng-container matColumnDef = "msatoshi_to_us" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header arrowPosition = "before" > Local Balance (Sats)< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" > < span fxLayoutAlign = "end center" >
2020-08-22 20:07:21 +00:00
{{channel?.msatoshi_to_us/1000 | number:channel?.msatoshi_to_us < 1000 ? ' 1 . 0-4 ' : ' 1 . 0-0 ' } } < / span > < / td >
2020-01-07 02:41:19 +00:00
< / ng-container >
< ng-container matColumnDef = "msatoshi_to_them" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header arrowPosition = "before" > Remote Balance (Sats)< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" > < span fxLayoutAlign = "end center" >
2020-08-22 20:07:21 +00:00
{{channel?.msatoshi_to_them/1000 | number:channel?.msatoshi_to_them < 1000 ? ' 1 . 0-4 ' : ' 1 . 0-0 ' } } < / span > < / td >
2020-01-03 20:04:00 +00:00
< / ng-container >
< ng-container matColumnDef = "balancedness" >
2022-11-01 00:43:54 +00:00
< th mat-header-cell * matHeaderCellDef mat-sort-header > Balance Score< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" >
2020-01-03 20:04:00 +00:00
< div fxLayout = "row" >
< mat-hint fxFlex = "100" fxLayoutAlign = "center center" class = "font-size-80" > {{channel.balancedness || 0 | number}}< / mat-hint >
< / div >
2020-01-08 21:11:37 +00:00
< mat-progress-bar mode = "determinate" value = "{{channel.msatoshi_to_us && channel.msatoshi_to_us > 0 ? ((+channel.msatoshi_to_us/((+channel.msatoshi_to_us)+(+channel.msatoshi_to_them)))*100) : 0}}" > < / mat-progress-bar >
2020-01-03 20:04:00 +00:00
< / td >
< / ng-container >
< ng-container matColumnDef = "actions" >
2022-10-28 16:41:38 +00:00
< th mat-header-cell * matHeaderCellDef >
2022-10-18 21:51:20 +00:00
< div class = "bordered-box table-actions-select" fxLayoutAlign = "center center" >
2020-01-03 20:04:00 +00:00
< mat-select placeholder = "Actions" tabindex = "1" class = "mr-0" >
< mat-select-trigger > < / mat-select-trigger >
< mat-option ( click ) = " onChannelUpdate ( ' all ' ) " > Update Fee Policy< / mat-option >
2020-03-10 17:25:52 +00:00
< mat-option ( click ) = " onDownloadCSV ( ) " > Download CSV< / mat-option >
2020-01-03 20:04:00 +00:00
< / mat-select >
< / div >
2022-11-01 00:43:54 +00:00
< / th >
2022-10-28 16:41:38 +00:00
< td mat-cell * matCellDef = "let channel" fxLayoutAlign = "end center" >
2021-02-21 19:02:31 +00:00
< div class = "bordered-box table-actions-select" fxLayoutAlign = "center center" >
2020-01-03 20:04:00 +00:00
< mat-select placeholder = "Actions" tabindex = "2" class = "mr-0" >
< mat-select-trigger > < / mat-select-trigger >
< mat-option ( click ) = " onChannelClick ( channel , $ event ) " > View Info< / mat-option >
2020-01-04 01:06:36 +00:00
< mat-option ( click ) = " onViewRemotePolicy ( channel ) " > View Remote Fee< / mat-option >
2020-01-03 20:04:00 +00:00
< mat-option ( click ) = " onChannelUpdate ( channel ) " > Update Fee Policy< / mat-option >
< mat-option ( click ) = " onChannelClose ( channel ) " > Close Channel< / mat-option >
< / mat-select >
< / div >
< / td >
< / ng-container >
< ng-container matColumnDef = "no_peer" >
< td mat-footer-cell * matFooterCellDef colspan = "4" >
2021-12-29 23:08:41 +00:00
< p * ngIf = "numPeers<1 && (!channels?.data || channels?.data?.length<1) && apiCallStatus.status === apiCallStatusEnum.COMPLETED" > No peers connected. Add a peer in order to open a channel.< / p >
< p * ngIf = "numPeers>0 && (!channels?.data || channels?.data?.length<1) && apiCallStatus.status === apiCallStatusEnum.COMPLETED" > No channel available.< / p >
< p * ngIf = "(!channels?.data || channels?.data?.length<1) && apiCallStatus.status === apiCallStatusEnum.INITIATED" > Getting channels...< / p >
< p * ngIf = "(!channels?.data || channels?.data?.length<1) && apiCallStatus.status === apiCallStatusEnum.ERROR" > {{errorMessage}}< / p >
2020-01-03 20:04:00 +00:00
< / td >
< / ng-container >
2020-10-12 22:43:16 +00:00
< tr mat-footer-row * matFooterRowDef = "['no_peer']" [ ngClass ] = " { ' display-none ' : numPeers > 0 & & channels?.data & & channels?.data?.length>0}">< / tr >
2022-10-16 05:51:29 +00:00
< tr mat-header-row * matHeaderRowDef = "displayedColumns" > < / tr >
2020-01-03 20:04:00 +00:00
< tr mat-row * matRowDef = "let row; columns: displayedColumns;" > < / tr >
< / table >
< / div >
2021-04-24 19:08:44 +00:00
< mat-paginator [ pageSize ] = " pageSize " [ pageSizeOptions ] = " pageSizeOptions " [ showFirstLastButtons ] = " screenSize = == screenSizeEnum . XS ? false : true " class = "mb-1" > < / mat-paginator >
2020-01-03 20:04:00 +00:00
< / div >