[pmg-devel] [PATCH widget-toolkit v6 09/12] fix: panel: AuthView: change API path in pmx-domains model

Markus Frank m.frank at proxmox.com
Tue Feb 25 14:36:16 CET 2025


Currently it always uses the default path because it was hardcoded into
the 'pmx-domains' model.

Fixes: 8d4faa88212757f274cc177c906af09d4ebe07bb
Signed-off-by: Markus Frank <m.frank at proxmox.com>
Co-authored-by: Dominik Csapak <d.csapak at proxmox.com>
---
This patch is new to v6. Required to change the API path to
/access/auth-realm

 src/panel/AuthView.js | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/panel/AuthView.js b/src/panel/AuthView.js
index f607532..0e1718e 100644
--- a/src/panel/AuthView.js
+++ b/src/panel/AuthView.js
@@ -47,14 +47,6 @@ Ext.define('Proxmox.panel.AuthView', {
 	},
     ],
 
-    store: {
-	model: 'pmx-domains',
-	sorters: {
-	    property: 'realm',
-	    direction: 'ASC',
-	},
-    },
-
     openEditWindow: function(authType, realm) {
 	let me = this;
 	const { useTypeInUrl, onlineHelp } = Proxmox.Schema.authDomains[authType];
@@ -111,6 +103,18 @@ Ext.define('Proxmox.panel.AuthView', {
     initComponent: function() {
 	var me = this;
 
+	me.store = {
+	    model: 'pmx-domains',
+	    sorters: {
+		property: 'realm',
+		direction: 'ASC',
+	    },
+	    proxy: {
+		type: 'proxmox',
+		url: `/api2/json${me.baseUrl}`,
+	    },
+	};
+
 	let menuitems = [];
 	for (const [authType, config] of Object.entries(Proxmox.Schema.authDomains).sort()) {
 	    if (!config.add) { continue; }
-- 
2.39.5





More information about the pmg-devel mailing list