diff --git a/js/app/models/Download.js b/js/app/models/Download.js index 31e7c5b..6182e6c 100644 --- a/js/app/models/Download.js +++ b/js/app/models/Download.js @@ -79,7 +79,8 @@ Ext.define('amdaModel.Download', { { name: 'fileformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.fileformatTT }, { name: 'compression', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filecompress }, { name: 'compressionTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filecompressTT }, - { name: 'last_update', type: 'int', defaultValue: 0 } + { name: 'last_update', type: 'int', defaultValue: 0 }, + { name: 'description', type: 'string', defaultValue: '' }, ], associations: [{ @@ -145,6 +146,7 @@ Ext.define('amdaModel.Download', { myValues.scientificformat = this.get('scientificformat'); myValues.sampling = this.get('sampling'); myValues.fileprefix = this.get('fileprefix'); + myValues.description =this.get('description'); myValues.timesrc = this.get('timesrc'); // if there's at least one timeTable in case of Download data diff --git a/js/app/models/PlotObjects/PlotRequestObject.js b/js/app/models/PlotObjects/PlotRequestObject.js index a216cd0..87c9ac8 100644 --- a/js/app/models/PlotObjects/PlotRequestObject.js +++ b/js/app/models/PlotObjects/PlotRequestObject.js @@ -34,6 +34,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { {name: 'file-format', type: 'string'}, {name: 'file-output', type: 'string'}, {name: 'file-prefix', type: 'string'}, + {name: 'description', type: 'string'}, {name: 'one-file-per-interval', type: 'boolean'}, {name: 'tree-full-view', type: 'boolean'}, @@ -161,6 +162,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { this.set('file-format', amdaPlotObj.PlotObjectConfig.defaultValues.file.format); this.set('file-output', amdaPlotObj.PlotObjectConfig.defaultValues.file.output); this.set('file-prefix', ''); + this.set('description',''); this.set('one-file-per-interval', amdaPlotObj.PlotObjectConfig.defaultValues.file.oneFilePerInterval); this.set('name', ''); @@ -242,6 +244,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { requestValues['file-format'] = this.get('file-format'); requestValues['file-output'] = this.get('file-output'); requestValues['file-prefix'] = this.get('file-prefix'); + requestValues['description'] = this.get('description'); requestValues['one-file-per-interval'] = this.get('one-file-per-interval'); requestValues['tree-full-view'] = this.get('tree-full-view'); diff --git a/js/app/views/DownloadUI.js b/js/app/views/DownloadUI.js index 870e392..f92476d 100644 --- a/js/app/views/DownloadUI.js +++ b/js/app/views/DownloadUI.js @@ -642,6 +642,22 @@ Ext.define('amdaUI.DownloadUI', { fields: ['id', 'name', 'qtip'], data: amdaModel.DownloadConfig.timeformatData }); + + var descriptionCase = { + xtype:'panel', + resizable:true, + height: 120, + margin:'5 0 5 0', + bodyStyle: {background: '#dfe8f6',padding: '1', }, + border:false, + layout:'fit', + items:[{ + xtype: 'textarea', + name: 'description', + emptyText:'Description' + }] + }; + this.paramPanel = new Ext.container.Container({ title: 'Parameters', layout: { @@ -663,7 +679,8 @@ Ext.define('amdaUI.DownloadUI', { xtype: 'splitter', flex: 0.05 }, - this.paramGrid + this.paramGrid, + descriptionCase, ] }, { diff --git a/js/app/views/PlotComponents/PlotTabContent.js b/js/app/views/PlotComponents/PlotTabContent.js index 848c9dc..62a4b87 100644 --- a/js/app/views/PlotComponents/PlotTabContent.js +++ b/js/app/views/PlotComponents/PlotTabContent.js @@ -188,6 +188,8 @@ Ext.define('amdaPlotComp.PlotTabContent', { updateUI : function() { this.plotOutput.setObject(this.plotNode.get('object')); + var descField = Ext.getCmp('plot_description'); + descField.setValue(this.plotNode.get('object').get('description')); this.timeSelector.intervalSel.setInterval(this.plotNode.get('object').get('startDate'), this.plotNode.get('object').get('stopDate')); this.timeSelector.intervalSel.updateStop(); this.timeSelector.setTTTab(this.plotNode.get('object').get('timeTables')); @@ -210,9 +212,21 @@ Ext.define('amdaPlotComp.PlotTabContent', { this.plotTabPanel = config.plotTabPanel; this.timeSelector = new amdaUI.TimeSelectorUI( { id: Ext.id()/*'plotTimeSelectorTab' + this.plotNode.id*/, border : false, flex: 6, collapsible: true, collapseDirection : 'bottom'} ); - this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 11}); + this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 12}); this.treePlot = new amdaPlotComp.PlotTree({flex: 11, plotElementPanel: this.plotElement}); - this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 6, collapseDirection : 'bottom', collapsible : true }); + this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 8, collapseDirection : 'bottom', collapsible : true }); + this.descriptionCase = { + xtype:'fieldset', + title:'Request description', + collapsible:true, + collapsed:true, + flex:3, + bodyStyle: {background: '#dfe8f6',padding: '1', }, + border:false, + layout:'fit', + items:[{ xtype: 'textarea', name: 'description', + id:'plot_description',emptyText:'Description'}] + }; var treePanel = new Ext.form.Panel({ flex: 1, @@ -244,7 +258,8 @@ Ext.define('amdaPlotComp.PlotTabContent', { }, items: [ this.plotElement, - this.plotOutput + this.plotOutput, + this.descriptionCase ] }); diff --git a/php/classes/RequestMgr.php b/php/classes/RequestMgr.php index 53227fe..1e53384 100644 --- a/php/classes/RequestMgr.php +++ b/php/classes/RequestMgr.php @@ -379,6 +379,7 @@ class RequestMgr extends AmdaObjectMgr switch ($this->type) { case 'request': $info .= "Plot: "; + $description = $obj->description; $panels_list = array(); if (!empty($obj->panels)) { foreach ($obj->panels as $p) { @@ -410,6 +411,9 @@ class RequestMgr extends AmdaObjectMgr else { $info .= "Empty"; } + if(!empty($description)){ + $info .= '<br/>Description: '.$description; + } break; case 'condition': $info .= "Data Mining: ".htmlspecialchars($obj->expression); @@ -417,6 +421,7 @@ class RequestMgr extends AmdaObjectMgr case 'download': $info .= "Download: "; $params_list = array(); + $description = $obj->description; if (!empty($obj->list)) { foreach ($obj->list as $p) { if (!in_array($p->paramid, $params_list)) @@ -429,6 +434,9 @@ class RequestMgr extends AmdaObjectMgr else { $info .= "Empty"; } + if(!empty($description)){ + $info .= '<br/>Description: '.$description; + } break; case 'statistic': $info .= "Statistic: "; -- libgit2 0.21.2