luci-app-olsr: convert mid.htm to new json plugin
authorpmelange <isprotejesvalkata@gmail.com>
Mon, 5 Nov 2018 15:37:19 +0000 (16:37 +0100)
committerpmelange <isprotejesvalkata@gmail.com>
Thu, 6 Dec 2018 18:06:40 +0000 (19:06 +0100)
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
applications/luci-app-olsr/luasrc/controller/olsr.lua
applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm

index ff4a248dae8373c051ab21f3258cb44ec2a4d937..e2e93d26938d7d990f8882b099f1b8f71a662b7b 100644 (file)
@@ -300,7 +300,7 @@ function action_mid()
 
        local function compare(a,b)
                if a.proto == b.proto then
-                       return a.ipAddress < b.ipAddress
+                       return a.main.ipAddress < b.main.ipAddress
                else
                        return a.proto < b.proto
                end
index 8c9f63af0b012f89657e47f65c6664a35c2a3724..9babd50a801e5919f789b09f6c38167705e307c6 100644 (file)
@@ -31,14 +31,14 @@ local i = 1
                                end
                                aliases = v.ipAddress .. sep .. aliases
                        end
-                       local host = mid.ipAddress
+                       local host = mid.main.ipAddress
                        if mid.proto == '6' then
-                               host = '[' .. mid.ipAddress .. ']'
+                               host = '[' .. mid.main.ipAddress .. ']'
                        end
                %>
 
                <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>