diff --git a/app/components/Sparkline/Sparkline.tsx b/app/components/Sparkline/Sparkline.tsx index 52caef503..cb2b881ef 100644 --- a/app/components/Sparkline/Sparkline.tsx +++ b/app/components/Sparkline/Sparkline.tsx @@ -47,7 +47,7 @@ const Sparkline = ({ > Date: {label} - {payload[0].value + {payload[0].value || payload[0].value === 0 ? `${ commifyValue ? commify(payload[0].value) : payload[0].value } ${valueLabel}` diff --git a/app/routes/account.$accountId.$appId.insights/view.tsx b/app/routes/account.$accountId.$appId.insights/view.tsx index 0ecdfde35..d966b69e4 100644 --- a/app/routes/account.$accountId.$appId.insights/view.tsx +++ b/app/routes/account.$accountId.$appId.insights/view.tsx @@ -54,12 +54,12 @@ export default function ApplicationInsightsView({ data }: ApplicationInsightsVie ( - - Total Relays - + + Total Relays + {commify(total?.countTotal ?? 0)} - + )} @@ -77,12 +77,12 @@ export default function ApplicationInsightsView({ data }: ApplicationInsightsVie ( - - Average Latency{" "} - + + Average Latency + {commify(total?.avgLatency ?? 0)}ms - + )} @@ -98,12 +98,12 @@ export default function ApplicationInsightsView({ data }: ApplicationInsightsVie ( - - Success Rate{" "} - + + Success Rate + {commify(total?.rateSuccess ?? 0)}% - + )} @@ -120,12 +120,12 @@ export default function ApplicationInsightsView({ data }: ApplicationInsightsVie ( - - Total Errors{" "} - + + Total Errors + {totalErrors ? commify(totalErrors) : 0} - + )} diff --git a/app/routes/account.$accountId.$appId.logs/route.tsx b/app/routes/account.$accountId.$appId.logs/route.tsx index e1a6f2922..ba12255e3 100644 --- a/app/routes/account.$accountId.$appId.logs/route.tsx +++ b/app/routes/account.$accountId.$appId.logs/route.tsx @@ -45,6 +45,7 @@ export const loader: LoaderFunction = async ({ request, params }) => { error: false, }) } catch (error) { + console.error(error) return json>({ data: null, error: true, diff --git a/app/routes/account.$accountId.$appId.security/components/ApprovedChainsModal/ApprovedChainsModal.tsx b/app/routes/account.$accountId.$appId.security/components/ApprovedChainsModal/ApprovedChainsModal.tsx index 8e15c02fb..5e7914b3b 100644 --- a/app/routes/account.$accountId.$appId.security/components/ApprovedChainsModal/ApprovedChainsModal.tsx +++ b/app/routes/account.$accountId.$appId.security/components/ApprovedChainsModal/ApprovedChainsModal.tsx @@ -39,7 +39,6 @@ const ApprovedChainsModal = ({ ) const deleteSelectedChain = (chainId: string) => { - console.log(chainId) setSelectedBlockchainsIds((ids) => ids.filter((id) => chainId !== id)) } diff --git a/app/routes/account.$accountId.$appId.security/components/WhitelistUserAgentsModal/WhitelistUserAgentsModal.tsx b/app/routes/account.$accountId.$appId.security/components/WhitelistUserAgentsModal/WhitelistUserAgentsModal.tsx index 75d777f47..4e43fb158 100644 --- a/app/routes/account.$accountId.$appId.security/components/WhitelistUserAgentsModal/WhitelistUserAgentsModal.tsx +++ b/app/routes/account.$accountId.$appId.security/components/WhitelistUserAgentsModal/WhitelistUserAgentsModal.tsx @@ -29,7 +29,6 @@ const WhitelistUserAgentsModal = ({ dispatch }: WhitelistUserAgentsModalProps) = const [selectedUserAgents, setSelectedUserAgents] = useState([]) const [inputUserAgent, setInputUserAgent] = useState("") const deletedAgent = (deletedAgent: string) => { - console.log(deletedAgent) setSelectedUserAgents((agents) => agents.filter((agent) => agent !== deletedAgent)) } diff --git a/app/routes/account.$accountId._index/route.tsx b/app/routes/account.$accountId._index/route.tsx index 8c7c53284..604551a30 100644 --- a/app/routes/account.$accountId._index/route.tsx +++ b/app/routes/account.$accountId._index/route.tsx @@ -71,6 +71,7 @@ export const loader: LoaderFunction = async ({ request, params }) => { error: false, }) } catch (error) { + console.error(error) return json>({ data: null, error: true, diff --git a/app/routes/account.$accountId._index/view.tsx b/app/routes/account.$accountId._index/view.tsx index 7687c8c25..a80a84650 100644 --- a/app/routes/account.$accountId._index/view.tsx +++ b/app/routes/account.$accountId._index/view.tsx @@ -55,12 +55,12 @@ export const AccountInsightsView = ({ data }: AccountInsightsViewProps) => { ( - - Total Relays{" "} - + + Total Relays + {commify(total?.countTotal ?? 0)} - + )} @@ -78,12 +78,12 @@ export const AccountInsightsView = ({ data }: AccountInsightsViewProps) => { ( - - Average Latency{" "} - + + Average Latency + {commify(total?.avgLatency ?? 0)}ms - + )} @@ -99,12 +99,12 @@ export const AccountInsightsView = ({ data }: AccountInsightsViewProps) => { ( - - Success Rate{" "} - + + Success Rate + {commify(total?.rateSuccess ?? 0)}% - + )} @@ -122,12 +122,12 @@ export const AccountInsightsView = ({ data }: AccountInsightsViewProps) => { ( - - Total Errors{" "} - + + Total Errors + {totalErrors ? commify(totalErrors) : 0} - + )} diff --git a/app/routes/account_.$accountId.create/components/AppForm/AppForm.tsx b/app/routes/account_.$accountId.create/components/AppForm/AppForm.tsx index ba4fd2d1c..4539b2821 100644 --- a/app/routes/account_.$accountId.create/components/AppForm/AppForm.tsx +++ b/app/routes/account_.$accountId.create/components/AppForm/AppForm.tsx @@ -38,7 +38,7 @@ const AppForm = ({ app, onSubmit }: AppFormProps) => { const [name, setName] = useState(app?.name ?? "") const [referral, setReferral] = useState("") - const [appmoji, setAppmoji] = useState(DEFAULT_APPMOJI) + const [appmoji, setAppmoji] = useState(app?.appEmoji ?? DEFAULT_APPMOJI) useEffect(() => { const rid = window.localStorage.getItem("rid") diff --git a/app/styles/root.css b/app/styles/root.css index aa3e39b11..3d3295ce3 100644 --- a/app/styles/root.css +++ b/app/styles/root.css @@ -119,5 +119,5 @@ button.pokt-button-with__icon:hover { } .clickable-table tbody tr:hover { - background-color: rgba(37, 38, 43, 0.50) !important -} \ No newline at end of file + background-color: rgba(37, 38, 43, 0.5) !important; +} diff --git a/app/utils/chartUtils.ts b/app/utils/chartUtils.ts index 034241b63..14aadd2fb 100644 --- a/app/utils/chartUtils.ts +++ b/app/utils/chartUtils.ts @@ -3,7 +3,11 @@ import { AnalyticsRelaysAggregated, AnalyticsRelaysTotal } from "~/models/dwh/sd export const getTotalErrors = ( aggregatedData: AnalyticsRelaysAggregated | AnalyticsRelaysTotal, ) => { - if (!aggregatedData || !aggregatedData.rateError || !aggregatedData.countTotal) { + if ( + !aggregatedData || + !aggregatedData.countTotal || + (!aggregatedData.rateError && aggregatedData?.rateError !== 0) + ) { return null }