Skip to content

Commit

Permalink
fixes for address watchdog and others
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Oct 29, 2024
1 parent 1a18ecf commit ffe94d0
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 199 deletions.
209 changes: 99 additions & 110 deletions components/ui/HealthDetailsOverlay.vue
Original file line number Diff line number Diff line change
@@ -1,115 +1,108 @@
<template>
<OverlayDialog :show="show" :close="close" title="System Health">
<div class="mt-2">
<div v-if="!isLive">
<p class="text-sm text-yellow-400">
This service is not live yet. please try again later!
<div v-if="router.currentRoute.value.path === '/teerdays'">
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(
systemHealth.getIntegriteeSystemHealth.integriteeProgress,
),
]"
>
Integritee Network Block Height:<br />
{{
formatBlockNumber(
systemHealth.getIntergiteeBlockNumberObservable?.value,
)
}}
<b>{{ integriteeNetworkBlockNumberAge }}s</b>
</p>
</div>
<div v-else>
<div v-if="router.currentRoute.value.path === '/teerdays'">
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(
systemHealth.getIntegriteeSystemHealth.integriteeProgress,
),
]"
>
Integritee Network Block Height:<br />
{{
formatBlockNumber(
systemHealth.getIntergiteeBlockNumberObservable?.value,
)
}}
<b>{{ integriteeNetworkBlockNumberAge }}s</b>
</p>
</div>
<div v-else>
<p class="text-sm text-gray-400">
This service is in <b>BETA</b>. Use at your own risk.
</p>
<br />
<p class="text-sm text-gray-400 wrap">
Incognitee shard: <i>{{ incogniteeShard }}</i>
</p>
<p class="text-sm text-gray-400 wrap">
Incognitee fingerprint: <i>{{ incogniteeStore.getFingerprint }}</i>
</p>
<br />
<p class="text-sm text-gray-400">
Shielding Target: <b>{{ chainConfigs[shieldingTarget].name }}</b>
</p>
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(
systemHealth.getSidechainSystemHealth.shieldingTargetProgress,
),
]"
>
Last block:
{{
formatBlockNumber(
systemHealth.getShieldingTargetBlockNumberObservable?.value,
)
}}
<b>{{ shieldingTargetBlockNumberAge }}s</b>
</p>
<br />
<p class="text-sm text-gray-400 wrap">
genesis hash for api vs enclave light client:
</p>
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(systemHealth.getSidechainSystemHealth.genesisMatch),
]"
>
{{
systemHealth.getShieldingTargetApiGenesisHashHex
? systemHealth.getShieldingTargetApiGenesisHashHex.slice(0, 8) +
"..."
: "unknown"
}}
vs
{{
systemHealth.getShieldingTargetLightClientGenesisHashHex
? systemHealth.getShieldingTargetLightClientGenesisHashHex.slice(
0,
8,
) + "..."
: "unknown"
}}
</p>
<br />
<p class="text-sm text-gray-400">
Sidechain import of finalized target blocks
</p>
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(
systemHealth.getSidechainSystemHealth
.shieldingTargetImportProgress,
),
]"
>
Last imported L1 block<br />
{{
formatBlockNumber(
systemHealth.getShieldingTargetImportedBlockNumberObservable
?.value,
)
}}
<p class="text-sm text-gray-400">
This service is in <b>BETA</b>. Use at your own risk.
</p>
<br />
<p class="text-sm text-gray-400 wrap">
Incognitee shard: <i>{{ incogniteeShard }}</i>
</p>
<p class="text-sm text-gray-400 wrap">
Incognitee fingerprint: <i>{{ incogniteeStore.getFingerprint }}</i>
</p>
<br />
<p class="text-sm text-gray-400">
Shielding Target: <b>{{ chainConfigs[shieldingTarget].name }}</b>
</p>
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(
systemHealth.getSidechainSystemHealth.shieldingTargetProgress,
),
]"
>
Last block:
{{
formatBlockNumber(
systemHealth.getShieldingTargetBlockNumberObservable?.value,
)
}}
<b>{{ shieldingTargetBlockNumberAge }}s</b>
</p>
<br />
<p class="text-sm text-gray-400 wrap">
genesis hash for api vs enclave light client:
</p>
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(systemHealth.getSidechainSystemHealth.genesisMatch),
]"
>
{{
systemHealth.getShieldingTargetApiGenesisHashHex
? systemHealth.getShieldingTargetApiGenesisHashHex.slice(0, 8) +
"..."
: "unknown"
}}
vs
{{
systemHealth.getShieldingTargetLightClientGenesisHashHex
? systemHealth.getShieldingTargetLightClientGenesisHashHex.slice(
0,
8,
) + "..."
: "unknown"
}}
</p>
<br />
<p class="text-sm text-gray-400">
Sidechain import of finalized target blocks
</p>
<p
:class="[
'text-sm',
'text-gray-400',
healthColor(
systemHealth.getSidechainSystemHealth
.shieldingTargetImportProgress,
),
]"
>
Last imported L1 block<br />
{{
formatBlockNumber(
systemHealth.getShieldingTargetImportedBlockNumberObservable
?.value,
)
}}

<b>{{ shieldingTargetImportLag }} blocks behind</b>
</p>
</div>
<b>{{ shieldingTargetImportLag }} blocks behind</b>
</p>
</div>
</div>
</OverlayDialog>
Expand All @@ -123,11 +116,7 @@ import { useInterval } from "@vueuse/core";
import { useRouter } from "vue-router";
import { useIncognitee } from "@/store/incognitee.ts";
import { chainConfigs } from "@/configs/chains.ts";
import {
shieldingTarget,
incogniteeShard,
isLive,
} from "@/lib/environmentConfig";
import { shieldingTarget, incogniteeShard } from "@/lib/environmentConfig";
const router = useRouter();
const systemHealth = useSystemHealth();
Expand Down
15 changes: 12 additions & 3 deletions components/ui/HealthIndicator.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<template>
<div @click="openHealthDetailsOverlay" class="cursor-pointer">
<div v-if="contextualHealth === Health.Healthy">
<div class="bg-green-500 w-4 h-4 rounded-full" title="all good"></div>
<div
class="bg-green-500 w-4 h-4 rounded-full"
title="system health: all good"
></div>
</div>
<div v-else-if="contextualHealth === Health.Warning">
<div class="bg-yellow-500 w-4 h-4 rounded-full" title="warnings"></div>
<div
class="bg-yellow-500 w-4 h-4 rounded-full"
title="system health: warnings"
></div>
</div>
<div v-else-if="contextualHealth === Health.Critical">
<div class="bg-red-500 w-4 h-4 rounded-full" title="critical"></div>
<div
class="bg-red-500 w-4 h-4 rounded-full"
title="system health: critical"
></div>
</div>
<div v-else>
<div
Expand Down
1 change: 0 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<!-- Network health text and health indicator -->
<div class="flex items-center gap-2">
<!-- gap-2 für den Abstand zwischen Network Health und Indikator -->
<span class="text-sm">Network health</span>
<HealthIndicator />
</div>

Expand Down
Loading

0 comments on commit ffe94d0

Please sign in to comment.