From: Matthias Heiserer <m.heiserer@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 3/3] fix #3939: ui: default realm setting in NodeOptionView
Date: Mon, 11 Apr 2022 12:03:12 +0200 [thread overview]
Message-ID: <95da5ac9-95ba-7e90-03be-00f38ce00415@proxmox.com> (raw)
In-Reply-To: <94299fed-fecf-e43a-6acb-c93db48998b6@proxmox.com>
On 11.04.2022 10:13, Thomas Lamprecht wrote:
> 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.
I don't think I can drop this function, because for each row entry the
ObjectGrid searches for a function named `add_${rowdef.xtype}_row` and
throws an error if none can be found. That's also the reason for the
strange name.
Maybe I misunderstand something?
>
>> + 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'), {
This call is unnecessary, I should put it in gridRows.
>> + defaultValue: 'pam',
>> + });
>>
>> me.callParent();
>>
>
next prev parent reply other threads:[~2022-04-11 10:03 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
2022-04-11 10:03 ` Matthias Heiserer [this message]
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=95da5ac9-95ba-7e90-03be-00f38ce00415@proxmox.com \
--to=m.heiserer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=t.lamprecht@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