all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2 3/3] ui: remove PVE.dc.AuthEditBase window
Date: Wed, 14 Jul 2021 14:52:58 +0200	[thread overview]
Message-ID: <20210714125258.1747811-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20210714125258.1747811-1-d.csapak@proxmox.com>

this is not needed anymore since we now use Proxmox.window.AuthEditBase

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/dc/AuthEditBase.js | 91 ---------------------------------
 1 file changed, 91 deletions(-)

diff --git a/www/manager6/dc/AuthEditBase.js b/www/manager6/dc/AuthEditBase.js
index 996ed6a8..3c66b4bf 100644
--- a/www/manager6/dc/AuthEditBase.js
+++ b/www/manager6/dc/AuthEditBase.js
@@ -64,94 +64,3 @@ Ext.define('PVE.panel.AuthBase', {
 	me.callParent();
     },
 });
-
-Ext.define('PVE.dc.AuthEditBase', {
-    extend: 'Proxmox.window.Edit',
-
-    onlineHelp: 'pveum_authentication_realms',
-
-    isAdd: true,
-
-    fieldDefaults: {
-	labelWidth: 120,
-    },
-
-    initComponent: function() {
-	var me = this;
-
-	me.isCreate = !me.realm;
-
-	if (me.isCreate) {
-	    me.url = '/api2/extjs/access/domains';
-	    me.method = 'POST';
-	} else {
-	    me.url = '/api2/extjs/access/domains/' + me.realm;
-	    me.method = 'PUT';
-	}
-
-	let authConfig = PVE.Utils.authSchema[me.authType];
-	if (!authConfig) {
-	    throw 'unknown auth type';
-	} else if (!authConfig.add && me.isCreate) {
-	    throw 'trying to add non addable realm';
-	}
-
-	me.subject = authConfig.name;
-
-	let items;
-	let bodyPadding;
-	if (authConfig.syncipanel) {
-	    bodyPadding = 0;
-	    items = {
-		xtype: 'tabpanel',
-		region: 'center',
-		layout: 'fit',
-		bodyPadding: 10,
-		items: [
-		    {
-			title: gettext('General'),
-			realm: me.realm,
-			xtype: authConfig.ipanel,
-			isCreate: me.isCreate,
-			type: me.authType,
-		    },
-		    {
-			title: gettext('Sync Options'),
-			realm: me.realm,
-			xtype: authConfig.syncipanel,
-			isCreate: me.isCreate,
-			type: me.authType,
-		    },
-		],
-	    };
-	} else {
-	    items = [{
-		realm: me.realm,
-		xtype: authConfig.ipanel,
-		isCreate: me.isCreate,
-		type: me.authType,
-	    }];
-	}
-
-	Ext.apply(me, {
-	    items,
-	    bodyPadding,
-	});
-
-	me.callParent();
-
-	if (!me.isCreate) {
-	    me.load({
-		success: function(response, options) {
-		    var data = response.result.data || {};
-		    // just to be sure (should not happen)
-		    if (data.type !== me.authType) {
-			me.close();
-			throw "got wrong auth type";
-		    }
-		    me.setValues(data);
-		},
-	    });
-	}
-    },
-});
-- 
2.30.2





  parent reply	other threads:[~2021-07-14 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 12:52 [pve-devel] [PATCH manager v2 1/3] ui: add Schema singleton Dominik Csapak
2021-07-14 12:52 ` [pve-devel] [PATCH manager v2 2/3] ui: use AuthView and authSchema from widget-toolkit Dominik Csapak
2021-07-14 12:52 ` Dominik Csapak [this message]
2021-07-15 12:36 ` [pve-devel] [PATCH manager v2 1/3] ui: add Schema singleton Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210714125258.1747811-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal