]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Fri, 7 Dec 2012 17:00:08 +0000 (17:00 +0000)
committerhadeshyp <hadeshyp>
Fri, 7 Dec 2012 17:00:08 +0000 (17:00 +0000)
cts/htdocs/layout/styles.css
cts/htdocs/padiwa/padiwa.htm

index d56656044ce760d5147a0df7e0730642a2e2a3c5..e5920531e77a5631d5bcca2f405a39a372170748 100644 (file)
@@ -82,6 +82,11 @@ table#content td, table#content th, table#contentregs td, table#contentregs th{
  border-width:0 1px 1px 0;
  width:90px;
  min-width:90px;
+ max-width:90px;
+ overflow:hidden;
+ height:22px;
+ min-height:22px;
+ max-height:22px;
  text-align:right;
  padding-right:15px;
 }
index 50d2e770e0cc1f587655f24c555a243c3bd86640..24a42a696ecce30025dfe82067df74b8dd3c8095 100644 (file)
 <h2>Padiwa</h2>
 <form acion="">
 <table class="form"><tr class="head"><th colspan=2>Configuration
-<tr><td>Board<td><input onChange="setValues()" type="text" id="form_board" name="board" maxlength="4" value="fe48">
-<tr><td>Update Interval (ms)<td><input onChange="setValues()" type="text" id="form_rate" name="rate" maxlength="6" value="10000">
-<tr><td>Option<td><select onChange="setValues()" id="form_option" name="option"><option value="temp">Temperature<option value="id">ID<option value="thresh">Thresholds</select>
-<tr><td>Min/Max<td><input onChange="setValues()" type="text" id="form_min" name="min" maxlength="6" value="10"><input onChange="setValues()" type="text" id="form_max" name="max" maxlength="6" value="80">
-<tr><td><td><input type="button" onClick="setValues()" value="OK">
+<tr title="4-digit hex board address for data query"><td>Board
+    <td><input onChange="setValues()" type="text" id="form_board" name="board" maxlength="4" value="fe48">
+<tr title="list of 4-digit hex addresses of boards to show"><td>Filter
+    <td><input onChange="setValues()" type="text" id="form_filter" name="filter"  value="" >
+<tr title="Update interval in milliseconds"><td>Update Interval (ms)
+    <td><input onChange="setValues()" type="text" id="form_rate" name="rate" maxlength="6" value="10000">
+<tr title="Select the value to show"><td>Option
+    <td><select onChange="setValues()" id="form_option" name="option">
+           <option value="temp">Temperature
+           <option value="id">ID
+           <option value="thresh">Thresholds
+         </select>
+<tr title="Minimum &amp; Maximum value for temperature color code"><td>Min/Max
+    <td><input onChange="setValues()" type="text" id="form_min" name="min" maxlength="6" value="10">
+        <input onChange="setValues()" type="text" id="form_max" name="max" maxlength="6" value="80">
+<tr title="Just for your convenience, you actually don't need this button..."><td>
+    <td><input type="button" onClick="setValues()" value="OK">
 </table>
 </form>
 
+
 <div style="float:left"><table id="content"><tr><th>Board</table></div>
 
 
@@ -27,6 +40,7 @@
 <script language="javascript">
 var updaterate = document.getElementById("form_rate").value;
 var board      = document.getElementById("form_board").value;
+var filter     = document.getElementById("form_filter").value;
 var option     = document.getElementById("form_option").value;
 var min        = document.getElementById("form_min").value;
 var max        = document.getElementById("form_max").value;
@@ -35,6 +49,7 @@ var updateTask = setTimeout("getdata('../commands/getpadiwa.pl?"+board+"-"+optio
 function setValues() {
   updaterate = document.getElementById("form_rate").value;
   board      = document.getElementById("form_board").value;
+  filter     = document.getElementById("form_filter").value;
   option     = document.getElementById("form_option").value;
   min        = document.getElementById("form_min").value;
   max        = document.getElementById("form_max").value;
@@ -47,40 +62,48 @@ function update(data) {
   if(!document.getElementById("content").innerHTML) return;
   var b = data.split("&");
   var c = {};
+  var isShown = new Array();
   o = "<tr class=\"head\"><th>Board";
 
   for(j=0;j<b.length-1;j++) {
     c[j] = b[j].split(" ");
-    o += "<th>"+c[j][0];
+    if(filter == "" || filter.indexOf(c[j][0]) != -1)
+      isShown[j] = 1;
+    else
+      isShown[j] = 0;
+    if(isShown[j])
+      o += "<th>"+c[j][0];
     } 
   
   for(i = 1; i <= 4; i++) {
     o += "<tr class=\""+(i%2?"odd":"even")+"\"><th>"+(i-1);
     for(j=0;j<b.length-1;j++) {
-      if(option == "temp") {
-        val = (((c[j][i]) & 0xFFF)/16);
-        if(val <= 0 || val > 100 || (c[j][i])&0xf000) val = "---";
-          else val = val.toFixed(1)
-        o += "<td class=\"colored\" style=\"background:"+findcolor(val,min,max,0)+"\">"+(val);
-        }
-      else if(option == "id") {
-        val = c[j][(i-1)*4+4]+c[j][(i-1)*4+3]+c[j][(i-1)*4+2]+c[j][(i-1)*4+1];
-        if(c[j][(i-1)*4+1].substr(2,2) != "28") val = "---";
-        o += "<td class=\"fixed\">"+(val);
-        }
-      else if(option == "thresh") {
-        o += "<td>";
-        for(k=1;k<=16;k++) {
-          val = c[j][(i-1)*16+k]*1.;
-          if((c[j][(i-1)*16+k]&0x7fff0000) != (((k-1)<<15) & 0x7fff0000)) {
-            val = "---";
-            col = "transparent";
-            }
-          else {
-            col = findcolor((val&0xffff),0x6500,0x9000,0);
-            val =((val&0xffff).toString(16));
+      if(isShown[j]) {
+        if(option == "temp") {
+          val = (((c[j][i]) & 0xFFF)/16);
+          if(val <= 0 || val > 100 || (c[j][i])&0xf000) val = "---";
+            else val = val.toFixed(1)
+          o += "<td class=\"colored\" style=\"background:"+findcolor(val,min,max,0)+"\">"+(val);
+          }
+        else if(option == "id") {
+          val = c[j][(i-1)*4+4]+c[j][(i-1)*4+3]+c[j][(i-1)*4+2]+c[j][(i-1)*4+1];
+          if(c[j][(i-1)*4+1].substr(2,2) != "28") val = "---";
+          o += "<td class=\"fixed\">"+(val);
+          }
+        else if(option == "thresh") {
+          o += "<td>";
+          for(k=1;k<=16;k++) {
+            val = c[j][(i-1)*16+k]*1.;
+            if((c[j][(i-1)*16+k]&0x7fff0000) != (((k-1)<<15) & 0x7fff0000)) {
+              val = "---";
+              col = "transparent";
+              }
+            else {
+              col = findcolor((val&0xffff),0x6500,0x9000,0);
+              val =((val&0xffff).toString(16));
+              }
+            o += "<span class=\"fixed\" style=\"background:"+col+"\">"+val+"</span><br>";
             }
-          o += "<span class=\"fixed\" style=\"background:"+col+"\">"+val+"</span><br>";
           }
         }
       }