mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix sending maxDataPoints as string (#85561)
* make sure maxDataPoints is a number * add migration for maxDataPoints * remove migration
This commit is contained in:
@@ -17,6 +17,13 @@ export function initPanelState(panel: PanelModel): ThunkResult<Promise<void>> {
|
|||||||
return;
|
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 pluginToLoad = panel.type;
|
||||||
let plugin = getStore().plugins.panels[pluginToLoad];
|
let plugin = getStore().plugins.panels[pluginToLoad];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user