Commit 68cf84febb009f9634320f7b5828995925df2418

Authored by Hacene SI HADJ MOHAND
1 parent 9d0827cd
Exists in 8928 and in 1 other branch 6728

ihm ok

js/app/models/DownloadNode.js
... ... @@ -84,12 +84,14 @@ Ext.define('amdaModel.DownloadNode', {
84 84 myParam['dim1-max-value'] = param.get('dim1-max-value');
85 85 myParam['dim1-min-index'] = param.get('dim1-min-index');
86 86 myParam['dim1-max-index'] = param.get('dim1-max-index');
  87 + myParam['dim1-process-type'] = param['dim1-process-type'];
87 88 myParam['dim2-index'] = param.get('dim2-index');
88 89 myParam['dim2-sum-type'] = param.get('dim2-sum-type');
89 90 myParam['dim2-min-value'] = param.get('dim2-min-value');
90 91 myParam['dim2-max-value'] = param.get('dim2-max-value');
91 92 myParam['dim2-min-index'] = param.get('dim2-min-index');
92 93 myParam['dim2-max-index'] = param.get('dim2-max-index');
  94 + myParam['dim2-process-type'] = param['dim2-process-type'];
93 95 myParam.template_args = param.get('template_args');
94 96 if (!param.get('plotonly')) {
95 97 myValues.list.push(myParam);
... ...
js/app/models/PlotObjects/PlotPanelObject.js
... ... @@ -187,9 +187,11 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
187 187 params[index]['dim1-sum-type'] = param['dim1-is-range'] ? 1 : 0;
188 188 params[index]['dim1-min-value'] = param['dim1-min-range'];
189 189 params[index]['dim1-max-value'] = param['dim1-max-range'];
  190 + params[index]['dim1-process-type'] = param['dim1-process-type'];
190 191 params[index]['dim2-sum-type'] = param['dim2-is-range'] ? 1 : 0;
191 192 params[index]['dim2-min-value'] = param['dim2-min-range'];
192 193 params[index]['dim2-max-value'] = param['dim2-max-range'];
  194 + params[index]['dim2-process-type'] = param['dim2-process-type'];
193 195 params[index]['is-init'] = true;
194 196 });
195 197 this.params().loadData(params);
... ...
js/app/models/RequestParamObject.js
... ... @@ -73,9 +73,9 @@ Ext.define('amdaModel.RequestParamObject', {
73 73 getDimSum : function(dim) {
74 74 switch (this.get(dim+'-sum-type')) {
75 75 case 1:
76   - return 'range[' + this.get(dim+'-min-value') + ',' + this.get(dim+'-max-value') + ']';
  76 + return this.get(dim+'-process-type')+'_range[' + this.get(dim+'-min-value') + ',' + this.get(dim+'-max-value') + ']';
77 77 case 2:
78   - return 'indexes[' + this.get(dim+'-min-index') + ',' + this.get(dim+'-max-index') + ']';
  78 + return this.get(dim+'-process-type')+'_indexes[' + this.get(dim+'-min-index') + ',' + this.get(dim+'-max-index') + ']';
79 79 }
80 80 return false;
81 81 },
... ...
js/app/views/ParamArgumentsUI.js
... ... @@ -338,9 +338,7 @@ Ext.define('amdaUI.ParamArgumentsUI', {
338 338 data: [
339 339 {'type': 'all', 'name': 'Value in each channel'},
340 340 {'type': 'sum', 'name': 'Sum in range'},
341   - {'type': 'average', 'name': 'Average in range'},
342   - {'type': 'median', 'name': 'Median in range'},
343   - {'type': 'integral', 'name': 'Integral flux in range'}
  341 + {'type': 'average', 'name': 'Average in range'}
344 342 ]
345 343 });
346 344 var sumTypes = Ext.create('Ext.data.Store', {
... ... @@ -360,7 +358,7 @@ Ext.define('amdaUI.ParamArgumentsUI', {
360 358 displayField: 'name',
361 359 valueField: 'type',
362 360 fieldLabel: 'Process Type',
363   - value:'Sum in range',
  361 + value:'sum',
364 362 listeners: {
365 363 change: function(field, newValue, oldValue, eOpts) {
366 364 this.paramRequestObject.set(relatedDim+'-process-type',newValue);
... ... @@ -476,7 +474,12 @@ Ext.define('amdaUI.ParamArgumentsUI', {
476 474 if (this.paramRequestObject.get(relatedDim+'-sum-type') == 0) {
477 475 this.paramRequestObject.set(relatedDim+'-sum-type',1);
478 476 }
  477 + if (this.paramRequestObject.get(relatedDim+'-process-type') == '') {
  478 + this.paramRequestObject.set(relatedDim+'-process-type','sum');
  479 + }
  480 +
479 481 fieldset.down('[name=sum_type_'+relatedDim+']').setValue(this.paramRequestObject.get(relatedDim+'-sum-type'));
  482 + fieldset.down('[name=process_type_'+relatedDim+']').setValue(this.paramRequestObject.get(relatedDim+'-process-type'));
480 483 indexesCombo.setDisabled(true);
481 484 if (!this.inRebuild && (this.onChange != null))
482 485 this.onChange(uiScope, relatedDim, true, false, false);
... ...