mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
dashboard: allow and persist vertical resize
This commit is contained in:
parent
3245ac209a
commit
4bd6ad3cde
@ -198,7 +198,13 @@ class WidgetManager {
|
||||
let content = widget.getMarkup();
|
||||
let $panel = this._makeWidget(id, this.widgetTranslations[id].title, content);
|
||||
|
||||
const options = widget.getGridOptions();
|
||||
let options = widget.getGridOptions(persistedConfig);
|
||||
|
||||
if ('sizeToContent' in options && 'h' in persistedConfig) {
|
||||
// override the sizeToContent option with the persisted height to allow for manual resizing with scrollbar
|
||||
options.sizeToContent = persistedConfig.h;
|
||||
}
|
||||
|
||||
const gridElement = {
|
||||
content: $panel.prop('outerHTML'),
|
||||
id: id,
|
||||
|
||||
@ -29,13 +29,12 @@ import BaseTableWidget from "./BaseTableWidget.js";
|
||||
export default class Interfaces extends BaseTableWidget {
|
||||
constructor() {
|
||||
super();
|
||||
this.resizeHandles = "e, w";
|
||||
}
|
||||
|
||||
getGridOptions() {
|
||||
return {
|
||||
// trigger overflow-y:scroll after 650px height
|
||||
sizeToContent: 350
|
||||
sizeToContent: 650
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@ import BaseTableWidget from "./BaseTableWidget.js";
|
||||
export default class IpsecLeases extends BaseTableWidget {
|
||||
constructor() {
|
||||
super();
|
||||
this.resizeHandles = "e, w";
|
||||
this.currentLeases = {};
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@ import BaseTableWidget from "./BaseTableWidget.js";
|
||||
export default class IpsecTunnels extends BaseTableWidget {
|
||||
constructor() {
|
||||
super();
|
||||
this.resizeHandles = "e, w";
|
||||
this.currentTunnels = {};
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@ import BaseTableWidget from "./BaseTableWidget.js";
|
||||
export default class OpenVPNClients extends BaseTableWidget {
|
||||
constructor(config) {
|
||||
super(config);
|
||||
this.resizeHandles = "e, w";
|
||||
|
||||
this.locked = false;
|
||||
}
|
||||
|
||||
@ -29,7 +29,6 @@ import BaseTableWidget from "./BaseTableWidget.js";
|
||||
export default class OpenVPNServers extends BaseTableWidget {
|
||||
constructor() {
|
||||
super();
|
||||
this.resizeHandles = "e, w";
|
||||
}
|
||||
|
||||
getGridOptions() {
|
||||
|
||||
@ -30,7 +30,6 @@ import BaseTableWidget from "./BaseTableWidget.js";
|
||||
export default class Wireguard extends BaseTableWidget {
|
||||
constructor() {
|
||||
super();
|
||||
this.resizeHandles = "e, w";
|
||||
this.currentTunnels = {};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user