X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_status%2Finterfaces.htm;h=0ee2cf659e58a63dbf5be3fe3a7826736c64fef9;hp=720ce9c3d7129fd022e1e420b797990016642d73;hb=97e27a0bcf5eb9c388a05f73dc13867ef8703e4c;hpb=8fcd841aa9af96c8a4a4d3c1a555d2d1ed42332c diff --git a/modules/admin-full/luasrc/view/admin_status/interfaces.htm b/modules/admin-full/luasrc/view/admin_status/interfaces.htm index 720ce9c3d..0ee2cf659 100644 --- a/modules/admin-full/luasrc/view/admin_status/interfaces.htm +++ b/modules/admin-full/luasrc/view/admin_status/interfaces.htm @@ -129,13 +129,13 @@ $Id$ function get_iwmode(w) local m = { - ap = translate("a_s_if_iwmode_ap", "Master"), - sta = translate("a_s_if_iwmode_sta", "Client"), - wds = translate("a_s_if_iwmode_wds", "WDS"), - stawds = translate("a_s_if_iwmode_stawds", "Client + WDS"), - apwds = translate("a_s_if_iwmode_apwds", "Master + WDS"), - adhoc = translate("a_s_if_iwmode_adhoc", "Ad-Hoc"), - ahdemo = translate("a_s_if_iwmode_ahdemo", "Pseudo Ad-Hoc") + ap = translate("Master"), + sta = translate("Client"), + wds = translate("WDS"), + stawds = translate("Client + WDS"), + apwds = translate("Master + WDS"), + adhoc = translate("Ad-Hoc"), + ahdemo = translate("Pseudo Ad-Hoc") } return m[w.mode] or w.mode @@ -169,7 +169,7 @@ $Id$ <%+header%> -

<%:a_s_if_status Interface Status%>

+

<%:Interface Status%>

@@ -180,52 +180,52 @@ $Id$ if dev and devinfo and devinfo[dev] then %> -

<%:a_s_if_interface Interface%> <%=i['.name']%>

+

<%:Interface%> <%=i['.name']%>

