diff options
author | pmelange <isprotejesvalkata@gmail.com> | 2018-11-15 14:55:42 +0100 |
---|---|---|
committer | pmelange <isprotejesvalkata@gmail.com> | 2018-12-06 20:57:35 +0100 |
commit | 7387553a042c9357081e4baaa2141ce2d1964ecb (patch) | |
tree | 1d44f28b3405c397c7dfd53f24017378690a4102 /applications/luci-app-olsr/luasrc/controller | |
parent | a92c94df32eaf9d0693eb799bfcf5bd7e92151b8 (diff) |
luci-app-olsr: make cosmetic changes.
modify the status tables so that then headers and columns align, values
left justified.
Additionally, add the openwrt style interface name to the interfaces table,
change huge ETX numbers to 'infinate', and add the german translation for
'Selected'.
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 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua index dc424c0114..11e27d7c00 100644 --- a/applications/luci-app-olsr/luasrc/controller/olsr.lua +++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua @@ -331,6 +331,8 @@ end function action_interfaces() local data, has_v4, has_v6, error = fetch_jsoninfo('interfaces') + local ntm = require "luci.model.network".init() + if error then return end @@ -339,6 +341,13 @@ function action_interfaces() return a.proto < b.proto end + for k, v in ipairs(data) do + local interface = ntm:get_status_by_address(v.olsrInterface.ipAddress) + if interface then + v.interface = interface + end + end + table.sort(data, compare) luci.template.render("status-olsr/interfaces", {iface=data, has_v4=has_v4, has_v6=has_v6}) end |