From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH widget-toolkit 2/2] Toolkit: add HostPort vtype
Date: Thu, 1 Oct 2020 09:57:55 +0200 [thread overview]
Message-ID: <20201001075757.26446-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20201001075757.26446-1-d.csapak@proxmox.com>
for easy checking textfield for a single host:port
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/Toolkit.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/Toolkit.js b/src/Toolkit.js
index d528ea7..f706036 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -147,6 +147,14 @@ Ext.apply(Ext.form.field.VTypes, {
},
DnsOrIpText: gettext('Not a valid DNS name or IP address.'),
+ HostPort: function(v) {
+ return Proxmox.Utils.HostPort_match.test(v) ||
+ Proxmox.Utils.HostPortBrackets_match.test(v) ||
+ Proxmox.Utils.IP6_dotnotation_match.test(v);
+ },
+
+ HostPortText: gettext('Not a valid hosts'),
+
HostList: function(v) {
let list = v.split(/[ ,;]+/);
let i;
--
2.20.1
next prev parent reply other threads:[~2020-10-01 7:58 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 ` Dominik Csapak [this message]
2020-10-01 7:57 ` [pbs-devel] [PATCH proxmox-backup 1/2] ui: RemoteView: improve host columns Dominik Csapak
2020-10-01 8:12 ` [pbs-devel] applied: " 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-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