From: Jan Michel Date: Tue, 17 Dec 2013 10:50:48 +0000 (+0100) Subject: added checkboxes to enable rates and a future cache system X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=7585a0b5352b93e72a9ff3f4e6e15d7df7e28928;p=daqtools.git added checkboxes to enable rates and a future cache system --- diff --git a/web/htdocs/commands/xmlpage.pm b/web/htdocs/commands/xmlpage.pm index 200394f..740149d 100644 --- a/web/htdocs/commands/xmlpage.pm +++ b/web/htdocs/commands/xmlpage.pm @@ -19,15 +19,18 @@ sub initPage { } } - my $cmd = $setup[$active]->{cmd}; - my $period = $setup[$active]->{period}; - my $name = $setup[$active]->{name}; + my $cmd = $setup[$active]->{cmd}; + my $period = $setup[$active]->{period}; + my $name = $setup[$active]->{name}; my ($cmdMod,$cmdAddr,$cmdReg) = split('-',$setup[$active]->{cmd}); - + my $israte = $setup[$active]->{rate}; + my $iscache = $setup[$active]->{cache}; + $getscript = $page->{getscript}; if(!defined $getscript) { $getscript = "../xml-db/get.pl"; } + print < @@ -59,7 +62,7 @@ if($setup[$active]->{generic} == 1) { |; } -if($setup[$active]->{address} == 1) { +if(!$setup[$active]->{generic}) { print qq| {address} == 1) { print qq| +
+
|; diff --git a/web/htdocs/layout/blue.css b/web/htdocs/layout/blue.css index 622dc04..2a3a6a6 100644 --- a/web/htdocs/layout/blue.css +++ b/web/htdocs/layout/blue.css @@ -54,14 +54,19 @@ input[type="text"] { background-color:#dde; color:#444; font-size:10px; - height:20px; + height:24px; width:90px; text-align:right; padding-right:5px; + padding-top:1px; border:1px solid #78b; transition:background .4s; } +input[type="checkbox"], .head .checkbox { + +} + select { background:#dde; color:#444; @@ -69,7 +74,23 @@ select { transition:background .4s; } -input:hover, input:active, input:focus, select:hover, select:active { +div.checkbox { + position:relative; + top:4px; + width: 100px; + display:inline; + padding-top:9px; + font-size:10px; + height:20px; + background-color:#dde; + color:#444; + border:1px solid #78b; + transition:background .4s; +} + +input:hover, input:active, input:focus, +select:hover, select:active, +.checkbox:hover, .checkbox:active, .checkbox:focus { background:#eed; } diff --git a/web/htdocs/network/generic.pl b/web/htdocs/network/generic.pl index 8bf0587..55156bf 100755 --- a/web/htdocs/network/generic.pl +++ b/web/htdocs/network/generic.pl @@ -21,6 +21,7 @@ $setup[0]->{name} = "AnyReg"; $setup[0]->{cmd} = "TrbNet-0xffff-CompileTime"; $setup[0]->{period} = -1; $setup[0]->{generic} = 1; +$setup[0]->{rate} = 1; xmlpage::initPage(\@setup,$page); diff --git a/web/htdocs/network/trbnet.pl b/web/htdocs/network/trbnet.pl index 184b56d..2a89f94 100755 --- a/web/htdocs/network/trbnet.pl +++ b/web/htdocs/network/trbnet.pl @@ -19,17 +19,14 @@ my @setup; $setup[0]->{name} = "StatusRegisters"; $setup[0]->{cmd} = "TrbNet-0xffff-StatusRegisters"; $setup[0]->{period} = 2000; -$setup[0]->{address} = 1; $setup[1]->{name} = "BoardInfo"; $setup[1]->{cmd} = "TrbNet-0xffff-BoardInformation"; $setup[1]->{period} = -1; -$setup[1]->{address} = 1; $setup[2]->{name} = "Readout"; $setup[2]->{cmd} = "Readout-0xffff-Status"; $setup[2]->{period} = -1; -$setup[2]->{address} = 1; diff --git a/web/htdocs/scripts/xmlpage.js b/web/htdocs/scripts/xmlpage.js index ea5724c..486c551 100644 --- a/web/htdocs/scripts/xmlpage.js +++ b/web/htdocs/scripts/xmlpage.js @@ -42,12 +42,17 @@ function settarget(e) { command=document.getElementById("target").value; + var opt = ""; + if(document.getElementById("rate").checked) opt += "rate"; + if(document.getElementById("cache").checked) opt += "cache"; + var part = command.split('-'); + command = part[0]+"-"+part[1]+"-"+part[2] + "-" + opt; refresh(period); } function setaddress(e) { address=document.getElementById("address").value; var part = command.split('-'); - command=part[0]+"-"+address+"-"+part[2]; + command=part[0]+"-"+address+"-"+part[2]+part[3]; refresh(period); } \ No newline at end of file diff --git a/xml-db/database/TrbNet.xml b/xml-db/database/TrbNet.xml index 7ca27aa..6cef590 100644 --- a/xml-db/database/TrbNet.xml +++ b/xml-db/database/TrbNet.xml @@ -17,10 +17,10 @@ Event counters for LVL1 and Data channel - + Lvl1 event counter - + Number of last read-out event @@ -69,7 +69,7 @@ Trigger input statistics - + Number of edges on trigger input @@ -82,10 +82,10 @@ Number of received network resets - + Number of retransmit requests received - + Number of retransmit requests sent @@ -108,27 +108,27 @@ Trigger input statistics - + Number of invalid triggers. I.e. LVL1 triggers not preceeded by a reference time signal - + Count of multiple reference time signals before a LVL1 trigger, i.e. additional edges on the input which were not sent by the CTS Trigger input statistics - + Number of short signals on the reference time input. E.g. signals detected by the synchronous logic, but shorter than the 100 ns reference time signal - + Number of occurences of reference time signals before a calibration trigger which should not sent a reference time Trigger input statistics - + Number of edges on the reference time input. Sampled using asynchronous circuitry. Not available in all designs diff --git a/xml-db/get.pl b/xml-db/get.pl index 6ed9019..10e6e3d 100755 --- a/xml-db/get.pl +++ b/xml-db/get.pl @@ -32,6 +32,10 @@ if (defined $ENV{'QUERY_STRING'}) { unless ($server =~ /HTTPi/i) { print "Content-type: text/html\n\n"; } + else { + &htsponse(200, "OK"); + print "Content-type: text/html; charset=utf-8\r\n\r\n"; + } } else { $request[0] = ""; #Dummy entry to run foreach