From 68cf84febb009f9634320f7b5828995925df2418 Mon Sep 17 00:00:00 2001 From: Hacene SI HADJ MOHAND Date: Tue, 30 Mar 2021 10:23:12 +0200 Subject: [PATCH] ihm ok --- js/app/models/DownloadNode.js | 2 ++ js/app/models/PlotObjects/PlotPanelObject.js | 2 ++ js/app/models/RequestParamObject.js | 4 ++-- js/app/views/ParamArgumentsUI.js | 11 +++++++---- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/js/app/models/DownloadNode.js b/js/app/models/DownloadNode.js index 82217c9..b32966c 100644 --- a/js/app/models/DownloadNode.js +++ b/js/app/models/DownloadNode.js @@ -84,12 +84,14 @@ Ext.define('amdaModel.DownloadNode', { myParam['dim1-max-value'] = param.get('dim1-max-value'); myParam['dim1-min-index'] = param.get('dim1-min-index'); myParam['dim1-max-index'] = param.get('dim1-max-index'); + myParam['dim1-process-type'] = param['dim1-process-type']; myParam['dim2-index'] = param.get('dim2-index'); myParam['dim2-sum-type'] = param.get('dim2-sum-type'); myParam['dim2-min-value'] = param.get('dim2-min-value'); myParam['dim2-max-value'] = param.get('dim2-max-value'); myParam['dim2-min-index'] = param.get('dim2-min-index'); myParam['dim2-max-index'] = param.get('dim2-max-index'); + myParam['dim2-process-type'] = param['dim2-process-type']; myParam.template_args = param.get('template_args'); if (!param.get('plotonly')) { myValues.list.push(myParam); diff --git a/js/app/models/PlotObjects/PlotPanelObject.js b/js/app/models/PlotObjects/PlotPanelObject.js index 1e22f0d..8bf42cc 100644 --- a/js/app/models/PlotObjects/PlotPanelObject.js +++ b/js/app/models/PlotObjects/PlotPanelObject.js @@ -187,9 +187,11 @@ Ext.define('amdaPlotObj.PlotPanelObject', { params[index]['dim1-sum-type'] = param['dim1-is-range'] ? 1 : 0; params[index]['dim1-min-value'] = param['dim1-min-range']; params[index]['dim1-max-value'] = param['dim1-max-range']; + params[index]['dim1-process-type'] = param['dim1-process-type']; params[index]['dim2-sum-type'] = param['dim2-is-range'] ? 1 : 0; params[index]['dim2-min-value'] = param['dim2-min-range']; params[index]['dim2-max-value'] = param['dim2-max-range']; + params[index]['dim2-process-type'] = param['dim2-process-type']; params[index]['is-init'] = true; }); this.params().loadData(params); diff --git a/js/app/models/RequestParamObject.js b/js/app/models/RequestParamObject.js index 0d0229f..ad0556a 100644 --- a/js/app/models/RequestParamObject.js +++ b/js/app/models/RequestParamObject.js @@ -73,9 +73,9 @@ Ext.define('amdaModel.RequestParamObject', { getDimSum : function(dim) { switch (this.get(dim+'-sum-type')) { case 1: - return 'range[' + this.get(dim+'-min-value') + ',' + this.get(dim+'-max-value') + ']'; + return this.get(dim+'-process-type')+'_range[' + this.get(dim+'-min-value') + ',' + this.get(dim+'-max-value') + ']'; case 2: - return 'indexes[' + this.get(dim+'-min-index') + ',' + this.get(dim+'-max-index') + ']'; + return this.get(dim+'-process-type')+'_indexes[' + this.get(dim+'-min-index') + ',' + this.get(dim+'-max-index') + ']'; } return false; }, diff --git a/js/app/views/ParamArgumentsUI.js b/js/app/views/ParamArgumentsUI.js index b15542a..3569eac 100644 --- a/js/app/views/ParamArgumentsUI.js +++ b/js/app/views/ParamArgumentsUI.js @@ -338,9 +338,7 @@ Ext.define('amdaUI.ParamArgumentsUI', { data: [ {'type': 'all', 'name': 'Value in each channel'}, {'type': 'sum', 'name': 'Sum in range'}, - {'type': 'average', 'name': 'Average in range'}, - {'type': 'median', 'name': 'Median in range'}, - {'type': 'integral', 'name': 'Integral flux in range'} + {'type': 'average', 'name': 'Average in range'} ] }); var sumTypes = Ext.create('Ext.data.Store', { @@ -360,7 +358,7 @@ Ext.define('amdaUI.ParamArgumentsUI', { displayField: 'name', valueField: 'type', fieldLabel: 'Process Type', - value:'Sum in range', + value:'sum', listeners: { change: function(field, newValue, oldValue, eOpts) { this.paramRequestObject.set(relatedDim+'-process-type',newValue); @@ -476,7 +474,12 @@ Ext.define('amdaUI.ParamArgumentsUI', { if (this.paramRequestObject.get(relatedDim+'-sum-type') == 0) { this.paramRequestObject.set(relatedDim+'-sum-type',1); } + if (this.paramRequestObject.get(relatedDim+'-process-type') == '') { + this.paramRequestObject.set(relatedDim+'-process-type','sum'); + } + fieldset.down('[name=sum_type_'+relatedDim+']').setValue(this.paramRequestObject.get(relatedDim+'-sum-type')); + fieldset.down('[name=process_type_'+relatedDim+']').setValue(this.paramRequestObject.get(relatedDim+'-process-type')); indexesCombo.setDisabled(true); if (!this.inRebuild && (this.onChange != null)) this.onChange(uiScope, relatedDim, true, false, false); -- libgit2 0.21.2