mempool/frontend/src/app/components/pool/pool.component.html

138 lines
5.3 KiB
HTML
Raw Normal View History

<div class="container">
2022-02-08 18:56:51 +09:00
<div *ngIf="poolStats$ | async as poolStats; else loadingMain">
<h1 class="m-0 mb-2">
<img width="50" src="{{ poolStats['logo'] }}" onError="this.src = './resources/mining-pools/default.svg'"
class="mr-3">
{{ poolStats.pool.name }}
</h1>
<div class="box">
2022-02-09 19:41:05 +09:00
<div class="row">
<div class="col-lg-9">
<table class="table table-borderless table-striped" style="table-layout: fixed;">
2022-02-09 19:41:05 +09:00
<tbody>
<tr>
<td class="col-4 col-lg-3">Addresses</td>
<td class="text-truncate" *ngIf="poolStats.pool.addresses.length else noaddress">
<div class="scrollable">
2022-03-08 12:50:47 +01:00
<a *ngFor="let address of poolStats.pool.addresses"
[routerLink]="['/address' | relativeUrl, address]">{{ address }}<br></a>
</div>
</td>
2022-03-08 12:50:47 +01:00
<ng-template #noaddress>
<td>~</td>
</ng-template>
2022-02-09 19:41:05 +09:00
</tr>
<tr>
<td class="col-4 col-lg-3">Coinbase Tags</td>
<td class="text-truncate">{{ poolStats.pool.regexes }}</td>
2022-02-09 19:41:05 +09:00
</tr>
</tbody>
</table>
</div>
<div class="col-lg-3">
2022-02-09 19:41:05 +09:00
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td class="col-4 col-lg-8">Mined Blocks</td>
<td class="text-left">{{ poolStats.blockCount }}</td>
2022-02-09 19:41:05 +09:00
</tr>
<tr>
<td class="col-4 col-lg-8">Empty Blocks</td>
<td class="text-left">{{ poolStats.emptyBlocks }}</td>
2022-02-09 19:41:05 +09:00
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
2022-03-08 12:50:47 +01:00
<div class="chart" echarts [initOpts]="chartInitOptions" [options]="chartOptions"></div>
<div class="text-center loadingGraphs" *ngIf="isLoading">
<div class="spinner-border text-light"></div>
</div>
<table *ngIf="blocks$ | async as blocks" class="table table-borderless" [alwaysCallback]="true" infiniteScroll [infiniteScrollDistance]="1.5"
2022-03-08 12:50:47 +01:00
[infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="loadMore()">
2022-02-09 19:41:05 +09:00
<thead>
<th style="width: 15%;" i18n="latest-blocks.height">Height</th>
<th class="d-none d-md-block" style="width: 20%;" i18n="latest-blocks.timestamp">Timestamp</th>
<th style="width: 20%;" i18n="latest-blocks.mined">Mined</th>
<th class="text-right" style="width: 10%; padding-right: 30px" i18n="latest-blocks.reward">Reward</th>
<th class="d-none d-lg-block text-right" style="width: 15%; padding-right: 40px" i18n="latest-blocks.transactions">Transactions</th>
2022-02-09 19:41:05 +09:00
<th style="width: 20%;" i18n="latest-blocks.size">Size</th>
</thead>
<tbody>
2022-02-09 19:41:05 +09:00
<tr *ngFor="let block of blocks">
<td><a [routerLink]="['/block' | relativeUrl, block.id]">{{ block.height }}</a></td>
2022-02-09 19:41:05 +09:00
<td class="d-none d-md-block">&lrm;{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}</td>
2022-03-08 12:50:47 +01:00
<td>
<app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since>
</td>
<td class="text-right" style="padding-right: 30px">
2022-03-08 12:50:47 +01:00
<app-amount [satoshis]="block['reward']" digitsInfo="1.2-2" [noFiat]="true"></app-amount>
</td>
<td class="d-none d-lg-block text-right" style="padding-right: 40px">{{ block.tx_count | number }}</td>
2022-02-09 19:41:05 +09:00
<td>
<div class="progress">
2022-03-08 12:50:47 +01:00
<div class="progress-bar progress-mempool" role="progressbar"
[ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
2022-02-09 19:41:05 +09:00
<div class="progress-text" [innerHTML]="block.size | bytes: 2"></div>
</div>
</td>
</tr>
</tbody>
</table>
2022-02-08 18:56:51 +09:00
</div>
<ng-template #loadingMain>
<div>
<h1 class="m-0 mb-2">
<img width="50" src="./resources/mining-pools/default.svg" class="mr-3">
<div class="skeleton-loader"></div>
</h1>
<div class="box">
<div class="row">
<div class="col-lg-9">
<table class="table table-borderless table-striped" style="table-layout: fixed;">
<tbody>
<tr>
<td class="col-4 col-lg-3">Addresses</td>
<td class="text-truncate">
<div class="scrollable">
<div class="skeleton-loader"></div>
</div>
</td>
<ng-template #noaddress>
<td>~</td>
</ng-template>
</tr>
<tr>
<td class="col-4 col-lg-3">Coinbase Tags</td>
<td class="text-truncate"><div class="skeleton-loader"></div></td>
</tr>
</tbody>
</table>
</div>
<div class="col-lg-3">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td class="col-4 col-lg-8">Mined Blocks</td>
<td class="text-left"><div class="skeleton-loader"></div></td>
</tr>
<tr>
<td class="col-4 col-lg-8">Empty Blocks</td>
<td class="text-left"><div class="skeleton-loader"></div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</ng-template>