From 196144701db49ab8cc1d8947063bbeacf7891b76 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 13 Mar 2024 13:17:59 +0100 Subject: [PATCH] setup grafana --- .env.development | 4 ++++ .env.production | 3 ++- .env.rococo | 2 ++ src/sections/trade/TradePage.tsx | 5 +++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.env.development b/.env.development index 2eabc339..9520e3a4 100644 --- a/.env.development +++ b/.env.development @@ -1,9 +1,13 @@ VITE_PROVIDER_URL=wss://basilisk-rococo-rpc.play.hydration.cloud VITE_DOMAIN_URL=https://testnet-app.basilisk.cloud VITE_INDEXER_URL=https://basilisk-rococo-explorer.play.hydration.cloud/graphql +VITE_GRAFANA_URL=https://grafana-api.play.hydration.cloud/api/ds/query +VITE_GRAFANA_DSN=5 VITE_USD_PEGGED_ASSET_NAME=USDT VITE_USD_PEGGED_ASSET_ID=19 VITE_FF_XCM_ENABLED=true VITE_ENV=rococo VITE_WC_PROJECT_ID=8acb5f70a756a0a3bea40322364949c1 VITE_BSX_CAIP_ID=polkadot:a85cfb9b9fd4d622a5b28289a02347af +VITE_GRAFANA_URL=https://grafana-api.play.hydration.cloud/api/ds/query +VITE_GRAFANA_DSN=11 diff --git a/.env.production b/.env.production index 825f8184..86aac37e 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,11 @@ VITE_PROVIDER_URL=wss://rpc.basilisk.cloud VITE_DOMAIN_URL=https://app.basilisk.cloud VITE_INDEXER_URL=https://basilisk-explorer.play.hydration.cloud/graphql +VITE_GRAFANA_URL=https://grafana-api.play.hydration.cloud/api/ds/query +VITE_GRAFANA_DSN=5 VITE_USD_PEGGED_ASSET_NAME=USDT VITE_USD_PEGGED_ASSET_ID=14 VITE_FF_XCM_ENABLED=true VITE_ENV=production - VITE_WC_PROJECT_ID=8acb5f70a756a0a3bea40322364949c1 VITE_BSX_CAIP_ID=polkadot:a85cfb9b9fd4d622a5b28289a02347af diff --git a/.env.rococo b/.env.rococo index 34aa6b37..62eca58b 100644 --- a/.env.rococo +++ b/.env.rococo @@ -1,6 +1,8 @@ VITE_PROVIDER_URL=wss://basilisk-rococo-rpc.play.hydration.cloud VITE_DOMAIN_URL=https://rococo-app.basilisk.cloud VITE_INDEXER_URL=https://basilisk-rococo-explorer.play.hydration.cloud/graphql +VITE_GRAFANA_URL=https://grafana-api.play.hydration.cloud/api/ds/query +VITE_GRAFANA_DSN=5 VITE_USD_PEGGED_ASSET_NAME=USDT VITE_USD_PEGGED_ASSET_ID=19 VITE_FF_XCM_ENABLED=false diff --git a/src/sections/trade/TradePage.tsx b/src/sections/trade/TradePage.tsx index 20197d29..a830d52a 100644 --- a/src/sections/trade/TradePage.tsx +++ b/src/sections/trade/TradePage.tsx @@ -37,6 +37,9 @@ type SearchGenerics = MakeGenerics<{ Search: z.infer }> +const grafanaUrl = import.meta.env.VITE_GRAFANA_URL +const grafanaDsn = import.meta.env.VITE_GRAFANA_DSN + export function TradePage() { const api = useApiPromise() const { account } = useAccountStore() @@ -98,6 +101,8 @@ export function TradePage() { accountProvider={account?.provider} accountAddress={account?.address} apiAddress={rpcUrl} + grafanaUrl={grafanaUrl} + grafanaDsn={grafanaDsn} stableCoinAssetId={usdAssetId} assetIn={search.success ? search.data.assetIn : undefined} assetOut={search.success ? search.data.assetOut : undefined}