interfaces.htm 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%#
  2. Copyright 2008 Steven Barth <steven@midlink.org>
  3. Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
  4. Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
  5. Licensed to the public under the Apache License 2.0.
  6. -%>
  7. <%
  8. local i = 1
  9. %>
  10. <%+header%>
  11. <h2 name="content"><%:Interfaces%></h2>
  12. <div id="togglebuttons"></div>
  13. <fieldset class="cbi-section">
  14. <legend><%:Overview of interfaces where OLSR is running%></legend>
  15. <table class="cbi-section-table">
  16. <tr>
  17. <th class="cbi-section-table-cell"><%:Interface%></th>
  18. <th class="cbi-section-table-cell"><%:State%></th>
  19. <th class="cbi-section-table-cell"><%:MTU%></th>
  20. <th class="cbi-section-table-cell"><%:WLAN%></th>
  21. <th class="cbi-section-table-cell"><%:Source address%></th>
  22. <th class="cbi-section-table-cell"><%:Netmask%></th>
  23. <th class="cbi-section-table-cell"><%:Broadcast address%></th>
  24. </tr>
  25. <% for k, iface in ipairs(iface) do %>
  26. <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=iface.proto%>">
  27. <td class="cbi-section-table-cell"><%=iface.name%></td>
  28. <td class="cbi-section-table-cell"><%=iface.state%></td>
  29. <td class="cbi-section-table-cell"><%=iface.olsrMTU%></td>
  30. <td class="cbi-section-table-cell"><%=iface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></td>
  31. <td class="cbi-section-table-cell"><%=iface.ipv4Address or iface.ipv6Address%></td>
  32. <td class="cbi-section-table-cell"><%=iface.netmask%></td>
  33. <td class="cbi-section-table-cell"><%=iface.broadcast or iface.multicast%></td>
  34. </tr>
  35. <% i = ((i % 2) + 1)
  36. end %>
  37. </table>
  38. </fieldset>
  39. <%+status-olsr/common_js%>
  40. <%+footer%>