From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id F04A180015 for ; Tue, 16 Nov 2021 12:20:37 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E565B165B6 for ; Tue, 16 Nov 2021 12:20:37 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6C9E716593 for ; Tue, 16 Nov 2021 12:20:37 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 29EFD43C47 for ; Tue, 16 Nov 2021 12:20:37 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Tue, 16 Nov 2021 12:20:36 +0100 Message-Id: <20211116112036.3423536-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.216 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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: [pve-devel] [RFC PATCH manager] ui: render 'protected' column as icon and enable sorting X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 11:20:38 -0000 instead of 'Yes' and 'No', render the same icon as in pbs for protected backups, and leave the column empty otherwise this makes the difference much more visible and is more consistent with how we present that flag in pbs Signed-off-by: Dominik Csapak --- i initially wanted to add it to the text, but that seemed a bit weird. i'd let people convince me though, if there is a strong argument.. www/manager6/grid/BackupView.js | 3 ++- www/manager6/storage/ContentView.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js index fdc385a8..eb023d08 100644 --- a/www/manager6/grid/BackupView.js +++ b/www/manager6/grid/BackupView.js @@ -344,7 +344,8 @@ Ext.define('PVE.grid.BackupView', { { header: gettext('Protected'), width: 100, - renderer: Proxmox.Utils.format_boolean, + renderer: (value) => value ? '' : '', + sorter: (a, b) => (b.data.protected || 0) - (a.data.protected || 0), dataIndex: 'protected', }, { diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js index efbd209d..6080baea 100644 --- a/www/manager6/storage/ContentView.js +++ b/www/manager6/storage/ContentView.js @@ -163,7 +163,8 @@ Ext.define('PVE.storage.ContentView', { 'protected': { header: gettext('Protected'), width: 100, - renderer: Proxmox.Utils.format_boolean, + renderer: (value) => value ? '' : '', + sorter: (a, b) => (b.data.protected || 0) - (a.data.protected || 0), dataIndex: 'protected', }, 'date': { -- 2.30.2