X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-olsr%2Fluasrc%2Fview%2Fstatus-olsr%2Fhna.htm;fp=applications%2Fluci-olsr%2Fluasrc%2Fview%2Fstatus-olsr%2Fhna.htm;h=689bafdfae373576d0d7b87b0caa7d8010f5fd62;hb=97f0cf2996be5ce5ad58e22c35ea81336727db08;hp=bde1f009b54b50f71389664a76fb8df9787d2d2c;hpb=a0183b2f75a772366336671a818707df3dc04e79;p=project%2Fluci.git diff --git a/applications/luci-olsr/luasrc/view/status-olsr/hna.htm b/applications/luci-olsr/luasrc/view/status-olsr/hna.htm index bde1f009b..689bafdfa 100644 --- a/applications/luci-olsr/luasrc/view/status-olsr/hna.htm +++ b/applications/luci-olsr/luasrc/view/status-olsr/hna.htm @@ -10,39 +10,120 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -$Id$ - -%> + <% local i = 1 + +if luci.http.formvalue("status") == "1" then + local rv = {} + for k, hna in ipairs(hna) do + rv[#rv+1] = { + proto = hna["proto"], + destination = hna["destination"], + genmask = hna["genmask"], + gateway = hna["gateway"], + hostname = hna["hostname"], + validityTime = hna["validityTime"] + } + end + luci.http.prepare_content("application/json") + luci.http.write_json(rv) + return +end %> <%+header%> + + +