Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix(FE): show no No Data on default Dashboards (#2003)

Marius Kimminaa4346a2d93e5
diff --git a/frontend/src/container/GridGraphLayout/Graph/FullView/index.metricsBuilder.tsx b/frontend/src/container/GridGraphLayout/Graph/FullView/index.metricsBuilder.tsx
index df8ea6c22d..5aa298b76b 100644
--- a/frontend/src/container/GridGraphLayout/Graph/FullView/index.metricsBuilder.tsx
+++ b/frontend/src/container/GridGraphLayout/Graph/FullView/index.metricsBuilder.tsx
@@ -1,4 +1,4 @@
-import { Button, Typography } from 'antd';
+import { Button } from 'antd';
import { GraphOnClickHandler } from 'components/Graph';
import Spinner from 'components/Spinner';
import TimePreference from 'components/TimePreferenceDropDown';
@@ -19,7 +19,7 @@ import { Widgets } from 'types/api/dashboard/getAll';
import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';
import { GlobalReducer } from 'types/reducer/globalTime';
-import { NotFoundContainer, TimeContainer } from './styles';
+import { TimeContainer } from './styles';
function FullView({
widget,
@@ -57,20 +57,11 @@ function FullView({
}),
);
- const isError = response?.error;
const isLoading = response.isLoading === true;
- const errorMessage = isError instanceof Error ? isError?.message : '';
if (isLoading) {
return <Spinner height="100%" size="large" tip="Loading..." />;
}
- if (isError || !response?.data?.payload?.data?.result) {
- return (
- <NotFoundContainer>
- <Typography>{errorMessage}</Typography>
- </NotFoundContainer>
- );
- }
return (
<>
diff --git a/frontend/src/container/GridGraphLayout/Graph/FullView/styles.ts b/frontend/src/container/GridGraphLayout/Graph/FullView/styles.ts
index 7b85723a29..4fbc1a18c0 100644
--- a/frontend/src/container/GridGraphLayout/Graph/FullView/styles.ts
+++ b/frontend/src/container/GridGraphLayout/Graph/FullView/styles.ts
@@ -1,14 +1,5 @@
import styled from 'styled-components';
-export const GraphContainer = styled.div`
- min-height: 70vh;
- align-items: center;
- justify-content: center;
- display: flex;
- flex-direction: column;
- width: 100%;
-`;
-
export const NotFoundContainer = styled.div`
display: flex;
justify-content: center;