- <%:a_s_if_device Device%>: - <%=dev%> (<%:a_s_if_mac MAC%> <%=get_mac(dev)%>)
+ <%:Device%>: + <%=dev%> (<%:MAC%> <%=get_mac(dev)%>)
- <%:a_s_if_type Type%>: + <%:Type%>: <% if is_wifi(dev) then iw = get_iwinfo(dev) -%> - <%:a_s_if_wifidev Wireless Adapter%> (<%=iw.type%>)
+ <%:Wireless Adapter%> (<%=iw.type%>)
<% if iw then %> -   └ <%:a_s_if_iwmode Mode%>: <%=get_iwmode(iw)%>
-   └ <%:a_s_if_iwssid SSID%>: <%=iw.ssid%>
-   └ <%:a_s_if_iwchannel Channel%>: <%=iw.channel%> +   └ <%:Mode%>: <%=get_iwmode(iw)%>
+   └ <%:SSID%>: <%=iw.ssid%>
+   └ <%:Channel%>: <%=iw.channel%> <% end %> <% else -%> <% if vlan then %> - <%:a_s_if_ethswitch Ethernet Switch%> (<%=get_switch_driver(dev)%>)
-   └ <%:a_s_if_vlan VLAN%>: <%=get_vlan(dev)%> (<%:a_s_if_vlanports Ports%> <%=table.concat(get_vlan_ports(dev), ", ")%>) + <%:Ethernet Switch%> (<%=get_switch_driver(dev)%>)
+   └ <%:VLAN%>: <%=get_vlan(dev)%> (<%:Ports%> <%=table.concat(get_vlan_ports(dev), ", ")%>) <% else %> - <%:a_s_if_ethdev Ethernet Adapter%> + <%:Ethernet Adapter%> <% end %> <% end -%>
- <%:a_s_if_transfer Transfer%>
-   └ <%:a_s_if_transfer_rx RX%>: <%=devinfo[dev][2]%> <%:a_s_if_pkts Pkts.%> (<%=wba.byte_format(tonumber(devinfo[dev][1]))%>)
-   └ <%:a_s_if_transfer_tx TX%>: <%=devinfo[dev][10]%> <%:a_s_if_pkts Pkts.%> (<%=wba.byte_format(tonumber(devinfo[dev][9]))%>)
+ <%:Transfer%>
+   └ <%:RX%>: <%=devinfo[dev][2]%> <%:Pkts.%> (<%=wba.byte_format(tonumber(devinfo[dev][1]))%>)
+   └ <%:TX%>: <%=devinfo[dev][10]%> <%:Pkts.%> (<%=wba.byte_format(tonumber(devinfo[dev][9]))%>)
<%- if ( i.ipaddr and #i.ipaddr > 0 ) or ( i.ip6addr and #i.ip6addr > 0 ) then -%> - <%:a_s_if_ipconfig IP Configuration%>
-   └ <%:a_s_if_ipconfig_primary Primary%>: + <%:IP Configuration%>
+   └ <%:Primary%>: <% if i.ipaddr and #i.ipaddr > 0 then %> <%=i.ipaddr%>/<%=i.netmask%> <% if i.proto == "dhcp" then -%> - (<%:a_s_if_ipconfig_dhcp DHCP assigned%>) + (<%:DHCP assigned%>) <%- end %> <% else %> - <%:a_s_if_ipconfig_none Not configured%> + <%:Not configured%> <% end %>
<% for i, a in ipairs(get_aliases(i)) do %> -   └ <%:a_s_if_ipconfig_alias Alias%> #<%=i%>: - <%=a.ipaddr%>/<%=a.netmask%> (<%:a_s_if_device Device%> <%=dev%>:<%=i%>)
+   └ <%:Alias%> #<%=i%>: + <%=a.ipaddr%>/<%=a.netmask%> (<%:Device%> <%=dev%>:<%=i%>)
<% end %> <% if i.ip6addr and #i.ip6addr > 0 then %> -   └ <%:a_s_if_ipconfig_ipv6 IPv6%>: <%=i.ip6addr%>
+   └ <%:IPv6%>: <%=i.ip6addr%>
<% end %> <%- end -%>

@@ -238,41 +238,41 @@ $Id$ if br and devinfo and devinfo[dev] then %> -

<%:a_s_if_bridge Bridge%> <%=br.name%>

+

<%:Bridge%> <%=br.name%>

- <%:a_s_if_device Device%>: - <%=dev%> (<%:a_s_if_mac MAC%> <%=get_mac(dev)%>)
+ <%:Device%>: + <%=dev%> (<%:MAC%> <%=get_mac(dev)%>)
- <%:a_s_if_type Type%>: - <%:a_s_if_ethbridge Ethernet Bridge%>
+ <%:Type%>: + <%:Ethernet Bridge%>
-   └ <%:a_s_if_bridge_id ID%>: <%=br.id%>
-   └ <%:a_s_if_bridge_stp STP%>: <%=br.stp and "enabled" or "disabled"%>
+   └ <%:ID%>: <%=br.id%>
+   └ <%:STP%>: <%=br.stp and "enabled" or "disabled"%>
- <%:a_s_if_transfer Transfer%>
-   └ <%:a_s_if_transfer_rx RX%>: <%=devinfo[dev][2]%> Pkts. (<%=wba.byte_format(tonumber(devinfo[dev][1]))%>)
-   └ <%:a_s_if_transfer_tx TX%>: <%=devinfo[dev][10]%> Pkts. (<%=wba.byte_format(tonumber(devinfo[dev][9]))%>)
+ <%:Transfer%>
+   └ <%:RX%>: <%=devinfo[dev][2]%> Pkts. (<%=wba.byte_format(tonumber(devinfo[dev][1]))%>)
+   └ <%:TX%>: <%=devinfo[dev][10]%> Pkts. (<%=wba.byte_format(tonumber(devinfo[dev][9]))%>)
<%- if ( b.ipaddr and #b.ipaddr > 0 ) or ( b.ip6addr and #b.ip6addr > 0 ) then -%> - <%:a_s_if_ipconfig IP Configuration%>
-   └ <%:a_s_if_ipconfig_primary Primary%>: + <%:IP Configuration%>
+   └ <%:Primary%>: <% if b.ipaddr and #b.ipaddr > 0 then %> <%=b.ipaddr%>/<%=b.netmask%> <% if b.proto == "dhcp" then -%> - (<%:a_s_if_ipconfig_dhcp DHCP assigned%>) + (<%:DHCP assigned%>) <%- end %> <% else %> - <%:a_s_if_ipconfig_none Not configured%> + <%:Not configured%> <% end %>
<% for i, a in ipairs(get_aliases(b)) do %> -   └ <%:a_s_if_ipconfig_alias Alias%> #<%=i%>: - <%=a.ipaddr%>/<%=a.netmask%> (<%:a_s_if_device Device%> <%=dev%>:<%=i%>)
+   └ <%:Alias%> #<%=i%>: + <%=a.ipaddr%>/<%=a.netmask%> (<%:Device%> <%=dev%>:<%=i%>)
<% end %> <% if b.ip6addr and #b.ip6addr > 0 then %> -   └ <%:a_s_if_ipconfig_ipv6 IPv6%>: <%=b.ip6addr%>
+   └ <%:IPv6%>: <%=b.ip6addr%>
<% end %> <%- end -%> @@ -280,26 +280,26 @@ $Id$ dev = i vlan = get_vlan(dev) %> - <%:a_s_if_bridge_port Bridge Port%> <%=n%>
+ <%:Bridge Port%> <%=n%>
-   └ <%:a_s_if_device Device%>: - <%=dev%> (<%:a_s_if_mac MAC%> <%=get_mac(dev)%>)
+   └ <%:Device%>: + <%=dev%> (<%:MAC%> <%=get_mac(dev)%>)
-   └ <%:a_s_if_type Type%>: +   └ <%:Type%>: <% if is_wifi(dev) then iw = get_iwinfo(dev) -%> - <%:a_s_if_wifidev Wireless Adapter%> (<%=iw.type%>)
+ <%:Wireless Adapter%> (<%=iw.type%>)
<% if iw then %> -       └ <%:a_s_if_iwmode Mode%>: <%=get_iwmode(iw)%>
-       └ <%:a_s_if_iwssid SSID%>: <%=iw.ssid%>
-       └ <%:a_s_if_iwchannel Channel%>: <%=iw.channel%> +       └ <%:Mode%>: <%=get_iwmode(iw)%>
+       └ <%:SSID%>: <%=iw.ssid%>
+       └ <%:Channel%>: <%=iw.channel%> <% end %> <% else -%> <% if vlan then %> - <%:a_s_if_ethswitch Ethernet Switch%> (<%=get_switch_driver(dev)%>)
-       └ <%:a_s_if_vlan VLAN%>: - <%=get_vlan(dev)%> (<%:a_s_if_vlan_ports Ports%> <%=table.concat(get_vlan_ports(dev), ", ")%>) + <%:Ethernet Switch%> (<%=get_switch_driver(dev)%>)
+       └ <%:VLAN%>: + <%=get_vlan(dev)%> (<%:Ports%> <%=table.concat(get_vlan_ports(dev), ", ")%>) <% else %> - <%:a_s_if_ethdev Ethernet Adapter%> + <%:Ethernet Adapter%> <% end %> <% end -%>
<% end %>