mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 20:25:54 +08:00
fix: old and new dashboards in sync with local storage (#4520)
* fix: old and new dashboards in sync with local storage * fix: remove code * fix: remove console log * fix: remove console log
This commit is contained in:
parent
02f83e4b4a
commit
cff0e1cf1e
@ -73,7 +73,7 @@ function DashboardVariableSelection(): JSX.Element | null {
|
||||
return variableCopy;
|
||||
},
|
||||
);
|
||||
updateLocalStorageDashboardVariables(id, value, allSelected);
|
||||
updateLocalStorageDashboardVariables(name, value, allSelected);
|
||||
|
||||
const variables = convertVariablesToDbFormat(newVariablesArr);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user