Commit 1627a2dd97740e4567436efa29c41bceb693319a

Authored by Benjamin Renard
1 parent 71eaac9b

Add status bar definition in get param plot init request

src/InputOutput/IHMImpl/ParamInfo/IHMInputOutputParamInfoClass.php
... ... @@ -220,8 +220,13 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface
220 220  
221 221 switch ($mainDrawNode->getName()) {
222 222 case 'serie' :
223   - $result_data['type'] = 'serie';
224   - $this->unmarshallBaseSerieData($mainDrawNode, $result_data);
  223 + if ($plotNode->getName() == 'statusPlot') {
  224 + $result_data['type'] = 'status-bar';
  225 + }
  226 + else {
  227 + $result_data['type'] = 'serie';
  228 + $this->unmarshallBaseSerieData($mainDrawNode, $result_data);
  229 + }
225 230 //if (array_key_exists('colorserie', $otherDrawNodes))
226 231 // $this->unmarshallColorSerieData($mainDrawNode, $result_data);
227 232 break;
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotAxesNodeClass.php
... ... @@ -42,6 +42,10 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
42 42 return NULL;
43 43  
44 44 $axisNode = $this->getChildInstanceByName($axisType);
  45 +
  46 + if (!isset($axisNode))
  47 + return NULL;
  48 +
45 49 //add digital axis
46 50 $digitalAxisNode = new RequestOutputPlotDigitalAxisNodeClass();
47 51 $digitalAxisNode->setId($id);
... ... @@ -55,6 +59,10 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
55 59 return NULL;
56 60  
57 61 $axisNode = $this->getChildInstanceByName($axisType);
  62 +
  63 + if (!isset($axisNode))
  64 + return NULL;
  65 +
58 66 $digitalAxisNodes = $axisNode->getChildrenByName(REQUESTOUTPUTPLOTDIGITALAXIS_NAME);
59 67 foreach ($digitalAxisNodes as $digitalAxisNode)
60 68 if ($digitalAxisNode->getId() == $id)
... ... @@ -66,6 +74,8 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
66 74 public function getTimeAxis()
67 75 {
68 76 $axisNode = $this->getChildInstanceByName(RequestOutputPlotAxisTypeEnum::XAXIS);
  77 + if (!isset($axisNode))
  78 + return NULL;
69 79 $timeAxisNode = $axisNode->getFirstChildByName(REQUESTOUTPUTPLOTTIMEAXIS_NAME);
70 80 if (!isset($timeAxisNode))
71 81 {
... ... @@ -79,6 +89,8 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
79 89 public function getEpochAxis()
80 90 {
81 91 $axisNode = $this->getChildInstanceByName(RequestOutputPlotAxisTypeEnum::XAXIS);
  92 + if (!isset($axisNode))
  93 + return NULL;
82 94 $epochAxisNode = $axisNode->getFirstChildByName(REQUESTOUTPUTPLOTEPOCHAXIS_NAME);
83 95 if (!isset($epochAxisNode))
84 96 {
... ... @@ -92,6 +104,8 @@ class RequestOutputPlotAxesNodeClass extends NodeClass
92 104 public function getColorAxis()
93 105 {
94 106 $axisNode = $this->getChildInstanceByName(RequestOutputPlotAxisTypeEnum::ZAXIS);
  107 + if (!isset($axisNode))
  108 + return NULL;
95 109 $colorAxisNode = $axisNode->getFirstChildByName(REQUESTOUTPUTPLOTCOLORAXIS_NAME);
96 110 if (!isset($colorAxisNode))
97 111 {
... ...