nicer info window displays
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 7 Dec 2010 05:20:36 +0000 (05:20 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 7 Dec 2010 05:20:36 +0000 (05:20 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@259 01035d8c-6547-0410-b346-abe4f91aad63

dilimesh/README.txt
dilimesh/dilimesh/dilimesh.html
dilimesh/dilimesh_screenshot.png

index 8c1e91b54019b07cfcc69fdd04392ac5186cc0f7..622edba6ffde7f8f5a72ff869ee1a3d22d75102e 100644 (file)
@@ -152,7 +152,7 @@ Installation
 
 4/ (Optional) Signal strength daemon:
 
-  Copy these scripts to each MP in your mesh that you wish to read sis
+  Copy these scripts to each MP in your mesh that you wish to read sig
   strength from:
   
     $ cd dilimesh/script
index 793800ffb785b38efbde6094526a7da8399b184c..393d834bcea808329f91044f27e10e99480b9780 100644 (file)
       var packet_loss_formatted = Math.round(nodes[j].packet_loss*100);
 
       nodes[j].marker.setTitle(nodes[j].ip + ' Packet Loss: ' + packet_loss_formatted + '%');  
-      var html = nodes[j].ip + '<br>Packet Loss: ' + packet_loss_formatted + '%';
+      var html  = '<table>';
+          html += '<tr><th>' + nodes[j].ip + '</th></tr>';
+          html += '<tr><td>Packet Loss</td><td>' + packet_loss_formatted + '%</td></tr>';
       if (nodes[j].neighbour_ips != undefined) {
         for(var i=0; i<nodes[j].neighbour_ips.length; i++) {
-          html += '<br>' + trim(nodes[j].neighbour_ips[i]) + ' ' + trim(nodes[j].neighbour_sigs[i]) + ' dBm';
+          html += '<tr><td>' + trim(nodes[j].neighbour_ips[i]) + '</td><td>';
+          html += trim(nodes[j].neighbour_sigs[i]) + ' dBm</td><td>';
        }
       }
+      html += '</table>';
+
       nodes[j].infowindow.setContent(html);  
     }  
 
         if (nodes[j].ip == ip) {
           nodes[j].neighbour_ips  = neighbour_ips;
           nodes[j].neighbour_sigs = neighbour_sigs;
-          var html="";
+          var html="<table>";
           for(var i=0; i<neighbour_ips.length; i++) {
-            html += trim(neighbour_ips[i]) + ' ' + trim(neighbour_sigs[i]) + ' dBm';
-            if (i != (neighbour_ips.length-1))
-              html += '<br>';
+            html += '<tr><td>' + trim(neighbour_ips[i]) + '</td><td>' + trim(neighbour_sigs[i]) + ' dBm</td></tr>';
          }
+          html += '</table>';
          document.getElementById('sigstr_last_node').innerHTML = ip;
          document.getElementById('sigstr_results').innerHTML = html;
         }    
 
   function drawPathesBetweenNodes() {
 
-    // delete all exisiting paths, this is inefficient but is OK for a first pass
+    // delete all existing paths, this is inefficient but is OK for a first pass
       
     if (pathes) {
       for (j in pathes) {
     // add to nodes array
 
     var newInfoWindow = new google.maps.InfoWindow(
-      { content: newIp,
-        maxWidth: 20
+      { content: newIp
       });
     var newNode = {marker : newMarker, 
                    ip: newIp, 
       // add node to nodes array
 
       var newInfoWindow = new google.maps.InfoWindow(
-        {  content: dragIp,
-           maxWidth: 20
+        {  content: dragIp
         });
       var newNode = {marker : newMarker, 
                      ip: dragIp, 
index e74f69f9d8cffdc9e93bbb8a7f5382add2a91fb6..7c26086671181f05e5fe0c8f9fa7b1d7b7d0f591 100644 (file)
Binary files a/dilimesh/dilimesh_screenshot.png and b/dilimesh/dilimesh_screenshot.png differ