mid.htm 1.3 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><a id="content" name="content"><%:Active MID announcements%></a></h2>
  12. <div id="togglebuttons"></div>
  13. <fieldset class="cbi-section">
  14. <legend><%:Overview of known multiple interface announcements%></legend>
  15. <table class="cbi-section-table">
  16. <tr class="cbi-section-table-titles">
  17. <th class="cbi-section-table-cell"><%:OLSR node%></th>
  18. <th class="cbi-section-table-cell" ><%:Secondary OLSR interfaces%></th>
  19. </tr>
  20. <% for k, mid in ipairs(mids) do
  21. local aliases = ''
  22. for k,v in ipairs(mid.aliases) do
  23. if aliases == '' then
  24. sep = ''
  25. else
  26. sep = ', '
  27. end
  28. aliases = v.ipAddress .. sep .. aliases
  29. end
  30. local host = mid.ipAddress
  31. if mid.proto == '6' then
  32. host = '[' .. mid.ipAddress .. ']'
  33. end
  34. %>
  35. <tr class="cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=mid.proto%>">
  36. <td class="cbi-section-table-cell"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.ipAddress%></a></td>
  37. <td class="cbi-section-table-cell"><%=aliases%></td>
  38. </tr>
  39. <% i = ((i % 2) + 1)
  40. end %>
  41. </table>
  42. </fieldset>
  43. <%+status-olsr/common_js%>
  44. <%+footer%>