TV view button. Updated stats bar. Removed tx/second graph. CSS fixes.
This commit is contained in:
parent
85f1d4d7aa
commit
bd19b88f11
@ -28,6 +28,7 @@
|
|||||||
@media (max-width: 767.98px) {
|
@media (max-width: 767.98px) {
|
||||||
#divider {
|
#divider {
|
||||||
top: -50px;
|
top: -50px;
|
||||||
|
height: 1300px;
|
||||||
}
|
}
|
||||||
.position-container {
|
.position-container {
|
||||||
top: 100px;
|
top: 100px;
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="my-2 my-md-0 mr-md-3">
|
<div class="my-2 my-md-0 mr-md-3">
|
||||||
<div *ngIf="memPoolInfo" class="info-block">
|
<div *ngIf="memPoolInfo" class="info-block">
|
||||||
<span class="unconfirmedTx">Unconfirmed transactions:</span> <b>{{ memPoolInfo?.memPoolInfo?.size | number }} ({{ mempoolBlocks }} block<span [hidden]="mempoolBlocks <= 1">s</span>)</b>
|
<span class="unconfirmedTx">Unconfirmed transactions:</span> <b>{{ memPoolInfo?.memPoolInfo?.size | number }}</b>
|
||||||
<br />
|
<br />
|
||||||
<span class="mempoolSize">Tx per second:</span> <b>{{ memPoolInfo?.txPerSecond | number : '1.2-2' }} tx/s</b>
|
<span class="mempoolSize">Mempool size:</span> <b>{{ mempoolSize | bytes }} ({{ mempoolBlocks }} block<span [hidden]="mempoolBlocks <= 1">s</span>)</b>
|
||||||
<br />
|
<br />
|
||||||
<span class="txPerSecond">Tx weight per second:</span>
|
<span class="txPerSecond">Tx weight per second:</span>
|
||||||
|
|
||||||
|
@ -23,12 +23,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-block {
|
.info-block {
|
||||||
float:left;
|
float: left;
|
||||||
|
width: 350px;
|
||||||
|
line-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: 150px;
|
width: 160px;
|
||||||
background-color: #2d3348;
|
background-color: #2d3348;
|
||||||
height: 1.1rem;
|
height: 1.1rem;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ export class FooterComponent implements OnInit {
|
|||||||
mempoolBlocks = 0;
|
mempoolBlocks = 0;
|
||||||
progressWidth = '';
|
progressWidth = '';
|
||||||
progressClass: string;
|
progressClass: string;
|
||||||
|
mempoolSize = 0;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private memPoolService: MemPoolService
|
private memPoolService: MemPoolService
|
||||||
@ -22,9 +23,14 @@ export class FooterComponent implements OnInit {
|
|||||||
this.memPoolInfo = mempoolState;
|
this.memPoolInfo = mempoolState;
|
||||||
this.updateProgress();
|
this.updateProgress();
|
||||||
});
|
});
|
||||||
this.memPoolService.mempoolWeight$
|
|
||||||
.subscribe((mempoolWeight) => {
|
this.memPoolService.projectedBlocks$
|
||||||
this.mempoolBlocks = Math.ceil(mempoolWeight / 4000000);
|
.subscribe((projectedblocks) => {
|
||||||
|
if (!projectedblocks.length) { return; }
|
||||||
|
const size = projectedblocks.map((m) => m.blockSize).reduce((a, b) => a + b);
|
||||||
|
const weight = projectedblocks.map((m) => m.blockWeight).reduce((a, b) => a + b);
|
||||||
|
this.mempoolSize = size;
|
||||||
|
this.mempoolBlocks = Math.ceil(weight / 4000000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
<li class="nav-item" routerLinkActive="active">
|
<li class="nav-item" routerLinkActive="active">
|
||||||
<a class="nav-link" routerLink="/graphs" (click)="collapse()">Graphs</a>
|
<a class="nav-link" routerLink="/graphs" (click)="collapse()">Graphs</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item" routerLinkActive="active">
|
||||||
|
<a class="nav-link" routerLink="/tv" (click)="collapse()">TV view <img src="./assets/expand.png" width="15"/></a>
|
||||||
|
</li>
|
||||||
<li class="nav-item" routerLinkActive="active">
|
<li class="nav-item" routerLinkActive="active">
|
||||||
<a class="nav-link" routerLink="/about" (click)="collapse()">About</a>
|
<a class="nav-link" routerLink="/about" (click)="collapse()">About</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -86,23 +86,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<div class="card mb-3" *ngIf="mempoolTransactionsPerSecondData">
|
|
||||||
<div class="card-header">
|
|
||||||
<i class="fa fa-area-chart"></i> Transactions per second (tx/s)</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div style="height: 600px;">
|
|
||||||
<app-chartist
|
|
||||||
[data]="mempoolTransactionsPerSecondData"
|
|
||||||
[type]="'Line'"
|
|
||||||
[options]="transactionsPerSecondOptions">
|
|
||||||
</app-chartist>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,11 +24,9 @@ export class StatisticsComponent implements OnInit {
|
|||||||
|
|
||||||
mempoolVsizeFeesData: any;
|
mempoolVsizeFeesData: any;
|
||||||
mempoolUnconfirmedTransactionsData: any;
|
mempoolUnconfirmedTransactionsData: any;
|
||||||
mempoolTransactionsPerSecondData: any;
|
|
||||||
mempoolTransactionsWeightPerSecondData: any;
|
mempoolTransactionsWeightPerSecondData: any;
|
||||||
|
|
||||||
mempoolVsizeFeesOptions: any;
|
mempoolVsizeFeesOptions: any;
|
||||||
transactionsPerSecondOptions: any;
|
|
||||||
transactionsWeightPerSecondOptions: any;
|
transactionsWeightPerSecondOptions: any;
|
||||||
|
|
||||||
radioGroupForm: FormGroup;
|
radioGroupForm: FormGroup;
|
||||||
@ -120,19 +118,6 @@ export class StatisticsComponent implements OnInit {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.transactionsPerSecondOptions = {
|
|
||||||
showArea: false,
|
|
||||||
showLine: true,
|
|
||||||
showPoint: false,
|
|
||||||
low: 0,
|
|
||||||
axisY: {
|
|
||||||
offset: 40
|
|
||||||
},
|
|
||||||
axisX: {
|
|
||||||
labelInterpolationFnc: labelInterpolationFnc
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
this.route
|
this.route
|
||||||
.fragment
|
.fragment
|
||||||
.subscribe((fragment) => {
|
.subscribe((fragment) => {
|
||||||
@ -192,13 +177,6 @@ export class StatisticsComponent implements OnInit {
|
|||||||
mempoolStats.reverse();
|
mempoolStats.reverse();
|
||||||
const labels = mempoolStats.map(stats => stats.added);
|
const labels = mempoolStats.map(stats => stats.added);
|
||||||
|
|
||||||
/** Active admins summed up */
|
|
||||||
|
|
||||||
this.mempoolTransactionsPerSecondData = {
|
|
||||||
labels: labels,
|
|
||||||
series: [mempoolStats.map((stats) => stats.tx_per_second)],
|
|
||||||
};
|
|
||||||
|
|
||||||
this.mempoolTransactionsWeightPerSecondData = {
|
this.mempoolTransactionsWeightPerSecondData = {
|
||||||
labels: labels,
|
labels: labels,
|
||||||
series: [mempoolStats.map((stats) => stats.vbytes_per_second)],
|
series: [mempoolStats.map((stats) => stats.vbytes_per_second)],
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
bottom: 150px;
|
bottom: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chart-holder {
|
||||||
|
height: calc(100% - 220px);
|
||||||
|
}
|
||||||
|
|
||||||
#divider {
|
#divider {
|
||||||
width: 3px;
|
width: 3px;
|
||||||
height: 175px;
|
height: 175px;
|
||||||
@ -30,6 +34,12 @@
|
|||||||
top: -28px;
|
top: -28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-holder {
|
@media (min-width: 1920px) {
|
||||||
height: calc(100% - 220px);
|
.position-container {
|
||||||
|
transform: scale(1.3);
|
||||||
|
bottom: 190px;
|
||||||
|
}
|
||||||
|
.chart-holder {
|
||||||
|
height: calc(100% - 280px);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, LOCALE_ID, Inject } from '@angular/core';
|
import { Component, OnInit, LOCALE_ID, Inject, Renderer2 } from '@angular/core';
|
||||||
import { ApiService } from '../services/api.service';
|
import { ApiService } from '../services/api.service';
|
||||||
import { formatDate } from '@angular/common';
|
import { formatDate } from '@angular/common';
|
||||||
import { BytesPipe } from '../shared/pipes/bytes-pipe/bytes.pipe';
|
import { BytesPipe } from '../shared/pipes/bytes-pipe/bytes.pipe';
|
||||||
@ -24,11 +24,14 @@ export class TelevisionComponent implements OnInit {
|
|||||||
@Inject(LOCALE_ID) private locale: string,
|
@Inject(LOCALE_ID) private locale: string,
|
||||||
private bytesPipe: BytesPipe,
|
private bytesPipe: BytesPipe,
|
||||||
private memPoolService: MemPoolService,
|
private memPoolService: MemPoolService,
|
||||||
|
private renderer: Renderer2,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.apiService.webSocketWant(['projected-blocks', 'live-2h-chart']);
|
this.apiService.webSocketWant(['projected-blocks', 'live-2h-chart']);
|
||||||
|
|
||||||
|
this.renderer.addClass(document.body, 'disable-scroll');
|
||||||
|
|
||||||
const labelInterpolationFnc = (value: any, index: any) => {
|
const labelInterpolationFnc = (value: any, index: any) => {
|
||||||
return index % 6 === 0 ? formatDate(value, 'HH:mm', this.locale) : null;
|
return index % 6 === 0 ? formatDate(value, 'HH:mm', this.locale) : null;
|
||||||
};
|
};
|
||||||
|
BIN
frontend/src/assets/expand.png
Normal file
BIN
frontend/src/assets/expand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user