Merge pull request #2119 from TDT-AG/pr/20180830-fix-iface-status-page
luci-mod-admin-full: add hint to overview page
This commit is contained in:
commit
35ace20b25
3 changed files with 12 additions and 0 deletions
|
@ -1159,6 +1159,16 @@ function protocol.is_dynamic(self)
|
||||||
return (self:_ubus("dynamic") == true)
|
return (self:_ubus("dynamic") == true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function protocol.is_auto(self)
|
||||||
|
local auto = self:_get("auto")
|
||||||
|
|
||||||
|
if auto == "0" then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function protocol.is_alias(self)
|
function protocol.is_alias(self)
|
||||||
local ifn, parent = nil, nil
|
local ifn, parent = nil, nil
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ L.poll(5, L.url('admin/network/iface_status', networks.join(',')), null,
|
||||||
_('IPv6'), ifc.ip6addrs ? ifc.ip6addrs[8] : null,
|
_('IPv6'), ifc.ip6addrs ? ifc.ip6addrs[8] : null,
|
||||||
_('IPv6'), ifc.ip6addrs ? ifc.ip6addrs[9] : null,
|
_('IPv6'), ifc.ip6addrs ? ifc.ip6addrs[9] : null,
|
||||||
_('IPv6-PD'), ifc.ip6prefix,
|
_('IPv6-PD'), ifc.ip6prefix,
|
||||||
|
_('Information'), ifc.is_auto ? null : _('Not started on boot'),
|
||||||
_('Error'), ifc.errors ? ifc.errors[0] : null,
|
_('Error'), ifc.errors ? ifc.errors[0] : null,
|
||||||
_('Error'), ifc.errors ? ifc.errors[1] : null,
|
_('Error'), ifc.errors ? ifc.errors[1] : null,
|
||||||
_('Error'), ifc.errors ? ifc.errors[2] : null,
|
_('Error'), ifc.errors ? ifc.errors[2] : null,
|
||||||
|
|
|
@ -212,6 +212,7 @@ function iface_status(ifaces)
|
||||||
is_up = net:is_up() and device:is_up(),
|
is_up = net:is_up() and device:is_up(),
|
||||||
is_alias = net:is_alias(),
|
is_alias = net:is_alias(),
|
||||||
is_dynamic = net:is_dynamic(),
|
is_dynamic = net:is_dynamic(),
|
||||||
|
is_auto = net:is_auto(),
|
||||||
rx_bytes = device:rx_bytes(),
|
rx_bytes = device:rx_bytes(),
|
||||||
tx_bytes = device:tx_bytes(),
|
tx_bytes = device:tx_bytes(),
|
||||||
rx_packets = device:rx_packets(),
|
rx_packets = device:rx_packets(),
|
||||||
|
|
Loading…
Reference in a new issue