5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-10 01:18:06 +03: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:
Philipp Hufnagl 2023-10-13 16:37:55 +02:00 committed by Thomas Lamprecht
parent 247ae35019
commit ba558d105f
2 changed files with 15 additions and 3 deletions

View File

@ -227,6 +227,10 @@ span.snapshot-comment-column {
width: calc(100% - 18px);
}
.pmx-faded {
opacity: 0.7;
}
.x-action-col-icon.good:before {
color: #21BF4B;
}

View File

@ -287,6 +287,7 @@ Ext.define('PBS.DataStoreContent', {
if (item["backup-time"] > last_backup && item.size !== null) {
last_backup = item["backup-time"];
group["backup-time"] = last_backup;
group["last-comment"] = item.comment;
group.files = item.files;
group.size = item.size;
group.owner = item.owner;
@ -903,13 +904,20 @@ Ext.define('PBS.DataStoreContent', {
if (!data || data.leaf || data.root) {
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);
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>`;
},
listeners: {