Node stats updates
This commit is contained in:
@@ -18,12 +18,16 @@
|
||||
<table class="table table-borderless table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td i18n="address.total-received">First Seen</td>
|
||||
<td>{{ node.first_seen | date:'yyyy-MM-dd HH:mm' }}</td>
|
||||
<td i18n="address.total-received">First seen</td>
|
||||
<td>
|
||||
<app-time-since [dateString]="node.first_seen"></app-time-since>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td i18n="address.total-sent">Updated At</td>
|
||||
<td>{{ node.updated_at | date:'yyyy-MM-dd HH:mm' }}</td>
|
||||
<td i18n="address.total-sent">Last update</td>
|
||||
<td>
|
||||
<app-time-since [dateString]="node.updated_at"></app-time-since>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td i18n="address.balance">Color</td>
|
||||
|
||||
@@ -12,6 +12,7 @@ import { LightningApiService } from '../lightning-api.service';
|
||||
})
|
||||
export class NodeComponent implements OnInit {
|
||||
node$: Observable<any>;
|
||||
statistics$: Observable<any>;
|
||||
publicKey$: Observable<string>;
|
||||
|
||||
constructor(
|
||||
@@ -26,6 +27,13 @@ export class NodeComponent implements OnInit {
|
||||
return this.lightningApiService.getNode$(params.get('public_key'));
|
||||
})
|
||||
);
|
||||
|
||||
this.statistics$ = this.activatedRoute.paramMap
|
||||
.pipe(
|
||||
switchMap((params: ParamMap) => {
|
||||
return this.lightningApiService.listNodeStats$(params.get('public_key'));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user