]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: ceph warnings: disable copy-all if there are no additional infos
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Oct 2023 13:28:45 +0000 (15:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Oct 2023 15:38:39 +0000 (17:38 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/ceph/Status.js

index bedd4e14c0505d6905562c6d9d11455581540152..a72ee761ecbc3c18f8bf437bf81313c4474a84e5 100644 (file)
@@ -105,6 +105,7 @@ Ext.define('PVE.node.CephStatus', {
                                detail: check.detail.reduce((acc, v) => `${acc}\n${v.message}`, '').trimStart(),
                                severity: check.severity,
                            };
+                           data.noDetails = data.detail.length === 0;
                            if (data.detail.length === 0) {
                                data.detail = "no additional data";
                            }
@@ -157,6 +158,7 @@ Ext.define('PVE.node.CephStatus', {
                                {
                                    iconCls: 'x-fa fa-clipboard',
                                    tooltip: gettext('Copy All'),
+                                   isActionDisabled: (v, r, c, i, { data }) => !!data.noDetails,
                                    handler: function(grid, rowindex, colindex, item, e, { data }) {
                                        navigator.clipboard
                                            .writeText(`${data.severity}: ${data.summary}\n${data.detail}`)