olsr-viz.sh 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. echo Content-type: text/html
  3. echo
  4. cat << EOF
  5. <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
  6. var css=document.styleSheets[0];
  7. if (null!=css.insertRule) {
  8. css.insertRule(".label {color:black;background-color:white}", css.cssRules.length);
  9. }
  10. else {
  11. css.addRule(".label", "color:black");
  12. css.addRule(".label", "background-color:white");
  13. }
  14. </SCRIPT>
  15. <SCRIPT SRC="/luci-static/resources/olsr-viz.js" LANGUAGE="JavaScript1.2" TYPE="text/javascript"></SCRIPT>
  16. <DIV ID="main"
  17. STYLE="width: 100%; height: 93%; border: 1px solid #ccc; margin-left:auto; margin-right:auto; text-align:center; overflow: scroll">
  18. <DIV ID="edges" STYLE="width: 1px; height: 1px; position: relative; z-index:2"></DIV>
  19. <DIV ID="nodes" STYLE="width: 1px; height: 1px; position: relative; z-index:4"></DIV>
  20. </DIV>
  21. <DIV STYLE="z-index:99">
  22. <FORM ACTION="">
  23. <P><B TITLE="Bestimmt die Vergrößerungsstufe.">Zoom</B>&#160;<A HREF="javascript:set_scale(scale+0.1)">+</A>&#160;<A HREF="javascript:set_scale(scale-0.1)">&ndash;</A>&#160;<INPUT ID="zoom" NAME="zoom" TYPE="text" VALUE="2.0" SIZE="5" ONCHANGE="set_scale()">&#160;
  24. | &#160;<B TITLE="Beschränkt die Anzeige auf eine maximale Hop-Entfernung.">Metrik</B>&#160;<A HREF="javascript:set_maxmetric(maxmetric+1)">+</A>&#160;<A HREF="javascript:if(0<maxmetric)set_maxmetric(maxmetric-1)">&ndash;</A>&#160;<INPUT ID="maxmetric" NAME="maxmetric" TYPE="text" VALUE="3" SIZE="4" ONCHANGE="set_maxmetric(this.value)">&#160;
  25. | &#160;<B TITLE="Schaltet die automatischen Layout-Optimierung ein.">Optimierung</B><INPUT ID="auto_declump" NAME="auto_declump" TYPE="checkbox" ONCHANGE="set_autodeclump(this.checked)" CHECKED="CHECKED">&#160;
  26. | &#160;<B TITLE="Zeige Hostnamen an.">Hostnamen</B><INPUT ID="show_hostnames" NAME="show_hostnames" TYPE="checkbox" ONCHANGE="set_showdesc(this.checked)" CHECKED="CHECKED">&#160;
  27. | &#160;<A HREF="javascript:viz_save()" TITLE="Speichert die aktuellen Einstellungen in einem Cookie.">Speichern</A>&#160;
  28. | &#160;<A HREF="javascript:viz_reset()" TITLE="Startet das Viz-Skriptprogramm neu.">Zur&uuml;cksetzen</A></P>
  29. </FORM></DIV>
  30. <SPAN ID="debug" STYLE="visibility:hidden;"></SPAN>
  31. <IFRAME ID="RSIFrame" NAME="RSIFrame" STYLE="border:0px; width:0px; height:0px; visibility:hidden;">
  32. </IFRAME>
  33. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  34. viz_setup("RSIFrame","main","nodes","edges");
  35. viz_update();
  36. </SCRIPT>
  37. EOF