Fix sending maxDataPoints as string (#85561)

* make sure maxDataPoints is a number

* add migration for maxDataPoints

* remove migration
This commit is contained in:
ismail simsek 2024-04-04 11:11:18 +02:00 committed by GitHub
parent 6ffc08f429
commit 9c0f9f6ba4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,6 +17,13 @@ export function initPanelState(panel: PanelModel): ThunkResult<Promise<void>> {
return;
}
// Some old panels, somehow have maxDataPoints value as string.
// This is causing problems on the backend-side.
// Here we make sure maxDataPoints is always as number.
if (panel.maxDataPoints) {
panel.maxDataPoints = Number(panel.maxDataPoints);
}
let pluginToLoad = panel.type;
let plugin = getStore().plugins.panels[pluginToLoad];