Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #546

Merged
merged 3 commits into from
Sep 22, 2024
Merged

sync #546

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,14 @@
cssc = 'rgb(144, 240, 144)';
statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
statusMessageClass = "warning";
statusMessage = "Some connectivity tests failed";
statusMessage = "Some connectivity tests failed" + '<br />';
break;
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 + ")" + '<br />';
}
// Populate info
var wanip = mArray.wans[i].wanip;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down