From f1c324c1d46255e1a7f25d58a4020361e4e18c8c Mon Sep 17 00:00:00 2001 From: wolfez Date: Tue, 16 Jan 2024 20:35:43 +0100 Subject: [PATCH] fix error animations --- src/routes/Dashboard.svelte | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/routes/Dashboard.svelte b/src/routes/Dashboard.svelte index ed18cf8..d99944d 100644 --- a/src/routes/Dashboard.svelte +++ b/src/routes/Dashboard.svelte @@ -49,13 +49,17 @@ let myNode; let ethRPC; let L2TaikoRPC; - let fetchMetricsError = true; - let fetchSystemInfoError = true; - let fetchPrometheusError = true; - let fetchMyNodeError = true; - let fetchEthRPCError = true; - let fetchL2TaikoRPCError = true; - let fetchEventIndexerError = true; + let fetchSystemInfoError = false; + let fetchPrometheusError = false; + let fetchMyNodeError = false; + let fetchEthRPCError = false; + let fetchL2TaikoRPCError = false; + let fetchEventIndexerError = false; + $:hasError = fetchSystemInfoError || + fetchPrometheusError || + fetchMyNodeError || + fetchEthRPCError || + fetchEventIndexerError; // Syncing estimation let startNodeHeight; @@ -248,6 +252,7 @@ const fetchAddressEvents = async () => { // Fetch Amount Of blocks proposed/proven, so if nodeType is regular node return and do nothing + fetchEventIndexerError = false; if (nodeType === NodeTypes.Node) return; const event = nodeType === NodeTypes.Proposer ? "BlockProposed" : nodeType === NodeTypes.Prover ? "BlockProven" : ""; @@ -376,7 +381,7 @@ await initConnections(); // Set startNodeHeight of the node if the RPC is successfully set - if(!fetchMyNodeError) + if(!fetchMyNodeError && myNode) myNode.eth.getBlockNumber().then((height) => (startNodeHeight = height)); // Interval to fetch metrics every 5 seconds @@ -489,12 +494,7 @@ >