Merge branch 'master' into taproot-fee-tooltip
This commit is contained in:
		
						commit
						777a1bb4c1
					
				@ -9,7 +9,10 @@ class NodesApi {
 | 
			
		||||
        geo_names_country.names as country, geo_names_subdivision.names as subdivision,
 | 
			
		||||
          (SELECT Count(*)
 | 
			
		||||
          FROM channels
 | 
			
		||||
          WHERE channels.status < 2 AND ( channels.node1_public_key = ? OR channels.node2_public_key = ? )) AS channel_count,
 | 
			
		||||
          WHERE channels.status = 2 AND ( channels.node1_public_key = ? OR channels.node2_public_key = ? )) AS channel_closed_count,
 | 
			
		||||
          (SELECT Count(*)
 | 
			
		||||
          FROM channels
 | 
			
		||||
          WHERE channels.status < 2 AND ( channels.node1_public_key = ? OR channels.node2_public_key = ? )) AS channel_active_count,
 | 
			
		||||
          (SELECT Sum(capacity)
 | 
			
		||||
          FROM channels
 | 
			
		||||
          WHERE channels.status < 2 AND ( channels.node1_public_key = ? OR channels.node2_public_key = ? )) AS capacity,
 | 
			
		||||
@ -23,7 +26,7 @@ class NodesApi {
 | 
			
		||||
        LEFT JOIN geo_names geo_names_country on geo_names_country.id = country_id
 | 
			
		||||
        WHERE public_key = ?
 | 
			
		||||
      `;
 | 
			
		||||
      const [rows]: any = await DB.query(query, [public_key, public_key, public_key, public_key, public_key, public_key, public_key]);
 | 
			
		||||
      const [rows]: any = await DB.query(query, [public_key, public_key, public_key, public_key, public_key, public_key, public_key, public_key, public_key]);
 | 
			
		||||
      if (rows.length > 0) {
 | 
			
		||||
        rows[0].as_organization = JSON.parse(rows[0].as_organization);
 | 
			
		||||
        rows[0].subdivision = JSON.parse(rows[0].subdivision);
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
    </div>
 | 
			
		||||
  </form>
 | 
			
		||||
 | 
			
		||||
  <table class="table table-borderless">
 | 
			
		||||
  <table class="table table-borderless" *ngIf="response.channels.length > 1">
 | 
			
		||||
    <ng-container *ngTemplateOutlet="tableHeader"></ng-container>
 | 
			
		||||
    <tbody>
 | 
			
		||||
      <tr *ngFor="let channel of response.channels; let i = index;">
 | 
			
		||||
@ -19,7 +19,11 @@
 | 
			
		||||
    </tbody>
 | 
			
		||||
  </table>
 | 
			
		||||
  
 | 
			
		||||
  <ngb-pagination class="pagination-container float-right" [size]="paginationSize" [collectionSize]="response.totalItems" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true" [ellipses]="false"></ngb-pagination>
 | 
			
		||||
  <ngb-pagination *ngIf="response.channels.length > 1" class="pagination-container float-right" [size]="paginationSize" [collectionSize]="response.totalItems" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true" [ellipses]="false"></ngb-pagination>
 | 
			
		||||
 | 
			
		||||
  <table class="table table-borderless" *ngIf="response.channels.length === 0">
 | 
			
		||||
    <div class="d-flex justify-content-center" i18n="lightning.empty-channels-list">No channels to display</div>
 | 
			
		||||
  </table>
 | 
			
		||||
</div>
 | 
			
		||||
  
 | 
			
		||||
<ng-template #tableHeader>
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core';
 | 
			
		||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
 | 
			
		||||
import { FormBuilder, FormGroup } from '@angular/forms';
 | 
			
		||||
import { BehaviorSubject, combineLatest, merge, Observable, of } from 'rxjs';
 | 
			
		||||
import { map, startWith, switchMap } from 'rxjs/operators';
 | 
			
		||||
@ -12,6 +12,7 @@ import { LightningApiService } from '../lightning-api.service';
 | 
			
		||||
})
 | 
			
		||||
export class ChannelsListComponent implements OnInit, OnChanges {
 | 
			
		||||
  @Input() publicKey: string;
 | 
			
		||||
  @Output() channelsStatusChangedEvent = new EventEmitter<string>();
 | 
			
		||||
  channels$: Observable<any>;
 | 
			
		||||
 | 
			
		||||
  // @ts-ignore
 | 
			
		||||
@ -41,13 +42,17 @@ export class ChannelsListComponent implements OnInit, OnChanges {
 | 
			
		||||
 | 
			
		||||
  ngOnChanges(): void {
 | 
			
		||||
    this.channelStatusForm.get('status').setValue(this.defaultStatus, { emitEvent: false })
 | 
			
		||||
    this.channelsStatusChangedEvent.emit(this.defaultStatus);
 | 
			
		||||
 | 
			
		||||
    this.channels$ = combineLatest([
 | 
			
		||||
      this.channelsPage$,
 | 
			
		||||
      this.channelStatusForm.get('status').valueChanges.pipe(startWith(this.defaultStatus))
 | 
			
		||||
    ])
 | 
			
		||||
    .pipe(
 | 
			
		||||
      switchMap(([page, status]) =>this.lightningApiService.getChannelsByNodeId$(this.publicKey, (page -1) * this.itemsPerPage, status)),
 | 
			
		||||
      switchMap(([page, status]) => {
 | 
			
		||||
        this.channelsStatusChangedEvent.emit(status);
 | 
			
		||||
        return this.lightningApiService.getChannelsByNodeId$(this.publicKey, (page -1) * this.itemsPerPage, status);
 | 
			
		||||
      }),
 | 
			
		||||
      map((response) => {
 | 
			
		||||
        return {
 | 
			
		||||
          channels: response.body,
 | 
			
		||||
 | 
			
		||||
@ -1,126 +1,145 @@
 | 
			
		||||
<div class="container-xl" *ngIf="(node$ | async) as node">
 | 
			
		||||
  <div class="title-container mb-2">
 | 
			
		||||
  <div class="title-container mb-2" *ngIf="!error">
 | 
			
		||||
    <h1 class="mb-0">{{ node.alias }}</h1>
 | 
			
		||||
    <span class="tx-link">
 | 
			
		||||
      <a [routerLink]="['/lightning/node' | relativeUrl, node.public_key]">{{ node.public_key | shortenString : 12 }}</a>
 | 
			
		||||
      <a [routerLink]="['/lightning/node' | relativeUrl, node.public_key]">{{ node.public_key | shortenString : 12
 | 
			
		||||
        }}</a>
 | 
			
		||||
      <app-clipboard [text]="node.public_key"></app-clipboard>
 | 
			
		||||
    </span>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <div class="clearfix"></div>
 | 
			
		||||
 | 
			
		||||
    <div class="box">
 | 
			
		||||
  <div *ngIf="error" class="d-flex flex-column justify-content-around align-items-center mt-5 w-100" style="min-height: 100px">
 | 
			
		||||
    <span i18n="lightning.node-not-found">No node found for public key "{{ node.public_key | shortenString : 12}}"</span>
 | 
			
		||||
    <a [routerLink]="['/lightning' | relativeUrl]" i18n="lightning.back-to-lightning-dashboard">Back to the lightning dashboard</a>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
      <div class="row">
 | 
			
		||||
        <div class="col-md">
 | 
			
		||||
          <table class="table table-borderless table-striped">
 | 
			
		||||
            <tbody>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td i18n="address.total-received">Total capacity</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <app-sats [satoshis]="node.capacity"></app-sats><app-fiat [value]="node.capacity" digitsInfo="1.0-0"></app-fiat>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td i18n="address.total-sent">Total channels</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  {{ node.channel_count }}
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td i18n="address.total-received">Average channel size</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <app-sats [satoshis]="node.channels_capacity_avg"></app-sats><app-fiat [value]="node.channels_capacity_avg" digitsInfo="1.0-0"></app-fiat>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr *ngIf="node.country && node.city && node.subdivision">
 | 
			
		||||
                <td i18n="location">Location</td>
 | 
			
		||||
                <td>{{ node.city.en }}, {{ node.subdivision.en }}<br>{{ node.country.en }}</td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr *ngIf="node.country && !node.city">
 | 
			
		||||
                <td i18n="location">Location</td>
 | 
			
		||||
                <td>{{ node.country.en }}</td>
 | 
			
		||||
              </tr>
 | 
			
		||||
            </tbody>
 | 
			
		||||
          </table>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="w-100 d-block d-md-none"></div>
 | 
			
		||||
        <div class="col-md">
 | 
			
		||||
          <table class="table table-borderless table-striped">
 | 
			
		||||
            <tbody>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td i18n="address.total-received">First seen</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <app-timestamp [dateString]="node.first_seen"></app-timestamp>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td i18n="address.total-sent">Last update</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <app-timestamp [dateString]="node.updated_at"></app-timestamp>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td i18n="address.balance">Color</td>
 | 
			
		||||
                <td><div [ngStyle]="{'color': node.color}">{{ node.color }}</div></td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr *ngIf="node.country">
 | 
			
		||||
                <td i18n="isp">ISP</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  {{ node.as_organization }} [ASN {{node.as_number}}]
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
            </tbody>
 | 
			
		||||
          </table>
 | 
			
		||||
        </div>
 | 
			
		||||
  <div class="box" *ngIf="!error">
 | 
			
		||||
 | 
			
		||||
    <div class="row">
 | 
			
		||||
      <div class="col-md">
 | 
			
		||||
        <table class="table table-borderless table-striped">
 | 
			
		||||
          <tbody>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td i18n="address.total-received">Total capacity</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                <app-sats [satoshis]="node.capacity"></app-sats>
 | 
			
		||||
                <app-fiat [value]="node.capacity" digitsInfo="1.0-0"></app-fiat>
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td i18n="address.total-sent">Total channels</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                {{ node.channel_active_count }}
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td i18n="address.total-received">Average channel size</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                <app-sats [satoshis]="node.channels_capacity_avg"></app-sats>
 | 
			
		||||
                <app-fiat [value]="node.channels_capacity_avg" digitsInfo="1.0-0"></app-fiat>
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr *ngIf="node.country && node.city && node.subdivision">
 | 
			
		||||
              <td i18n="location">Location</td>
 | 
			
		||||
              <td>{{ node.city.en }}, {{ node.subdivision.en }}<br>{{ node.country.en }}</td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr *ngIf="node.country && !node.city">
 | 
			
		||||
              <td i18n="location">Location</td>
 | 
			
		||||
              <td>{{ node.country.en }}</td>
 | 
			
		||||
            </tr>
 | 
			
		||||
          </tbody>
 | 
			
		||||
        </table>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="w-100 d-block d-md-none"></div>
 | 
			
		||||
      <div class="col-md">
 | 
			
		||||
        <table class="table table-borderless table-striped">
 | 
			
		||||
          <tbody>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td i18n="address.total-received">First seen</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                <app-timestamp [dateString]="node.first_seen"></app-timestamp>
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td i18n="address.total-sent">Last update</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                <app-timestamp [dateString]="node.updated_at"></app-timestamp>
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
              <td i18n="address.balance">Color</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                <div [ngStyle]="{'color': node.color}">{{ node.color }}</div>
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr *ngIf="node.country">
 | 
			
		||||
              <td i18n="isp">ISP</td>
 | 
			
		||||
              <td>
 | 
			
		||||
                {{ node.as_organization }} [ASN {{node.as_number}}]
 | 
			
		||||
              </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
          </tbody>
 | 
			
		||||
        </table>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <br>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <div class="input-group mb-3" *ngIf="node.socketsObject.length">
 | 
			
		||||
      <div class="d-inline-block" ngbDropdown #myDrop="ngbDropdown" *ngIf="node.socketsObject.length > 1; else noDropdown">
 | 
			
		||||
        <button class="btn btn-secondary dropdown-toggle" type="button" aria-expanded="false" ngbDropdownAnchor (focus)="myDrop.open()"><div class="dropdownLabel">{{ node.socketsObject[selectedSocketIndex].label }}</div></button>
 | 
			
		||||
        <div ngbDropdownMenu aria-labelledby="dropdownManual">
 | 
			
		||||
          <button *ngFor="let socket of node.socketsObject; let i = index;" ngbDropdownItem (click)="changeSocket(i)">{{ socket.label }}</button>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <ng-template #noDropdown>
 | 
			
		||||
        <span class="input-group-text" id="basic-addon3">{{ node.socketsObject[selectedSocketIndex].label }}</span>
 | 
			
		||||
      </ng-template>
 | 
			
		||||
      <input type="text" class="form-control" aria-label="Text input with dropdown button" [value]="node.socketsObject[selectedSocketIndex].socket">
 | 
			
		||||
      <button class="btn btn-secondary ml-1" type="button" id="inputGroupFileAddon04" (mouseover)="qrCodeVisible = true" (mouseout)="qrCodeVisible = false">
 | 
			
		||||
        <fa-icon [icon]="['fas', 'qrcode']" [fixedWidth]="true"></fa-icon>
 | 
			
		||||
        <div class="qr-wrapper" [hidden]="!qrCodeVisible">
 | 
			
		||||
          <app-qrcode [size]="200" [data]="node.socketsObject[selectedSocketIndex].socket"></app-qrcode>
 | 
			
		||||
        </div>
 | 
			
		||||
  <br>
 | 
			
		||||
 | 
			
		||||
  <div class="input-group mb-3" *ngIf="!error && node.socketsObject.length">
 | 
			
		||||
    <div class="d-inline-block" ngbDropdown #myDrop="ngbDropdown"
 | 
			
		||||
      *ngIf="node.socketsObject.length > 1; else noDropdown">
 | 
			
		||||
      <button class="btn btn-secondary dropdown-toggle" type="button" aria-expanded="false" ngbDropdownAnchor
 | 
			
		||||
        (focus)="myDrop.open()">
 | 
			
		||||
        <div class="dropdownLabel">{{ node.socketsObject[selectedSocketIndex].label }}</div>
 | 
			
		||||
      </button>
 | 
			
		||||
      <button class="btn btn-secondary ml-1" type="button" id="inputGroupFileAddon04">
 | 
			
		||||
        <app-clipboard [text]="node.socketsObject[selectedSocketIndex].socket"></app-clipboard>
 | 
			
		||||
      </button>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <br>
 | 
			
		||||
 | 
			
		||||
    <app-node-statistics-chart [publicKey]="node.public_key"></app-node-statistics-chart>
 | 
			
		||||
    
 | 
			
		||||
    <br>
 | 
			
		||||
 | 
			
		||||
    <div class="d-flex justify-content-between">
 | 
			
		||||
      <h2>Channels ({{ node.channel_count }})</h2>
 | 
			
		||||
      <div class="d-flex align-items-center justify-content-end">
 | 
			
		||||
        <span style="margin-bottom: 0.5rem">List</span> 
 | 
			
		||||
        <label class="switch">
 | 
			
		||||
          <input type="checkbox" (change)="channelsListModeChange($event)">
 | 
			
		||||
          <span class="slider round"></span>
 | 
			
		||||
        </label>
 | 
			
		||||
         <span style="margin-bottom: 0.5rem">Map</span>
 | 
			
		||||
      <div ngbDropdownMenu aria-labelledby="dropdownManual">
 | 
			
		||||
        <button *ngFor="let socket of node.socketsObject; let i = index;" ngbDropdownItem (click)="changeSocket(i)">{{
 | 
			
		||||
          socket.label }}</button>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <ng-template #noDropdown>
 | 
			
		||||
      <span class="input-group-text" id="basic-addon3">{{ node.socketsObject[selectedSocketIndex].label }}</span>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <input type="text" class="form-control" aria-label="Text input with dropdown button"
 | 
			
		||||
      [value]="node.socketsObject[selectedSocketIndex].socket">
 | 
			
		||||
    <button class="btn btn-secondary ml-1" type="button" id="inputGroupFileAddon04" (mouseover)="qrCodeVisible = true"
 | 
			
		||||
      (mouseout)="qrCodeVisible = false">
 | 
			
		||||
      <fa-icon [icon]="['fas', 'qrcode']" [fixedWidth]="true"></fa-icon>
 | 
			
		||||
      <div class="qr-wrapper" [hidden]="!qrCodeVisible">
 | 
			
		||||
        <app-qrcode [size]="200" [data]="node.socketsObject[selectedSocketIndex].socket"></app-qrcode>
 | 
			
		||||
      </div>
 | 
			
		||||
    </button>
 | 
			
		||||
    <button class="btn btn-secondary ml-1" type="button" id="inputGroupFileAddon04">
 | 
			
		||||
      <app-clipboard [text]="node.socketsObject[selectedSocketIndex].socket"></app-clipboard>
 | 
			
		||||
    </button>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <app-nodes-channels-map *ngIf="channelsListMode === 'map'" [style]="'nodepage'" [publicKey]="node.public_key"></app-nodes-channels-map>
 | 
			
		||||
    <app-channels-list *ngIf="channelsListMode === 'list'" [publicKey]="node.public_key"></app-channels-list>
 | 
			
		||||
  <br>
 | 
			
		||||
 | 
			
		||||
  <app-node-statistics-chart [publicKey]="node.public_key" *ngIf="!error"></app-node-statistics-chart>
 | 
			
		||||
 | 
			
		||||
  <br>
 | 
			
		||||
 | 
			
		||||
  <div class="d-flex justify-content-between" *ngIf="!error">
 | 
			
		||||
    <h2>Channels ({{ channelsListStatus === 'open' ? node.channel_active_count : node.channel_closed_count }})</h2>
 | 
			
		||||
    <div class="d-flex align-items-center justify-content-end">
 | 
			
		||||
      <span style="margin-bottom: 0.5rem">List</span> 
 | 
			
		||||
      <label class="switch">
 | 
			
		||||
        <input type="checkbox" (change)="channelsListModeChange($event)">
 | 
			
		||||
        <span class="slider round"></span>
 | 
			
		||||
      </label>
 | 
			
		||||
       <span style="margin-bottom: 0.5rem">Map</span>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
  <app-nodes-channels-map *ngIf="channelsListMode === 'map' && !error" [style]="'nodepage'" [publicKey]="node.public_key">
 | 
			
		||||
  </app-nodes-channels-map>
 | 
			
		||||
  <app-channels-list *ngIf="channelsListMode === 'list' && !error" [publicKey]="node.public_key"
 | 
			
		||||
    (channelsStatusChangedEvent)="onChannelsListStatusChanged($event)"></app-channels-list>
 | 
			
		||||
    
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
 | 
			
		||||
import { ActivatedRoute, ParamMap } from '@angular/router';
 | 
			
		||||
import { Observable } from 'rxjs';
 | 
			
		||||
import { map, switchMap } from 'rxjs/operators';
 | 
			
		||||
import { catchError, map, switchMap } from 'rxjs/operators';
 | 
			
		||||
import { SeoService } from 'src/app/services/seo.service';
 | 
			
		||||
import { LightningApiService } from '../lightning-api.service';
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,9 @@ export class NodeComponent implements OnInit {
 | 
			
		||||
  selectedSocketIndex = 0;
 | 
			
		||||
  qrCodeVisible = false;
 | 
			
		||||
  channelsListMode = 'list';
 | 
			
		||||
  channelsListStatus: string;
 | 
			
		||||
  error: Error;
 | 
			
		||||
  publicKey: string;
 | 
			
		||||
 | 
			
		||||
  constructor(
 | 
			
		||||
    private lightningApiService: LightningApiService,
 | 
			
		||||
@ -29,6 +32,7 @@ export class NodeComponent implements OnInit {
 | 
			
		||||
    this.node$ = this.activatedRoute.paramMap
 | 
			
		||||
      .pipe(
 | 
			
		||||
        switchMap((params: ParamMap) => {
 | 
			
		||||
          this.publicKey = params.get('public_key');
 | 
			
		||||
          return this.lightningApiService.getNode$(params.get('public_key'));
 | 
			
		||||
        }),
 | 
			
		||||
        map((node) => {
 | 
			
		||||
@ -55,6 +59,13 @@ export class NodeComponent implements OnInit {
 | 
			
		||||
          node.socketsObject = socketsObject;
 | 
			
		||||
          return node;
 | 
			
		||||
        }),
 | 
			
		||||
        catchError(err => {
 | 
			
		||||
          this.error = err;
 | 
			
		||||
          return [{
 | 
			
		||||
            alias: this.publicKey,
 | 
			
		||||
            public_key: this.publicKey,
 | 
			
		||||
          }];
 | 
			
		||||
        })
 | 
			
		||||
      );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -69,4 +80,8 @@ export class NodeComponent implements OnInit {
 | 
			
		||||
      this.channelsListMode = 'list';
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  onChannelsListStatusChanged(e) {
 | 
			
		||||
    this.channelsListStatus = e;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -57,20 +57,26 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
 | 
			
		||||
 | 
			
		||||
          const channelsLoc = [];
 | 
			
		||||
          const nodes = [];
 | 
			
		||||
          const nodesPubkeys = {};
 | 
			
		||||
          for (const channel of data[1]) {
 | 
			
		||||
            channelsLoc.push([[channel[2], channel[3]], [channel[6], channel[7]]]);
 | 
			
		||||
            nodes.push({
 | 
			
		||||
              publicKey: channel[0],
 | 
			
		||||
              name: channel[1],
 | 
			
		||||
              value: [channel[2], channel[3]],
 | 
			
		||||
            });
 | 
			
		||||
            nodes.push({
 | 
			
		||||
              publicKey: channel[4],
 | 
			
		||||
              name: channel[5],
 | 
			
		||||
              value: [channel[6], channel[7]],
 | 
			
		||||
            });
 | 
			
		||||
            if (!nodesPubkeys[channel[0]]) {
 | 
			
		||||
              nodes.push({
 | 
			
		||||
                publicKey: channel[0],
 | 
			
		||||
                name: channel[1],
 | 
			
		||||
                value: [channel[2], channel[3]],
 | 
			
		||||
              });
 | 
			
		||||
              nodesPubkeys[channel[0]] = true;
 | 
			
		||||
            }
 | 
			
		||||
            if (!nodesPubkeys[channel[4]]) {
 | 
			
		||||
              nodes.push({
 | 
			
		||||
                publicKey: channel[4],
 | 
			
		||||
                name: channel[5],
 | 
			
		||||
                value: [channel[6], channel[7]],
 | 
			
		||||
              });
 | 
			
		||||
              nodesPubkeys[channel[4]] = true;  
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.prepareChartOptions(nodes, channelsLoc);
 | 
			
		||||
        }));
 | 
			
		||||
      })
 | 
			
		||||
@ -100,7 +106,7 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
 | 
			
		||||
        postEffect: {
 | 
			
		||||
          enable: true,
 | 
			
		||||
          bloom: {
 | 
			
		||||
            intensity: this.style === 'nodepage' ? 0.1 : 0.01,
 | 
			
		||||
            intensity: 0.1,
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        viewControl: {
 | 
			
		||||
@ -113,10 +119,10 @@ export class NodesChannelsMap implements OnInit, OnDestroy {
 | 
			
		||||
          zoomSensivity: 0.5,
 | 
			
		||||
        },
 | 
			
		||||
        itemStyle: {
 | 
			
		||||
          color: '#FFFFFF',
 | 
			
		||||
          color: 'white',
 | 
			
		||||
          opacity: 0.02,
 | 
			
		||||
          borderWidth: 1,
 | 
			
		||||
          borderColor: '#00000050',
 | 
			
		||||
          borderColor: 'black',
 | 
			
		||||
        },
 | 
			
		||||
        regionHeight: 0.01,
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
@ -1997,6 +1997,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="4793828002882320882" datatype="html">
 | 
			
		||||
        <source>At block: <x id="PH" equiv-text="data[0].data[2]"/></source>
 | 
			
		||||
        <target>W bloku: <x id="PH" equiv-text="data[0].data[2]"/></target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">188</context>
 | 
			
		||||
@ -2020,6 +2021,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="8918254921747459635" datatype="html">
 | 
			
		||||
        <source>Around block: <x id="PH" equiv-text="data[0].data[2]"/></source>
 | 
			
		||||
        <target>W okolicu bloku: <x id="PH" equiv-text="data[0].data[2]"/></target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">190</context>
 | 
			
		||||
@ -2234,6 +2236,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="d7d5fcf50179ad70c938491c517efb82de2c8146" datatype="html">
 | 
			
		||||
        <source>Block Prediction Accuracy</source>
 | 
			
		||||
        <target>Dokładność prognoz bloków</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">5,7</context>
 | 
			
		||||
@ -2250,6 +2253,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="829186404427796443" datatype="html">
 | 
			
		||||
        <source>Match rate</source>
 | 
			
		||||
        <target>Częstość trafień</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/block-prediction-graph/block-prediction-graph.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">176,174</context>
 | 
			
		||||
@ -2867,6 +2871,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="49bba8e970aa3b1bec6fcff7228ef95ceb335f59" datatype="html">
 | 
			
		||||
        <source>Usually places your transaction in between the second and third mempool blocks</source>
 | 
			
		||||
        <target>Zazwyczaj umieszcza Twoją transakcje między drugim a trzecim blokiem w mempool</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/fees-box/fees-box.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">8,9</context>
 | 
			
		||||
@ -2888,6 +2893,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="eeeeabc97373285d75acf0f013f68434a6f1935b" datatype="html">
 | 
			
		||||
        <source>Usually places your transaction in between the first and second mempool blocks</source>
 | 
			
		||||
        <target>Zazwyczaj umieszcza Twoją transakcje między pierwszym a drugim blokiem w mempool</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/fees-box/fees-box.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">9,10</context>
 | 
			
		||||
@ -3072,6 +3078,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="8105839921891777281" datatype="html">
 | 
			
		||||
        <source>Hashrate (MA)</source>
 | 
			
		||||
        <target>Prędkość haszowania (MA)</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/hashrate-chart/hashrate-chart.component.ts</context>
 | 
			
		||||
          <context context-type="linenumber">288,287</context>
 | 
			
		||||
@ -3244,6 +3251,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="2711844b4304254e88358d1761f9c732e5aefc69" datatype="html">
 | 
			
		||||
        <source>Pools luck (1 week)</source>
 | 
			
		||||
        <target>Szczęście kolektywu (1 tydzień)</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">9</context>
 | 
			
		||||
@ -3252,6 +3260,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="ea1a87734b5cc78ea8b268343497d92136855cd1" datatype="html">
 | 
			
		||||
        <source>Pools luck</source>
 | 
			
		||||
        <target>Szczęście kolektywu</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">9,11</context>
 | 
			
		||||
@ -3260,6 +3269,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="e910ea39a964514d51802d34cad96c75b14947d1" datatype="html">
 | 
			
		||||
        <source>The overall luck of all mining pools over the past week. A luck bigger than 100% means the average block time for the current epoch is less than 10 minutes.</source>
 | 
			
		||||
        <target>Ogólne szczęście wszystkich kolektywów wydobywczych w ciągu ostatniego tygodnia. Szczęście większe niż 100% oznacza, że średni czas bloku dla danej epoki jest mniejszy niż 10 minut.</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">11,15</context>
 | 
			
		||||
@ -3268,6 +3278,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="9740454c3c55ca2cfa437ff9ec07374c9b9d25b5" datatype="html">
 | 
			
		||||
        <source>Pools count (1w)</source>
 | 
			
		||||
        <target>Liczba kolektywów (1t)</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">17</context>
 | 
			
		||||
@ -3276,6 +3287,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="1107f1b39cd8474087d438971892967a331a6c7d" datatype="html">
 | 
			
		||||
        <source>Pools count</source>
 | 
			
		||||
        <target>Liczba kolektywów</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">17,19</context>
 | 
			
		||||
@ -3284,6 +3296,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="500e13dffc7300bf7e4822a6bbf29a71a55d7b75" datatype="html">
 | 
			
		||||
        <source>How many unique pools found at least one block over the past week.</source>
 | 
			
		||||
        <target>Ile unikatowych kolektywów znalazło conajmniej jeden blok w ciągu ostatniego tygodnia.</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">19,23</context>
 | 
			
		||||
@ -3309,6 +3322,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="c9e8defa185fa8e342548958bf206de97afc97a6" datatype="html">
 | 
			
		||||
        <source>The number of blocks found over the past week.</source>
 | 
			
		||||
        <target>Liczba bloków znalezionych w ciągu ostatniego tygodnia.</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/pool-ranking/pool-ranking.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">27,31</context>
 | 
			
		||||
@ -4465,6 +4479,7 @@
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="cd2330c7e9c74256f6a91e83bccf10e2905f8556" datatype="html">
 | 
			
		||||
        <source>REST API service</source>
 | 
			
		||||
        <target>Usługa REST API</target>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/docs/api-docs/api-docs.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">34,35</context>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user