Commit 09a0cb293e3af3cd33099e4c4e69c3071a07b1f6

Authored by Hacene SI HADJ MOHAND
1 parent 5f42fc77

us ok

php/classes/AmdaAction.php
... ... @@ -197,15 +197,16 @@ class AmdaAction
197 197 }
198 198 break;
199 199 case 'derivedParam':
  200 + error_log("child");
200 201 $info = $child->getAttribute('buildchain').'<br/>';
201 202  
202   - if($child->hasAttribute('units') && $child->getAttribute('units') != 'undefined') $info .= '<b>Units: <b> '.$child->getAttribute('units').'<br/>';
203   -
  203 + if($child->hasAttribute('units') && $child->getAttribute('units') != 'undefined')
  204 + $info .= 'Units: '.$child->getAttribute('units').'<br/>';
204 205 $samplingMode = $child->getAttribute('sampling_mode');
205 206 if($samplingMode == 'timestep'){
206   - $info .= '<b>Sampling Time: <b> '.$child->getAttribute('timestep');
  207 + $info .= 'Sampling Time: '.$child->getAttribute('timestep');
207 208 }else if($samplingMode == 'refparam'){
208   - $info .= '<b>Reference Parameter: <b> '.$child->getAttribute('reference_param');
  209 + $info .= 'Reference Parameter: '.$child->getAttribute('reference_param');
209 210 }
210 211  
211 212 if ($child->hasAttribute('dim_1')) {
... ...
php/classes/DerivedParamMgr.php
... ... @@ -19,9 +19,9 @@ class DerivedParamMgr extends AmdaObjectMgr
19 19 $this->contentRootId = 'derivedParam-treeRootNode';
20 20 $this->contentRootTag = 'paramList';
21 21 //node attributes and object XML tags
22   - $this->attributes = array('name' => '', 'buildchain' => '', 'timestep' => '', 'dim_1' => '1', 'dim_2' => '1');
  22 + $this->attributes = array('name' => '', 'buildchain' => '', 'timestep' => '', 'dim_1' => '1', 'dim_2' => '1', 'units'=>'undefined', 'sampling_mode'=>'', 'reference_param'=>'');
23 23 // + tags in object XML
24   - $this->optionalAttributes = array('units' => 'undefined','description' => 'undefined', 'ytitle' => 'undefined');
  24 + $this->optionalAttributes = array('description' => 'undefined', 'ytitle' => 'undefined');
25 25 $this->objTagName = 'param';
26 26 $this->id_prefix = 'ws_';
27 27 }
... ... @@ -143,8 +143,16 @@ class DerivedParamMgr extends AmdaObjectMgr
143 143 // switch between myData and Derived
144 144 $this->createObjectDescription($p);
145 145 $this->addToContent($p, $folder);
  146 + $info = $p->buildchain.'<br/>';
  147 + if(isset($p->units) && $p->units != "undifined")
  148 + $info .= 'Units: '.$p->units.'<br/>';
  149 + if($p->sampling_mode == 'timestep'){
  150 + $info .= 'Sampling Time: '.$p->timestep;
  151 + }else if($p->sampling_mode == 'refparam'){
  152 + $info .= 'Reference Parameter: '.$p->reference_param;
  153 + }
146 154  
147   - return array('id' => $this->id, 'info' => $p->buildchain, 'dim_1' => $p->dim_1, 'dim_2' => $p->dim_2, 'last_update' => $p->last_update);
  155 + return array('id' => $this->id, 'info' => $info, 'dim_1' => $p->dim_1, 'dim_2' => $p->dim_2, 'last_update' => $p->last_update);
148 156 }
149 157 // myData parameter
150 158 else
... ...