[pve-devel] [PATCH manager v2 1/3] ui: add Schema singleton
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jul 15 14:36:04 CEST 2021
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 at 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,
> + },
> + });
> + },
> +});
>
More information about the pve-devel
mailing list