public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/3] ui: prune/gc view: improve sizing & scrolling behaviour
Date: Mon, 22 Apr 2024 13:05:04 +0200	[thread overview]
Message-ID: <20240422110505.2052480-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240422110505.2052480-1-d.csapak@proxmox.com>

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 <d.csapak@proxmox.com>
---
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


  parent reply	other threads:[~2024-04-22 11:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 11:05 [pbs-devel] [PATCH proxmox-backup 0/3] follow ups for gc job status series Dominik Csapak
2024-04-22 11:05 ` [pbs-devel] [PATCH proxmox-backup 1/3] ui: gc view: use beforedestroy for stopping the store Dominik Csapak
2024-04-22 11:05 ` Dominik Csapak [this message]
2024-04-22 11:05 ` [pbs-devel] [PATCH proxmox-backup 3/3] ui: gc view: remove unnecessary widths in columns Dominik Csapak
2024-04-22 11:38 ` [pbs-devel] [PATCH proxmox-backup 0/4] more follow-ups Fabian Grünbichler
2024-04-22 11:38   ` [pbs-devel] [PATCH proxmox-backup 1/4] GC: flatten existing status into job status Fabian Grünbichler
2024-04-22 11:38   ` [pbs-devel] [PATCH proxmox-backup 2/4] api: merge garbage-collection-status and -job-status Fabian Grünbichler
2024-04-22 11:38   ` [pbs-devel] [PATCH proxmox-backup 3/4] ui: don't re-calculate GC duration Fabian Grünbichler
2024-04-22 11:38   ` [pbs-devel] [PATCH proxmox-backup 4/4] GC status: reduce code duplication Fabian Grünbichler
2024-04-23 12:36 ` [pbs-devel] applied: [PATCH proxmox-backup 0/3] follow ups for gc job status series Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240422110505.2052480-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal