frame.htm 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <%+header%>
  2. <%
  3. local has_latlon = false
  4. local uci = require "luci.model.uci".cursor()
  5. uci:foreach("olsrd", "LoadPlugin", function(s)
  6. if s.library == "olsrd_nameservice.so.0.3" and s.latlon_file then
  7. has_latlon = true
  8. end
  9. end)
  10. %>
  11. <% if has_latlon then %>
  12. <iframe style="width:100%; height:640px; border:none" src="<%=luci.dispatcher.build_url("freifunk/map/content")%>"></iframe>
  13. <h3><%:Legend%>:</h3>
  14. <ul>
  15. <li><strong><span style="color:#00cc00"><%:Green%></span></strong>:<%:Very good (ETX < 2)%></li>
  16. <li><strong><span style="color:#ffcb05"><%:Yellow%></span></strong>:<%:Good (2 < ETX < 4)%></li>
  17. <li><strong><span style="color:#ff6600"><%:Orange%></span></strong>:<%:Still usable (4 < ETX < 10)%></li>
  18. <li><strong><span style="color:#bb3333"><%:Red%></span></strong>:<%:Bad (ETX > 10)%></li>
  19. </ul>
  20. <% else %>
  21. <h2><%:Map Error%></h2>
  22. <p><%_The OLSRd service is not configured to capture position data from the network.<br />
  23. Please make sure that the nameservice plugin is properly configured and that the <em>latlon_file</em> option is enabled.%></p>
  24. <% end %>
  25. <%+footer%>