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: old and new dashboards in sync with local storage (#4520)

Vikrant Guptacff0e1cf1e87
diff --git a/frontend/src/container/NewDashboard/DashboardVariablesSelection/DashboardVariableSelection.tsx b/frontend/src/container/NewDashboard/DashboardVariablesSelection/DashboardVariableSelection.tsx
index 8ced5b2b22..8d67a8250b 100644
--- a/frontend/src/container/NewDashboard/DashboardVariablesSelection/DashboardVariableSelection.tsx
+++ b/frontend/src/container/NewDashboard/DashboardVariablesSelection/DashboardVariableSelection.tsx
@@ -73,7 +73,7 @@ function DashboardVariableSelection(): JSX.Element | null {
return variableCopy;
},
);
- updateLocalStorageDashboardVariables(id, value, allSelected);
+ updateLocalStorageDashboardVariables(name, value, allSelected);
const variables = convertVariablesToDbFormat(newVariablesArr);
diff --git a/frontend/src/providers/Dashboard/Dashboard.tsx b/frontend/src/providers/Dashboard/Dashboard.tsx
index 158374ec3c..a7fa94c044 100644
--- a/frontend/src/providers/Dashboard/Dashboard.tsx
+++ b/frontend/src/providers/Dashboard/Dashboard.tsx
@@ -116,9 +116,10 @@ export function DashboardProvider({
if (data && localStorageVariables) {
const updatedVariables = data.data.variables;
Object.keys(data.data.variables).forEach((variable) => {
+ const variableData = data.data.variables[variable];
const updatedVariable = {
...data.data.variables[variable],
- ...localStorageVariables[variable as any],
+ ...localStorageVariables[variableData.name as any],
};
updatedVariables[variable] = updatedVariable;