public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [RFC PATCH manager] ui: render 'protected' column as icon and enable sorting
@ 2021-11-16 11:20 Dominik Csapak
  2021-11-16 13:11 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-11-16 11:20 UTC (permalink / raw)
  To: pve-devel

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 <d.csapak@proxmox.com>
---
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 ? '<i class="fa fa-shield"></i>' : '',
+		    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 ? '<i class="fa fa-shield"></i>' : '',
+		sorter: (a, b) => (b.data.protected || 0) - (a.data.protected || 0),
 		dataIndex: 'protected',
 	    },
 	    'date': {
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [RFC PATCH manager] ui: render 'protected' column as icon and enable sorting
  2021-11-16 11:20 [pve-devel] [RFC PATCH manager] ui: render 'protected' column as icon and enable sorting Dominik Csapak
@ 2021-11-16 13:11 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-16 13:11 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 16.11.21 12:20, Dominik Csapak wrote:
> 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 <d.csapak@proxmox.com>
> ---
> 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..
> 

crowding the interface has some real cost, especially for new users, while
iconfying everything is surely also not ideal for UX I think it's OK here.

>  www/manager6/grid/BackupView.js     | 3 ++-
>  www/manager6/storage/ContentView.js | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-16 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 11:20 [pve-devel] [RFC PATCH manager] ui: render 'protected' column as icon and enable sorting Dominik Csapak
2021-11-16 13:11 ` [pve-devel] applied: " Thomas Lamprecht

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