mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 11:46:44 +00:00
ui: ceph warnings: disable copy-all if there are no additional infos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
f2a0f0ec72
commit
43fdec754d
@ -105,6 +105,7 @@ Ext.define('PVE.node.CephStatus', {
|
|||||||
detail: check.detail.reduce((acc, v) => `${acc}\n${v.message}`, '').trimStart(),
|
detail: check.detail.reduce((acc, v) => `${acc}\n${v.message}`, '').trimStart(),
|
||||||
severity: check.severity,
|
severity: check.severity,
|
||||||
};
|
};
|
||||||
|
data.noDetails = data.detail.length === 0;
|
||||||
if (data.detail.length === 0) {
|
if (data.detail.length === 0) {
|
||||||
data.detail = "no additional data";
|
data.detail = "no additional data";
|
||||||
}
|
}
|
||||||
@ -157,6 +158,7 @@ Ext.define('PVE.node.CephStatus', {
|
|||||||
{
|
{
|
||||||
iconCls: 'x-fa fa-clipboard',
|
iconCls: 'x-fa fa-clipboard',
|
||||||
tooltip: gettext('Copy All'),
|
tooltip: gettext('Copy All'),
|
||||||
|
isActionDisabled: (v, r, c, i, { data }) => !!data.noDetails,
|
||||||
handler: function(grid, rowindex, colindex, item, e, { data }) {
|
handler: function(grid, rowindex, colindex, item, e, { data }) {
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
.writeText(`${data.severity}: ${data.summary}\n${data.detail}`)
|
.writeText(`${data.severity}: ${data.summary}\n${data.detail}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user