ui: tape/BackupOverview: show namespaces as their own level above groups
since the namespaces are in the snapshot path we get here, we must parse them out, else we confuse the first namespace with the group. for now, show all namespaces on the same level (so not nested), and do not allow for preselecting a namespace for restoring Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
@ -338,9 +338,13 @@ Ext.define('PBS.Utils', {
|
||||
if (!snapshot) {
|
||||
return [undefined, undefined, undefined];
|
||||
}
|
||||
let [_match, type, group, id] = /^([^/]+)\/([^/]+)\/(.+)$/.exec(snapshot);
|
||||
let nsRegex = /(?:^|\/)(ns\/([^/]+))/g;
|
||||
let namespaces = [];
|
||||
let nsPaths = [];
|
||||
snapshot = snapshot.replace(nsRegex, (_, nsPath, ns) => { nsPaths.push(nsPath); namespaces.push(ns); return ""; });
|
||||
let [_match, type, group, id] = /^\/?([^/]+)\/([^/]+)\/(.+)$/.exec(snapshot);
|
||||
|
||||
return [type, group, id];
|
||||
return [type, group, id, namespaces.join('/'), nsPaths.join('/')];
|
||||
},
|
||||
|
||||
get_type_icon_cls: function(btype) {
|
||||
|
Reference in New Issue
Block a user