iostat.htm 1.62 KB
Newer Older
Franco (nextime) Lanza's avatar
Franco (nextime) Lanza committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<div id=status>
   <div id=load style="display:none">No data</div>
   <div id=display>
      <div>
         <p>RELAYS:<br/><span class=relays id=rl>
         </span></p>
         <p>INPUTS:<br/>
         <span id=ip></span>
         </p>
         <p>ANALOGS:<br/>
         <span>AN1: </span><span id=an1></span></br>
         <span>AN2: </span><span id=an2></span>
         </p>
      </div>
   </div>
</div>
</div>
<script>
rl="|";
ip="";

for(i=1;i<=12;i++)
{
   rl+='<a id=rel'+i+' onclick="ACmd(\'/cgi/relays.cgi?rel='+i+'\');">'+i+'</a>'+
   '<span style="font-size:9px;" id="cs'+i+'">'+i+'</span>|';
   ip+='<span id=inp'+i+'>'+i+'</span> &nbsp;';

}

$('rl').innerHTML=rl;
$('ip').innerHTML=ip;

function aLoopCB(xDt) {
   if(!xDt)
   {
      $('display').style.display='none';
      $('load').style.display='inline';
      return;
   }
   $('load').style.display='none';
   $('display').style.display='inline';
   for(i=1;i<13;i++) {
      if(getX(xDt,'r'+i)=='1')
      {
         $('rel'+i).style.color='#090';
         $('cs'+i).innerHTML=parseInt(getX(xDt,'p'+i))/10;
      }
      else
      {
       $('rel'+i).style.color='#ddd';
       $('cs'+i).innerHTML='0';
      }
   }
   for(i=1;i<13;i++) {
      if(getX(xDt,'i'+i)=='up')
      {
         $('inp'+i).style.color='#3366ff';
      }
      else
      {
         $('inp'+i).style.color='#e00000';
      }
   }
   $('an1').innerHTML=getX(xDt,'a1');
   $('an2').innerHTML=getX(xDt,'a2');
}
ftr();
</script>