diff options
author | pmelange <isprotejesvalkata@gmail.com> | 2018-11-05 16:27:40 +0100 |
---|---|---|
committer | pmelange <isprotejesvalkata@gmail.com> | 2018-11-11 19:50:43 +0100 |
commit | 5fd51f05a8f6bf7da7247c8c568080db625efa96 (patch) | |
tree | 3ad4be890cd8c53367cfd4e205c560d7857ac589 /applications/luci-app-olsr/luasrc/controller | |
parent | 7fb197c10a0c5b6d3908a6511ead043219be5492 (diff) |
luci-app-olsr: convert olsr.lua and smartgw.htm to new json plugin
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
Diffstat (limited to 'applications/luci-app-olsr/luasrc/controller')
-rw-r--r-- | applications/luci-app-olsr/luasrc/controller/olsr.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua index e2e93d2693..dc424c0114 100644 --- a/applications/luci-app-olsr/luasrc/controller/olsr.lua +++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua @@ -318,13 +318,14 @@ function action_smartgw() local function compare(a,b) if a.proto == b.proto then - return a.tcPathCost < b.tcPathCost + return a.cost < b.cost else return a.proto < b.proto end end - table.sort(data, compare) + table.sort(data.ipv4, compare) + table.sort(data.ipv6, compare) luci.template.render("status-olsr/smartgw", {gws=data, has_v4=has_v4, has_v6=has_v6}) end |