mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 07:49:19 +00:00
panel/AuthView: handle different baseUrls for configuring realms
we need that for pbs. also give the option to use the type in the path, like in AuthEditBase Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
335633d208
commit
8d4faa8821
@ -10,6 +10,9 @@ Ext.define('Proxmox.panel.AuthView', {
|
|||||||
trackOver: false,
|
trackOver: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
baseUrl: '/access/domains',
|
||||||
|
useTypeInUrl: false,
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
header: gettext('Realm'),
|
header: gettext('Realm'),
|
||||||
@ -43,6 +46,8 @@ Ext.define('Proxmox.panel.AuthView', {
|
|||||||
openEditWindow: function(authType, realm) {
|
openEditWindow: function(authType, realm) {
|
||||||
let me = this;
|
let me = this;
|
||||||
Ext.create('Proxmox.window.AuthEditBase', {
|
Ext.create('Proxmox.window.AuthEditBase', {
|
||||||
|
baseUrl: me.baseUrl,
|
||||||
|
useTypeInUrl: me.useTypeInUrl,
|
||||||
authType,
|
authType,
|
||||||
realm,
|
realm,
|
||||||
listeners: {
|
listeners: {
|
||||||
@ -99,7 +104,14 @@ Ext.define('Proxmox.panel.AuthView', {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'proxmoxStdRemoveButton',
|
xtype: 'proxmoxStdRemoveButton',
|
||||||
baseurl: '/access/domains/',
|
getUrl: (rec) => {
|
||||||
|
let url = me.baseUrl;
|
||||||
|
if (me.useTypeInUrl) {
|
||||||
|
url += `/${rec.get('type')}`;
|
||||||
|
}
|
||||||
|
url += `/${rec.getId()}`;
|
||||||
|
return url;
|
||||||
|
},
|
||||||
enableFn: (rec) => Proxmox.Schema.authDomains[rec.data.type].add,
|
enableFn: (rec) => Proxmox.Schema.authDomains[rec.data.type].add,
|
||||||
callback: () => me.reload(),
|
callback: () => me.reload(),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user