public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v2 1/3] ui: add Schema singleton
Date: Thu, 15 Jul 2021 14:36:04 +0200	[thread overview]
Message-ID: <99111886-b2ee-788e-0618-665348e8bb6d@proxmox.com> (raw)
In-Reply-To: <20210714125258.1747811-1-d.csapak@proxmox.com>

On 14.07.21 14:52, Dominik Csapak wrote:
> and override the Proxmox.Schema.authDomains in its constructor
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> new in v2
> 

IMO the patch order is a bit weird as we add the overrides here already but remove
the existing ones only in the second one, rather I'd either:

* squash patch 1 and patch 2
* really only add the schema boilerplate in patch 1

Besides that it would then also be good to move the storage schema and possible
other such things over to the new module, else we have two places with that
stuff, which is not really nice (and can be confusing for people adding the
next schema).

>  www/manager6/Makefile  |  1 +
>  www/manager6/Schema.js | 53 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 54 insertions(+)
>  create mode 100644 www/manager6/Schema.js
> 
> diff --git a/www/manager6/Makefile b/www/manager6/Makefile
> index 75d355a5..0b0d833e 100644
> --- a/www/manager6/Makefile
> +++ b/www/manager6/Makefile
> @@ -4,6 +4,7 @@ JSSRC= 							\
>  	Parser.js					\
>  	StateProvider.js				\
>  	Utils.js					\
> +	Schema.js					\
>  	Toolkit.js					\
>  	VNCConsole.js					\
>  	button/ConsoleButton.js				\
> diff --git a/www/manager6/Schema.js b/www/manager6/Schema.js
> new file mode 100644
> index 00000000..4e8ca8b9
> --- /dev/null
> +++ b/www/manager6/Schema.js
> @@ -0,0 +1,53 @@
> +Ext.define('PVE.Schema', { // a singleton
> +    singleton: true,
> +
> +    constructor: function() {
> +	var me = this;
> +
> +
> +	Proxmox.Schema.overrideAuthDomains({
> +	    ad: {
> +		name: gettext('Active Directory Server'),
> +		ipanel: 'pveAuthADPanel',
> +		syncipanel: 'pveAuthLDAPSyncPanel',
> +		add: true,
> +		edit: true,
> +		tfa: true,
> +		pwchange: true,
> +	    },
> +	    ldap: {
> +		name: gettext('LDAP Server'),
> +		ipanel: 'pveAuthLDAPPanel',
> +		syncipanel: 'pveAuthLDAPSyncPanel',
> +		add: true,
> +		edit: true,
> +		tfa: true,
> +		pwchange: true,
> +	    },
> +	    openid: {
> +		name: gettext('OpenID Connect Server'),
> +		ipanel: 'pveAuthOpenIDPanel',
> +		add: true,
> +		edit: true,
> +		tfa: false,
> +		pwchange: false,
> +		iconCls: 'pmx-itype-icon-openid-logo',
> +	    },
> +	    pam: {
> +		name: 'Linux PAM',
> +		ipanel: 'pveAuthBasePanel',
> +		add: false,
> +		edit: true,
> +		tfa: true,
> +		pwchange: true,
> +	    },
> +	    pve: {
> +		name: 'Proxmox VE authentication server',
> +		ipanel: 'pveAuthBasePanel',
> +		add: false,
> +		edit: true,
> +		pwchange: true,
> +	    },
> +	});
> +    },
> +});
> 





      parent reply	other threads:[~2021-07-15 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 12:52 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 ` [pve-devel] [PATCH manager v2 3/3] ui: remove PVE.dc.AuthEditBase window Dominik Csapak
2021-07-15 12:36 ` Thomas Lamprecht [this message]

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=99111886-b2ee-788e-0618-665348e8bb6d@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal