]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
ui: acl role selector: make wider and wrap priv column
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 14 May 2022 12:07:06 +0000 (14:07 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 14 May 2022 12:07:08 +0000 (14:07 +0200)
as UX was pretty poort, one could only see one and a half privileges
of the role, the rest overflowed and was hidden. While the column
could be resized, doing so would make the role name column shrink
automatically, and it really shouldn't be required in the first
place.

This is a very important selector and all privs of a role must be
visible when opening without any manual user interaction required.

So increase the width to 500px, make the priv colum take more
relative space and enable cellWrap to avoid hidden overflow.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/form/RoleSelector.js

index 142cdfdcfca94ad763b1e4a15fe785d6ec8ae5c5..d82c980484e42d75bf2892c6177d2612b3aa40b4 100644 (file)
@@ -18,17 +18,21 @@ Ext.define('Proxmox.form.RoleSelector', {
     displayField: 'roleid',
 
     listConfig: {
+       width: 500,
        columns: [
            {
                header: gettext('Role'),
                sortable: true,
                dataIndex: 'roleid',
-               flex: 1,
+               flex: 2,
            },
            {
                header: gettext('Privileges'),
                dataIndex: 'privs',
-               flex: 1,
+               cellWrap: true,
+               // join manually here, as ExtJS joins without whitespace which breaks cellWrap
+               renderer: v => v.join(', '),
+               flex: 5,
            },
        ],
     },