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.

feat: dashbaord error and loading state is removed from dashboard object

Palash gupta228fb6625146
diff --git a/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx b/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
index 24b2d8b753..99f5fb0eeb 100644
--- a/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
+++ b/frontend/src/container/ListOfDashboard/ImportJSON/index.tsx
@@ -77,6 +77,9 @@ function ImportJSON({
...queryData,
queryData: [],
})),
+ error: false,
+ errorMessage: '',
+ loading: false,
},
})),
};
diff --git a/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx b/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx
index d746d42218..134c2502c3 100644
--- a/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx
+++ b/frontend/src/container/NewDashboard/DescriptionOfDashboard/ShareModal.tsx
@@ -12,9 +12,23 @@ function ShareModal({
onToggleHandler,
selectedData,
}: ShareModalProps): JSX.Element {
- const [jsonValue, setJSONValue] = useState<string>(
- JSON.stringify(selectedData, null, 2),
- );
+ const getParsedValue = (): string => {
+ const updatedData: DashboardData = {
+ ...selectedData,
+ widgets: selectedData.widgets?.map((widget) => ({
+ ...widget,
+ queryData: {
+ ...widget.queryData,
+ loading: false,
+ error: false,
+ errorMessage: '',
+ },
+ })),
+ };
+ return JSON.stringify(updatedData, null, 2);
+ };
+
+ const [jsonValue, setJSONValue] = useState<string>(getParsedValue());
const [isViewJSON, setIsViewJSON] = useState<boolean>(false);
const { t } = useTranslation(['dashboard', 'common']);
const [state, setCopy] = useCopyToClipboard();