diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-11-17 17:42:22 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-11-17 17:42:22 +0100 |
commit | 20fdac1ac4a126ceebde13fb627a9f88bba0e2b3 (patch) | |
tree | d08ebb16bcd46b7a7d896e0a7c50faa6b2644c58 /modules/luci-mod-admin-full/luasrc | |
parent | 152ba9ab228ad4ea4c1748f29fe4ffa5f8f74ac6 (diff) |
luci-mod-admin-full: allow empty mac in interface status
Also adjust for changed IP address format emitted by iface_status call.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm | 14 | ||||
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm | 7 |
2 files changed, 9 insertions, 12 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm index 2967647fd2..01f9fb01e9 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm @@ -135,7 +135,7 @@ html += String.format('<strong><%:Uptime%>:</strong> %t<br />', ifc.uptime); } - if (ifc.type != 'tunnel') + if (ifc.macaddr) { html += String.format('<strong><%:MAC-Address%>:</strong> %s<br />', ifc.macaddr); } @@ -153,10 +153,9 @@ for (var i = 0; i < ifc.ipaddrs.length; i++) html += String.format( - '%s%s/%d', + '%s%s', i ? ', ' : '', - ifc.ipaddrs[i].addr, - ifc.ipaddrs[i].prefix + ifc.ipaddrs[i] ); html += '<br />'; @@ -168,10 +167,9 @@ for (var i = 0; i < ifc.ip6addrs.length; i++) html += String.format( - '%s%s/%d', + '%s%s', i ? ', ' : '', - ifc.ip6addrs[i].addr.toUpperCase(), - ifc.ip6addrs[i].prefix + ifc.ip6addrs[i].toUpperCase() ); html += '<br />'; @@ -250,7 +248,7 @@ <input type="button" class="cbi-button cbi-button-reload" style="width:100px" onclick="iface_shutdown('<%=net[1]%>', true)" title="<%:Reconnect this interface%>" value="<%:Connect%>" /> <input type="button" class="cbi-button cbi-button-reset" style="width:100px" onclick="iface_shutdown('<%=net[1]%>', false)" title="<%:Shutdown this interface%>" value="<%:Stop%>" /> <input type="button" class="cbi-button cbi-button-edit" style="width:100px" onclick="location.href='<%=url("admin/network/network", net[1])%>'" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" /> - <input type="button" class="cbi-button cbi-button-remove" style="width:100px" onclick="iface_delete('<%=net[1]%>')" value="<%:Delete%>" /> + <input type="submit" class="cbi-button cbi-button-remove" style="width:100px" onclick="iface_delete('<%=net[1]%>')" value="<%:Delete%>" /> </td> </tr> <% end %> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm index 1ebdbfcfb4..adf6dccd56 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_status.htm @@ -25,7 +25,7 @@ html += String.format('<strong><%:Uptime%>:</strong> %t<br />', ifc.uptime); } - if (ifc.type != 'tunnel') + if (ifc.macaddr) { html += String.format('<strong><%:MAC-Address%>:</strong> %s<br />', ifc.macaddr); } @@ -43,10 +43,9 @@ for (var i = 0; i < ifc.ipaddrs.length; i++) html += String.format( - '%s%s/%d', + '%s%s', i ? ', ' : '', - ifc.ipaddrs[i].addr, - ifc.ipaddrs[i].prefix + ifc.ipaddrs[i] ); html += '<br />'; |