update(Dashboard custom Section & additionalRow): the additional row is not removed when moving widgets and the custom section gets also created when created user_overrides

This commit is contained in:
SimonGschnell
2025-05-19 10:28:15 +02:00
parent df108482eb
commit 4a10faeb25
2 changed files with 7 additions and 3 deletions
@@ -107,7 +107,7 @@ class DashboardLib
$emptyoverride = new stdClass();
$emptyoverride->dashboard_id = $dashboard->dashboard_id;
$emptyoverride->uid = $uid;
$emptyoverride->override = '{"' . self::USEROVERRIDE_SECTION . '": {"widgets":{}}}}';
$emptyoverride->override = '{"' . self::USEROVERRIDE_SECTION . '": {"widgets":{}}, "custom": { "widgets" : {}}}';
return $emptyoverride;
}
+6 -2
View File
@@ -128,7 +128,11 @@ export default {
return [...this.placedItems, ...this.items_placeholders];
},
rows() {
if ((this.mode == MODE_MOVE || this.mode == MODE_RESIZE) && this.dragGrid){
if (this.additionalRowComputed) {
return this.grid ? (this.grid.h+1) : 1;
}
return this.grid ? this.grid.h : 1;
/* if ((this.mode == MODE_MOVE || this.mode == MODE_RESIZE) && this.dragGrid){
return this.dragGrid.h;
}
if (this.mode == MODE_IDLE) {
@@ -136,7 +140,7 @@ export default {
return this.grid ? (this.grid.h+1) : 1;
}
}
return this.grid ? this.grid.h : 1;
return this.grid ? this.grid.h : 1; */
},
gridStyle() {
const addH = this.active ? this.marginForExtraRow : 0;