[pisa-src] r2922 - in apps/ap-monitor: ap-mond.py www/ap-monitor.css www/ap-monitor.html www/ap-monitor.js www/ap30px.png www/power.png www/refresh-w.png www/umic-floorplan-600px-plain.png

  • From: Nicolai Viol <Nicolai.Viol@xxxxxxxxxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 13 Mar 2012 14:53:27 +0100

Author: viol
Date: Tue Mar 13 14:53:23 2012
New Revision: 2922

Log:
update for the ap monitoring tool

Added:
   apps/ap-monitor/www/ap30px.png   (contents, props changed)
   apps/ap-monitor/www/power.png   (contents, props changed)
   apps/ap-monitor/www/refresh-w.png   (contents, props changed)
   apps/ap-monitor/www/umic-floorplan-600px-plain.png   (contents, props 
changed)
Modified:
   apps/ap-monitor/ap-mond.py
   apps/ap-monitor/www/ap-monitor.css
   apps/ap-monitor/www/ap-monitor.html
   apps/ap-monitor/www/ap-monitor.js

Modified: apps/ap-monitor/ap-mond.py
==============================================================================
--- apps/ap-monitor/ap-mond.py  Mon Mar 12 22:52:41 2012        (r2921)
+++ apps/ap-monitor/ap-mond.py  Tue Mar 13 14:53:23 2012        (r2922)
@@ -13,6 +13,7 @@
 IP_PREFIX='192.168.5.'
 
 accessPoints_all={
+              '114':'helios',
               '115':'herakles',
               '116':'iris',
               '117':'selene',
@@ -20,20 +21,33 @@
               '118':'pan',
               '119':'nike',
               '120':'hebe',
+              '121':'nesoi',
+              '122':'ourea',
+              '123':'phanes',
+              '124':'pontus',
               '125':'gaia',
               '127':'hyperion',
               '129':'chaos',
               '130':'chronos',
               '131':'nyx',
-              '91':'ac-1',
-              '92':'ac-2',
-              '93':'ac-3',
-              '94':'ac-4',
-              '95':'ac-5',
-              '96':'ac-6',
+              '132':'tortarus',
+              '133':'thalassa',
+              '134':'iapetus',
+              '135':'coeus',
+              '91':'ac-1 Rathaus (sw)',
+              '92':'ac-2 Rathaus (nw)',
+              '93':'ac-3 Rathaus (so)',
+              '94':'ac-4 Loewenstein (nw)',
+              '95':'ac-5 Loewenstein (o)',
+              '96':'ac-6 Loewenstein (so)',
+              '97':'ac-7 Standesamt',
+              '98':'ac-8 Standesamt',
+              '99':'ac-9 Satndesamt',
               '81':'lancom-1',
               '82':'lancom-2',
               '83':'lancom-3',
+              '84':'lancom-4',
+              '85':'lancom-5',
               }
 
 accessPoints_select={'126':'freya',

Modified: apps/ap-monitor/www/ap-monitor.css
==============================================================================
--- apps/ap-monitor/www/ap-monitor.css  Mon Mar 12 22:52:41 2012        (r2921)
+++ apps/ap-monitor/www/ap-monitor.css  Tue Mar 13 14:53:23 2012        (r2922)
@@ -97,15 +97,28 @@
     width: 600px;
 }
 
-img.marker_img { width:80px; height:80px;}
-#marker_iris { position:absolute; left:90px; top:10px; z-index:2;}
-#marker_freya { position:absolute; left:305px; top:15px; z-index:2;}
-#marker_gaia { position:absolute; left:440px; top:15px; z-index:2;}
-#marker_hebe { position:absolute; left:328px; top:113px; z-index:2;}
-#marker_hyperion { position:absolute; left:365px; top:113px; z-index:2;}
-#marker_nike { position:absolute; left:50px; top:300px; z-index:2;}
-#marker_selene { position:absolute; left:370px; top:210px; z-index:2;}
-#marker_pan { position:absolute; left:365px; top:270px; z-index:2;}
+div.ap { width:80px; height:80px;}
+#ap_iris { position:absolute; right:-15px; top:75px; }
+#ap_freya { position:absolute; left:305px; top:15px;}
+#ap_gaia { position:absolute; left:440px; top:15px; }
+#ap_hebe { position:absolute; left:328px; top:113px;}
+#ap_hyperion { position:absolute; left:365px; top:113px;}
+#ap_nike { position:absolute; right:40px; top:260px;}
+#ap_selene { position:absolute; left:370px; top:210px;}
+#ap_pan { position:absolute; left:326px; top:280px;}
+
+img.ap_img { position:absolute; left:25px; top:25px; z-index:0;}
+p.ap_label{
+    position:absolute;
+    top:25px;
+    left:31px;
+    z-index:1;
+    text-align:center;
+    font-family:sans-serif;
+    color:white;
+    text-shadow:black 0 0 4444px;
+    font-size:small}
+img.marker_img { position:absolute; top:0px; left:0px; width:80px; 
height:80px; z-index:0;}
 
 #updateButton {
     position:absolute;

