Merge pull request #5395 from mempool/nymkappa/accel-status
[accelerator] fix accel status in widget
This commit is contained in:
commit
a0c21e4120
@ -62,9 +62,9 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="status text-right">
|
<td class="status text-right">
|
||||||
<span *ngIf="acceleration.status === 'accelerating'" class="badge badge-warning" i18n="accelerator.pending">Pending</span>
|
<span *ngIf="acceleration.status === 'accelerating'" class="badge badge-warning" i18n="accelerator.pending">Pending</span>
|
||||||
<span *ngIf="acceleration.status.includes('completed') && acceleration.minedByPoolUniqueId && pools[acceleration.minedByPoolUniqueId]" class="badge badge-success" i18n="accelerator.completed">Completed <span *ngIf="acceleration.status === 'completed_provisional'">🔄</span></span>
|
<span *ngIf="acceleration.status.includes('completed') && acceleration.minedByPoolUniqueId && pools[acceleration.minedByPoolUniqueId]" class="badge badge-success" i18n="accelerator.completed">Completed <span *ngIf="acceleration.status === 'completed_provisional'">⌛</span></span>
|
||||||
<span *ngIf="acceleration.status.includes('completed') && (!acceleration.minedByPoolUniqueId || !pools[acceleration.minedByPoolUniqueId])" class="badge badge-success" i18n="accelerator.mined">Mined <span *ngIf="acceleration.status === 'completed_provisional'">🔄</span></span>
|
<span *ngIf="acceleration.status.includes('completed') && (!acceleration.minedByPoolUniqueId || !pools[acceleration.minedByPoolUniqueId])" class="badge badge-success" i18n="accelerator.mined">Mined <span *ngIf="acceleration.status === 'completed_provisional'">⌛</span></span>
|
||||||
<span *ngIf="acceleration.status.includes('failed')" class="badge badge-danger" i18n="accelerator.canceled">Failed <span *ngIf="acceleration.status === 'failed_provisional'">🔄</span></span>
|
<span *ngIf="acceleration.status.includes('failed')" class="badge badge-danger" i18n="accelerator.canceled">Failed <span *ngIf="acceleration.status === 'failed_provisional'">⌛</span></span>
|
||||||
</td>
|
</td>
|
||||||
<td class="date text-right" *ngIf="!this.widget">
|
<td class="date text-right" *ngIf="!this.widget">
|
||||||
<app-time kind="since" [time]="acceleration.added" [fastRender]="true" [showTooltip]="true"></app-time>
|
<app-time kind="since" [time]="acceleration.added" [fastRender]="true" [showTooltip]="true"></app-time>
|
||||||
|
@ -50,6 +50,12 @@ export class AccelerationsListComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.miningService.getPools().subscribe(pools => {
|
||||||
|
for (const pool of pools) {
|
||||||
|
this.pools[pool.unique_id] = pool;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!this.widget) {
|
if (!this.widget) {
|
||||||
this.websocketService.want(['blocks']);
|
this.websocketService.want(['blocks']);
|
||||||
this.seoService.setTitle($localize`:@@02573b6980a2d611b4361a2595a4447e390058cd:Accelerations`);
|
this.seoService.setTitle($localize`:@@02573b6980a2d611b4361a2595a4447e390058cd:Accelerations`);
|
||||||
@ -82,12 +88,6 @@ export class AccelerationsListComponent implements OnInit, OnDestroy {
|
|||||||
).subscribe(() => {
|
).subscribe(() => {
|
||||||
this.pageChange(this.page);
|
this.pageChange(this.page);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.miningService.getPools().subscribe(pools => {
|
|
||||||
for (const pool of pools) {
|
|
||||||
this.pools[pool.unique_id] = pool;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.skeletonLines = this.widget === true ? [...Array(6).keys()] : [...Array(15).keys()];
|
this.skeletonLines = this.widget === true ? [...Array(6).keys()] : [...Array(15).keys()];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user