[pve-devel] applied: [PATCH pve-manager] fix #4393: ui: storage backup view: make pbs-specific columns sortable

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jan 16 14:26:17 CET 2023


Am 16/12/2022 um 13:45 schrieb Stefan Hanreich:
> The sort order is analogous to how it behaves in the datastore content
> overview in pbs.
> 
> This means sorting in ascending order behaves as follows:
> 
> Verify State
> * failed
> * none
> * ok
> 
> Encryption
> * no
> * yes
> 
> For the encryption state there is theoretically a distinction between
> signed and encrypted, but as far as I can tell we do not render this
> distinction in PVE, which is why I chose to not make this distinction
> for sorting as well.
> 
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> ---
>  www/manager6/Utils.js              |  7 +++++++
>  www/manager6/storage/BackupView.js | 12 ++++++++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index 8c118fa2..3dd287e3 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -1963,6 +1963,13 @@ Ext.define('PVE.Utils', {
>      },
>  
>      tagCharRegex: /^[a-z0-9+_.-]+$/i,
> +
> +    verificationStateOrder: {
> +	'failed': 0,
> +	'none': 1,
> +	'ok': 2,
> +	'__default__': 3,
> +    },

Not that your patch is really at fault here, but made me notice again that we really
need to make Utils go away, it's a real dump for so much stuff that it's just
becoming gross..

It should be split up and stuff moved either directly where its actually used,
to specialized classes, even if on the smaller side, or to more generic but
sensible "aggregative" classes like one for Schema stuff (but not utils, helper,
tools anymore).

>  },
>  
>      singleton: true,
>

applied, thanks!





More information about the pve-devel mailing list