Commit 8e579498b87bc35a67ed8325ea97ed954b423140

Authored by Hacene SI HADJ MOHAND
2 parents 7661455a a12a3c21

Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM

merge after rm_6829
help/MinMaxThreshold
1 1 <h3>Min/Max Thresholds</h3>
2 2 Values out of Min/Max thresholds are not shown on the plot but this does not impact the X/Y axis range.
3   -To have access to axis control you should uncheck <i>Simplified View</i> checkbox.
  3 +To have access to axis control you should check <i>Extended Plot Options</i> checkbox.
4 4 <br/>
5 5  
... ...
js/app/models/PlotObjects/PlotBaseSerieObject.js
... ... @@ -22,6 +22,7 @@ Ext.define(&#39;amdaPlotObj.PlotBaseSerieObject&#39;, {
22 22  
23 23 fields : [
24 24 {name: 'serie-yaxis', type: 'string'},
  25 + {name: 'serie-resolution', type: 'int'},
25 26 {name: 'serie-lines-activated', type: 'boolean'},
26 27 {name: 'serie-lines-style', type: 'string'},
27 28 {name: 'serie-lines-width', type: 'float'},
... ... @@ -85,6 +86,7 @@ Ext.define(&#39;amdaPlotObj.PlotBaseSerieObject&#39;, {
85 86 setDefaultValues: function()
86 87 {
87 88 this.set('serie-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.serie.yAxis);
  89 + this.set('serie-resolution', amdaPlotObj.PlotObjectConfig.defaultValues.serie.resolution);
88 90 this.set('serie-lines-activated', true);
89 91 this.set('serie-lines-style', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.style);
90 92 this.set('serie-lines-width', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.width);
... ... @@ -141,6 +143,7 @@ Ext.define(&#39;amdaPlotObj.PlotBaseSerieObject&#39;, {
141 143 var serieValues = new Object();
142 144  
143 145 serieValues['serie-yaxis'] = this.get('serie-yaxis');
  146 + serieValues['serie-resolution'] = this.get('serie-resolution');
144 147 serieValues['serie-lines-activated'] = this.get('serie-lines-activated');
145 148 serieValues['serie-lines-style'] = this.get('serie-lines-style');
146 149 serieValues['serie-lines-width'] = this.get('serie-lines-width');
... ... @@ -186,4 +189,4 @@ Ext.define(&#39;amdaPlotObj.PlotBaseSerieObject&#39;, {
186 189  
187 190 return serieValues;
188 191 }
189   -});
190 192 \ No newline at end of file
  193 +});
... ...
js/app/models/PlotObjects/PlotObjectConfig.js
... ... @@ -83,6 +83,7 @@ Ext.define(&#39;amdaPlotObj.PlotObjectConfig&#39;, {
83 83 },
84 84 serie : {
85 85 yAxis : 'y-left',
  86 + resolution : 3000,
86 87 lines : {
87 88 style : 'plain',
88 89 width : 1,
... ... @@ -293,7 +294,14 @@ Ext.define(&#39;amdaPlotObj.PlotObjectConfig&#39;, {
293 294 availableYAxes : [
294 295 {'key' : 'y-left', 'value' : 'Left'},
295 296 {'key' : 'y-right', 'value' : 'Right'}
296   - ],
  297 + ],
  298 +
  299 + availableResolutions : [
  300 + {'key' : 3000, 'value' : '3000'},
  301 + {'key' : 10000, 'value' : '10000'},
  302 + {'key' : 50000, 'value' : '50000'},
  303 + {'key' : 100000, 'value' : '100000'}
  304 + ],
297 305  
298 306 availableLinesStyles : [
299 307 {'key' : 'plain', 'value' : 'Plain'},
... ...
js/app/models/PlotObjects/PlotPanelObject.js
... ... @@ -280,7 +280,7 @@ Ext.define(&#39;amdaPlotObj.PlotPanelObject&#39;, {
280 280 }
281 281 },
282 282  
283   - createNewParam: function(paramId, paramComponents, isVector, is2d, plotOnly, onAfterCreate) {
  283 + createNewParam: function(paramId, paramComponents, isVector, plotOnly, onAfterCreate) {
284 284 this.set('last-param-id', this.get('last-param-id') + 1);
285 285  
286 286 var emptyPanel = (this.params().getCount() == 0);
... ... @@ -304,9 +304,7 @@ Ext.define(&#39;amdaPlotObj.PlotPanelObject&#39;, {
304 304 recs[0].set('dim2-index', paramComponents['index2']);
305 305 }
306 306 }
307   -
308   - if (is2d)
309   - recs[0].set('dim2-index','0');
  307 +
310 308 // activate legend if vector & TimePlot
311 309 if ( isVector && this.get('panel-plot-type') == 'timePlot' ) {
312 310 this.loadSeriesLegend();
... ...
js/app/views/IntervalUI.js
... ... @@ -202,16 +202,15 @@ Ext.define(&#39;amdaUI.IntervalUI&#39;, {
202 202 getDateField : function(fieldName,fieldText,fieldId,onChangeField)
203 203 {
204 204 return {
205   - layout: {type: 'hbox', align: 'middle'},
206   - items: [{
207 205 xtype: 'datefield',
208   - margin : '10 0 0 5', // (top, right, bottom, left).
209   - name: fieldName,
  206 + // margin : '10 0 5 5', // (top, right, bottom, left).
  207 + name: fieldName,
  208 + // width : 220,
210 209 emptyText: 'YYYY/MM/DD hh:mm:ss',
211   - tip: 'Date formated as YYYY/MM/DD hh:mm:ss',
  210 + tip: 'Date formatted as YYYY/MM/DD hh:mm:ss',
212 211 format: 'Y/m/d H:i:s',
213   - enforceMaxLength: true,
214   - maxLength: 19,
  212 + enforceMaxLength: true,
  213 + maxLength: 19,
215 214 fieldLabel: fieldText,
216 215 labelAlign: 'left',
217 216 labelWidth: 60,
... ... @@ -225,7 +224,6 @@ Ext.define(&#39;amdaUI.IntervalUI&#39;, {
225 224 },
226 225 scope : this
227 226 }
228   - }]
229 227 };
230 228 },
231 229  
... ... @@ -243,7 +241,7 @@ Ext.define(&#39;amdaUI.IntervalUI&#39;, {
243 241 {
244 242 return {
245 243 layout: {type: 'hbox', align: 'middle'},
246   - margin: 0,
  244 + // margin: 0,
247 245 defaults: {
248 246 xtype: 'numberfield',
249 247 minValue: 0,
... ... @@ -292,7 +290,7 @@ Ext.define(&#39;amdaUI.IntervalUI&#39;, {
292 290 plain: true,
293 291 flex: 1,
294 292 layout: 'anchor',
295   - defaults: { margin: '0 0 5 0', xtype : 'container'},
  293 + defaults: { margin: '10 0 5 5', xtype : 'container'},
296 294 items: [
297 295 me.getStartField(),
298 296 me.getStopField(),
... ...
js/app/views/ParamArgumentsUI.js
... ... @@ -20,6 +20,7 @@ Ext.define(&#39;amdaUI.ParamArgumentsUI&#39;, {
20 20 onModifyHeight: null,
21 21 pluginOwner: null,
22 22 isFirstMsg : true,
  23 + isInit : false,
23 24 // -1 -> unknown, 0 -> scalar, 1 -> Tab1D, 2 -> Tab2D
24 25 paramType: 0,
25 26  
... ... @@ -40,6 +41,9 @@ Ext.define(&#39;amdaUI.ParamArgumentsUI&#39;, {
40 41 },
41 42  
42 43 editParameter: function(paramRequestObject, uiScope, onReady) {
  44 + if (paramRequestObject.get('type') === 0)
  45 + this.isInit = true;
  46 +
43 47 this.paramRequestObject = paramRequestObject;
44 48 var me = this;
45 49 me.mask();
... ... @@ -230,10 +234,16 @@ Ext.define(&#39;amdaUI.ParamArgumentsUI&#39;, {
230 234 argId: relatedDim,
231 235 hidden: (relatedTable ? relatedTable.variable : false),
232 236 listeners: {
  237 + afterrender: function(combo) {
  238 + if (relatedDim == 'dim2' && !relatedTable.variable && this.isInit) {
  239 + combo.setValue('0');
  240 + this.isInit = false;
  241 + }
  242 + },
233 243 change: function(field, newValue, oldValue, eOpts) {
234 244 if (this.paramRequestObject.get('type') == '2' && this.isFirstMsg)
235 245 {
236   - if (field.argId == 'dim2' && newValue == '*') {
  246 + if (relatedDim == 'dim2' && newValue == '*') {
237 247 var previousCombo = field.previousSibling();
238 248  
239 249 if (previousCombo instanceof Ext.form.FieldSet)
... ... @@ -305,6 +315,12 @@ Ext.define(&#39;amdaUI.ParamArgumentsUI&#39;, {
305 315 },
306 316 items: rangeItems,
307 317 listeners: {
  318 + afterrender: function(fieldset) {
  319 + if (relatedDim == 'dim2' && relatedTable.variable && this.isInit) {
  320 + fieldset.checkboxCmp.setValue('true');
  321 + this.isInit = false;
  322 + }
  323 + },
308 324 expand: function(fieldset, eOpts) {
309 325 if (relatedTable.variable) {
310 326 if (Ext.Object.isEmpty(relatedTable.minmax)) {
... ...
js/app/views/PlotComponents/PlotBaseSerieForm.js
... ... @@ -86,6 +86,9 @@ Ext.define(&#39;amdaPlotComp.PlotBaseSerieForm&#39;, {
86 86 var me = this;
87 87  
88 88 return [
  89 + this.addStandardCombo('serie-resolution', 'Resolution', amdaPlotObj.PlotObjectConfig.availableResolutions, function(name, value, oldValue) {
  90 + me.object.set('serie-resolution', value);
  91 + }),
89 92 this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) {
90 93 me.object.set('serie-yaxis', value);
91 94 me.crtTree.refresh();
... ...
js/app/views/PlotComponents/PlotTabContent.js
... ... @@ -67,8 +67,8 @@ Ext.define(&#39;amdaPlotComp.PlotTabContent&#39;, {
67 67 this.plotElementPanel = config.plotElementPanel;
68 68 this.plotTabPanel = config.plotTabPanel;
69 69  
70   - this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'plotTimeSelectorTab' + config.tabId, border : false, flex: 2, collapsible: true, collapseDirection : 'bottom', hidden: true} );
71   - this.treePlot = new amdaPlotComp.PlotTree({flex: 4, plotElementPanel: this.plotElementPanel, plotTabContent: this});
  70 + this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'plotTimeSelectorTab' + config.tabId, border : false, flex: 3, collapsible: true, collapseDirection : 'bottom', hidden: true} );
  71 + this.treePlot = new amdaPlotComp.PlotTree({flex: 5.6, plotElementPanel: this.plotElementPanel, plotTabContent: this});
72 72  
73 73 var myConf = {
74 74 bodyStyle: { background : '#dfe8f6' },
... ...
js/app/views/PlotComponents/PlotTree.js
... ... @@ -607,7 +607,7 @@ Ext.define(&#39;amdaPlotComp.PlotTree&#39;, {
607 607 return false;
608 608 },
609 609  
610   - dropParamToCreate: function (targetNode, position, paramId, paramComponents, isVector, is2d, plotOnly)
  610 + dropParamToCreate: function (targetNode, position, paramId, paramComponents, isVector, plotOnly)
611 611 {
612 612 var panelObject = null;
613 613 if (targetNode == null)
... ... @@ -640,7 +640,7 @@ Ext.define(&#39;amdaPlotComp.PlotTree&#39;, {
640 640  
641 641 //Create param object
642 642 var me = this;
643   - panelObject.createNewParam(paramId, paramComponents, isVector, is2d, plotOnly, function (newParamObject) {
  643 + panelObject.createNewParam(paramId, paramComponents, isVector, plotOnly, function (newParamObject) {
644 644 //Rebuild params node
645 645 me.buildPanelsNode(newParamObject.getId());
646 646 //BRE newParamObject
... ... @@ -669,7 +669,6 @@ Ext.define(&#39;amdaPlotComp.PlotTree&#39;, {
669 669 this.dropParamToCreate(targetNode, position, "#" + record.get('alias'));
670 670 else {
671 671 var isVector = record.get('iconCls') == 'icon-vector';
672   - var is2d = record.get('iconCls') == 'icon-2dspectra';
673 672 var component_info = record.get('component_info');
674 673 var param_id = record.get('id');
675 674 var plot_only = record.get('notyet');
... ... @@ -683,7 +682,7 @@ Ext.define(&#39;amdaPlotComp.PlotTree&#39;, {
683 682 if (component_info.index2)
684 683 components['index2'] = component_info.index2;
685 684 }
686   - this.dropParamToCreate(targetNode, position, param_id, components, isVector, is2d, plot_only);
  685 + this.dropParamToCreate(targetNode, position, param_id, components, isVector, plot_only);
687 686 }
688 687 return true;
689 688 case 'amdaModel.AliasNode' :
... ...