mempool/frontend/src/app/lightning/node/node-preview.component.html

67 lines
2.3 KiB
HTML
Raw Normal View History

2022-08-11 17:19:12 +00:00
<div class="box preview-box" *ngIf="(node$ | async) as node">
<h2 class="preview-header" i18n="lightning.node">lightning node</h2>
2022-08-11 17:42:29 +00:00
<div class="row d-flex justify-content-between full-width-row">
<h1 class="title"></h1>
<div class="title-wrapper">
<h1 class="title">{{ node.alias }}</h1>
</div>
2022-08-11 17:42:29 +00:00
<div class="badges mb-2">
<span class="badge rounded-pill badge-success" *ngFor="let socketType of socketTypes">{{ socketType }}</span>
</div>
</div>
2022-08-11 17:19:12 +00:00
<div class="row">
<div class="col-md">
<a class="subtitle" [routerLink]="['/lightning/node' | relativeUrl, node.public_key]">{{ node.public_key }}</a>
2022-08-11 17:19:12 +00:00
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td i18n="lightning.active-capacity">Active capacity</td>
<td>
<app-amount [satoshis]="node.capacity" [noFiat]="true"></app-amount>
</td>
</tr>
<tr>
<td i18n="lightning.active-channels">Active channels</td>
<td>
{{ node.active_channel_count }}
</td>
</tr>
<tr>
<td i18n="lightning.active-channels-avg">Average size</td>
<td>
<app-amount [satoshis]="node.avgCapacity" [noFiat]="true"></app-amount>
</td>
</tr>
<tr *ngIf="node.city">
<td i18n="location">Location</td>
<td>
<span>{{ node.city.en }}</span>
</td>
</tr>
<tr *ngIf="node.country">
<td i18n="country">Country</td>
<td>
{{ node.country.en }} {{ node.flag }}
</td>
</tr>
2022-08-11 17:42:29 +00:00
<tr *ngIf="!node.city && !node.country">
<td i18n="location">Location</td>
<td>
<span>unknown</span>
</td>
</tr>
2022-08-11 17:19:12 +00:00
</tbody>
</table>
</div>
<div class="col-md map-col">
<app-nodes-channels-map *ngIf="!error" [style]="'nodepage'" [publicKey]="node.public_key" [fitContainer]="true" [placeholder]="true" [hasLocation]="!!node.as_number" (readyEvent)="onMapReady()"></app-nodes-channels-map>
2022-08-11 17:19:12 +00:00
</div>
</div>
</div>
<ng-template [ngIf]="error">
<div class="text-center">
<span i18n="error.general-loading-data">Error loading data.</span>
</div>
</ng-template>