mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-07 17:18:03 +03:00
ui: group filter: allow to set namespace for local datastore
The namespace has to be set in order to get the correct groups to be used as group filter options with a local datastore as source, required for sync jobs in push direction. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
964162ce35
commit
43a92c8c1b
@ -252,14 +252,17 @@ Ext.define('PBS.form.GroupFilter', {
|
||||
let url;
|
||||
if (me.remote) {
|
||||
url = `/api2/json/config/remote/${me.remote}/scan/${me.datastore}/groups`;
|
||||
if (me.namespace) {
|
||||
url += `?namespace=${me.namespace}`;
|
||||
}
|
||||
} else if (me.datastore) {
|
||||
url = `/api2/json/admin/datastore/${me.datastore}/groups`;
|
||||
if (me.namespace) {
|
||||
url += `?ns=${me.namespace}`;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (me.namespace) {
|
||||
url += `?namespace=${me.namespace}`;
|
||||
}
|
||||
me.setDsStoreUrl(url);
|
||||
me.dsStore.load({
|
||||
callback: (records) => {
|
||||
@ -279,6 +282,18 @@ Ext.define('PBS.form.GroupFilter', {
|
||||
}
|
||||
me.remote = undefined;
|
||||
me.datastore = datastore;
|
||||
me.namespace = undefined;
|
||||
me.updateGroupSelectors();
|
||||
},
|
||||
|
||||
setLocalNamespace: function(datastore, namespace) {
|
||||
let me = this;
|
||||
if (me.datastore === datastore && me.namespace === namespace) {
|
||||
return;
|
||||
}
|
||||
me.remote = undefined;
|
||||
me.datastore = datastore;
|
||||
me.namespace = namespace;
|
||||
me.updateGroupSelectors();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user