From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id A0C431FF56B for ; Mon, 22 Apr 2024 13:05:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9C4AFECD9; Mon, 22 Apr 2024 13:05:43 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Mon, 22 Apr 2024 13:05:04 +0200 Message-Id: <20240422110505.2052480-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422110505.2052480-1-d.csapak@proxmox.com> References: <20240422110505.2052480-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup 2/3] ui: prune/gc view: improve sizing & scrolling behaviour X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" before, this was only used where the top list was a fixed size and only for one datastore (which limits the number of prune jobs a bit) since now we show gc jobs for all datastores here too and all their prune jobs, this panel can get much bigger. To improve it's scrolling sizing behavior, make the prune jobs panel `flex: 1`, so it fills out the rest of the view, and add a splitter between them so one can resize them on the fly. To prevent making one of the panels too small, set an appropriate minHeight for both and make the surrounding panel scrollable. To not save the height into it's state, we have to filter that out for the GCView. Signed-off-by: Dominik Csapak --- we probably still have to adapt the color of the splitter? not sure about it's visibility www/config/GCView.js | 5 +++++ www/config/PruneAndGC.js | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/www/config/GCView.js b/www/config/GCView.js index de43bc25..76fb262e 100644 --- a/www/config/GCView.js +++ b/www/config/GCView.js @@ -107,6 +107,10 @@ Ext.define('PBS.config.GCJobView', { stopStore: function() { this.getView().getStore().rstore.stopUpdate(); }, reload: function() { this.getView().getStore().rstore.load(); }, + + filterState: function(view, state) { + delete state.height; + }, }, listeners: { @@ -114,6 +118,7 @@ Ext.define('PBS.config.GCJobView', { beforedestroy: 'stopStore', deactivate: 'stopStore', itemdblclick: 'editGCJob', + beforestatesave: 'filterState', }, store: { diff --git a/www/config/PruneAndGC.js b/www/config/PruneAndGC.js index a1163402..b85c2961 100644 --- a/www/config/PruneAndGC.js +++ b/www/config/PruneAndGC.js @@ -14,6 +14,7 @@ Ext.define('PBS.config.PruneAndGC', { collapsible: false, margin: '7 10 3 10', }, + scrollable: true, items: [ { xtype: 'pbsGCJobView', @@ -22,6 +23,11 @@ Ext.define('PBS.config.PruneAndGC', { cbind: { datastore: '{datastore}', }, + minHeight: 125, // shows at least one line of content + }, + { + xtype: 'splitter', + performCollapse: false, }, { xtype: 'pbsPruneJobView', @@ -30,12 +36,14 @@ Ext.define('PBS.config.PruneAndGC', { cbind: { datastore: '{datastore}', }, + flex: 1, + minHeight: 160, // shows at least one line of content }, ], initComponent: function() { let me = this; - let subPanelIds = me.items.map(el => el.itemId); + let subPanelIds = me.items.map(el => el.itemId).filter(id => !!id); me.callParent(); -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel