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 20E1B1FF396 for ; Tue, 21 May 2024 11:26:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 458E71563B; Tue, 21 May 2024 11:26:27 +0200 (CEST) Mime-Version: 1.0 Date: Tue, 21 May 2024 11:25:50 +0200 Message-Id: From: "Max Carrara" To: "Proxmox Backup Server development discussion" X-Mailer: aerc 0.17.0-72-g6a84f1331f1c References: <20240516091845.46279-1-g.goller@proxmox.com> In-Reply-To: <20240516091845.46279-1-g.goller@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 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: Re: [pbs-devel] [PATCH proxmox-backup v2] fix #5422: ui: garbage-collection: make columns sortable 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 Cc: Thomas Lamprecht Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" On Thu May 16, 2024 at 11:18 AM CEST, Gabriel Goller wrote: > Make columns sortable in the global 'Prune & GC Jobs' view. In the > per-datastore view the columns will not be sortable as there can only be > one job. > > Fixes: db3fd213 ("fix #3217: ui: global prune and gc job view") > > Co-authored-by: Thomas Lamprecht > Signed-off-by: Gabriel Goller Tested this again; didn't think that the columns would also be sortable in the per-datastore view. Good catch @Thomas! Now does what it says on the box. LGTM. Tested-by: Max Carrara > --- > www/config/GCView.js | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/www/config/GCView.js b/www/config/GCView.js > index bcea72a5..7733c265 100644 > --- a/www/config/GCView.js > +++ b/www/config/GCView.js > @@ -155,7 +155,6 @@ Ext.define('PBS.config.GCJobView', { > header: gettext('Datastore'), > dataIndex: 'store', > renderer: Ext.String.htmlEncode, > - sortable: true, > hideable: false, > minWidth: 120, > maxWidth: 300, > @@ -164,7 +163,6 @@ Ext.define('PBS.config.GCJobView', { > { > header: gettext('Schedule'), > dataIndex: 'schedule', > - sortable: false, > hideable: false, > renderer: (value) => value ? value : Proxmox.Utils.NoneText, > minWidth: 85, > @@ -174,7 +172,6 @@ Ext.define('PBS.config.GCJobView', { > header: gettext('Last GC'), > dataIndex: 'last-run-endtime', > renderer: PBS.Utils.render_optional_timestamp, > - sortable: true, > minWidth: 150, > flex: 1, > }, > @@ -182,7 +179,6 @@ Ext.define('PBS.config.GCJobView', { > text: gettext('Duration'), > dataIndex: 'duration', > renderer: Proxmox.Utils.render_duration, > - sortable: false, > minWidth: 80, > flex: 1, > }, > @@ -190,7 +186,6 @@ Ext.define('PBS.config.GCJobView', { > header: gettext('Last Status'), > dataIndex: 'last-run-state', > renderer: PBS.Utils.render_task_status, > - sortable: true, > minWidth: 80, > flex: 1, > }, > @@ -198,7 +193,6 @@ Ext.define('PBS.config.GCJobView', { > header: gettext('Next Run'), > dataIndex: 'next-run', > renderer: PBS.Utils.render_next_task_run, > - sortable: true, > minWidth: 150, > flex: 1, > }, > @@ -207,7 +201,6 @@ Ext.define('PBS.config.GCJobView', { > dataIndex: 'removed-bytes', > renderer: (value, meta, record) => record.data.upid !== null > ? Proxmox.Utils.format_size(value, true) : "-", > - sortable: false, > minWidth: 85, > flex: 1, > }, > @@ -216,7 +209,6 @@ Ext.define('PBS.config.GCJobView', { > dataIndex: 'pending-bytes', > renderer: (value, meta, record) => record.data.upid !== null > ? Proxmox.Utils.format_size(value, true) : "-", > - sortable: false, > minWidth: 80, > flex: 3, > }, > @@ -224,12 +216,12 @@ Ext.define('PBS.config.GCJobView', { > > initComponent: function() { > let me = this; > - let hideLocalDatastore = !!me.datastore; > + let isSingleDatastore = !!me.datastore; > > for (let column of me.columns) { > + column.sortable = !isSingleDatastore; > if (column.dataIndex === 'store') { > - column.hidden = hideLocalDatastore; > - break; > + column.hidden = isSingleDatastore; > } > } > _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel