Commit 752ba9ab484327639851946ca0f1a35ac9d7195b

Authored by Benjamin Renard
1 parent 4efeb459

Fix nodeType for multiplot

js/app/models/PlotObjects/MultiplotRequestObject.js
... ... @@ -105,7 +105,7 @@ Ext.define('amdaPlotObj.MultiplotRequestObject', {
105 105 {
106 106 var requestValues = new Object();
107 107  
108   - requestValues['nodeType'] = 'request';
  108 + requestValues['nodeType'] = 'multiplot';
109 109 requestValues['leaf'] = true;
110 110  
111 111 requestValues['timesrc'] = this.get('timesrc');
... ...
php/classes/RequestMgr.php
... ... @@ -240,6 +240,34 @@ class RequestMgr extends AmdaObjectMgr
240 240 }
241 241 if (count($argsTab) > 0) $args[] = $argsTab;
242 242 break;
  243 + case 'multiplot':
  244 + if ($obj->timesrc != 'Interval') break;
  245 +
  246 + $argsTab = array();
  247 + foreach ($obj->plots as $plot)
  248 + {
  249 + foreach ($plot->panels as $panel)
  250 + {
  251 + $params = array();
  252 + foreach ($panel->params as $param)
  253 + {
  254 + //TODO not in code spase___IMPEX_ !!!
  255 + //TODO other models (tsyganenko etc)
  256 + if (preg_match("#^spase___IMPEX_#", $param->paramid))
  257 + {
  258 + if ($param->template_args->url_XYZ) $params[] = $param->template_args->url_XYZ;
  259 + }
  260 + }
  261 + if (count($params) > 0)
  262 + {
  263 + $argsTab['param'] = array_unique($params);
  264 + $argsTab['startTime'] = $obj->startDate;
  265 + $argsTab['stopTime'] = $obj->stopDate;
  266 + }
  267 + }
  268 + }
  269 + if (count($argsTab) > 0) $args[] = $argsTab;
  270 + break;
243 271 case 'condition' :
244 272 //$argsTab = array();
245 273 if ($obj->timesrc != 'Interval') break;
... ...