2022-05-10 14:57:43 +02:00
|
|
|
<app-indexing-progress *ngIf="!widget"></app-indexing-progress>
|
2022-05-02 17:28:58 +09:00
|
|
|
|
2022-05-24 11:19:09 +02:00
|
|
|
<div class="container-xl" style="min-height: 335px" [ngClass]="{'widget': widget, 'full-height': !widget, 'legacy': !indexingAvailable}">
|
2022-05-10 17:05:07 +04:00
|
|
|
<h1 *ngIf="!widget" class="float-left" i18n="master-page.blocks">Blocks</h1>
|
2022-05-24 11:55:43 +02:00
|
|
|
<div *ngIf="!widget && isLoading" class="spinner-border ml-3" role="status"></div>
|
2022-03-10 18:35:37 +01:00
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
2022-03-12 17:33:07 +01:00
|
|
|
<div style="min-height: 295px">
|
|
|
|
<table class="table table-borderless">
|
|
|
|
<thead>
|
2022-05-21 08:51:36 +02:00
|
|
|
<th class="height text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}" i18n="latest-blocks.height">Height</th>
|
2022-06-09 15:58:49 +02:00
|
|
|
<th *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}" i18n="mining.pool-name"
|
|
|
|
i18n-ngbTooltip="mining.pool-name" ngbTooltip="Pool" placement="bottom" #miningpool [disableTooltip]="!isEllipsisActive(miningpool)">Pool</th>
|
2022-05-20 18:11:02 +02:00
|
|
|
<th class="timestamp" i18n="latest-blocks.timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Timestamp</th>
|
|
|
|
<th class="mined" i18n="latest-blocks.mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Mined</th>
|
2023-02-14 12:23:26 -06:00
|
|
|
<th *ngIf="auditAvailable" class="health text-right" i18n="latest-blocks.health" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"
|
2022-10-28 10:33:15 -06:00
|
|
|
i18n-ngbTooltip="latest-blocks.health" ngbTooltip="Health" placement="bottom" #health [disableTooltip]="!isEllipsisActive(health)">Health</th>
|
2022-06-09 15:58:49 +02:00
|
|
|
<th *ngIf="indexingAvailable" class="reward text-right" i18n="latest-blocks.reward" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"
|
|
|
|
i18n-ngbTooltip="latest-blocks.reward" ngbTooltip="Reward" placement="bottom" #reward [disableTooltip]="!isEllipsisActive(reward)">Reward</th>
|
2022-05-20 18:11:02 +02:00
|
|
|
<th *ngIf="indexingAvailable && !widget" class="fees text-right" i18n="latest-blocks.fees" [class]="indexingAvailable ? '' : 'legacy'">Fees</th>
|
2022-06-09 15:58:49 +02:00
|
|
|
<th *ngIf="indexingAvailable" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}"
|
|
|
|
i18n-ngbTooltip="dashboard.txs" ngbTooltip="TXs" placement="bottom" #txs [disableTooltip]="!isEllipsisActive(txs)">TXs</th>
|
2022-05-21 08:51:36 +02:00
|
|
|
<th *ngIf="!indexingAvailable" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">Transactions</th>
|
2022-05-20 18:11:02 +02:00
|
|
|
<th class="size" i18n="latest-blocks.size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Size</th>
|
2022-03-12 17:33:07 +01:00
|
|
|
</thead>
|
|
|
|
<tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''">
|
|
|
|
<tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
|
2022-05-12 17:05:31 +02:00
|
|
|
<td class="text-left" [class]="widget ? 'widget' : ''">
|
2022-12-26 16:30:10 +04:00
|
|
|
<a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a>
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2022-05-21 08:51:36 +02:00
|
|
|
<td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-03-15 23:33:51 +01:00
|
|
|
<div class="tooltip-custom">
|
2022-03-29 12:50:57 +09:00
|
|
|
<a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]">
|
2022-04-18 11:54:52 +09:00
|
|
|
<img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
|
2022-07-11 13:32:24 +02:00
|
|
|
onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">
|
2022-03-15 23:33:51 +01:00
|
|
|
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
|
|
|
</a>
|
2022-03-22 18:31:28 +09:00
|
|
|
<span *ngIf="!widget" class="tooltiptext badge badge-secondary scriptmessage">{{ block.extras.coinbaseRaw | hex2ascii }}</span>
|
2022-03-15 23:33:51 +01:00
|
|
|
</div>
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2022-10-28 10:33:15 -06:00
|
|
|
<td class="timestamp" *ngIf="!widget" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-03-12 17:33:07 +01:00
|
|
|
‎{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2022-05-20 18:11:02 +02:00
|
|
|
<td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
|
2023-03-05 18:54:04 -06:00
|
|
|
<app-time kind="since" [time]="block.timestamp" [fastRender]="true"></app-time>
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2023-02-14 12:23:26 -06:00
|
|
|
<td *ngIf="auditAvailable" class="health text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-12-19 19:02:50 -06:00
|
|
|
<a
|
|
|
|
class="health-badge badge"
|
|
|
|
[class.badge-success]="auditScores[block.id] >= 99"
|
|
|
|
[class.badge-warning]="auditScores[block.id] >= 75 && auditScores[block.id] < 99"
|
|
|
|
[class.badge-danger]="auditScores[block.id] < 75"
|
|
|
|
[routerLink]="auditScores[block.id] != null ? ['/block/' | relativeUrl, block.id] : null"
|
2022-12-26 16:30:10 +04:00
|
|
|
[state]="{ data: { block: block } }"
|
2022-12-19 19:02:50 -06:00
|
|
|
*ngIf="auditScores[block.id] != null; else nullHealth"
|
|
|
|
>{{ auditScores[block.id] }}%</a>
|
|
|
|
<ng-template #nullHealth>
|
|
|
|
<ng-container *ngIf="!loadingScores; else loadingHealth">
|
|
|
|
<span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span>
|
|
|
|
</ng-container>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template #loadingHealth>
|
|
|
|
<span class="skeleton-loader" style="max-width: 60px"></span>
|
|
|
|
</ng-template>
|
2022-10-28 10:33:15 -06:00
|
|
|
</td>
|
2022-05-21 08:51:36 +02:00
|
|
|
<td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-05-16 11:24:38 +02:00
|
|
|
<app-amount [satoshis]="block.extras.reward" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2022-05-20 18:11:02 +02:00
|
|
|
<td *ngIf="indexingAvailable && !widget" class="fees text-right" [class]="indexingAvailable ? '' : 'legacy'">
|
2022-05-16 11:24:38 +02:00
|
|
|
<app-amount [satoshis]="block.extras.totalFees" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2022-05-21 08:51:36 +02:00
|
|
|
<td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-03-12 17:33:07 +01:00
|
|
|
{{ block.tx_count | number }}
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
2022-05-20 18:11:02 +02:00
|
|
|
<td class="size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
|
2022-03-12 17:33:07 +01:00
|
|
|
<div class="progress">
|
|
|
|
<div class="progress-bar progress-mempool" role="progressbar"
|
|
|
|
[ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
|
|
|
|
<div class="progress-text" [innerHTML]="block.size | bytes: 2"></div>
|
|
|
|
</div>
|
2022-03-11 14:54:34 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
2022-03-12 17:33:07 +01:00
|
|
|
<ng-template #skeleton>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let item of skeletonLines">
|
2022-05-23 12:08:52 +02:00
|
|
|
<td class="height text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-04-18 11:54:52 +09:00
|
|
|
<span class="skeleton-loader" style="max-width: 75px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-04-18 11:54:52 +09:00
|
|
|
<img width="1" height="25" style="opacity: 0">
|
|
|
|
<span class="skeleton-loader" style="max-width: 125px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td class="timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
|
2022-04-18 11:54:52 +09:00
|
|
|
<span class="skeleton-loader" style="max-width: 150px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
|
2022-04-18 11:54:52 +09:00
|
|
|
<span class="skeleton-loader" style="max-width: 125px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2023-02-14 12:23:26 -06:00
|
|
|
<td *ngIf="auditAvailable" class="health text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-10-28 10:33:15 -06:00
|
|
|
<span class="skeleton-loader" style="max-width: 75px"></span>
|
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-04-18 11:54:52 +09:00
|
|
|
<span class="skeleton-loader" style="max-width: 75px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td *ngIf="indexingAvailable && !widget" class="fees text-right" [class]="indexingAvailable ? '' : 'legacy'">
|
2022-04-18 11:54:52 +09:00
|
|
|
<span class="skeleton-loader" style="max-width: 75px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
|
2022-04-18 11:54:52 +09:00
|
|
|
<span class="skeleton-loader" style="max-width: 75px"></span>
|
2022-03-12 17:33:07 +01:00
|
|
|
</td>
|
2022-05-23 12:08:52 +02:00
|
|
|
<td class="size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
|
2022-03-12 17:33:07 +01:00
|
|
|
<span class="skeleton-loader"></span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</ng-template>
|
|
|
|
</table>
|
2022-03-10 18:35:37 +01:00
|
|
|
|
2022-03-12 17:33:07 +01:00
|
|
|
<ngb-pagination *ngIf="!widget" class="pagination-container float-right mt-2" [class]="isLoading ? 'disabled' : ''"
|
2022-03-22 15:16:15 +09:00
|
|
|
[collectionSize]="blocksCount" [rotate]="true" [maxSize]="maxSize" [pageSize]="15" [(page)]="page"
|
2022-03-12 17:33:07 +01:00
|
|
|
(pageChange)="pageChange(page)" [boundaryLinks]="true" [ellipses]="false">
|
|
|
|
</ngb-pagination>
|
2023-01-13 11:31:56 -06:00
|
|
|
|
2023-02-19 19:30:55 +09:00
|
|
|
<ng-template [ngIf]="!widget">
|
|
|
|
<div class="clearfix"></div>
|
2023-02-19 20:43:51 +09:00
|
|
|
<br>
|
2023-02-19 19:30:55 +09:00
|
|
|
</ng-template>
|
2022-03-12 17:33:07 +01:00
|
|
|
</div>
|
|
|
|
|
2022-03-31 18:14:07 +09:00
|
|
|
</div>
|