]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: ceph warnings: drop summary copy button
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Oct 2023 16:03:16 +0000 (18:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Oct 2023 16:16:34 +0000 (18:16 +0200)
talked with Aaron off-list and he found it OK to drop this button now
that "Copy Details" became a "Copy All".

This reduces cognitive load on the user as there are half as many
buttons.

Rename "Copy All" to "Copy to Clipboard" now that there's only one and
drop the disable logic.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/ceph/Status.js

index 386eadf4d7dba6629b5135b88943cf26bd9d6c64..430d8df5a549b477872d44e22ab594651fb81334 100644 (file)
@@ -147,22 +147,13 @@ Ext.define('PVE.node.CephStatus', {
                            align: 'center',
                            tooltip: gettext('Actions'),
                            items: [
-                               {
-                                   iconCls: 'x-fa fa-files-o',
-                                   tooltip: gettext('Copy Summary'),
-                                   handler: function(grid, rowindex, colindex, item, e, record) {
-                                       navigator.clipboard
-                                           .writeText(record.data.summary)
-                                           .catch(err => Ext.Msg.alert(gettext('Error'), err));
-                                   },
-                               },
                                {
                                    iconCls: 'x-fa fa-clipboard',
-                                   tooltip: gettext('Copy All'),
-                                   isActionDisabled: (v, r, c, i, { data }) => !!data.noDetails,
+                                   tooltip: gettext('Copy to Clipboard'),
                                    handler: function(grid, rowindex, colindex, item, e, { data }) {
+                                       let detail = data.noDetails ? '': `\n${data.detail}`;
                                        navigator.clipboard
-                                           .writeText(`${data.severity}: ${data.summary}\n${data.detail}`)
+                                           .writeText(`${data.severity}: ${data.summary}${detail}`)
                                            .catch(err => Ext.Msg.alert(gettext('Error'), err));
                                    },
                                },