From f75b8729a15cf94196bddf566696268adda80dc2 Mon Sep 17 00:00:00 2001 From: blockchainluffy Date: Thu, 31 Oct 2024 15:27:09 +0100 Subject: [PATCH 1/3] added loki configuration --- docker/.env.example | 3 ++- docker/docker-compose.yml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docker/.env.example b/docker/.env.example index 5aec955..6bf9a0d 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -17,4 +17,5 @@ ERPC_DB_SSL_MODE= GENESIS_TIMESTAMP= SLOT_DURATION= SLOTS_PER_EPOCH= -TOTAL_GNOSIS_VALIDATORS= \ No newline at end of file +TOTAL_GNOSIS_VALIDATORS= +LOKI_URL=https://:@logs.metrics.shutter.network/insert/loki/api/v1/push diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5dddfaa..120a289 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,6 +10,12 @@ services: condition: service_healthy ports: - "4000:4000" + logging: + driver: loki + options: + loki-url: ${LOKI_URL} + loki-external-labels: | + job=observer environment: DB_HOST: db DB_PORT: 5432 @@ -46,6 +52,12 @@ services: restart: unless-stopped depends_on: - observer + logging: + driver: loki + options: + loki-url: ${LOKI_URL} + loki-external-labels: | + job=explorer-backend environment: SERVER_PORT: 5000 OBSERVER_DB_HOST: db From 6e93231184a9ed99052e35de2fea2c504919238b Mon Sep 17 00:00:00 2001 From: faheelsattar Date: Tue, 5 Nov 2024 14:56:21 +0100 Subject: [PATCH 2/3] add changes --- frontend/cypress/components/SearchBar.cy.tsx | 4 ++-- frontend/src/components/ResponsiveLayout.tsx | 2 +- frontend/src/pages/Transaction.tsx | 24 ++++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/cypress/components/SearchBar.cy.tsx b/frontend/cypress/components/SearchBar.cy.tsx index a1efb83..cc7951d 100644 --- a/frontend/cypress/components/SearchBar.cy.tsx +++ b/frontend/cypress/components/SearchBar.cy.tsx @@ -23,7 +23,7 @@ describe(' and data display test', () => { path="/" element={ @@ -49,7 +49,7 @@ describe(' and data display test', () => { mount(); - cy.get('input[placeholder="Search by Txn Hash"]', { timeout: 10000 }) + cy.get('input[placeholder="Search by transaction Hash"]', { timeout: 10000 }) .should('exist') .should('be.visible') .type(`${txHash}{enter}`, { force: true }); diff --git a/frontend/src/components/ResponsiveLayout.tsx b/frontend/src/components/ResponsiveLayout.tsx index 1fe9b3a..0d32d0f 100644 --- a/frontend/src/components/ResponsiveLayout.tsx +++ b/frontend/src/components/ResponsiveLayout.tsx @@ -32,7 +32,7 @@ const ResponsiveLayout: FC = ({ children }) => { diff --git a/frontend/src/pages/Transaction.tsx b/frontend/src/pages/Transaction.tsx index 86189f3..d3b5079 100644 --- a/frontend/src/pages/Transaction.tsx +++ b/frontend/src/pages/Transaction.tsx @@ -37,7 +37,7 @@ const Transaction: FC = () => { if (updatedData) { setTransaction(updatedData.message as TransactionDetails); - if (transaction? finalisedStatuses.includes(transaction.TxStatus): false){ + if (transaction ? finalisedStatuses.includes(transaction.TxStatus) : false) { setStopPolling(true) } } else { @@ -149,7 +149,7 @@ const Transaction: FC = () => { Estimated Inclusion Time - + @@ -161,7 +161,7 @@ const Transaction: FC = () => { Estimated Inclusion Delay - + @@ -182,7 +182,7 @@ const Transaction: FC = () => { Effective Inclusion Time - + @@ -194,7 +194,7 @@ const Transaction: FC = () => { Effective Inclusion Delay - + @@ -216,7 +216,7 @@ const Transaction: FC = () => { - {transaction.TxStatus === 'Not included' ? 'INCLUSION TIMEOUT EXPIRED' : transaction.TxStatus.toUpperCase()} + {transaction.TxStatus === 'Not included' ? 'INCLUSION TIMEOUT EXPIRED' : transaction.TxStatus.toUpperCase()} {transaction.TxStatus === 'Not included' && ( @@ -225,14 +225,14 @@ const Transaction: FC = () => { (Please check for inclusion directly on the Gnosis Explorer) - - - - - + + + + + )} - + From f15b447f03767c72ae5677041f75ffb27cde90f8 Mon Sep 17 00:00:00 2001 From: faheelsattar Date: Tue, 5 Nov 2024 15:02:06 +0100 Subject: [PATCH 3/3] upd sentence --- frontend/cypress/components/SearchBar.cy.tsx | 4 ++-- frontend/src/components/ResponsiveLayout.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/cypress/components/SearchBar.cy.tsx b/frontend/cypress/components/SearchBar.cy.tsx index cc7951d..7a28a71 100644 --- a/frontend/cypress/components/SearchBar.cy.tsx +++ b/frontend/cypress/components/SearchBar.cy.tsx @@ -23,7 +23,7 @@ describe(' and data display test', () => { path="/" element={ @@ -49,7 +49,7 @@ describe(' and data display test', () => { mount(); - cy.get('input[placeholder="Search by transaction Hash"]', { timeout: 10000 }) + cy.get('input[placeholder="Search by transaction hash"]', { timeout: 10000 }) .should('exist') .should('be.visible') .type(`${txHash}{enter}`, { force: true }); diff --git a/frontend/src/components/ResponsiveLayout.tsx b/frontend/src/components/ResponsiveLayout.tsx index 0d32d0f..82d7731 100644 --- a/frontend/src/components/ResponsiveLayout.tsx +++ b/frontend/src/components/ResponsiveLayout.tsx @@ -32,7 +32,7 @@ const ResponsiveLayout: FC = ({ children }) => {