Commit a53fe52090d2a9cc86b04de9dafe93daa1252d1d

Authored by Menouar AZIB
1 parent 48e98e36

The UI of plotFunction feature is almost ready, the remaining is to send request to AMDA Integration

js/app/views/PlotComponents/PlotZoomPlug.js
... ... @@ -52,7 +52,6 @@ Ext.define('amdaPlotComp.PlotZoomPlug', {
52 52  
53 53 init: function (cmp) {
54 54 this.hostCmp = cmp;
55   - this.plotFunctionType = new amdaPlotComp.plotFunction.FunctionType({});
56 55 },
57 56  
58 57 /**
... ... @@ -62,6 +61,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', {
62 61 setParameters: function (listParams_) {
63 62 this.listParams = listParams_;
64 63 this.plotFunctionParamField = new amdaPlotComp.plotFunction.ParamField({ params: this.listParams });
  64 + this.plotFunctionType = new amdaPlotComp.plotFunction.FunctionType({});
65 65 },
66 66  
67 67  
... ... @@ -85,12 +85,14 @@ Ext.define('amdaPlotComp.PlotZoomPlug', {
85 85 var minValue = this.form.getForm().findField('zoom-min-time').getValue();
86 86 if (minValue <= max) {
87 87 this.form.getForm().findField('zoom-max-time').setValue(max);
88   - this.plotFunctionParamField.setNbPoints(this.form.getForm(), minValue, max);
  88 + if (this.isPlotFunction)
  89 + this.plotFunctionParamField.setNbPoints(this.form.getForm(), minValue, max);
89 90 }
90 91 else {
91 92 this.form.getForm().findField('zoom-min-time').setValue(max);
92 93 this.form.getForm().findField('zoom-max-time').setValue(minValue);
93   - this.plotFunctionParamField.setNbPoints(this.form.getForm(), max, minValue);
  94 + if (this.isPlotFunction)
  95 + this.plotFunctionParamField.setNbPoints(this.form.getForm(), max, minValue);
94 96 }
95 97  
96 98 }
... ... @@ -130,7 +132,6 @@ Ext.define(&#39;amdaPlotComp.PlotZoomPlug&#39;, {
130 132 */
131 133 show: function (interactiveId, zoomType, panelId, isPlotFunction_ = false) {
132 134 this.isPlotFunction = isPlotFunction_;
133   -
134 135 if (!this.win) {
135 136 this.win = new Ext.Window({
136 137 id: 'plot-zoom-win-' + this.hostCmp.ownerCt.getId(), // Plot window ID
... ... @@ -164,7 +165,6 @@ Ext.define(&#39;amdaPlotComp.PlotZoomPlug&#39;, {
164 165  
165 166 Ext.PluginManager.register(this);
166 167 }
167   -
168 168 this.interactiveId = interactiveId;
169 169 this.updateWinByType(zoomType, panelId);
170 170 this.win.show();
... ... @@ -216,8 +216,6 @@ Ext.define(&#39;amdaPlotComp.PlotZoomPlug&#39;, {
216 216 },
217 217  
218 218 resetMinMaxValue: function () {
219   - const ui_item = this.form.getForm().findField("NUMBERFIELDace_swe_all_VSW");
220   - console.log(ui_item);
221 219 if (this.zoomType == 'timeAxis') {
222 220 this.form.getForm().findField('zoom-min-time').setValue('');
223 221 this.form.getForm().findField('zoom-max-time').setValue('');
... ... @@ -240,7 +238,6 @@ Ext.define(&#39;amdaPlotComp.PlotZoomPlug&#39;, {
240 238 * Main form
241 239 */
242 240 getFormConfig: function () {
243   -
244 241 var intervalFieldSet = {
245 242 xtype: 'fieldset',
246 243 title: 'Interval Selection',
... ... @@ -440,7 +437,7 @@ Ext.define(&#39;amdaPlotComp.PlotZoomPlug&#39;, {
440 437 ],
441 438 fbar: [
442 439 {
443   - text: 'Apply Zoom',
  440 + text: me.isPlotFunction ? "Apply" : 'Apply Zoom',
444 441 width: 100,
445 442 scope: this,
446 443 handler: function () {
... ...
js/app/views/PlotComponents/plotFunction/ParamField.js
... ... @@ -76,7 +76,6 @@ Ext.define(&#39;amdaPlotComp.plotFunction.ParamField&#39;, {
76 76 const ui_item = parentForm.findField(this.label_number_field1 + param.id);
77 77 if (ui_item !== undefined && ui_item !== null) {
78 78 param["nb_points"] = ui_item.getValue();
79   - console.log(param);
80 79 }
81 80 }
82 81 },
... ...