mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-07 14:38:53 +00:00
fix #4260: ui: fallback to note of last snapshot for backup group comment
When there is no comment for a backup group, the comment of the last (most recent) snapshot in this group will be shown as dimmed text, as long as the back group is collapsed. Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
This commit is contained in:
parent
247ae35019
commit
ba558d105f
@ -227,6 +227,10 @@ span.snapshot-comment-column {
|
|||||||
width: calc(100% - 18px);
|
width: calc(100% - 18px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pmx-faded {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
.x-action-col-icon.good:before {
|
.x-action-col-icon.good:before {
|
||||||
color: #21BF4B;
|
color: #21BF4B;
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,7 @@ Ext.define('PBS.DataStoreContent', {
|
|||||||
if (item["backup-time"] > last_backup && item.size !== null) {
|
if (item["backup-time"] > last_backup && item.size !== null) {
|
||||||
last_backup = item["backup-time"];
|
last_backup = item["backup-time"];
|
||||||
group["backup-time"] = last_backup;
|
group["backup-time"] = last_backup;
|
||||||
|
group["last-comment"] = item.comment;
|
||||||
group.files = item.files;
|
group.files = item.files;
|
||||||
group.size = item.size;
|
group.size = item.size;
|
||||||
group.owner = item.owner;
|
group.owner = item.owner;
|
||||||
@ -903,13 +904,20 @@ Ext.define('PBS.DataStoreContent', {
|
|||||||
if (!data || data.leaf || data.root) {
|
if (!data || data.leaf || data.root) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
if (v === undefined || v === null) {
|
|
||||||
v = '';
|
let additionalClasses = "";
|
||||||
|
if (!v) {
|
||||||
|
if (!data.expanded) {
|
||||||
|
v = data['last-comment'] ?? '';
|
||||||
|
additionalClasses = "pmx-faded";
|
||||||
|
} else {
|
||||||
|
v = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
v = Ext.String.htmlEncode(v);
|
v = Ext.String.htmlEncode(v);
|
||||||
let icon = 'x-action-col-icon fa fa-fw fa-pencil pointer';
|
let icon = 'x-action-col-icon fa fa-fw fa-pencil pointer';
|
||||||
|
|
||||||
return `<span class="snapshot-comment-column">${v}</span>
|
return `<span class="snapshot-comment-column ${additionalClasses}">${v}</span>
|
||||||
<i data-qtip="${gettext('Edit')}" style="float: right; margin: 0px;" class="${icon}"></i>`;
|
<i data-qtip="${gettext('Edit')}" style="float: right; margin: 0px;" class="${icon}"></i>`;
|
||||||
},
|
},
|
||||||
listeners: {
|
listeners: {
|
||||||
|
Loading…
Reference in New Issue
Block a user