From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Matthias Heiserer <m.heiserer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 3/3] fix #3939: ui: default realm setting in NodeOptionView
Date: Mon, 11 Apr 2022 10:13:36 +0200 [thread overview]
Message-ID: <94299fed-fecf-e43a-6acb-c93db48998b6@proxmox.com> (raw)
In-Reply-To: <20220323130111.2552347-3-m.heiserer@proxmox.com>
On 23.03.22 14:01, Matthias Heiserer wrote:
> Again, different than we do it in PVE, because default-realm
> is stored in node.cfg.
>
While this patch may be obsolete in the current form with my bz comment and
review on the backend, still some notes.
> Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
> ---
> www/config/NodeOptionView.js | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js
> index bb12513b..f3652a53 100644
> --- a/www/config/NodeOptionView.js
> +++ b/www/config/NodeOptionView.js
> @@ -53,8 +53,31 @@ Ext.define('PBS.NodeOptionView', {
> },
> ],
>
> + add_pmxRealmComboBox_row: function(name, text, opts) {
I'd figure that camels and snakes don't mix well, at least in casing style ;-)
But in general: this is unnecessary, as currently used you can just add another
static entry in the `gridRows` array, and if the user of this whole component
needs to be able to config something (which they ain't with your approach, but
it feels like that was the aim?) a simple (c)bind can avoid such intermediate
creation helper.
> + let me = this;
> + opts = opts || {};
> + me.rows = me.rows || {};
> + me.rows[name] = {
> + required: true,
> + header: text,
> + defaultValue: opts.defaultValue,
> + renderer: opts.renderer,
> + editor: {
> + xtype: 'proxmoxWindowEdit',
> + subject: text,
> + items: {
> + xtype: 'pmxRealmComboBox',
> + name: name,
> + },
> + },
> + };
> + },
> +
> initComponent: function() {
> let me = this;
> + me.add_pmxRealmComboBox_row('default-realm', gettext('Default realm'), {
> + defaultValue: 'pam',
> + });
>
> me.callParent();
>
next prev parent reply other threads:[~2022-04-11 8:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 13:01 [pbs-devel] [PATCH proxmox-backup 1/3] fix #3939: add default-realm field to node config Matthias Heiserer
2022-03-23 13:01 ` [pbs-devel] [PATCH proxmox-backup 2/3] fix #3939: set default value in domains endpoint Matthias Heiserer
2022-04-11 8:12 ` Thomas Lamprecht
2022-04-11 10:20 ` Matthias Heiserer
2022-04-11 11:34 ` Thomas Lamprecht
2022-03-23 13:01 ` [pbs-devel] [PATCH proxmox-backup 3/3] fix #3939: ui: default realm setting in NodeOptionView Matthias Heiserer
2022-04-11 8:13 ` Thomas Lamprecht [this message]
2022-04-11 10:03 ` Matthias Heiserer
2022-04-11 11:41 ` 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=94299fed-fecf-e43a-6acb-c93db48998b6@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=m.heiserer@proxmox.com \
--cc=pbs-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