Commit 4affe9609a0b330b409a94ed767adda3974711b5
1 parent
01a239de
Exists in
FER_10852
All done.
Showing
5 changed files
with
50 additions
and
5 deletions
Show diff stats
js/app/models/Download.js
... | ... | @@ -79,7 +79,8 @@ Ext.define('amdaModel.Download', { |
79 | 79 | { name: 'fileformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.fileformatTT }, |
80 | 80 | { name: 'compression', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filecompress }, |
81 | 81 | { name: 'compressionTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filecompressTT }, |
82 | - { name: 'last_update', type: 'int', defaultValue: 0 } | |
82 | + { name: 'last_update', type: 'int', defaultValue: 0 }, | |
83 | + { name: 'description', type: 'string', defaultValue: '' }, | |
83 | 84 | ], |
84 | 85 | |
85 | 86 | associations: [{ |
... | ... | @@ -145,6 +146,7 @@ Ext.define('amdaModel.Download', { |
145 | 146 | myValues.scientificformat = this.get('scientificformat'); |
146 | 147 | myValues.sampling = this.get('sampling'); |
147 | 148 | myValues.fileprefix = this.get('fileprefix'); |
149 | + myValues.description =this.get('description'); | |
148 | 150 | |
149 | 151 | myValues.timesrc = this.get('timesrc'); |
150 | 152 | // if there's at least one timeTable in case of Download data |
... | ... |
js/app/models/PlotObjects/PlotRequestObject.js
... | ... | @@ -34,6 +34,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { |
34 | 34 | {name: 'file-format', type: 'string'}, |
35 | 35 | {name: 'file-output', type: 'string'}, |
36 | 36 | {name: 'file-prefix', type: 'string'}, |
37 | + {name: 'description', type: 'string'}, | |
37 | 38 | {name: 'one-file-per-interval', type: 'boolean'}, |
38 | 39 | |
39 | 40 | {name: 'tree-full-view', type: 'boolean'}, |
... | ... | @@ -161,6 +162,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { |
161 | 162 | this.set('file-format', amdaDefaultValues.plot.file.format); |
162 | 163 | this.set('file-output', amdaDefaultValues.plot.file.output); |
163 | 164 | this.set('file-prefix', ''); |
165 | + this.set('description',''); | |
164 | 166 | this.set('one-file-per-interval', amdaDefaultValues.plot.file.oneFilePerInterval); |
165 | 167 | this.set('name', ''); |
166 | 168 | |
... | ... | @@ -242,6 +244,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { |
242 | 244 | requestValues['file-format'] = this.get('file-format'); |
243 | 245 | requestValues['file-output'] = this.get('file-output'); |
244 | 246 | requestValues['file-prefix'] = this.get('file-prefix'); |
247 | + requestValues['description'] = this.get('description'); | |
245 | 248 | requestValues['one-file-per-interval'] = this.get('one-file-per-interval'); |
246 | 249 | |
247 | 250 | requestValues['tree-full-view'] = this.get('tree-full-view'); |
... | ... |
js/app/views/DownloadUI.js
... | ... | @@ -642,6 +642,22 @@ Ext.define('amdaUI.DownloadUI', { |
642 | 642 | fields: ['id', 'name', 'qtip'], |
643 | 643 | data: amdaModel.DownloadConfig.timeformatData |
644 | 644 | }); |
645 | + | |
646 | + var descriptionCase = { | |
647 | + xtype:'panel', | |
648 | + resizable:true, | |
649 | + height: 120, | |
650 | + margin:'5 0 5 0', | |
651 | + bodyStyle: {background: '#dfe8f6',padding: '1', }, | |
652 | + border:false, | |
653 | + layout:'fit', | |
654 | + items:[{ | |
655 | + xtype: 'textarea', | |
656 | + name: 'description', | |
657 | + emptyText:'Description' | |
658 | + }] | |
659 | + }; | |
660 | + | |
645 | 661 | this.paramPanel = new Ext.container.Container({ |
646 | 662 | title: 'Parameters', |
647 | 663 | layout: { |
... | ... | @@ -663,7 +679,8 @@ Ext.define('amdaUI.DownloadUI', { |
663 | 679 | xtype: 'splitter', |
664 | 680 | flex: 0.05 |
665 | 681 | }, |
666 | - this.paramGrid | |
682 | + this.paramGrid, | |
683 | + descriptionCase, | |
667 | 684 | ] |
668 | 685 | }, |
669 | 686 | { |
... | ... |
js/app/views/PlotComponents/PlotTabContent.js
... | ... | @@ -188,6 +188,8 @@ Ext.define('amdaPlotComp.PlotTabContent', { |
188 | 188 | |
189 | 189 | updateUI : function() { |
190 | 190 | this.plotOutput.setObject(this.plotNode.get('object')); |
191 | + var descField = Ext.getCmp('plot_description'); | |
192 | + descField.setValue(this.plotNode.get('object').get('description')); | |
191 | 193 | this.timeSelector.intervalSel.setInterval(this.plotNode.get('object').get('startDate'), this.plotNode.get('object').get('stopDate')); |
192 | 194 | this.timeSelector.intervalSel.updateStop(); |
193 | 195 | this.timeSelector.setTTTab(this.plotNode.get('object').get('timeTables')); |
... | ... | @@ -210,9 +212,21 @@ Ext.define('amdaPlotComp.PlotTabContent', { |
210 | 212 | this.plotTabPanel = config.plotTabPanel; |
211 | 213 | |
212 | 214 | this.timeSelector = new amdaUI.TimeSelectorUI( { id: Ext.id()/*'plotTimeSelectorTab' + this.plotNode.id*/, border : false, flex: 6, collapsible: true, collapseDirection : 'bottom'} ); |
213 | - this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 11}); | |
215 | + this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 12}); | |
214 | 216 | this.treePlot = new amdaPlotComp.PlotTree({flex: 11, plotElementPanel: this.plotElement}); |
215 | - this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 6, collapseDirection : 'bottom', collapsible : true }); | |
217 | + this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 8, collapseDirection : 'bottom', collapsible : true }); | |
218 | + this.descriptionCase = { | |
219 | + xtype:'fieldset', | |
220 | + title:'Request description', | |
221 | + collapsible:true, | |
222 | + collapsed:true, | |
223 | + flex:3, | |
224 | + bodyStyle: {background: '#dfe8f6',padding: '1', }, | |
225 | + border:false, | |
226 | + layout:'fit', | |
227 | + items:[{ xtype: 'textarea', name: 'description', | |
228 | + id:'plot_description',emptyText:'Description'}] | |
229 | + }; | |
216 | 230 | |
217 | 231 | var treePanel = new Ext.form.Panel({ |
218 | 232 | flex: 1, |
... | ... | @@ -244,7 +258,8 @@ Ext.define('amdaPlotComp.PlotTabContent', { |
244 | 258 | }, |
245 | 259 | items: [ |
246 | 260 | this.plotElement, |
247 | - this.plotOutput | |
261 | + this.plotOutput, | |
262 | + this.descriptionCase | |
248 | 263 | ] |
249 | 264 | }); |
250 | 265 | |
... | ... |
php/classes/RequestMgr.php
... | ... | @@ -379,6 +379,7 @@ class RequestMgr extends AmdaObjectMgr |
379 | 379 | switch ($this->type) { |
380 | 380 | case 'request': |
381 | 381 | $info .= "Plot: "; |
382 | + $description = $obj->description; | |
382 | 383 | $panels_list = array(); |
383 | 384 | if (!empty($obj->panels)) { |
384 | 385 | foreach ($obj->panels as $p) { |
... | ... | @@ -410,6 +411,9 @@ class RequestMgr extends AmdaObjectMgr |
410 | 411 | else { |
411 | 412 | $info .= "Empty"; |
412 | 413 | } |
414 | + if(!empty($description)){ | |
415 | + $info .= '<br/>Description: '.$description; | |
416 | + } | |
413 | 417 | break; |
414 | 418 | case 'condition': |
415 | 419 | $info .= "Data Mining: ".htmlspecialchars($obj->expression); |
... | ... | @@ -417,6 +421,7 @@ class RequestMgr extends AmdaObjectMgr |
417 | 421 | case 'download': |
418 | 422 | $info .= "Download: "; |
419 | 423 | $params_list = array(); |
424 | + $description = $obj->description; | |
420 | 425 | if (!empty($obj->list)) { |
421 | 426 | foreach ($obj->list as $p) { |
422 | 427 | if (!in_array($p->paramid, $params_list)) |
... | ... | @@ -429,6 +434,9 @@ class RequestMgr extends AmdaObjectMgr |
429 | 434 | else { |
430 | 435 | $info .= "Empty"; |
431 | 436 | } |
437 | + if(!empty($description)){ | |
438 | + $info .= '<br/>Description: '.$description; | |
439 | + } | |
432 | 440 | break; |
433 | 441 | case 'statistic': |
434 | 442 | $info .= "Statistic: "; |
... | ... |