From 44b8789388ec5537b5af43eb122e3ccdb6a0d3b4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 20 Sep 2024 19:52:00 +0200 Subject: [PATCH 1/3] Remove OMR entry from DHCP IP Sets in Luci interface --- .../htdocs/luci-static/resources/view/network/dhcp.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index da0eeabb5a..f6ffc7d5fa 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -305,6 +305,10 @@ return view.extend({ o = s.taboption('general', form.DynamicList, 'ipset', _('IP sets'), _('List of IP sets to populate with the IPs of DNS lookup results of the FQDNs also specified here.')); + o.filter = function(section_id, name) { + return (section_id.startsWith('omr_dscp') == false); + }; + o.optional = true; o.placeholder = '/example.org/ipset,ipset6'; @@ -754,6 +758,9 @@ return view.extend({ _('List of IP sets to populate with the IPs of DNS lookup results of the FQDNs also specified here.')); ss = o.subsection; + ss.filter = function(section_id, name) { + return (section_id.startsWith('omr_') == false); + }; ss.addremove = true; ss.anonymous = true; From 8ae235cf3d716640066b520005ee935c8998c4e1 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 20 Sep 2024 19:52:38 +0200 Subject: [PATCH 2/3] Try to find why we have unknown status in some cases --- .../luasrc/view/openmptcprouter/wanstatus.htm | 4 ++-- openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm index f9d6fcf5c9..3108c7e37c 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm @@ -445,13 +445,13 @@ cssc = 'rgb(144, 240, 144)'; statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png"; statusMessageClass = "warning"; - statusMessage = "Some connectivity tests failed"; + statusMessage = "Some connectivity tests failed" + '
'; default: stat = 'Unknown'; cssc = 'rgb(144, 240, 144)'; statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png"; statusMessageClass = "warning"; - statusMessage = "Unknown status"; + statusMessage = "Unknown status (" + mArray.wans[i].status + ")" + '
'; } // Populate info var wanip = mArray.wans[i].wanip; diff --git a/openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter b/openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter index a3b2747a00..166565cea3 100755 --- a/openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter +++ b/openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter @@ -1273,6 +1273,7 @@ function interfaces_status() local mac = section ["macaddr"] or "" local itype = section ["type"] or "" local state = uci:get("openmptcprouter", interface, "state") or "" + local connectivity = "OK" --if not ipaddr or not gateway then return end -- Don't show if0 in the overview @@ -1311,7 +1312,7 @@ function interfaces_status() if enabled == "0" then return end - local connectivity = "OK" + --local connectivity = "OK" if ipaddr == "" and ifname ~= nil and ifname ~= "" and proto ~= "dhcpv6" then ipaddr = ut.trim(sys.exec("ip -4 -br addr ls dev " .. ifname .. " | awk -F'[ /]+' '{print $3}' | tr -d '\n'")) end From 698c94bf1d475b98cd31e3fdf660e6b917d18074 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 20 Sep 2024 19:55:37 +0200 Subject: [PATCH 3/3] Add missing break in switch wan state in Status page --- .../luasrc/view/openmptcprouter/wanstatus.htm | 1 + 1 file changed, 1 insertion(+) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm index 3108c7e37c..224ff07a66 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm @@ -446,6 +446,7 @@ statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png"; statusMessageClass = "warning"; statusMessage = "Some connectivity tests failed" + '
'; + break; default: stat = 'Unknown'; cssc = 'rgb(144, 240, 144)';