Commit 944871aaa35bab821b2987521833625902dc45cf
Exists in
master
and in
107 other branches
Merge branch master in rm_5357
Showing
6 changed files
with
56 additions
and
33 deletions
Show diff stats
js/app/controllers/DownloadModule.js
js/app/models/Download.js
... | ... | @@ -22,6 +22,7 @@ Ext.define('amdaModel.Download', { |
22 | 22 | {name: 'refparamSampling', type: 'boolean', defaultValue: false}, |
23 | 23 | {name: 'separateInfoFile', type: 'boolean', defaultValue: false}, |
24 | 24 | {name: 'sampling', type: 'int', defaultValue: '600'}, |
25 | + {name: 'scientificformat', type: 'boolean', defaultValue: false}, | |
25 | 26 | {name: 'fileprefix', type: 'string'}, |
26 | 27 | {name: 'fileformat', type: 'string'}, |
27 | 28 | {name: 'fileformatTT', type: 'string'}, |
... | ... | @@ -29,7 +30,7 @@ Ext.define('amdaModel.Download', { |
29 | 30 | {name: 'compressionTT', type: 'string'} |
30 | 31 | ], |
31 | 32 | |
32 | - propertiesToCopy : 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT', | |
33 | + propertiesToCopy : 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,scientificformat,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT', | |
33 | 34 | |
34 | 35 | getJsonValues : function(){ |
35 | 36 | |
... | ... | @@ -42,6 +43,7 @@ Ext.define('amdaModel.Download', { |
42 | 43 | myValues.structure = this.get('structure'); |
43 | 44 | myValues.refparamSampling = this.get('refparamSampling'); |
44 | 45 | myValues.separateInfoFile = this.get('separateInfoFile'); |
46 | + myValues.scientificformat = this.get('scientificformat'); | |
45 | 47 | myValues.sampling = this.get('sampling'); |
46 | 48 | myValues.fileprefix = this.get('fileprefix'); |
47 | 49 | |
... | ... |
js/app/models/InteractiveNode.js
... | ... | @@ -487,16 +487,16 @@ Ext.define('amdaModel.InteractiveNode', { |
487 | 487 | else |
488 | 488 | paramName = node.get('id'); |
489 | 489 | } |
490 | -// var component_info = node.get('component_info'); | |
491 | -// if (component_info && component_info.parentId) { | |
492 | -// //It's a component | |
493 | -// paramName = component_info.parentId; | |
494 | -// components = []; | |
495 | -// if (component_info.index1) | |
496 | -// components['index1'] = component_info.index1; | |
497 | -// if (component_info.index2) | |
498 | -// components['index2'] = component_info.index2; | |
499 | -// } | |
490 | + var component_info = node.get('component_info'); | |
491 | + if (component_info && component_info.parentId) { | |
492 | + //It's a component | |
493 | + paramName = component_info.parentId; | |
494 | + components = []; | |
495 | + if (component_info.index1) | |
496 | + components['index1'] = component_info.index1; | |
497 | + if (component_info.index2) | |
498 | + components['index2'] = component_info.index2; | |
499 | + } | |
500 | 500 | module.addParam(paramName,true,node.get('needsArgs'),components); |
501 | 501 | }); |
502 | 502 | }, |
... | ... |
js/app/models/PlotObjects/PlotParamObject.js
... | ... | @@ -97,7 +97,7 @@ Ext.define('amdaPlotObj.PlotParamObject', { |
97 | 97 | if (this.get('param-drawing-object') != null) |
98 | 98 | { |
99 | 99 | this.get('param-drawing-object').setDefaultValues(); |
100 | - if (this.get('param-drawing-object').loadFromData && drawData) | |
100 | + if (this.get('param-drawing-object').loadFromData && drawData && (type == drawData.type)) | |
101 | 101 | this.get('param-drawing-object').loadFromData(drawData); |
102 | 102 | } |
103 | 103 | }, |
... | ... | @@ -204,4 +204,4 @@ Ext.define('amdaPlotObj.PlotParamObject', { |
204 | 204 | |
205 | 205 | return paramValues; |
206 | 206 | } |
207 | -}); | |
208 | 207 | \ No newline at end of file |
208 | +}); | |
... | ... |
js/app/views/DownloadUI.js
... | ... | @@ -7,8 +7,7 @@ |
7 | 7 | * @author Myriam |
8 | 8 | * @version $Id: DownloadUI.js 2622 2014-11-07 14:50:09Z elena $ |
9 | 9 | */ |
10 | - | |
11 | - | |
10 | + | |
12 | 11 | Ext.define('amdaUI.DownloadUI', { |
13 | 12 | extend: 'Ext.container.Container', |
14 | 13 | alias: 'widget.panelDownload', |
... | ... | @@ -18,12 +17,14 @@ Ext.define('amdaUI.DownloadUI', { |
18 | 17 | 'amdaUI.ParamArgumentsPlug', |
19 | 18 | 'amdaUI.SendToSampButtonUI', |
20 | 19 | 'amdaModel.DownloadParam' |
21 | - ], | |
22 | - | |
20 | + ], | |
21 | + | |
23 | 22 | //Old kernel time formats |
24 | 23 | //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 | 24 | //New kernel time formats |
26 | - timeformatData : [['Y-m-dTH:i:s', 'YYYY-MM-DDThh:mm:ss'], ['DD Time', 'DD Time'], ['Timestamp', 'Timestamp']], | |
25 | + timeformatData : [['YYYY-MM-DDThh:mm:ss', 'YYYY-MM-DDThh:mm:ss.ms', 'ISO format with msecs'], | |
26 | + ['DD Time', 'YYYYDOYhhmmssms', 'Day-Of-Year, 1 Jan : DOY = 0'], | |
27 | + ['Timestamp', 'Seconds from 1970', 'Total of seconds from the Unix Epoch on January 1st, 1970 at UTC.']], | |
27 | 28 | timeformatTTData : [['Y-m-dTH:i:s', 'YYYY-MM-DDThh:mm:ss']], |
28 | 29 | fileformatData : [['ASCII', 'ASCII'],['vot', 'VOTable'],['cdf', 'CDF'],['json', 'JSON']], |
29 | 30 | fileformatTTData : [['text', 'plain text'], ['vot','VOTable']], |
... | ... | @@ -121,8 +122,9 @@ Ext.define('amdaUI.DownloadUI', { |
121 | 122 | var pos = this.paramGrid.store.getCount(); |
122 | 123 | this.paramGrid.store.insert(pos,r); |
123 | 124 | this.paramGrid.getView().refresh(); |
124 | - //if (!isLeaf || needArgs) | |
125 | - //this.editParameterArgs(r); | |
125 | + | |
126 | + if (needArgs) | |
127 | + this.editParameterArgs(r); | |
126 | 128 | }, |
127 | 129 | |
128 | 130 | addParams: function(arrayParams) |
... | ... | @@ -199,8 +201,8 @@ Ext.define('amdaUI.DownloadUI', { |
199 | 201 | |
200 | 202 | // data download |
201 | 203 | if (downloadSrc === 0) |
202 | - { | |
203 | - var timeformat = basicForm.findField('timeformat').getRawValue(); | |
204 | + { | |
205 | + var timeformat = values.timeformat; | |
204 | 206 | var timeSource = this.timeSelector.getActiveTimeSource(); |
205 | 207 | var structure = values.filestructure; |
206 | 208 | var sampling = values.sampling ? values.sampling : 600; |
... | ... | @@ -455,7 +457,7 @@ Ext.define('amdaUI.DownloadUI', { |
455 | 457 | var component_info = data.records[0].get('component_info'); |
456 | 458 | if (component_info && component_info.parentId) |
457 | 459 | { |
458 | - if ( component_info.index1 && component_info.index2 ) | |
460 | + if ( component_info.index1 || component_info.index2 ) | |
459 | 461 | { |
460 | 462 | idToSent = component_info.parentId; |
461 | 463 | components = []; |
... | ... | @@ -552,7 +554,12 @@ Ext.define('amdaUI.DownloadUI', { |
552 | 554 | }); |
553 | 555 | |
554 | 556 | this.TTGrid.on('cellclick', this.actionItem, this); |
555 | - | |
557 | + | |
558 | + var store = new Ext.data.ArrayStore({ | |
559 | + fields: ['id', 'name', 'qtip'], | |
560 | + data: this.timeformatData | |
561 | + }); | |
562 | + | |
556 | 563 | this.paramPanel = { |
557 | 564 | xtype: 'container', |
558 | 565 | title: 'Parameters', |
... | ... | @@ -596,12 +603,22 @@ Ext.define('amdaUI.DownloadUI', { |
596 | 603 | type: 'vbox', |
597 | 604 | align: 'stretch' |
598 | 605 | }, |
599 | - items: [ | |
600 | - { | |
601 | - fieldLabel: 'Time Format', | |
602 | - name: 'timeformat', | |
603 | - store: this.timeformatData, | |
604 | - value: this.timeformatData[0] | |
606 | + items: [ | |
607 | + { | |
608 | + fieldLabel: 'Time Format', | |
609 | + name: 'timeformat', | |
610 | + valueField: 'id', | |
611 | + displayField: 'name', | |
612 | + queryMode: 'local', | |
613 | + store: store, | |
614 | + listConfig: { | |
615 | + tpl: [ | |
616 | + '<tpl for=".">', | |
617 | + '<li class="x-boundlist-item" data-qtip="{qtip}">{name}</li>', | |
618 | + '</tpl>' | |
619 | + ] | |
620 | + }, | |
621 | + value: store.first() | |
605 | 622 | }, |
606 | 623 | { |
607 | 624 | fieldLabel: 'File Structure', |
... | ... | @@ -635,6 +652,11 @@ Ext.define('amdaUI.DownloadUI', { |
635 | 652 | disabled: true |
636 | 653 | }, |
637 | 654 | { |
655 | + xtype : 'checkbox', boxLabel: 'Scientific floating-point formatting', | |
656 | + boxLabelAlign: 'before', | |
657 | + name: 'scientificformat', checked: false | |
658 | + }, | |
659 | + { | |
638 | 660 | xtype: 'textfield', name: 'fileprefix', |
639 | 661 | fieldLabel: 'File Prefix', |
640 | 662 | disabled: false, editable: true |
... | ... |
js/app/views/PlotComponents/PlotPanelForm.js
... | ... | @@ -49,7 +49,6 @@ Ext.define('amdaPlotComp.PlotPanelForm', { |
49 | 49 | |
50 | 50 | //Instant time visibility |
51 | 51 | var instantTimeField = this.getForm().findField('panel-instant-time'); |
52 | - console.log(this.up().up().up().up()); | |
53 | 52 | instantTimeField.setVisible(plotType == 'instantPlot'); |
54 | 53 | |
55 | 54 | //Options in relation with the layout |
... | ... | @@ -152,4 +151,4 @@ Ext.define('amdaPlotComp.PlotPanelForm', { |
152 | 151 | this.addStandardFieldSet('Ticks Bars', '', tickItems) |
153 | 152 | ]; |
154 | 153 | } |
155 | -}); | |
156 | 154 | \ No newline at end of file |
155 | +}); | |
... | ... |