mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-07-12 16:02:19 +02:00
user agents
This commit is contained in:
@ -62,6 +62,28 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-12" *ngIf="userAgents$ | async as userAgents">
|
||||||
|
<div class="card">
|
||||||
|
<h4 style="text-align: center;">Devices</h4>
|
||||||
|
<p-table [value]="userAgents">
|
||||||
|
<ng-template pTemplate="header">
|
||||||
|
<tr>
|
||||||
|
<th>Device</th>
|
||||||
|
<th>Currently Working</th>
|
||||||
|
</tr>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template pTemplate="body" let-userAgent>
|
||||||
|
<tr>
|
||||||
|
<td>{{ userAgent.userAgent }}</td>
|
||||||
|
<td>{{ userAgent.count }}</td>
|
||||||
|
</tr>
|
||||||
|
</ng-template>
|
||||||
|
</p-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-12" *ngIf="blockData$ | async as blockData">
|
<div class="col-12" *ngIf="blockData$ | async as blockData">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h4 style="text-align: center;"> Found Blocks</h4>
|
<h4 style="text-align: center;"> Found Blocks</h4>
|
||||||
|
@ -17,6 +17,7 @@ export class SplashComponent {
|
|||||||
|
|
||||||
public chartData$: Observable<any>;
|
public chartData$: Observable<any>;
|
||||||
public blockData$: Observable<any>;
|
public blockData$: Observable<any>;
|
||||||
|
public userAgents$: Observable<any>;
|
||||||
|
|
||||||
public chartOptions: any;
|
public chartOptions: any;
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ export class SplashComponent {
|
|||||||
|
|
||||||
const info$ = this.appService.getInfo().pipe(shareReplay({ refCount: true, bufferSize: 1 }));
|
const info$ = this.appService.getInfo().pipe(shareReplay({ refCount: true, bufferSize: 1 }));
|
||||||
this.blockData$ = info$.pipe(map(info => info.blockData));
|
this.blockData$ = info$.pipe(map(info => info.blockData));
|
||||||
|
this.userAgents$ = info$.pipe(map(info => info.userAgents));
|
||||||
this.chartData$ = info$.pipe(
|
this.chartData$ = info$.pipe(
|
||||||
map((info: any) => {
|
map((info: any) => {
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user