Modified: apps/ap-monitor/www/ap-monitor.html
==============================================================================
--- apps/ap-monitor/www/ap-monitor.html Mon Mar 12 22:52:41 2012        (r2921)
+++ apps/ap-monitor/www/ap-monitor.html Tue Mar 13 14:53:23 2012        (r2922)
@@ -36,17 +36,47 @@
     <area shape="rect" alt="" title="selene" coords="530,310,570,350" 
onclick="toggleInfo('selene')" onmouseover="setActive('selene')" 
onmouseout="setInactive('selene')"/>
     <area shape="rect" alt="" title="pan" coords="513,390,553,430" 
onclick="toggleInfo('pan')" onmouseover="setActive('pan')" 
onmouseout="setInactive('pan')"/>
     </map>
-    <img id="floorplan_img" src="./umic-floorplan-600px.png" 
USEMAP="#router_map_600">
-
-    <img id="marker_iris" class="marker_img" src="./marker.png" title="iris">
-    <img id="marker_freya" class="marker_img" src="./marker.png" title="freya">
-    <img id="marker_gaia" class="marker_img" src="./marker.png" title="gaia">
-    <img id="marker_hebe" class="marker_img" src="./marker.png" title="hebe">
-    <img id="marker_hyperion" class="marker_img" src="./marker.png" 
title="hyperion">
-    <img id="marker_nike" class="marker_img" src="./marker.png" title="nike">
-    <img id="marker_selene" class="marker_img" src="./marker.png" 
title="selene">
-    <img id="marker_pan" class="marker_img" src="./marker.png" title="pan">
-
+    <img id="floorplan_img" src="./umic-floorplan-600px-plain.png" 
USEMAP="#router_map_600">
+    <div id="ap_iris" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_iris" class="marker_img" src="./marker.png" 
title="iris">
+        <p class="ap_label" id="label_iris" onclick="toggleInfo('iris')" 
onmouseover="setActive('iris')" onmouseout="setInactive('iris')">116</p>
+    </div>
+    <div id="ap_freya" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_freya" class="marker_img" src="./marker.png" 
title="freya">
+         <p class="ap_label" id="label_freya" onclick="toggleInfo('freya')" 
onmouseover="setActive('freya')" onmouseout="setInactive('freya')"/>126</p>
+    </div>
+    <div id="ap_gaia" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_gaia" class="marker_img" src="./marker.png" 
title="gaia">
+         <p class="ap_label" id="label_gaia" onclick="toggleInfo('gaia')" 
onmouseover="setActive('gaia')" onmouseout="setInactive('gaia')">125</p>
+    </div>
+    <div id="ap_hebe" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_hebe" class="marker_img" src="./marker.png" 
title="hebe">
+         <p class="ap_label" id="label_hebe" onclick="toggleInfo('hebe')" 
onmouseover="setActive('hebe')" onmouseout="setInactive('hebe')">120</p>
+    </div>
+    <div id="ap_hyperion" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_hyperion" class="marker_img" src="./marker.png" 
title="hyperion">
+         <p class="ap_label" id="label_hyperion" 
onclick="toggleInfo('hyperion')" onmouseover="setActive('hyperion')" 
onmouseout="setInactive('hyperion')">127</p>
+    </div>
+    <div id="ap_nike" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_nike" class="marker_img" src="./marker.png" 
title="nike">
+         <p class="ap_label" id="label_nike" onclick="toggleInfo('nike')" 
onmouseover="setActive('nike')" onmouseout="setInactive('nike')">119</p>
+    </div>
+    <div id="ap_selene" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_selene" class="marker_img" src="./marker.png" 
title="selene">
+         <p class="ap_label" id="label_selene" onclick="toggleInfo('selene')" 
onmouseover="setActive('selene')" onmouseout="setInactive('selene')">117</p>
+    </div>
+    <div id="ap_pan" class="ap">
+       <img class="ap_img" src="./ap30px.png">
+        <img id="marker_pan" class="marker_img" src="./marker.png" title="pan">
+         <p class="ap_label" id="label_pan" onclick="toggleInfo('pan')" 
onmouseover="setActive('pan')" onmouseout="setInactive('pan')">118</p>
+    </div>
   </div>
 
  </div>

