From: Ivan Chashkin Date: Fri, 21 Feb 2025 19:20:54 +0000 (+0300) Subject: luci-proto-yggdrasil: update yggdrasil.js for 0.5.7+ version X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=ca9761370a111c8358999559e76a3b75c52c3fc8;p=project%2Fluci.git luci-proto-yggdrasil: update yggdrasil.js for 0.5.7+ version rename latency_ms and add new protocols to validate functions https://yggdrasil-network.github.io/configurationref.html Signed-off-by: Ivan Chashkin --- diff --git a/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js b/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js index 3766bb1b48..4cfa62583f 100644 --- a/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js +++ b/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js @@ -33,13 +33,13 @@ function validateYggdrasilListenUri(section_id,value) { if (value.length == 0) { return true; }; - if (!value.match(/^(tls|tcp|unix|quic):\/\//)) + if (!value.match(/^(tls|tcp|quic|unix|ws):\/\//)) return _('Unsupported URI scheme in %s').format(value); return true; }; function validateYggdrasilPeerUri(section_id,value) { - if (!value.match(/^(tls|tcp|unix|quic|socks|sockstls):\/\//)) + if (!value.match(/^(tls|tcp|quic|socks|sockstls|unix|ws|wss):\/\//)) return _('URI scheme %s not supported').format(value); return true; }; @@ -98,7 +98,7 @@ function updateActivePeers(ifname) { cell = row.insertCell(-1) cell.className = "td" - cell.textContent = '%.2f ms'.format(peer.latency_ms / 10**6); + cell.textContent = '%.2f ms'.format(peer.latency / 10**6); cell = row.insertCell(-1) cell.className = "td"