From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] ui: add node options under 'Configuration -> Options'
Date: Wed, 12 May 2021 16:42:32 +0200 [thread overview]
Message-ID: <20210512144232.5643-1-d.csapak@proxmox.com> (raw)
for now only http-proxy lives there, but we will add more options later,
such as
* email from
* default gui language
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/Makefile | 1 +
www/SystemConfiguration.js | 5 +++++
www/config/NodeOptionView.js | 42 ++++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+)
create mode 100644 www/config/NodeOptionView.js
diff --git a/www/Makefile b/www/Makefile
index f0b795ca..517cbd23 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -54,6 +54,7 @@ JSSRC= \
config/VerifyView.js \
config/WebauthnView.js \
config/CertificateView.js \
+ config/NodeOptionView.js \
window/ACLEdit.js \
window/AddTfaRecovery.js \
window/AddTotp.js \
diff --git a/www/SystemConfiguration.js b/www/SystemConfiguration.js
index 025e0273..211c9c08 100644
--- a/www/SystemConfiguration.js
+++ b/www/SystemConfiguration.js
@@ -65,6 +65,11 @@ Ext.define('PBS.SystemConfiguration', {
},
],
},
+ {
+ title: gettext('Options'),
+ itemId: 'options',
+ xtype: 'pbsNodeOptionView',
+ },
],
initComponent: function() {
diff --git a/www/config/NodeOptionView.js b/www/config/NodeOptionView.js
new file mode 100644
index 00000000..beeea35f
--- /dev/null
+++ b/www/config/NodeOptionView.js
@@ -0,0 +1,42 @@
+Ext.define('PBS.NodeOptionView', {
+ extend: 'Proxmox.grid.ObjectGrid',
+ alias: 'widget.pbsNodeOptionView',
+
+ monStoreErrors: true,
+
+ url: `/api2/json/nodes/${Proxmox.NodeName}/config`,
+ editorConfig: {
+ url: `/api2/extjs/nodes/${Proxmox.NodeName}/config`,
+ },
+ interval: 5000,
+ cwidth1: 200,
+
+ listeners: {
+ itemdblclick: function() { this.run_editor() },
+ },
+
+ tbar: [
+ {
+ text: gettext('Edit'),
+ xtype: 'proxmoxButton',
+ disabled: true,
+ handler: function() { this.up('grid').run_editor(); },
+ }
+ ],
+
+ initComponent: function() {
+ let me = this;
+
+ me.add_text_row('http-proxy', gettext('HTTP proxy'), {
+ defaultValue: Proxmox.Utils.noneText,
+ vtype: 'HttpProxy',
+ deleteEmpty: true,
+ });
+
+ me.callParent();
+
+ me.on('activate', me.rstore.startUpdate);
+ me.on('destroy', me.rstore.stopUpdate);
+ me.on('deactivate', me.rstore.stopUpdate);
+ },
+});
--
2.20.1
next reply other threads:[~2021-05-12 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 14:42 Dominik Csapak [this message]
2021-05-12 19:24 ` Thomas Lamprecht
2021-05-25 5:52 ` [pbs-devel] applied: " 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=20210512144232.5643-1-d.csapak@proxmox.com \
--to=d.csapak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal