mirror of
https://github.com/mempool/mempool.git
synced 2024-12-29 09:44:26 +01:00
bugfix: vbytespersecond display was limited to 1667
This commit is contained in:
parent
147de195a9
commit
80fc3df76d
@ -25,6 +25,7 @@ interface MempoolInfoData {
|
|||||||
export class FooterComponent implements OnInit {
|
export class FooterComponent implements OnInit {
|
||||||
mempoolBlocksData$: Observable<MempoolBlocksData>;
|
mempoolBlocksData$: Observable<MempoolBlocksData>;
|
||||||
mempoolInfoData$: Observable<MempoolInfoData>;
|
mempoolInfoData$: Observable<MempoolInfoData>;
|
||||||
|
vBytesPerSecondLimit = 1667;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
@ -37,13 +38,7 @@ export class FooterComponent implements OnInit {
|
|||||||
])
|
])
|
||||||
.pipe(
|
.pipe(
|
||||||
map(([mempoolInfo, vbytesPerSecond]) => {
|
map(([mempoolInfo, vbytesPerSecond]) => {
|
||||||
const vBytesPerSecondLimit = 1667;
|
const percent = Math.round((Math.min(vbytesPerSecond, this.vBytesPerSecondLimit) / this.vBytesPerSecondLimit) * 100);
|
||||||
let vBytesPerSecond = vbytesPerSecond;
|
|
||||||
if (vBytesPerSecond > 1667) {
|
|
||||||
vBytesPerSecond = 1667;
|
|
||||||
}
|
|
||||||
|
|
||||||
const percent = Math.round((vBytesPerSecond / vBytesPerSecondLimit) * 100);
|
|
||||||
|
|
||||||
let progressClass = 'bg-danger';
|
let progressClass = 'bg-danger';
|
||||||
if (percent <= 75) {
|
if (percent <= 75) {
|
||||||
@ -54,7 +49,7 @@ export class FooterComponent implements OnInit {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
memPoolInfo: mempoolInfo,
|
memPoolInfo: mempoolInfo,
|
||||||
vBytesPerSecond: vBytesPerSecond,
|
vBytesPerSecond: vbytesPerSecond,
|
||||||
progressWidth: percent + '%',
|
progressWidth: percent + '%',
|
||||||
progressClass: progressClass,
|
progressClass: progressClass,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user