luci-app-olsr: convert mid.htm to new json plugin

Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
This commit is contained in:
pmelange 2018-11-05 16:37:19 +01:00
parent 9e7557b606
commit 7fb197c10a
2 changed files with 4 additions and 4 deletions

View file

@ -300,7 +300,7 @@ function action_mid()
local function compare(a,b) local function compare(a,b)
if a.proto == b.proto then if a.proto == b.proto then
return a.ipAddress < b.ipAddress return a.main.ipAddress < b.main.ipAddress
else else
return a.proto < b.proto return a.proto < b.proto
end end

View file

@ -31,14 +31,14 @@ local i = 1
end end
aliases = v.ipAddress .. sep .. aliases aliases = v.ipAddress .. sep .. aliases
end end
local host = mid.ipAddress local host = mid.main.ipAddress
if mid.proto == '6' then if mid.proto == '6' then
host = '[' .. mid.ipAddress .. ']' host = '[' .. mid.main.ipAddress .. ']'
end end
%> %>
<div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=mid.proto%>"> <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=mid.proto%>">
<div class="td cbi-section-table-cell"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.ipAddress%></a></div> <div class="td cbi-section-table-cell"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.main.ipAddress%></a></div>
<div class="td cbi-section-table-cell"><%=aliases%></div> <div class="td cbi-section-table-cell"><%=aliases%></div>
</div> </div>