From cbcc6e609cf68baab34737aebeb5f8741e7a2b49 Mon Sep 17 00:00:00 2001 From: John Williams Date: Tue, 17 Dec 2024 10:53:46 -0500 Subject: [PATCH] refactor(explorer): remove bytes logging and include all possible error logs --- .changeset/fifty-apples-juggle.md | 5 +++++ .changeset/silent-dolls-arrive.md | 5 +++++ apps/explorer/app/page.tsx | 19 ++----------------- 3 files changed, 12 insertions(+), 17 deletions(-) create mode 100644 .changeset/fifty-apples-juggle.md create mode 100644 .changeset/silent-dolls-arrive.md diff --git a/.changeset/fifty-apples-juggle.md b/.changeset/fifty-apples-juggle.md new file mode 100644 index 000000000..46bbe326a --- /dev/null +++ b/.changeset/fifty-apples-juggle.md @@ -0,0 +1,5 @@ +--- +'explorer': minor +--- + +Add host and block metrics error logging to home page. diff --git a/.changeset/silent-dolls-arrive.md b/.changeset/silent-dolls-arrive.md new file mode 100644 index 000000000..23c2b8cf3 --- /dev/null +++ b/.changeset/silent-dolls-arrive.md @@ -0,0 +1,5 @@ +--- +'explorer': minor +--- + +Remove bytes logging from home page. diff --git a/apps/explorer/app/page.tsx b/apps/explorer/app/page.tsx index eade37132..115e087bd 100644 --- a/apps/explorer/app/page.tsx +++ b/apps/explorer/app/page.tsx @@ -2,7 +2,6 @@ import { Metadata } from 'next' import { appLink, network } from '../config' import { Home } from '../components/Home' import { buildMetadata } from '../lib/utils' -import { humanBytes } from '@siafoundation/units' import { getLatestBlocks } from '../lib/blocks' import { siaCentral } from '../config/siaCentral' import { to } from '@siafoundation/request' @@ -60,25 +59,11 @@ export default async function HomePage() { latestBlocksError, exchangeRatesError, hostsError, + hostMetricsError, + blockMetrics, }) } - console.log(new Date().toISOString(), { - latestBlocks: humanBytes( - Buffer.byteLength(JSON.stringify(latestBlocks || '')) - ), - exchangeRates: humanBytes( - Buffer.byteLength(JSON.stringify(exchangeRates || '')) - ), - hosts: humanBytes(Buffer.byteLength(JSON.stringify(hosts || ''))), - hostMetrics: humanBytes( - Buffer.byteLength(JSON.stringify(hostMetrics || '')) - ), - blockMetrics: humanBytes( - Buffer.byteLength(JSON.stringify(blockMetrics || '')) - ), - }) - return (