mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Max number of repeated panels per row
Instead of min width
This commit is contained in:
@@ -21,7 +21,7 @@ export class DashboardMigrator {
|
||||
let i, j, k, n;
|
||||
const oldVersion = this.dashboard.schemaVersion;
|
||||
const panelUpgrades = [];
|
||||
this.dashboard.schemaVersion = 16;
|
||||
this.dashboard.schemaVersion = 17;
|
||||
|
||||
if (oldVersion === this.dashboard.schemaVersion) {
|
||||
return;
|
||||
@@ -368,6 +368,15 @@ export class DashboardMigrator {
|
||||
this.upgradeToGridLayout(old);
|
||||
}
|
||||
|
||||
if (oldVersion < 17) {
|
||||
panelUpgrades.push(panel => {
|
||||
if (panel.minSpan) {
|
||||
panel.maxPerRow = GRID_COLUMN_COUNT / panel.minSpan;
|
||||
}
|
||||
delete panel.minSpan;
|
||||
});
|
||||
}
|
||||
|
||||
if (panelUpgrades.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user