From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/2] ui: RemoteView: improve host columns
Date: Thu, 1 Oct 2020 09:57:56 +0200 [thread overview]
Message-ID: <20201001075757.26446-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20201001075757.26446-1-d.csapak@proxmox.com>
do not show the default (8007) port
and only add brackets [] to ipv6 addresses if there is a port
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/config/RemoteView.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/www/config/RemoteView.js b/www/config/RemoteView.js
index 96788fc7..98f72bb5 100644
--- a/www/config/RemoteView.js
+++ b/www/config/RemoteView.js
@@ -4,12 +4,15 @@ Ext.define('pmx-remotes', {
{
name: 'server',
calculate: function(data) {
- let host = data.host || "localhost";
+ let txt = data.host || "localhost";
let port = data.port || "8007";
- if (Proxmox.Utils.IP64_match.test(host)) {
- host = `[${host}]`;
+ if (port.toString() !== "8007") {
+ if (Proxmox.Utils.IP6_match.test(txt)) {
+ txt = `[${txt}]`;
+ }
+ txt += `:${port}`;
}
- return `${host}:${port}`;
+ return txt;
}
}
],
--
2.20.1
next prev parent reply other threads:[~2020-10-01 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 7:57 [pbs-devel] [PATCH widget-toolkit/proxmox-backup] improve ipv6/ports for remotes gui Dominik Csapak
2020-10-01 7:57 ` [pbs-devel] [PATCH widget-toolkit 1/2] Utils: improve matching groups of ip/host regexes Dominik Csapak
2020-10-01 8:10 ` [pbs-devel] applied: " Dietmar Maurer
2020-10-01 7:57 ` [pbs-devel] [PATCH widget-toolkit 2/2] Toolkit: add HostPort vtype Dominik Csapak
2020-10-01 7:57 ` Dominik Csapak [this message]
2020-10-01 8:12 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: RemoteView: improve host columns Dietmar Maurer
2020-10-01 7:57 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: RemoteEdit: remove port field and parse it from host field Dominik Csapak
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=20201001075757.26446-4-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