ui: RemoteView: improve host columns
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>
This commit is contained in:
parent
4c95d58c41
commit
3784dbf029
|
@ -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}]`;
|
||||
}
|
||||
return `${host}:${port}`;
|
||||
txt += `:${port}`;
|
||||
}
|
||||
return txt;
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue