interfaces.htm 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. <div class="table cbi-section-table">
  16. <div class="tr">
  17. <div class="th cbi-section-table-cell"><%:Interface%></div>
  18. <div class="th cbi-section-table-cell"><%:Device%></div>
  19. <div class="th cbi-section-table-cell"><%:State%></div>
  20. <div class="th cbi-section-table-cell"><%:MTU%></div>
  21. <div class="th cbi-section-table-cell"><%:WLAN%></div>
  22. <div class="th cbi-section-table-cell"><%:Source address%></div>
  23. <div class="th cbi-section-table-cell"><%:Netmask%></div>
  24. <div class="th cbi-section-table-cell"><%:Broadcast address%></div>
  25. </div>
  26. <% for k, iface in ipairs(iface) do %>
  27. <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=iface.proto%>">
  28. <div class="td cbi-section-table-cell left"><%=iface.interface%></div>
  29. <div class="td cbi-section-table-cell left"><%=iface.name%></div>
  30. <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.up and luci.i18n.translate('up') or luci.i18n.translate('down')%></div>
  31. <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.mtu%></div>
  32. <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div>
  33. <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.ipAddress%></div>
  34. <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.ipv4Address ~= '0.0.0.0' and iface.olsrInterface.ipv4Netmask%></div>
  35. <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.ipv4Address ~= '0.0.0.0' and iface.olsrInterface.ipv4Broadcast or iface.olsrInterface.ipv6Multicast%></div>
  36. </div>
  37. <% i = ((i % 2) + 1)
  38. end %>
  39. </div>
  40. </fieldset>
  41. <%+status-olsr/common_js%>
  42. <%+footer%>