ui: fix group backup comment NS awareness

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-11 12:01:36 +02:00
parent ad7741a294
commit d83ce0d0c7

View File

@ -142,9 +142,11 @@ Ext.define('PBS.DataStoreContent', {
updateGroupNotes: async function(view) {
try {
let { result: { data: groups } } = await Proxmox.Async.api2({
url: `/api2/extjs/admin/datastore/${view.datastore}/groups`,
});
let url = `/api2/extjs/admin/datastore/${view.datastore}/groups`;
if (view.namespace && view.namespace !== '') {
url += `?backup-ns=${encodeURIComponent(view.namespace)}`;
}
let { result: { data: groups } } = await Proxmox.Async.api2({ url });
let map = {};
for (const group of groups) {
map[`${group["backup-type"]}/${group["backup-id"]}`] = group.comment;