From 9d0d9bb08cfbfd43a28fe3864acd50b4609d4ebb Mon Sep 17 00:00:00 2001 From: Maciej Bodek Date: Sat, 2 Nov 2024 08:39:00 +0100 Subject: [PATCH] Table does not exist error --- .../src/scenes/Editor/Metrics/index.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/web-console/src/scenes/Editor/Metrics/index.tsx b/packages/web-console/src/scenes/Editor/Metrics/index.tsx index 0c44e96a5..82ba14850 100644 --- a/packages/web-console/src/scenes/Editor/Metrics/index.tsx +++ b/packages/web-console/src/scenes/Editor/Metrics/index.tsx @@ -11,8 +11,10 @@ import * as QuestDB from "../../../utils/questdb" import { QuestContext } from "../../../providers" import { rowsApplied as rowsAppliedSQL, latency as latencySQL } from "./queries" import { Graph } from "./graph" +import { History } from "@styled-icons/boxicons-regular" const Root = styled.div` + display: flex; width: 100%; height: 100%; background: #2c2e3d; @@ -46,6 +48,13 @@ const Charts = styled.div` height: 100%; ` +const GlobalError = styled(Box).attrs({ + align: "center", + justifyContent: "center", +})` + margin: auto; +` + export const Metrics = () => { const { quest } = useContext(QuestContext) const { activeBuffer, updateBuffer } = useEditor() @@ -138,7 +147,16 @@ export const Metrics = () => { fetchRowsApplied(activeBuffer.metricsViewState.tableId) }, [metricDuration]) - if (!table) return null + if (!table) + return ( + + + + Error: Cannot load metrics. Table not found in the database + + + + ) return ( @@ -165,6 +183,7 @@ export const Metrics = () => { onChange={(e) => setMetricDuration(e.target.value as MetricDuration) } + prefixIcon={} />