Modified: apps/ap-monitor/www/ap-monitor.js
==============================================================================
--- apps/ap-monitor/www/ap-monitor.js   Mon Mar 12 22:52:41 2012        (r2921)
+++ apps/ap-monitor/www/ap-monitor.js   Tue Mar 13 14:53:23 2012        (r2922)
@@ -397,7 +397,9 @@
         //$('<a/>').html(btnText)
             .click(function(){
                 $.ajax('/execApCmd/'+cmd+'/'+self.id);
-               setTimeout(function(){self.processRequest()},500);
+                //update AP info but give the cmd a little time to process
+                setTimeout(function(){self.processRequest()},1500);
+                self.updateRotate(true);
             }).appendTo($(e));
     }
 
@@ -437,7 +439,7 @@
     var infoHeaderPing = document.createElement("small");
     var infoHeaderTools = document.createElement("div");
     //TODO refresh tool, update router info (onclick processRequest();)
-    var refreshImg = 
$('<img/>',{'src':'refresh.png','class':'refresh_img','title':'refresh info'})
+    var refreshImg = 
$('<img/>',{'src':'refresh-w.png','class':'refresh_img','title':'update ' 
+self.name +' info'})
         .click(function(e){
             self.processRequest();
             //$(this).rotate(90);
@@ -445,12 +447,12 @@
          })
         .appendTo($(infoHeader));
     //TODO command tool, onClick open command-box
-    var cmdImg = 
$('<img/>',{'src':'cmd.png','class':'cmd_img','title':'reboot'})
+    var cmdImg = 
$('<img/>',{'src':'power.png','class':'cmd_img','title':'reboot '+ self.name})
         .click(function(e){
-            if (confirm("Do you want to reboot AP "+ self.name + "?")){
+            if (confirm("Click OK to roboot AP "+ self.name + " now?")){
                 getStatsRequest.open('GET', '/execApCmd/reboot/'+id, true);
                 getStatsRequest.send(null);
-                $(this).rotate({angle:0,animateTo:-1080});
+                //$(this).rotate({angle:0,animateTo:-1080,duration:8000});
                 $(infoHeaderPing).html('REBOOT');
 
             }
@@ -648,7 +650,7 @@
 
 var updateButton = document.createElement('input');
 updateButton.type = 'button';
-updateButton.value = 'Update AP Info';
+updateButton.value = 'Update all APs';
 updateButton.onclick = function(){watchAps();};
 updateButton.disabled = false;
 
@@ -657,7 +659,7 @@
     dprint("draw buttons");
     $('#updateButton').append($(updateButton));
     $('#updateButton').append($(autoUpdateRButton));
-    $('<small>enable auto update</small>').appendTo($('#updateButton'));
+    $('<small>enable auto update (interval 5 sec, duration 10 
min)</small>').appendTo($('#updateButton'));
 }
 
 
@@ -737,7 +739,7 @@
             window.clearInterval(refreshTimer);
         }
         catch(err){
-            dprint(err);
+            console.info(err);
         }
         autoRefreshEnabled = false;
         //autoUpdateRButton.value = 'Start auto update';

Added: apps/ap-monitor/www/ap30px.png
==============================================================================
Binary file. No diff available.

Added: apps/ap-monitor/www/power.png
==============================================================================
Binary file. No diff available.

Added: apps/ap-monitor/www/refresh-w.png
==============================================================================
Binary file. No diff available.

Added: apps/ap-monitor/www/umic-floorplan-600px-plain.png
==============================================================================
Binary file. No diff available.
-- 
This is the pisa developer mailing list. Please also subscribe to the main pisa 
list at:
//www.freelists.org/list/pisa

Other related posts:

  • » [pisa-src] r2922 - in apps/ap-monitor: ap-mond.py www/ap-monitor.css www/ap-monitor.html www/ap-monitor.js www/ap30px.png www/power.png www/refresh-w.png www/umic-floorplan-600px-plain.png - Nicolai Viol