From: www@jspc55 Date: Fri, 6 Jun 2014 13:24:05 +0000 (+0200) Subject: improved adcmon.pl (warning when no data from CB), added 'startup only' feature to... X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=09d3a4ffbd24d63b42d74777b8289ab7cde9982e;p=mvdsensorcontrol.git improved adcmon.pl (warning when no data from CB), added 'startup only' feature to testgui.pl, cleaned up some css directives --- diff --git a/layout/adcmon.css b/layout/adcmon.css index 1f99875..f24adc0 100644 --- a/layout/adcmon.css +++ b/layout/adcmon.css @@ -1,17 +1,5 @@ - - - - - - -.plasticBox { - border-radius:5px; - background:#eef; - box-shadow: 0 0 10px 5px #fff, 0 0 4px 1px #78b inset; -} - .debugFeature { visibility:collapse; } diff --git a/layout/jtageditor_blue.css b/layout/jtageditor_blue.css index d5db304..674057e 100644 --- a/layout/jtageditor_blue.css +++ b/layout/jtageditor_blue.css @@ -11,9 +11,6 @@ body { width:320px; padding:10px; margin:50px 10px 0 30px; - border-radius:5px; - background:#eef; - box-shadow: 0 0 10px 5px #fff, 0 0 4px 1px #78b inset; } #fileSelection { diff --git a/layout/styles.css b/layout/styles.css index 3755da2..1b6a564 100644 --- a/layout/styles.css +++ b/layout/styles.css @@ -262,4 +262,8 @@ table#server-details pre { display: inline; } - +.stylishBox { + border-radius:5px; + background:#eef; + box-shadow: 0 0 10px 5px #fff, 0 0 4px 1px #78b inset; +} \ No newline at end of file diff --git a/layout/testgui.css b/layout/testgui.css index 3d9eca6..1c0bcaa 100644 --- a/layout/testgui.css +++ b/layout/testgui.css @@ -7,8 +7,16 @@ visibility:visible; } -#theConsole { +#theConsoleContainer { visibility:collapse; + margin:5px; + padding:10px; +} + +#advancedOptionsContainer { + visibility:collapse; + margin:5px; + padding:10px; } .td_solid { @@ -35,9 +43,6 @@ /* width:320px; */ /* padding:10px; */ margin:0px 0px 30px 0px; - border-radius:5px; - background:#eef; - box-shadow: 0 0 10px 5px #fff, 0 0 4px 1px #78b inset; } .previewArea img{ @@ -61,19 +66,5 @@ width:100%; width:320px; padding:10px; margin:50px 10px 0 30px; - border-radius:5px; - background:#eef; - box-shadow: 0 0 10px 5px #fff, 0 0 4px 1px #78b inset; } -.sensorHeader{ -/* float:left; */ -/* position:relative; */ -/* width:700px; */ -/* min-height:50px; */ -/* padding:10px; */ - margin:50px 0 0 20px; - border-radius:5px; - background:#eef; - box-shadow: 0 0 10px 5px #fff, 0 0 4px 1px #78b inset; -} \ No newline at end of file diff --git a/tools/HPlot.pm b/tools/HPlot.pm index 6e2faba..2c64165 100644 --- a/tools/HPlot.pm +++ b/tools/HPlot.pm @@ -28,7 +28,7 @@ sub plot_write { sub makeTimeString{ - return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()) + return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()); } @@ -144,6 +144,13 @@ sub PlotDraw { # $p->{$name}->{file}.".png". # "\""); plot_write($p->{$name}->{fh},makeTimeString()); + #### show a label when no data is coming #### + if ( $p->{$name}->{value}->[1]->[-1] > $p->{$name}->{value}->[2]->[-1] ) { # test if min>max (impossible for real data) + plot_write($p->{$name}->{fh},"set label 101 \"no data from FEE\" at screen 0.52,0.55 center tc rgb \"#770000\" font \"monospace,14\"\n"); + }else{ + plot_write($p->{$name}->{fh},"set label 101 \"\"\n"); + } + #### /show a label when no data is coming #### plot_write($p->{$name}->{fh},"replot"); } for(my $j=0; $j<$p->{$name}->{curves}; $j++) { @@ -154,6 +161,7 @@ sub PlotDraw { } plot_write($p->{$name}->{fh},"e"); } + $p->{$name}->{run}++; } diff --git a/tools/adcmon.pl b/tools/adcmon.pl index eccbe75..2311f50 100755 --- a/tools/adcmon.pl +++ b/tools/adcmon.pl @@ -96,16 +96,16 @@ my $q = shift; print h2 "Converter Board ADC Monitor"; -print '
'; +print '
'; print_selectors($q); print '
'; -print '
'; +print '
'; print "
Plots
"; # print "plotAreaBg"; print '
'; -print '
'; +print '
'; # print "plotAreaFg"; print '
'; diff --git a/tools/jtageditor.pl b/tools/jtageditor.pl index bc62137..99ff677 100755 --- a/tools/jtageditor.pl +++ b/tools/jtageditor.pl @@ -290,18 +290,18 @@ if ($cgiHash{'edit'}) { } print <JTAG Configuration File Editor -
+
Debug Output
debug text
-
+
Current File: unknown
-
+
empty
-
+
empty
diff --git a/tools/plotService.pl b/tools/plotService.pl index f0dd387..b7eed89 100755 --- a/tools/plotService.pl +++ b/tools/plotService.pl @@ -215,8 +215,13 @@ sub sample { my $max = ($minmax >> 16 ) * $self->{scale} + ($self->{scaleoffset}||0); # upper 16 bit # print $value."\n" if $myverbose; HPlot::PlotAdd($self->{requestString},$value,0); - HPlot::PlotAdd($self->{requestString},$min,1); - HPlot::PlotAdd($self->{requestString},$max,2); + if ($min > $max){ # $min>$max means no real data + HPlot::PlotAdd($self->{requestString},$value+$self->{scale},1); # draw min and max close to last value ... + HPlot::PlotAdd($self->{requestString},$value-$self->{scale},2); # but still the wrong order + } else { # valid data + HPlot::PlotAdd($self->{requestString},$min,1); + HPlot::PlotAdd($self->{requestString},$max,2); + } } sub draw { diff --git a/tools/run.pl b/tools/run.pl index 557e052..a6f5dc3 100755 --- a/tools/run.pl +++ b/tools/run.pl @@ -80,12 +80,14 @@ unless(-e $picPath or mkdir $picPath) { my $dummy; $dummy =qx"./startup.pl $setupFile"; -$dummy.=qx"rm $dumpPath/te1*.hld 2>&1"; -$dummy.=qx"./preview/exec_evtbuild_t.pl -t $runtime -p $dumpPath -s $systemName -d $ports 2>&1"; -$dummy.=qx"rm $dumpPath/temp.hld 2>&1"; -$dummy.=qx"mv $dumpPath/te1* $dumpPath/temp.hld 2>&1"; -$dummy.=qx"rm $picPath/$systemName*.png 2>&1"; # delete old pictures -$dummy.=qx"./preview/unpack_hld.pl -f $dumpPath/temp.hld -p $picPath -s $systemName 2>&1"; +unless($q->param('startupOnly') eq 'true'){ + $dummy.=qx"rm $dumpPath/te1*.hld 2>&1"; + $dummy.=qx"./preview/exec_evtbuild_t.pl -t $runtime -p $dumpPath -s $systemName -d $ports 2>&1"; + $dummy.=qx"rm $dumpPath/temp.hld 2>&1"; + $dummy.=qx"mv $dumpPath/te1* $dumpPath/temp.hld 2>&1"; + $dummy.=qx"rm $picPath/$systemName*.png 2>&1"; # delete old pictures + $dummy.=qx"./preview/unpack_hld.pl -f $dumpPath/temp.hld -p $picPath -s $systemName 2>&1"; +} my $escapedDummy = escapeHTML($dummy); $escapedDummy =~ s/\n/
/g; print $escapedDummy; diff --git a/tools/startup.pl b/tools/startup.pl index f0e0acd..30da2ad 100755 --- a/tools/startup.pl +++ b/tools/startup.pl @@ -163,7 +163,7 @@ $chainsinifile->close(); # configure Converter Boards local $CWD = XMLDBPATH; -delete $ENV{'QUERY_STRING'}; +delete $ENV{'QUERY_STRING'}; # make sure put.pl is used in a command line and not in a web context foreach my $cmd (@CbCommands){ my $entity = "CbController"; my $addr = $cmd->{addr}; diff --git a/tools/test.txt b/tools/test.txt new file mode 100644 index 0000000..e69de29 diff --git a/tools/testgui.js b/tools/testgui.js index 6400a59..28f0e63 100644 --- a/tools/testgui.js +++ b/tools/testgui.js @@ -35,3 +35,16 @@ function run(time) { } + + +function startupOnly(){ + + + + var setupFile_ = encodeURIComponent(setupFile); + getdata("run.pl?startupOnly=true&runtime=0&setupFile="+setupFile_,"theConsole",false); + + + + +} \ No newline at end of file diff --git a/tools/testgui.pl b/tools/testgui.pl index b4d0a84..0113da9 100755 --- a/tools/testgui.pl +++ b/tools/testgui.pl @@ -187,13 +187,33 @@ sub init_html{ print ""; # end of that story - print ""; + print ""; + print ""; print ""; print ""; print "

"; + + print "
"; + print "
advanced options
"; + print "
"; + + print "
"; + print q%%; +# print ""; + print "
"; + + + print "
"; + print "
"; + + + print "
"; + print "
debug output
"; print "
[the \"console\"]
"; + print "
"; print end_html; @@ -279,13 +299,13 @@ sub print_sensorArea { print ""; my $previewAreaId = "preview_".$sensorId; - print ""; + print ""; print "
$sensorName (id=$sensorId)
"; print "
[not run yet]
"; print ""; $quickEditAreaId = "quickEdit_".$sensorId; - print ""; + print ""; print_quickEditArea($sensorConfig); print ""; print "";