diff --git a/luasrc/view/commotion/conn_clients.htm b/luasrc/view/commotion/conn_clients.htm index ff58103..97063b5 100644 --- a/luasrc/view/commotion/conn_clients.htm +++ b/luasrc/view/commotion/conn_clients.htm @@ -92,7 +92,7 @@ if #clients > 0 then --Actually create the table below here. %> -

<%:Connected Clients%>

+

<%:Connected Clients!%>

A client is a device that has connected to this node. Information about clients is displayed below.

<% if warning then %>

<%:You are not using a welcome page (splash page/captive portal.) Without a splash page we can only show a clients ip-address and the status of their connection.%>

@@ -109,6 +109,6 @@

<%:Connected Clients%>

<%else%> -

<%:Connected Clients%>

+

<%:Connected Clients!%>

<%:No connected clients were found at this time. If a Welcome Page has been enabled, clients must click through it before being displayed here.%>

<%end%> diff --git a/luasrc/view/themes/commotion/header.htm b/luasrc/view/themes/commotion/header.htm index 5b5c1e1..0d6beed 100644 --- a/luasrc/view/themes/commotion/header.htm +++ b/luasrc/view/themes/commotion/header.htm @@ -109,6 +109,21 @@ end end ) + uci:foreach("olsrd", "Interface", function(s) + if s and s.Mode and s.Mode == "ether" and s.interface and s.ignore ~= 1 then + local iface = conn:call("network.interface."..s.interface, "status", {}) + if iface ~= nil and iface["ipv4-address"] then + if iface["ipv4-address"][1] and iface["ipv4-address"][1].address then + if mesh_ip == "Unknown" then + mesh_ip = iface["ipv4-address"][1].address + else + mesh_ip = (mesh_ip..", "..iface["ipv4-address"][1].address) + end + end + end + end + end + ) conn:close() -- END mesh ip generation