luci-mod-admin-full: expose errors, description and up state in net status
authorJo-Philipp Wich <jo@mein.io>
Thu, 12 Jul 2018 14:44:31 +0000 (16:44 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 12 Jul 2018 16:10:10 +0000 (18:10 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-admin-full/luasrc/controller/admin/network.lua

index 8c14de924054fbbde65c345e1bd534630edf3079..4605ffaf33b26c09b0c1aee053c912061d9bb3ff 100644 (file)
@@ -206,6 +206,7 @@ function iface_status(ifaces)
                if device then
                        local data = {
                                id         = iface,
+                               desc       = net:get_i18n(),
                                proto      = net:proto(),
                                uptime     = net:uptime(),
                                gwaddr     = net:gwaddr(),
@@ -213,11 +214,14 @@ function iface_status(ifaces)
                                ip6addrs   = net:ip6addrs(),
                                dnsaddrs   = net:dnsaddrs(),
                                ip6prefix  = net:ip6prefix(),
+                               errors     = net:errors(),
                                name       = device:shortname(),
                                type       = device:type(),
                                ifname     = device:name(),
                                macaddr    = device:mac(),
-                               is_up      = device:is_up(),
+                               is_up      = net:is_up() and device:is_up(),
+                               is_alias   = net:is_alias(),
+                               is_dynamic = net:is_dynamic(),
                                rx_bytes   = device:rx_bytes(),
                                tx_bytes   = device:tx_bytes(),
                                rx_packets = device:rx_packets(),