Merged
Merge Request #41 · created by Erdogan Furkan


9628 - Resolution du download


From 9628 into develop

Merged by Benjamin Renard

Source branch has been removed
2 participants

05 Jul, 2022

1 commit


04 Jul, 2022

1 commit


js/app/models/Download.js
@@ -19,7 +19,7 @@ Ext.define('amdaModel.DownloadConfig', { @@ -19,7 +19,7 @@ Ext.define('amdaModel.DownloadConfig', {
19 fileformatTT: 'text', 19 fileformatTT: 'text',
20 filecompress: 'tar+gzip', 20 filecompress: 'tar+gzip',
21 filecompressTT: 'tar+gzip', 21 filecompressTT: 'tar+gzip',
22 - filestructure: '2' 22 + filestructure: '0'
23 }, 23 },
24 24
25 timeformatData: [ 25 timeformatData: [
@@ -69,7 +69,7 @@ Ext.define('amdaModel.Download', { @@ -69,7 +69,7 @@ Ext.define('amdaModel.Download', {
69 { name: 'timeformat', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformat }, 69 { name: 'timeformat', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformat },
70 { name: 'timeformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformatTT }, 70 { name: 'timeformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformatTT },
71 { name: 'filestructure', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filestructure }, 71 { name: 'filestructure', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filestructure },
72 - { name: 'refparamSampling', type: 'boolean', defaultValue: false }, 72 + { name: 'refparamSampling', type: 'boolean', defaultValue: true },
73 { name: 'separateInfoFile', type: 'boolean', defaultValue: false }, 73 { name: 'separateInfoFile', type: 'boolean', defaultValue: false },
74 { name: 'sampling', type: 'float', defaultValue: '600' }, 74 { name: 'sampling', type: 'float', defaultValue: '600' },
75 { name: 'scientificformat', type: 'boolean', defaultValue: true }, 75 { name: 'scientificformat', type: 'boolean', defaultValue: true },
@@ -89,7 +89,7 @@ Ext.define('amdaModel.Download', { @@ -89,7 +89,7 @@ Ext.define('amdaModel.Download', {
89 89
90 propertiesToCopy: 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,scientificformat,list,timeformat,timeformatTT,filestructure,fileprefix,fileformat,fileformatTT,compression,compressionTT', 90 propertiesToCopy: 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,scientificformat,list,timeformat,timeformatTT,filestructure,fileprefix,fileformat,fileformatTT,compression,compressionTT',
91 91
92 - constructor: function() { 92 + constructor: function () {
93 var me = this; 93 var me = this;
94 me.callParent(arguments); 94 me.callParent(arguments);
95 if ((arguments.length > 0) && arguments[0]) { 95 if ((arguments.length > 0) && arguments[0]) {
@@ -99,9 +99,9 @@ Ext.define('amdaModel.Download', { @@ -99,9 +99,9 @@ Ext.define('amdaModel.Download', {
99 this.dirty = false; 99 this.dirty = false;
100 }, 100 },
101 101
102 - loadParams: function(params) { 102 + loadParams: function (params) {
103 /* Compatability mode */ 103 /* Compatability mode */
104 - Ext.each(params, function(param, index) { 104 + Ext.each(params, function (param, index) {
105 if (param.hasOwnProperty('is-init')) { 105 if (param.hasOwnProperty('is-init')) {
106 return; 106 return;
107 } 107 }
@@ -116,20 +116,20 @@ Ext.define('amdaModel.Download', { @@ -116,20 +116,20 @@ Ext.define('amdaModel.Download', {
116 this.params().loadData(params); 116 this.params().loadData(params);
117 }, 117 },
118 118
119 - isDirty: function() { 119 + isDirty: function () {
120 if (this.dirty) 120 if (this.dirty)
121 return true; 121 return true;
122 122
123 var d = false; 123 var d = false;
124 124
125 - this.params().each(function(param, index) { 125 + this.params().each(function (param, index) {
126 if (param.dirty) 126 if (param.dirty)
127 d = true; 127 d = true;
128 }); 128 });
129 return d; 129 return d;
130 }, 130 },
131 131
132 - getJsonValues: function() { 132 + getJsonValues: function () {
133 133
134 var myValues = new Object(); 134 var myValues = new Object();
135 myValues.nodeType = 'download'; //amdaModel.DownloadNode.nodeType; 135 myValues.nodeType = 'download'; //amdaModel.DownloadNode.nodeType;
@@ -152,7 +152,7 @@ Ext.define('amdaModel.Download', { @@ -152,7 +152,7 @@ Ext.define('amdaModel.Download', {
152 var timeTables = this.get('timeTables'); // init an empty array for timeTables 152 var timeTables = this.get('timeTables'); // init an empty array for timeTables
153 myValues.timeTables = []; 153 myValues.timeTables = [];
154 // for each interval record 154 // for each interval record
155 - Ext.Array.each(timeTables, function(item, index, all) { 155 + Ext.Array.each(timeTables, function (item, index, all) {
156 // get Json simplified value 156 // get Json simplified value
157 if (!item.$className) { 157 if (!item.$className) {
158 myValues.timeTables[index] = { timeTableName: item.timeTableName, id: item.id }; 158 myValues.timeTables[index] = { timeTableName: item.timeTableName, id: item.id };
@@ -174,7 +174,7 @@ Ext.define('amdaModel.Download', { @@ -174,7 +174,7 @@ Ext.define('amdaModel.Download', {
174 174
175 // if there's at least one parameter 175 // if there's at least one parameter
176 myValues.list = [] 176 myValues.list = []
177 - this.params().each(function(param, index) { 177 + this.params().each(function (param, index) {
178 myValues.list[index] = param.getJsonValues(); 178 myValues.list[index] = param.getJsonValues();
179 }); 179 });
180 myValues.fileformat = this.get('fileformat'); 180 myValues.fileformat = this.get('fileformat');
@@ -188,7 +188,7 @@ Ext.define('amdaModel.Download', { @@ -188,7 +188,7 @@ Ext.define('amdaModel.Download', {
188 var list = this.get('timeTables'); 188 var list = this.get('timeTables');
189 myValues.list = []; 189 myValues.list = [];
190 190
191 - Ext.each(list, function(item, index) { 191 + Ext.each(list, function (item, index) {
192 var tt = new Object(); 192 var tt = new Object();
193 tt.name = item.get('name'); 193 tt.name = item.get('name');
194 tt.id = item.get('id'); 194 tt.id = item.get('id');
@@ -203,7 +203,7 @@ Ext.define('amdaModel.Download', { @@ -203,7 +203,7 @@ Ext.define('amdaModel.Download', {
203 else { 203 else {
204 myValues.list = []; 204 myValues.list = [];
205 if (this.get('list') && this.get('list').length) 205 if (this.get('list') && this.get('list').length)
206 - Ext.each(this.get('list'), function(item, index) { 206 + Ext.each(this.get('list'), function (item, index) {
207 var image = new Object(); 207 var image = new Object();
208 image.name = item['name']; 208 image.name = item['name'];
209 image.url = item['url']; 209 image.url = item['url'];