Commit 8fe7c322268ad8ac88c3bf2e68e87c01cb2b886a

Authored by Benjamin Renard
2 parents 1514ed12 7c2e29e9

Merge branch 'master' into amdadev

src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -915,7 +915,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
915 915 empty($paramDrawingData->{'spectro-normalization'}) ? NULL : $paramDrawingData->{'spectro-normalization'},
916 916 empty($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_TYPE}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_TYPE},
917 917 !isset($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_VALUE}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_VALUE},
918   - !isset($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}
  918 + !isset($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}) || ($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM} == "") ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}
919 919 );
920 920 }
921 921 protected function unmarshallSauvaud($paramDrawingData, $plotNode, $paramNode, $indexes)
... ...
src/InputOutput/IHMImpl/Tools/IHMParamManagerClass.php
... ... @@ -104,30 +104,48 @@ class IHMParamManagerClass
104 104 $flag = $parameter["id"];
105 105 $description = $parameter["description"];
106 106 $desc_parts = array();
107   - foreach (explode("-",$description) as $def) {
108   - $def = trim($def);
109   - $p = strpos($def, ":");
110   - if ($p === FALSE) {
111   - continue;
112   - }
113   - $val = substr($def, 0, $p);
114   - $val = trim($val);
115   - $name = substr($def, $p+1);
116   - $name = trim($name);
117   - $color = "";
118   - $p = strpos($name, "[");
119   - if ($p !== FALSE) {
120   - $color = substr($name, $p);
121   - $color = trim($color);
122   - $name = substr($name, 0, $p);
  107 + $defs = explode("-",$description);
  108 + if (empty($description)) {
  109 + //No status defined => Read catalog as TT
  110 + $info["info"]["isCatalog"] = FALSE;
  111 + $flag = "";
  112 + $units = "";
  113 + $ytitle = $info["info"]["name"];
  114 + $status = array(
  115 + array(
  116 + "min" => -PHP_FLOAT_MAX,
  117 + "max" => PHP_FLOAT_MAX,
  118 + "name" => "Inside",
  119 + "color" => "[255,0,0]",
  120 + ),
  121 + );
  122 + }
  123 + else {
  124 + foreach ($defs as $def) {
  125 + $def = trim($def);
  126 + $p = strpos($def, ":");
  127 + if ($p === FALSE) {
  128 + continue;
  129 + }
  130 + $val = substr($def, 0, $p);
  131 + $val = trim($val);
  132 + $name = substr($def, $p+1);
123 133 $name = trim($name);
  134 + $color = "";
  135 + $p = strpos($name, "[");
  136 + if ($p !== FALSE) {
  137 + $color = substr($name, $p);
  138 + $color = trim($color);
  139 + $name = substr($name, 0, $p);
  140 + $name = trim($name);
  141 + }
  142 + $status[] = array(
  143 + "min" => floatval($val),
  144 + "max" => floatval($val),
  145 + "name" => $name,
  146 + "color" => $color,
  147 + );
124 148 }
125   - $status[] = array(
126   - "min" => floatval($val),
127   - "max" => floatval($val),
128   - "name" => $name,
129   - "color" => $color,
130   - );
131 149 }
132 150 }
133 151 else {
... ...
src/InputOutput/WSImpl/Params/DownloadImpl/WSInputOutputParamsDownloadClass.php
... ... @@ -123,6 +123,8 @@ class WSInputOutputParamsDownloadClass extends IHMInputOutputParamsAbstractClass
123 123 else {
124 124 $downloadNode->setStructure(RequestOutputDownloadStructureEnum::ONE_FILE_PER_PARAMETER_PER_INTERVAL);
125 125 }
  126 +
  127 + $downloadNode->setPrecision("true");
126 128  
127 129 switch ($input->compression)
128 130 {
... ...