Hide hybrid column on liquid monitoring

This commit is contained in:
natsoni 2026-02-28 18:03:59 +01:00
parent 0e0dd5b33f
commit 547dbd87bb
No known key found for this signature in database
GPG key ID: 5554443C889C720E
2 changed files with 8 additions and 6 deletions

View file

@ -19,8 +19,8 @@
<th class="rtt only-small">RTT</th>
<th class="rtt only-large">RTT</th>
<th class="height">Height</th>
<th *ngIf="isLiquid" class="peg">Peg</th>
<th class="hybrid hash">Hybrid</th>
<th *ngIf="isLiquidMainnet" class="peg">Peg</th>
<th *ngIf="showHybridHash" class="hybrid hash">Hybrid</th>
<th class="frontend hash">Front</th>
<th class="backend hash">Back</th>
<th class="electrs hash">Electrs</th>
@ -36,9 +36,9 @@
<td class="rtt only-small">{{ (host.rtt / 1000) | number : '1.1-1' }} {{ host.rtt == null ? '' : 's'}} {{ !host.checked ? '⏳' : (host.unreachable ? '🔥' : '✅') }}</td>
<td class="rtt only-large">{{ host.rtt | number : '1.0-0' }} {{ host.rtt == null ? '' : 'ms'}} {{ !host.checked ? '⏳' : (host.unreachable ? '🔥' : '✅') }}</td>
<td class="height">{{ host.latestHeight }} {{ !host.checked ? '⏳' : (host.outOfSync ? '🚫' : (host.latestHeight && host.latestHeight < maxHeight ? '🟧' : '')) }}</td>
<td class="peg" *ngIf="isLiquid">{{ formatPegRatio(host.liquidAudit?.pegRatio) }}</td>
<td class="peg" *ngIf="isLiquidMainnet">{{ formatPegRatio(host.liquidAudit?.pegRatio) }}</td>
<ng-container *ngFor="let type of ['hybrid', 'frontend', 'backend', 'electrs', 'ssr', 'core', 'os']">
<td class="{{type}}" [class.hash]="type !== 'core' && type !== 'os'" [class.version]="type === 'core' || type === 'os'" [style.background-color]="colors[host.host][type]">
<td *ngIf="showHybridHash || type !== 'hybrid'" class="{{type}}" [class.hash]="type !== 'core' && type !== 'os'" [class.version]="type === 'core' || type === 'os'" [style.background-color]="colors[host.host][type]">
@if (type !== 'core' && type !== 'os' && host.hashes?.[type]) {
<a [style.color]="'white'" href="https://github.com/mempool/{{repoMap[type]}}/commit/{{ host.hashes[type] }}" target="_blank">{{ host.hashes[type].slice(0, 8) || '?' }}</a>
} @else if (host.hashes?.[type]) {

View file

@ -18,7 +18,8 @@ export class ServerHealthComponent implements OnInit {
interval: number;
now: number = Date.now();
colors: Record<string, Record<string, string>> = {};
isLiquid = false;
isLiquidMainnet = false;
showHybridHash = false;
repoMap = {
frontend: 'mempool',
@ -95,7 +96,8 @@ export class ServerHealthComponent implements OnInit {
this.cd.markForCheck();
}, 1000);
this.isLiquid = this.stateService.network === 'liquid';
this.isLiquidMainnet = this.stateService.network === 'liquid';
this.showHybridHash = !this.stateService.isLiquid();
}
trackByFn(index: number, host: HealthCheckHost): string {