Commit 3a42095385f60fff24c04751aa98f08a58f96c15

Authored by Benjamin Renard
2 parents bdcdb526 cbbbdc34

Merge branch 'master' into save-plot-request

Showing 1 changed file with 28 additions and 4 deletions   Show diff stats
php/classes/AmdaAction.php
@@ -203,7 +203,20 @@ class AmdaAction @@ -203,7 +203,20 @@ class AmdaAction
203 case 'alias': 203 case 'alias':
204 $info = $id; 204 $info = $id;
205 $id = 'alias_'.$id; 205 $id = 'alias_'.$id;
  206 + $component_info = array();
  207 + if ($child->hasAttribute("index1"))
  208 + $component_info["index1"] = $child->getAttribute('index1');
  209 + if ($child->hasAttribute("index2"))
  210 + $component_info["index2"] = $child->getAttribute('index2');
  211 +
  212 + if ($child->hasAttribute("parentId"))
  213 + $component_info["parentId"] = $child->getAttribute("parentId");
  214 +
  215 + if ($child->hasAttribute("iconCls"))
  216 + $iconCls = $child->getAttribute("iconCls");
  217 +
206 if ($isLeaf) $isParameter = true; 218 if ($isLeaf) $isParameter = true;
  219 +
207 break; 220 break;
208 221
209 case 'timeTable': 222 case 'timeTable':
@@ -268,8 +281,16 @@ class AmdaAction @@ -268,8 +281,16 @@ class AmdaAction
268 // } 281 // }
269 } 282 }
270 283
271 - if ($child->hasAttribute('units')) $info = $child->getAttribute('units');  
272 - 284 + if ($child->hasAttribute('units')) {
  285 +
  286 + $units = $child->getAttribute('units');
  287 +
  288 + if ($child->hasAttribute('description'))
  289 + $info = $child->getAttribute('description')."<br/>".$units;
  290 + else
  291 + $info = $units;
  292 + }
  293 +
273 if ($child->tagName == 'parameter') { 294 if ($child->tagName == 'parameter') {
274 $isParameter = true; 295 $isParameter = true;
275 296
@@ -576,7 +597,9 @@ class AmdaAction @@ -576,7 +597,9 @@ class AmdaAction
576 } 597 }
577 598
578 $childrenToReturn[] = array('text' => $name, 'id' => $id, 'nodeType' => $nodeType, 'info' => $info, 599 $childrenToReturn[] = array('text' => $name, 'id' => $id, 'nodeType' => $nodeType, 'info' => $info,
579 - 'help' => $help, 'leaf' => $isLeaf, 'isParameter' => $isParameter, 'dim_1' => $dim_1, 'dim_2' => $dim_2, 'tabs' => $plotTabs); 600 + 'help' => $help, 'leaf' => $isLeaf, 'isParameter' => $isParameter, 'dim_1' => $dim_1, 'dim_2' => $dim_2, 'tabs' => $plotTabs,
  601 + 'component_info' => isset($component_info) ? $component_info : NULL,
  602 + 'iconCls' => isset($iconCls) ? $iconCls : NULL );
580 } 603 }
581 } 604 }
582 // if $childrenToReturn we have to return [] 605 // if $childrenToReturn we have to return []
@@ -932,7 +955,8 @@ class AmdaAction @@ -932,7 +955,8 @@ class AmdaAction
932 } 955 }
933 956
934 private function executeRequest($obj, $function) 957 private function executeRequest($obj, $function)
935 - { 958 + {
  959 +
936 // Check user if access to DD Server and / or possible 'space consuming' action 960 // Check user if access to DD Server and / or possible 'space consuming' action
937 if ( $function == FunctionTypeEnumClass::PARAMS || 961 if ( $function == FunctionTypeEnumClass::PARAMS ||
938 $function == FunctionTypeEnumClass::ACTION || 962 $function == FunctionTypeEnumClass::ACTION ||