From 5a45d9187b8a237bf4362ecddeed31d7e5f6e489 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 4 Jan 2025 16:31:26 +0800 Subject: [PATCH] fix(client): add back unique check for routing node Signed-off-by: Tianling Shen --- htdocs/luci-static/resources/homeproxy.js | 2 ++ htdocs/luci-static/resources/view/homeproxy/client.js | 1 + 2 files changed, 3 insertions(+) diff --git a/htdocs/luci-static/resources/homeproxy.js b/htdocs/luci-static/resources/homeproxy.js index 35fd7ce4..020ea3e0 100644 --- a/htdocs/luci-static/resources/homeproxy.js +++ b/htdocs/luci-static/resources/homeproxy.js @@ -279,6 +279,8 @@ return baseclass.extend({ if (section_id) { if (!value) return _('Expecting: %s').format(_('non-empty value')); + if (ucioption === 'node' && value === 'urltest') + return true; var duplicate = false; uci.sections(uciconfig, ucisection, (res) => { diff --git a/htdocs/luci-static/resources/view/homeproxy/client.js b/htdocs/luci-static/resources/view/homeproxy/client.js index e35170d8..356e832d 100644 --- a/htdocs/luci-static/resources/view/homeproxy/client.js +++ b/htdocs/luci-static/resources/view/homeproxy/client.js @@ -381,6 +381,7 @@ return view.extend({ so.value('urltest', _('URLTest')); for (var i in proxy_nodes) so.value(i, proxy_nodes[i]); + so.validate = L.bind(hp.validateUniqueValue, this, data[0], 'routing_node', 'node'); so.editable = true; so = ss.option(form.ListValue, 'domain_strategy', _('Domain strategy'),