From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC PATCH proxmox-backup 2/2] ui: add port support for remotes
Date: Tue, 29 Sep 2020 16:18:59 +0200 [thread overview]
Message-ID: <20200929141859.17102-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20200929141859.17102-1-d.csapak@proxmox.com>
by adding a field to RemoteEdit and showing it in the grid
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/config/RemoteView.js | 13 +++++++++++--
www/window/RemoteEdit.js | 10 ++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/www/config/RemoteView.js b/www/config/RemoteView.js
index a820da04..a804e5d6 100644
--- a/www/config/RemoteView.js
+++ b/www/config/RemoteView.js
@@ -1,6 +1,15 @@
Ext.define('pmx-remotes', {
extend: 'Ext.data.Model',
- fields: ['name', 'host', 'userid', 'fingerprint', 'comment'],
+ fields: ['name', 'host', 'port', 'userid', 'fingerprint', 'comment',
+ {
+ name: 'server',
+ calculate: function(data) {
+ let host = data.host || "localhost";
+ let port = data.port || "8007";
+ return `${host}:${port}`;
+ }
+ }
+ ],
idProperty: 'name',
proxy: {
type: 'proxmox',
@@ -109,7 +118,7 @@ Ext.define('PBS.config.RemoteView', {
header: gettext('Host'),
width: 200,
sortable: true,
- dataIndex: 'host',
+ dataIndex: 'server',
},
{
header: gettext('User name'),
diff --git a/www/window/RemoteEdit.js b/www/window/RemoteEdit.js
index cbfbe1d9..7d0ea546 100644
--- a/www/window/RemoteEdit.js
+++ b/www/window/RemoteEdit.js
@@ -48,6 +48,16 @@ Ext.define('PBS.window.RemoteEdit', {
name: 'host',
fieldLabel: gettext('Host'),
},
+ {
+ xtype: 'proxmoxintegerfield',
+ allowBlank: true,
+ minValue: 1,
+ maxValue: 2**16,
+ name: 'port',
+ emptyText: 8007,
+ deleteEmpty: true,
+ fieldLabel: gettext('Port'),
+ },
],
column2: [
--
2.20.1
next prev parent reply other threads:[~2020-09-29 14:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 14:18 [pbs-devel] [RFC PATCH proxmox-backup 0/2] add support for custom ports Dominik Csapak
2020-09-29 14:18 ` [pbs-devel] [RFC PATCH proxmox-backup 1/2] client/remote: add support to specify port number Dominik Csapak
2020-09-29 14:18 ` Dominik Csapak [this message]
2020-09-30 15:54 ` [pbs-devel] applied: [RFC PATCH proxmox-backup 0/2] add support for custom ports 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=20200929141859.17102-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox