Commit 0e540b69fe24bb7199d605399c4156627194aa90

Authored by Benjamin Renard
1 parent ed47f960

Finalize save of download requests (#6295)

js/app/controllers/DownloadModule.js
... ... @@ -60,5 +60,11 @@ Ext.define('amdaDesktop.DownloadModule', {
60 60 me.getUiContent().addParameter(paramNode, true);
61 61 });
62 62 }
  63 + },
  64 +
  65 + editFromJsonData: function(jsonData) {
  66 + this.createLinkedNode();
  67 + this.createObject(jsonData);
  68 + this.createWindow();
63 69 }
64 70 });
... ...
js/app/controllers/PlotModule.js
... ... @@ -300,5 +300,28 @@ Ext.define('amdaDesktop.PlotModule', {
300 300  
301 301 isMultiPlot : function() {
302 302 return this.multiPlotWin && !this.multiPlotWin.isHidden();
  303 + },
  304 +
  305 + editInDownloadModule: function(plotNode) {
  306 + var plotValues = plotNode.get('object').getJsonValues();
  307 + var downloadValues = new Object();
  308 + downloadValues.timesrc = plotValues.timesrc;
  309 + downloadValues.startDate = plotValues.startDate;
  310 + downloadValues.stopDate = plotValues.stopDate;
  311 + downloadValues.durationDay = plotValues.durationDay;
  312 + downloadValues.durationHour = plotValues.durationHour;
  313 + downloadValues.durationMin = plotValues.durationMin;
  314 + downloadValues.durationSec = plotValues.durationSec;
  315 + if (plotValues.timeTables)
  316 + downloadValues.timeTables = plotValues.timeTables;
  317 + downloadValues.list = [];
  318 + plotNode.get('object').panels().each(function (panel) {
  319 + panel.params().each(function (param) {
  320 + downloadValues.list.push(param.getJsonValues());
  321 + });
  322 + });
  323 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.download.id, true, function (module) {
  324 + module.editFromJsonData(downloadValues);
  325 + });
303 326 }
304 327 });
... ...
js/app/models/Download.js
... ... @@ -7,30 +7,129 @@
7 7 * @author myriam
8 8 * @version $Id: Download.js 2068 2014-02-06 11:27:38Z elena $
9 9 */
10   -
  10 +
  11 +
  12 +Ext.define('amdaModel.DownloadConfig', {
  13 + singleton: true,
  14 +
  15 + defaultValues : {
  16 + timeformat: 'YYYY-MM-DDThh:mm:ss',
  17 + timeformatTT: 'YYYY-MM-DDThh:mm:ss',
  18 + fileformat: 'ASCII',
  19 + fileformatTT: 'text',
  20 + filecompress: 'tar+gzip',
  21 + filecompressTT: 'tar+gzip',
  22 + filestructure: '2'
  23 + },
  24 +
  25 + timeformatData: [
  26 + ['YYYY-MM-DDThh:mm:ss', 'YYYY-MM-DDThh:mm:ss.ms', 'ISO format with msecs'],
  27 + ['DD Time', 'YYYYDOYhhmmssms', 'Day-Of-Year, 1 Jan : DOY = 0'],
  28 + ['Timestamp', 'Seconds from 1970', 'Total of seconds from the Unix Epoch on January 1st, 1970 at UTC.'],
  29 + ['YYYY MM DD hh mm ss', 'YYYY MM DD hh mm ss ms', 'date with spaces'],
  30 + ['Timestamp-with-milliseconds', 'Seconds from 1970 with ms', 'Total of seconds from the Unix Epoch with milliseconds.']
  31 + ],
  32 + fileformatData: [
  33 + ['ASCII', 'ASCII'],
  34 + ['vot', 'VOTable'],
  35 + ['cdf', 'CDF'],
  36 + ['json', 'JSON']
  37 + ],
  38 + fileformatTTData: [
  39 + ['text', 'plain text'],
  40 + ['vot', 'VOTable']
  41 + ],
  42 + filecompressData: [
  43 + ['zip', 'zip'],
  44 + ['tar+gzip', 'tar+gzip']
  45 + ],
  46 + filecompressTTData: [
  47 + ['zip', 'zip'],
  48 + ['tar+gzip', 'tar+gzip'],
  49 + ['none', 'none']
  50 + ],
  51 + filestructureData: [
  52 + ['0', 'All In One File'],
  53 + ['1', 'One File Per Time Interval'],
  54 + ['2', 'One File Per Param/Interval']
  55 + ]
  56 +});
11 57  
12 58 Ext.define('amdaModel.Download', {
13 59 extend: 'amdaModel.AmdaTimeObject',
14   -
  60 +
  61 + requires: [
  62 + "amdaModel.DownloadParam"
  63 + ],
  64 +
15 65 fields : [
16 66 {name: 'type', type: 'string', defaultValue: 'Download'},
17 67 {name: 'downloadSrc', type: 'string'},
18   - {name: 'list', defaultValue: null }, // array of parameters
19   - {name: 'timeformat', type: 'string'},
20   - {name: 'timeformatTT', type: 'string'},
21   - {name: 'structure', type: 'string'},
  68 + {name: 'timeformat', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformat},
  69 + {name: 'timeformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformatTT},
  70 + {name: 'filestructure', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filestructure},
22 71 {name: 'refparamSampling', type: 'boolean', defaultValue: false},
23 72 {name: 'separateInfoFile', type: 'boolean', defaultValue: false},
24 73 {name: 'sampling', type: 'int', defaultValue: '600'},
25 74 {name: 'scientificformat', type: 'boolean', defaultValue: true},
26 75 {name: 'fileprefix', type: 'string'},
27   - {name: 'fileformat', type: 'string'},
28   - {name: 'fileformatTT', type: 'string'},
29   - {name: 'compression', type: 'string'},
30   - {name: 'compressionTT', type: 'string'}
  76 + {name: 'fileformat', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.fileformat},
  77 + {name: 'fileformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.fileformatTT},
  78 + {name: 'compression', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filecompress},
  79 + {name: 'compressionTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filecompressTT}
  80 + ],
  81 +
  82 + associations : [
  83 + {
  84 + type : 'hasMany',
  85 + model : 'amdaModel.DownloadParam',
  86 + name : 'params'
  87 + }
31 88 ],
32 89  
33   - propertiesToCopy : 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,scientificformat,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT',
  90 + propertiesToCopy : 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,scientificformat,list,timeformat,timeformatTT,filestructure,fileprefix,fileformat,fileformatTT,compression,compressionTT',
  91 +
  92 + constructor: function(){
  93 + var me = this;
  94 + me.callParent(arguments);
  95 + if ((arguments.length > 0) && arguments[0])
  96 + {
  97 + if (arguments[0].list)
  98 + me.loadParams(arguments[0].list);
  99 + }
  100 + this.dirty = false;
  101 + },
  102 +
  103 + loadParams: function(params)
  104 + {
  105 + /* Compatability mode */
  106 + Ext.each(params, function(param, index) {
  107 + if (param.hasOwnProperty('is-init')) {
  108 + return;
  109 + }
  110 + params[index]['dim1-sum-type'] = param['dim1-is-range'] ? 1 : 0;
  111 + params[index]['dim1-min-value'] = param['dim1-min-range'];
  112 + params[index]['dim1-max-value'] = param['dim1-max-range'];
  113 + params[index]['dim2-sum-type'] = param['dim2-is-range'] ? 1 : 0;
  114 + params[index]['dim2-min-value'] = param['dim2-min-range'];
  115 + params[index]['dim2-max-value'] = param['dim2-max-range'];
  116 + params[index]['is-init'] = true;
  117 + });
  118 + this.params().loadData(params);
  119 + },
  120 +
  121 + isDirty : function() {
  122 + if (this.dirty)
  123 + return true;
  124 +
  125 + var d = false;
  126 +
  127 + this.params().each(function (param, index) {
  128 + if (param.dirty)
  129 + d = true;
  130 + });
  131 + return d;
  132 + },
34 133  
35 134 getJsonValues : function(){
36 135  
... ... @@ -41,7 +140,7 @@ Ext.define('amdaModel.Download', {
41 140 myValues.name = this.get('name');
42 141 //Data download
43 142 if (myValues.downloadSrc === '0') { // Data download
44   - myValues.structure = this.get('structure');
  143 + myValues.filestructure = this.get('filestructure');
45 144 myValues.refparamSampling = this.get('refparamSampling');
46 145 myValues.separateInfoFile = this.get('separateInfoFile');
47 146 myValues.scientificformat = this.get('scientificformat');
... ... @@ -75,13 +174,10 @@ Ext.define('amdaModel.Download', {
75 174 }
76 175  
77 176 // if there's at least one parameter
78   - if (this.get('list') && this.get('list').length) {
79   - var list = this.get('list');
80   - myValues.list=[];
81   - Ext.each(list, function(item, index){
82   - myValues.list[index] = item.getJsonValues();
83   - });
84   - }
  177 + myValues.list = []
  178 + this.params().each(function (param, index) {
  179 + myValues.list[index] = param.getJsonValues();
  180 + });
85 181 myValues.fileformat = this.get('fileformat');
86 182 myValues.timeformat = this.get('timeformat');
87 183 myValues.compression = this.get('compression');
... ...
js/app/views/AstroImagesUI.js
... ... @@ -38,7 +38,8 @@ Ext.define('amdaUI.AstroImagesUI', {
38 38 extend: 'Ext.form.Panel',
39 39  
40 40 requires: [
41   - 'amdaUI.SendToSampButtonUI'
  41 + 'amdaUI.SendToSampButtonUI',
  42 + 'amdaModel.DownloadNode'
42 43 ],
43 44  
44 45 //
... ... @@ -318,9 +319,13 @@ Ext.define('amdaUI.AstroImagesUI', {
318 319 obj.set('compression','zip');
319 320 obj.set('list',imageList);
320 321 obj.set('downloadSrc',2);
321   -
322   - amdaModel.DownloadNode.set('object',obj);
323   - amdaModel.DownloadNode.execute();
  322 +
  323 + var downloadNode = Ext.create('amdaModel.DownloadNode', {
  324 + leaf : true,
  325 + });
  326 +
  327 + downloadNode.set('object',obj);
  328 + downloadNode.execute();
324 329 },
325 330  
326 331 getAdditionalRequestConfig : function(panelId)
... ...
js/app/views/DownloadUI.js
... ... @@ -16,25 +16,11 @@ Ext.define('amdaUI.DownloadUI', {
16 16 'amdaUI.TimeSelectorUI',
17 17 'amdaUI.ParamArgumentsPlug',
18 18 'amdaUI.SendToSampButtonUI',
  19 + 'amdaModel.Download',
19 20 'amdaModel.DownloadParam',
20 21 'amdaModel.RequestParamObject'
21 22 ],
22 23  
23   - //Old kernel time formats
24   - //timeformatData : [['Y-m-dTH:i:s', 'YYYY-MM-DDThh:mm:ss'], ['Y m d H i s', 'YYYY MM DD hh mm ss'], ['d m Y H i s', 'DD MM YYYY hh mm ss'], ['Y z H i s', 'YYYY DDD hh mm ss']],
25   - //New kernel time formats
26   - timeformatData: [['YYYY-MM-DDThh:mm:ss', 'YYYY-MM-DDThh:mm:ss.ms', 'ISO format with msecs'],
27   - ['DD Time', 'YYYYDOYhhmmssms', 'Day-Of-Year, 1 Jan : DOY = 0'],
28   - ['Timestamp', 'Seconds from 1970', 'Total of seconds from the Unix Epoch on January 1st, 1970 at UTC.'],
29   - ['YYYY MM DD hh mm ss', 'YYYY MM DD hh mm ss ms', 'date with spaces'],
30   - ['Timestamp-with-milliseconds', 'Seconds from 1970 with ms', 'Total of seconds from the Unix Epoch with milliseconds.']],
31   - timeformatTTData: [['Y-m-dTH:i:s', 'YYYY-MM-DDThh:mm:ss']],
32   - fileformatData: [['ASCII', 'ASCII'], ['vot', 'VOTable'], ['cdf', 'CDF'], ['json', 'JSON']],
33   - fileformatTTData: [['text', 'plain text'], ['vot', 'VOTable']],
34   - filecompressData: [['zip', 'zip'], ['tar+gzip', 'tar+gzip']],
35   - filecompressTT: [['zip', 'zip'], ['tar+gzip', 'tar+gzip'], ['none', 'none']],
36   - filestructureData: [['0', 'All In One File'], ['1', 'One File Per Time Interval'], ['2', 'One File Per Param/Interval']],
37   -
38 24 constructor: function (config) {
39 25 this.init(config);
40 26 this.callParent(arguments);
... ... @@ -112,26 +98,23 @@ Ext.define('amdaUI.DownloadUI', {
112 98 },
113 99  
114 100 saveProcess: function(toRename) {
115   - if (this.object.dirty)
116   - {
117   - var downloadModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.download.id);
118   - if (this.object.isModified('name')) {
119   - if (this.object.get('id'))
120   - {
121   - var contextNode = downloadModule.linkedNode.parentNode;
122   - downloadModule.createLinkedNode();
123   - downloadModule.linkedNode.set('contextNode',contextNode);
124   - downloadModule.createObject(this.object.getJsonValues());
125   - var downloadObj = downloadModule.linkedNode.get('object');
126   - this.object = downloadObj;
127   - if (toRename) downloadModule.linkedNode.toRename = true;
128   - }
129   - downloadModule.linkedNode.create();
130   - }
131   - else {
132   - downloadModule.linkedNode.set('contextNode',downloadModule.contextNode);
133   - downloadModule.linkedNode.update();
  101 + var downloadModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.download.id);
  102 + if (this.object.isModified('name')) {
  103 + if (this.object.get('id'))
  104 + {
  105 + var contextNode = downloadModule.linkedNode.parentNode;
  106 + downloadModule.createLinkedNode();
  107 + downloadModule.linkedNode.set('contextNode',contextNode);
  108 + downloadModule.createObject(this.object.getJsonValues());
  109 + var downloadObj = downloadModule.linkedNode.get('object');
  110 + this.object = downloadObj;
  111 + if (toRename) downloadModule.linkedNode.toRename = true;
134 112 }
  113 + downloadModule.linkedNode.create();
  114 + }
  115 + else {
  116 + downloadModule.linkedNode.set('contextNode',downloadModule.contextNode);
  117 + downloadModule.linkedNode.update();
135 118 }
136 119 },
137 120  
... ... @@ -219,44 +202,6 @@ Ext.define('amdaUI.DownloadUI', {
219 202 this.editParameterArgs(r);
220 203 },
221 204  
222   - addParams: function (arrayParams)
223   - {
224   - var arrayRec = new Array();
225   - var index = 1;
226   -
227   - if (arrayParams)
228   - {
229   - Ext.Array.each(arrayParams, function (item) {
230   - if (Ext.isObject(item)) {
231   - // handel case of derived parameters
232   - var patt_ws = new RegExp("ws_");
233   - var patt_wsd = new RegExp("wsd_");
234   - if (typeof paramId !== 'undefined' && ! patt_ws.test(item.paramid) && ! patt_wsd.test(item.paramid))
235   - {
236   - // for Parameter Name in Download Module
237   - var paramObj = amdaModel.RequestParamObject.getEmptyObj();
238   - paramObj.paramid = paramId;
239   - paramObj['dim1-index'] = item.get('dim1');
240   - paramObj['dim2-index'] = item.get('dim2');
241   -
242   - var r = Ext.create('amdaModel.DownloadParam', paramObj);
243   - } else
244   - {
245   - //for download from get Data in Plot module
246   - var r = Ext.create('amdaModel.DownloadParam', item);
247   - }
248   -
249   - } else {
250   - // for Download By Request in Operations menu
251   - //TODO BRE - Components selection
252   - var r = Ext.create('amdaModel.DownloadParam', {paramid: item});
253   - }
254   - arrayRec.push(r);
255   - });
256   - }
257   - this.paramGrid.getStore().loadData(arrayRec);
258   - },
259   -
260 205 // parameter name -> alias
261 206 updateConstruct: function (oldval, newval) {
262 207 var index = this.paramGrid.store.findExact('name', oldval);
... ... @@ -288,7 +233,7 @@ Ext.define('amdaUI.DownloadUI', {
288 233 {
289 234 var timeformat = values.timeformat;
290 235 var timeSource = this.timeSelector.getActiveTimeSource();
291   - var structure = values.filestructure;
  236 + var filestructure = values.filestructure;
292 237 var sampling = values.sampling ? values.sampling : 600;
293 238 var refparamSampling = values.refparamsampling == 'on';
294 239 var fileprefix = values.fileprefix ? values.fileprefix : '';
... ... @@ -316,18 +261,23 @@ Ext.define('amdaUI.DownloadUI', {
316 261 updateStatus = false;
317 262 }
318 263  
  264 + if (updateStatus && (this.object.params().count() == 0))
  265 + {
  266 + myDesktopApp.warningMsg('You must define at least one parameter to download');
  267 + updateStatus = false;
  268 + }
  269 +
319 270 if (updateStatus)
320 271 {
321 272 /// real object update
322 273 // update TimeTable object with the content of form
323 274 basicForm.updateRecord(this.object);
  275 +
324 276 this.object.set('timesrc', timeSource);
325 277 // set valid intervals into TimeTable object
326 278 if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
327 279 this.object.set('timeTables', this.timeSelector.TTGrid.getStore().data.items);
328   - // set parameters
329   - this.object.set('list', this.paramGrid.getStore().data.items);
330   - this.object.set('structure', structure);
  280 + this.object.set('filestructure', filestructure);
331 281 this.object.set('refparamSampling', refparamSampling);
332 282 this.object.set('sampling', sampling);
333 283 this.object.set('fileprefix', fileprefix);
... ... @@ -342,7 +292,11 @@ Ext.define('amdaUI.DownloadUI', {
342 292 var timeformat = values.timeformatTT;
343 293 var compression = values.compressionTT;
344 294 var fileformat = values.fileformatTT;
345   - if (compression === 'none'
  295 + if (this.TTGrid.getStore().count() == 0) {
  296 + myDesktopApp.warningMsg('You must define at least one TimeTable or Catalog to download');
  297 + updateStatus = false;
  298 + }
  299 + else if (compression === 'none'
346 300 && this.TTGrid.getStore().count() > 1) {
347 301 myDesktopApp.warningMsg('You are going to download several time tables - select the Compression please');
348 302 updateStatus = false;
... ... @@ -362,31 +316,16 @@ Ext.define('amdaUI.DownloadUI', {
362 316 * load this.object into form
363 317 */
364 318 loadObject: function () {
365   -
366   - if (!this.object.get('timeformat'))
367   - this.object.set('timeformat', this.timeformatData[0][0]);
368   -
369   - if (!this.object.get('timeformatTT'))
370   - this.object.set('timeformatTT', this.timeformatData[0][0]);
371   -
372   - if (!this.object.get('fileformat'))
373   - this.object.set('fileformat', this.fileformatData[0][0]);
374   -
375   - if (!this.object.get('fileformatTT'))
376   - this.object.set('fileformatTT', this.fileformatTTData[0][0]);
377   -
378   - if (!this.object.get('compression'))
379   - this.object.set('compression', this.filecompressData[1][0]);
380   -
381   - if (!this.object.get('compressionTT'))
382   - this.object.set('compressionTT', this.filecompressData[1][0]);
383   -
384 319 // load object into form
385 320 this.formPanel.getForm().loadRecord(this.object);
386 321 // set object's TTs into the timeselector
387 322 this.addTTs(this.object.get('timeTables'));
388   - // set parameters
389   - this.addParams(this.object.get('list'));
  323 + // set parameters
  324 + this.paramGrid.reconfigure(this.object.params());
  325 + //this.paramGrid.getStore().loadData(this.object.params().data.items);
  326 + // select "Parameters" tab
  327 + var tabPanel = this.formPanel.down();
  328 + tabPanel.setActiveTab(0);
390 329 },
391 330  
392 331 /**
... ... @@ -572,7 +511,7 @@ Ext.define('amdaUI.DownloadUI', {
572 511 * @return false
573 512 */
574 513 fclose: function () {
575   - return false;
  514 + return this.object.isDirty();
576 515 },
577 516  
578 517 init: function (config) {
... ... @@ -710,7 +649,7 @@ Ext.define('amdaUI.DownloadUI', {
710 649  
711 650 var storeTimeFormat = new Ext.data.ArrayStore({
712 651 fields: ['id', 'name', 'qtip'],
713   - data: this.timeformatData
  652 + data: amdaModel.DownloadConfig.timeformatData
714 653 });
715 654  
716 655 this.paramPanel = new Ext.container.Container({
... ... @@ -764,14 +703,12 @@ Ext.define('amdaUI.DownloadUI', {
764 703 '<li class="x-boundlist-item" data-qtip="{qtip}">{name}</li>',
765 704 '</tpl>'
766 705 ]
767   - },
768   - value: storeTimeFormat.first()
  706 + }
769 707 },
770 708 {
771 709 fieldLabel: 'File Structure',
772 710 name: 'filestructure',
773   - store: this.filestructureData,
774   - value: this.filestructureData[2],
  711 + store: amdaModel.DownloadConfig.filestructureData,
775 712 listeners: {
776 713 change: {fn: this.onFileStructureChange},
777 714 scope: this
... ... @@ -811,14 +748,12 @@ Ext.define(&#39;amdaUI.DownloadUI&#39;, {
811 748 {
812 749 fieldLabel: 'File Format',
813 750 name: 'fileformat',
814   - store: this.fileformatData,
815   - value: this.fileformatData[0]
  751 + store: amdaModel.DownloadConfig.fileformatData
816 752 },
817 753 {
818 754 fieldLabel: 'Compression',
819 755 name: 'compression',
820   - store: this.filecompressData,
821   - value: this.filecompressData[0]
  756 + store: amdaModel.DownloadConfig.filecompressData
822 757 },
823 758 this.timeSelector
824 759 ]
... ... @@ -862,20 +797,17 @@ Ext.define(&#39;amdaUI.DownloadUI&#39;, {
862 797 '<li class="x-boundlist-item" data-qtip="{qtip}">{name}</li>',
863 798 '</tpl>'
864 799 ]
865   - },
866   - value: storeTimeFormat.first()
  800 + }
867 801 },
868 802 {
869 803 fieldLabel: 'File Format ',
870 804 name: 'fileformatTT',
871   - store: this.fileformatTTData,
872   - value: this.fileformatTTData[0]
  805 + store: amdaModel.DownloadConfig.fileformatTTData
873 806 },
874 807 {
875 808 fieldLabel: 'Compression ',
876 809 name: 'compressionTT',
877   - store: this.filecompressTT,
878   - value: this.filecompressTT[0]
  810 + store: amdaModel.DownloadConfig.filecompressTTData
879 811 }
880 812 ]}
881 813 ]
... ... @@ -923,17 +855,11 @@ Ext.define(&#39;amdaUI.DownloadUI&#39;, {
923 855 text: 'Reset',
924 856 scope: this,
925 857 handler: function () {
926   - this.formPanel.getForm().reset();
927   - var tabPanel = this.formPanel.down();
928   - var downloadSrc = tabPanel.items.indexOf(tabPanel.getActiveTab());
929   - if (downloadSrc === 0) {
930   - // reset parameters and Time Tables in Get Data
931   - this.paramGrid.store.removeAll();
932   - this.timeSelector.TTGrid.store.removeAll();
933   - } else {
934   - // reset Time Tables in Get time Table
935   - this.TTGrid.store.removeAll();
936   - }
  858 + var downModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.download.id);
  859 + downModule.createLinkedNode();
  860 + var obj = null;
  861 + downModule.createObject(obj);
  862 + this.setObject(downModule.linkedNode.get('object'));
937 863 }
938 864 },
939 865 {
... ...
js/app/views/PlotComponents/PlotTabContent.js
... ... @@ -167,9 +167,8 @@ Ext.define(&#39;amdaPlotComp.PlotTabContent&#39;, {
167 167 },
168 168  
169 169 getDataProcess : function() {
170   - var downObject = amdaModel.DownloadNode.decodeObject(this.plotNode.get('object'));
171   - amdaModel.DownloadNode.set('object',Ext.create('amdaModel.Download',downObject));
172   - amdaModel.DownloadNode.editInModule();
  170 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  171 + plotModule.editInDownloadModule(this.plotNode);
173 172 },
174 173  
175 174 isValidRequest : function(acceptEmptyTTList = true) {
... ...