public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 3/3] fix #3939: ui: default realm setting in NodeOptionView
Date: Wed, 23 Mar 2022 14:01:11 +0100	[thread overview]
Message-ID: <20220323130111.2552347-3-m.heiserer@proxmox.com> (raw)
In-Reply-To: <20220323130111.2552347-1-m.heiserer@proxmox.com>

Again, different than we do it in PVE, because default-realm
is stored in node.cfg.

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) {
+	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();
 
-- 
2.30.2





  parent reply	other threads:[~2022-03-23 13:10 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 ` Matthias Heiserer [this message]
2022-04-11  8:13   ` [pbs-devel] [PATCH proxmox-backup 3/3] fix #3939: ui: default realm setting in NodeOptionView Thomas Lamprecht
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=20220323130111.2552347-3-m.heiserer@proxmox.com \
    --to=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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal