Commit ecffe9a3c1926a1da4cd9ba22f602004e5a5f747
1 parent
be6060f0
Exists in
8928
and in
1 other branch
ihm ok
Showing
2 changed files
with
44 additions
and
9 deletions
Show diff stats
js/app/models/RequestParamObject.js
... | ... | @@ -29,12 +29,14 @@ Ext.define('amdaModel.RequestParamObject', { |
29 | 29 | 'dim1-max-value': 0., |
30 | 30 | 'dim1-min-index': 0, |
31 | 31 | 'dim1-max-index': 0, |
32 | + 'dim1-process-type': '', | |
32 | 33 | 'dim2-index': '*', |
33 | 34 | 'dim2-sum-type': 0, |
34 | 35 | 'dim2-min-value': 0., |
35 | 36 | 'dim2-max-value': 0., |
36 | 37 | 'dim2-min-index': 0, |
37 | 38 | 'dim2-max-index': 0, |
39 | + 'dim2-process-type': '', | |
38 | 40 | 'template_args': {} |
39 | 41 | }; |
40 | 42 | }, |
... | ... | @@ -53,6 +55,7 @@ Ext.define('amdaModel.RequestParamObject', { |
53 | 55 | {name: 'dim1-max-value', type: 'float', defaultValue: 0.}, |
54 | 56 | {name: 'dim1-min-index', type: 'int', defaultValue: 0}, |
55 | 57 | {name: 'dim1-max-index', type: 'int', defaultValue: 0}, |
58 | + {name: 'dim1-process-type', type: 'string', defaultValue: ''}, // process type : sum, average, median, integral, all | |
56 | 59 | /* Fields for dim2 */ |
57 | 60 | {name: 'dim2-index', type: 'string', defaultValue: '*'}, |
58 | 61 | {name: 'dim2-sum-type', type: 'int', defaultValue: 0}, /* Sum type. 0: None, 1: sum into values range, 2: sum between indexes */ |
... | ... | @@ -60,6 +63,7 @@ Ext.define('amdaModel.RequestParamObject', { |
60 | 63 | {name: 'dim2-max-value', type: 'float', defaultValue: 0.}, |
61 | 64 | {name: 'dim2-min-index', type: 'int', defaultValue: 0}, |
62 | 65 | {name: 'dim2-max-index', type: 'int', defaultValue: 0}, |
66 | + {name: 'dim2-process-type', type: 'string', defaultValue: ''}, // process type : sum, average, median, integral, all | |
63 | 67 | /* Field for arguments of a templated parameter */ |
64 | 68 | {name: 'template_args', type: 'auto', defaultValue: null}, |
65 | 69 | /* ?? */ |
... | ... | @@ -141,17 +145,19 @@ Ext.define('amdaModel.RequestParamObject', { |
141 | 145 | |
142 | 146 | paramValues['dim1-index'] = this.get('dim1-index'); |
143 | 147 | paramValues['dim1-sum-type'] = this.get('dim1-sum-type'); |
144 | - paramValues['dim1-min-value'] = this.get('dim1-min-value'); | |
145 | - paramValues['dim1-max-value'] = this.get('dim1-max-value'); | |
146 | - paramValues['dim1-min-index'] = this.get('dim1-min-index'); | |
147 | - paramValues['dim1-max-index'] = this.get('dim1-max-index'); | |
148 | + paramValues['dim1-min-value'] = this.get('dim1-min-value'); | |
149 | + paramValues['dim1-max-value'] = this.get('dim1-max-value'); | |
150 | + paramValues['dim1-min-index'] = this.get('dim1-min-index'); | |
151 | + paramValues['dim1-max-index'] = this.get('dim1-max-index'); | |
152 | + paramValues['dim1-process-type'] = this.get('dim1-process-type'); | |
148 | 153 | |
149 | 154 | paramValues['dim2-index'] = this.get('dim2-index'); |
150 | 155 | paramValues['dim2-sum-type'] = this.get('dim2-sum-type'); |
151 | - paramValues['dim2-min-value'] = this.get('dim2-min-value'); | |
152 | - paramValues['dim2-max-value'] = this.get('dim2-max-value'); | |
153 | - paramValues['dim2-min-index'] = this.get('dim2-min-index'); | |
154 | - paramValues['dim2-max-index'] = this.get('dim2-max-index'); | |
156 | + paramValues['dim2-min-value'] = this.get('dim2-min-value'); | |
157 | + paramValues['dim2-max-value'] = this.get('dim2-max-value'); | |
158 | + paramValues['dim2-min-index'] = this.get('dim2-min-index'); | |
159 | + paramValues['dim2-max-index'] = this.get('dim2-max-index'); | |
160 | + paramValues['dim2-process-type'] = this.get('dim2-process-type'); | |
155 | 161 | |
156 | 162 | paramValues['type'] = this.get('type'); |
157 | 163 | paramValues['is-init'] = this.get('is-init'); | ... | ... |
js/app/views/ParamArgumentsUI.js
... | ... | @@ -333,6 +333,16 @@ Ext.define('amdaUI.ParamArgumentsUI', { |
333 | 333 | this.add(indexesCombo); |
334 | 334 | |
335 | 335 | if (relatedTable) { |
336 | + var processTypes = Ext.create('Ext.data.Store', { | |
337 | + fields: ['type', 'name'], | |
338 | + data: [ | |
339 | + {'type': 'all', 'name': 'Value in each channel'}, | |
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'} | |
344 | + ] | |
345 | + }); | |
336 | 346 | var sumTypes = Ext.create('Ext.data.Store', { |
337 | 347 | fields: ['type', 'name'], |
338 | 348 | data: [ |
... | ... | @@ -341,7 +351,26 @@ Ext.define('amdaUI.ParamArgumentsUI', { |
341 | 351 | ] |
342 | 352 | }); |
343 | 353 | var sumItems = [ |
344 | - { | |
354 | + { | |
355 | + xtype: 'combobox', | |
356 | + name: 'process_type_'+relatedDim, | |
357 | + store: processTypes, | |
358 | + queryMode: 'local', | |
359 | + editable: false, | |
360 | + displayField: 'name', | |
361 | + valueField: 'type', | |
362 | + fieldLabel: 'Process Type', | |
363 | + value:'Sum in range', | |
364 | + listeners: { | |
365 | + change: function(field, newValue, oldValue, eOpts) { | |
366 | + this.paramRequestObject.set(relatedDim+'-process-type',newValue); | |
367 | + if (!this.inRebuild && (this.onChange != null)) | |
368 | + this.onChange(uiScope, relatedDim, newValue, oldValue, false); | |
369 | + }, | |
370 | + scope: this | |
371 | + } | |
372 | + }, | |
373 | + { | |
345 | 374 | xtype: 'combobox', |
346 | 375 | name: 'sum_type_'+relatedDim, |
347 | 376 | store: sumTypes, | ... | ... |