diff --git a/frontend/src/app/lightning/node/node.component.html b/frontend/src/app/lightning/node/node.component.html index d25ca569c..e2132bca5 100644 --- a/frontend/src/app/lightning/node/node.component.html +++ b/frontend/src/app/lightning/node/node.component.html @@ -1,128 +1,146 @@
-
+
-
+
+ No node found for public key "{{ node.public_key | shortenString : 12}}" + Back to the lightning dashboard +
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
Total capacity - -
Total channels - {{ node.channel_active_count }} -
Average channel size - -
Location{{ node.city.en }}, {{ node.subdivision.en }}
{{ node.country.en }}
Location{{ node.country.en }}
-
-
-
- - - - - - - - - - - - - - - - - - - -
First seen - -
Last update - -
Color
{{ node.color }}
ISP - {{ node.as_organization }} [ASN {{node.as_number}}] -
-
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Total capacity + + +
Total channels + {{ node.channel_active_count }} +
Average channel size + + +
Location{{ node.city.en }}, {{ node.subdivision.en }}
{{ node.country.en }}
Location{{ node.country.en }}
+
+
+
+ + + + + + + + + + + + + + + + + + + +
First seen + +
Last update + +
Color +
{{ node.color }}
+
ISP + {{ node.as_organization }} [ASN {{node.as_number}}] +
-
-
+
-
-
- -
- -
+
+ +
+
+ +
+
- - {{ node.socketsObject[selectedSocketIndex].label }} - - - -
+ + {{ node.socketsObject[selectedSocketIndex].label }} + + + + +
-
+
- + + +
+ +
+

Channels ({{ channelsListStatus === 'open' ? node.channel_active_count : node.channel_closed_count }})

+
+ List  + +  Map +
+
+ + + + -
- -
-

Channels ({{ channelsListStatus === 'open' ? node.channel_active_count : node.channel_closed_count }})

-
- List  - -  Map -
-
- - - -
-
+
\ No newline at end of file diff --git a/frontend/src/app/lightning/node/node.component.ts b/frontend/src/app/lightning/node/node.component.ts index f75ab6c95..c70983b54 100644 --- a/frontend/src/app/lightning/node/node.component.ts +++ b/frontend/src/app/lightning/node/node.component.ts @@ -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'; @@ -19,6 +19,8 @@ export class NodeComponent implements OnInit { qrCodeVisible = false; channelsListMode = 'list'; channelsListStatus: string; + error: Error; + publicKey: string; constructor( private lightningApiService: LightningApiService, @@ -30,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) => { @@ -56,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, + }]; + }) ); }