diff --git a/js/app/models/AliasNode.js b/js/app/models/AliasNode.js index aff762d..3e9ec68 100644 --- a/js/app/models/AliasNode.js +++ b/js/app/models/AliasNode.js @@ -6,32 +6,25 @@ * @brief Basic Model of Node corresponding to an alias * @author Myriam * @version $Id: AliasNode.js 2615 2014-10-23 15:03:48Z myriam $ - * @todo - ******************************************************************************* - * FT Id : Date : Name - Description - ******************************************************************************* - * : :14/10/2011: Myriam - file creation */ Ext.define('amdaModel.AliasNode', { - extend: 'amdaModel.InteractiveNode', - - statics: { - nodeType: 'alias', - objectName: 'Alias', - deletedAliases : null - }, + extend: 'amdaModel.InteractiveNode', + + statics: { + nodeType: 'alias', + objectName: 'Alias', + deletedAliases : null + }, fields: [ {name: 'isScatter', type: 'boolean', defaultValue: true} ], - constructor : function(config){ - - this.callParent(arguments); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); - this.set('nodeType',amdaModel.AliasNode.nodeType); + constructor : function(config) + { + this.callParent(arguments); if (this.get('leaf')) this.set('iconCls', 'icon-scalar'); }, diff --git a/js/app/models/BkgJobNode.js b/js/app/models/BkgJobNode.js index dace07b..5563bd6 100644 --- a/js/app/models/BkgJobNode.js +++ b/js/app/models/BkgJobNode.js @@ -31,7 +31,7 @@ Ext.define('amdaModel.BkgJobNode', { RES_ROOT_NODE: { PLOT: 'resPlot-treeRootNode', CONDITION: 'resSearch-treeRootNode', - DOWNLOAD: 'resDown-treeRootNode', + DOWNLOAD: 'resDown-treeRootNode', STATISTICS: 'resStatistics-treeRootNode' }, STATUS_LIST: { @@ -43,24 +43,22 @@ Ext.define('amdaModel.BkgJobNode', { fields: [ // name, id, moduleId, object> from parent { name : 'jobType', type : 'string' }, - { name : 'processId', type : 'string' }, - { name : 'status', type : 'string' }, + { name : 'processId', type : 'string' }, + { name : 'status', type : 'string' }, { name : 'percentDone', type : 'string', defaultValue : '0' }, - { name : 'start', type: 'date' }, - // { name : 'duration', type: 'int' , defaultValue: -1} - { name : 'stop', type: 'date', defaultValue: null }, + { name : 'start', type: 'date' }, + // { name : 'duration', type: 'int' , defaultValue: -1} + { name : 'stop', type: 'date', defaultValue: null }, { name : 'rawname', type: 'string'}, { name : 'tabId', type: 'string'}, { name : 'info', type: 'string'} - ], constructor : function(config){ this.callParent(arguments); this.set('ownerTreeId', amdaUI.ExplorerUI.JOB_TAB.TREE_ID); - this.set('nodeType', amdaModel.BkgJobNode.nodeType); - + if (this.isLeaf()) { switch (this.get('status')) { case amdaModel.BkgJobNode.STATUS_LIST.ERROR: diff --git a/js/app/models/CatalogNode.js b/js/app/models/CatalogNode.js index a33173b..c6fbf49 100644 --- a/js/app/models/CatalogNode.js +++ b/js/app/models/CatalogNode.js @@ -9,21 +9,20 @@ Ext.define('amdaModel.CatalogNode', { - extend: 'amdaModel.TimeTableNode', + extend: 'amdaModel.TimeTableNode', - statics: { - nodeType: 'catalog', - objectName: 'Catalog' - }, + statics: { + nodeType: 'catalog', + objectName: 'Catalog' + }, - constructor : function(config){// - this.callParent(arguments); - this.set('nodeType',amdaModel.CatalogNode.nodeType); - this.set('moduleId',myDesktopApp.dynamicModules.catalog.id); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); - this.set('objectDataModel',amdaModel.Catalog.$className); - if (this.get('leaf')) this.set('iconCls', 'icon-catalog'); - }, + constructor : function(config) + { + this.callParent(arguments) + this.set('moduleId',myDesktopApp.dynamicModules.catalog.id); + this.set('objectDataModel',amdaModel.Catalog.$className); + if (this.get('leaf')) this.set('iconCls', 'icon-catalog'); + }, localMenuItems : function() { var menuItems = @@ -62,6 +61,13 @@ Ext.define('amdaModel.CatalogNode', { }*/]; return menuItems; + }, + + ttDownload : function() { + alert('NOT IMPLEMENTED YET'); + }, + + downloadMulti: function() { + alert('NOT IMPLEMENTED YET'); } - }); diff --git a/js/app/models/DerivedParamNode.js b/js/app/models/DerivedParamNode.js index 4393a87..0139291 100644 --- a/js/app/models/DerivedParamNode.js +++ b/js/app/models/DerivedParamNode.js @@ -6,12 +6,6 @@ * @brief Model of Node corresponding to a derived parameter * @author CDA * @version $Id: DerivedParamNode.js 2544 2014-10-03 10:21:56Z elena $ - * @todo - ******************************************************************************* - * FT Id : Date : Name - Description - ******************************************************************************* - * : :08/06/2011: CDA - Migration extjs4 - * : :09/06/2011: elena - all generic methods are now of InteractiveNode class */ Ext.define('amdaModel.DerivedParamNode', { @@ -28,13 +22,11 @@ Ext.define('amdaModel.DerivedParamNode', { ], constructor : function(config){ - this.callParent(arguments); - - this.set('nodeType',amdaModel.DerivedParamNode.nodeType); + this.callParent(arguments); this.set('moduleId',myDesktopApp.dynamicModules.param.id); this.set('objectDataModel',amdaModel.Parameter.$className); this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); - if (this.get('leaf')) this.set('iconCls', 'icon-scalar'); + if (this.get('leaf')) this.set('iconCls', 'icon-scalar'); }, localMenuItems : function() { diff --git a/js/app/models/DownloadNode.js b/js/app/models/DownloadNode.js index bd9fb50..10206b3 100644 --- a/js/app/models/DownloadNode.js +++ b/js/app/models/DownloadNode.js @@ -14,14 +14,14 @@ Ext.define('amdaModel.DownloadNode', { singleton: true, - fields: [ {name : 'downloadType', type : 'string'}, - {name: 'object', type: 'object'}, - {name: 'realLinkedNode', type: 'amdaModel.AmdaNode'}, - {name: 'moduleId', type: 'string', defaultValue:'down-win'}, - {name: 'nodeType', type: 'string', defaultValue: 'download'}, - {name: 'objectDataModel', type: 'string', defaultValue:'amdaModel.Download'}, - {name: 'jobNode', type: 'string', defaultValue: 'amdaModel.BkgJobNode'} - ], + fields:[{name : 'downloadType', type : 'string'}, + {name: 'object', type: 'object'}, + {name: 'realLinkedNode', type: 'amdaModel.AmdaNode'}, + {name: 'moduleId', type: 'string', defaultValue:'down-win'}, + {name: 'nodeType', type: 'string', defaultValue: 'download'}, + {name: 'objectDataModel', type: 'string', defaultValue:'amdaModel.Download'}, + {name: 'jobNode', type: 'string', defaultValue: 'amdaModel.BkgJobNode'} + ], isExecutable: function(){ return true; diff --git a/js/app/models/ExecutableNode.js b/js/app/models/ExecutableNode.js index 0407de8..2b2ebee 100644 --- a/js/app/models/ExecutableNode.js +++ b/js/app/models/ExecutableNode.js @@ -24,7 +24,8 @@ Ext.define('amdaModel.ExecutableNode', { statics: { jobTreeLoaded : false }, constructor : function(config) { - this.callParent(arguments); + this.callParent(arguments); + this.set('ownerTreeId',amdaUI.ExplorerUI.OPE_TAB.TREE_ID); this.set('jobNode', amdaModel.BkgJobNode.$className); }, diff --git a/js/app/models/InteractiveNode.js b/js/app/models/InteractiveNode.js index ded9d7d..158482b 100644 --- a/js/app/models/InteractiveNode.js +++ b/js/app/models/InteractiveNode.js @@ -82,7 +82,9 @@ Ext.define('amdaModel.InteractiveNode', { constructor : function(config) { - this.callParent(arguments); + this.callParent(arguments); + this.set('nodeType',this.self.nodeType); + this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); // if id of this node have root category suffix if (Ext.util.Format.substr(this.get('id'), -(amdaUI.ExplorerUI.CAT_SUFFIX.length), this.get('id').length) === amdaUI.ExplorerUI.CAT_SUFFIX) { diff --git a/js/app/models/LocalParamNode.js b/js/app/models/LocalParamNode.js index afe6e10..4e5ca4a 100644 --- a/js/app/models/LocalParamNode.js +++ b/js/app/models/LocalParamNode.js @@ -39,9 +39,7 @@ Ext.define('amdaModel.LocalParamNode', this.set('allowDrop', true); this.set('moduleId',myDesktopApp.dynamicModules.param.id); this.set('objectDataModel',amdaModel.Parameter.$className); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); - this.set('nodeType',amdaModel.LocalParamNode.nodeType); - + // if future missions or 'depending on mission' if (this.get('globalStart')) { var now = Ext.Date.format(new Date(), 'Y/m/d'); diff --git a/js/app/models/MyDataNode.js b/js/app/models/MyDataNode.js index fc38a68..9d76cf9 100644 --- a/js/app/models/MyDataNode.js +++ b/js/app/models/MyDataNode.js @@ -17,26 +17,24 @@ Ext.define('amdaModel.MyDataNode', { extend: 'amdaModel.InteractiveNode', + statics:{ + nodeType: 'myData' + }, + fields: [ {name: 'globalStart', type: 'string', persist: false}, {name: 'globalStop', type: 'string', persist: false} ], + dependentRootNodeId : 'myDataParam-treeRootNode', + constructor : function(config){ this.callParent(arguments); this.set('moduleId',myDesktopApp.dynamicModules.my_data.id); this.set('objectDataModel','amdaModel.FileObject'); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); - this.set('nodeType',amdaModel.MyDataNode.nodeType); - }, - - statics:{ - nodeType: 'myData' }, - - dependentRootNodeId : 'myDataParam-treeRootNode', - + localMenuItems : function() { var menuItems = [{ diff --git a/js/app/models/MyDataParamNode.js b/js/app/models/MyDataParamNode.js index 69bc238..ff3591d 100644 --- a/js/app/models/MyDataParamNode.js +++ b/js/app/models/MyDataParamNode.js @@ -13,33 +13,31 @@ Ext.define('amdaModel.MyDataParamNode', { - extend: 'amdaModel.InteractiveNode', - - fields : [ // { name : 'linkedFile', persist: false}, - { name : 'linkedMask', persist: false}, - { name : 'fileObject', persist: false}, - { name : 'size', persist: false}, - { name : 'isSpectra', type: 'boolean', defaultValue: false, persist: false } - ], + extend: 'amdaModel.InteractiveNode', + + fields : [ // { name : 'linkedFile', persist: false}, + { name : 'linkedMask', persist: false}, + { name : 'fileObject', persist: false}, + { name : 'size', persist: false}, + { name : 'isSpectra', type: 'boolean', defaultValue: false, persist: false } + ], - statics:{ - nodeType: 'myDataParam', - objectName : 'Parameter' - }, + statics:{ + nodeType: 'myDataParam', + objectName : 'Parameter' + }, - constructor : function(config){ + constructor : function(config) + { this.callParent(arguments); this.set('moduleId',myDesktopApp.dynamicModules.my_data.id); - this.set('objectDataModel','amdaModel.FileParamObject'); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); - this.set('nodeType',amdaModel.MyDataParamNode.nodeType); + this.set('objectDataModel','amdaModel.FileParamObject'); if (this.get('isParameter')) { if (this.get('size') == 1) this.set('iconCls', 'icon-scalar'); else this.set('iconCls', 'icon-unknowntype'); } //TODO this.set('iconCls', 'icon-vector'); - if (this.get('isSpectra')) this.set('iconCls', 'icon-spectra'); - + if (this.get('isSpectra')) this.set('iconCls', 'icon-spectra'); }, localMenuItems : function() { diff --git a/js/app/models/PlotNode.js b/js/app/models/PlotNode.js index 2002258..9afe8ac 100644 --- a/js/app/models/PlotNode.js +++ b/js/app/models/PlotNode.js @@ -6,11 +6,6 @@ * @brief Basic Model of Node corresponding to a plot request * @author Caroline DARMON * @version $Id: $ - * @todo - ******************************************************************************* - * FT Id : Date : Name - Description - ******************************************************************************* - * : :08/09/2011: CDA - file creation */ Ext.define('amdaModel.PlotNode', { @@ -19,16 +14,13 @@ Ext.define('amdaModel.PlotNode', { statics: { nodeType: 'request' - // objectName: 'Plot Request', }, - constructor : function(config){ - + constructor : function(config) + { this.callParent(arguments); this.set('moduleId',myDesktopApp.dynamicModules.plot.id); this.set('objectDataModel',amdaModel.Plot.$className); - this.set('ownerTreeId',amdaUI.ExplorerUI.OPE_TAB.TREE_ID); - this.set('nodeType',amdaModel.PlotNode.nodeType); }, allMenuItems : function() { diff --git a/js/app/models/RemoteParamNode.js b/js/app/models/RemoteParamNode.js index 4a77bfe..6e38f05 100644 --- a/js/app/models/RemoteParamNode.js +++ b/js/app/models/RemoteParamNode.js @@ -12,14 +12,17 @@ Ext.define('amdaModel.RemoteParamNode', { extend: 'amdaModel.LocalParamNode', + statics:{ + nodeType: 'remoteParam' + }, + fields: [ {name: 'isRemoteDataSet', type:'boolean', persist: false, defaultValue: false}, {name: 'isSimulation', type:'boolean', defaultValue: false} ], constructor : function(config){ - this.callParent(arguments); - this.set('nodeType',amdaModel.RemoteParamNode.nodeType); + this.callParent(arguments); //TODO only for INTEROPER TREE if (!this.get('leaf')) this.set('allowDrag', false); if (this.get('isParameter')) this.set('allowDrag',true); @@ -30,10 +33,7 @@ Ext.define('amdaModel.RemoteParamNode', { } }, - statics:{ - nodeType: 'remoteParam' - }, - + allMenuItems : function() { var menuItems = [{ diff --git a/js/app/models/RemoteSimuParamNode.js b/js/app/models/RemoteSimuParamNode.js index 8fe616d..130e510 100644 --- a/js/app/models/RemoteSimuParamNode.js +++ b/js/app/models/RemoteSimuParamNode.js @@ -12,6 +12,10 @@ Ext.define('amdaModel.RemoteSimuParamNode', { extend: 'amdaModel.LocalParamNode', + statics:{ + nodeType: 'remoteSimuParam' + }, + requires: 'amdaUI.InteropImpexUI', fields: [ @@ -23,10 +27,9 @@ Ext.define('amdaModel.RemoteSimuParamNode', { ], constructor : function(config){ - this.callParent(arguments); - this.set('nodeType',amdaModel.RemoteSimuParamNode.nodeType); + this.callParent(arguments); if (this.get('isParameter')) this.set('needsArgs',this.get('needsArgs')); - if (this.get('leaf') && this.get('isSpectra')) this.set('iconCls', 'icon-spectra'); + if (this.get('leaf') && this.get('isSpectra')) this.set('iconCls', 'icon-spectra'); if (this.get('disable')) { this.set('cls', 'icon-disabled'); this.set('allowDrag', false); @@ -48,10 +51,7 @@ Ext.define('amdaModel.RemoteSimuParamNode', { } }, - statics:{ - nodeType: 'remoteSimuParam' - }, - + allMenuItems : function() { var menuItems = [ { diff --git a/js/app/models/SearchNode.js b/js/app/models/SearchNode.js index 0762b4a..90e42db 100644 --- a/js/app/models/SearchNode.js +++ b/js/app/models/SearchNode.js @@ -6,11 +6,6 @@ * @brief Basic Model of Node corresponding to a amda condition * @author * @version $Id: SearchNode.js 1739 2013-09-09 14:47:10Z myriam $ - * @todo - ******************************************************************************* - * FT Id : Date : Name - Description - ******************************************************************************* - * : :23/06/2011: myriam - Migration extjs4 */ Ext.define('amdaModel.SearchNode', { @@ -21,15 +16,12 @@ Ext.define('amdaModel.SearchNode', { nodeType: 'condition' }, - constructor : function(config){ - + constructor : function(config) + { this.callParent(arguments); this.set('moduleId',myDesktopApp.dynamicModules.search.id); - this.set('objectDataModel',amdaModel.Search.$className); - this.set('ownerTreeId',amdaUI.ExplorerUI.OPE_TAB.TREE_ID); - this.set('nodeType',amdaModel.SearchNode.nodeType); - this.set('resultModel',amdaModel.TimeTable.$className); - + this.set('objectDataModel',amdaModel.Search.$className); + this.set('resultModel',amdaModel.TimeTable.$className); }, allMenuItems : function() { diff --git a/js/app/models/StatisticsNode.js b/js/app/models/StatisticsNode.js index dce3b2e..1143770 100644 --- a/js/app/models/StatisticsNode.js +++ b/js/app/models/StatisticsNode.js @@ -2,39 +2,28 @@ * Project : AMDA-NG * Name : StatisticsNode.js * @class amdaModel.StatisticsNode - * @extends amdaModel.TimeTableNode + * @extends amdaModel.ExecutableNode * @brief Basic Model of Node corresponding to a amda statistics operation * @author elena */ Ext.define('amdaModel.StatisticsNode', { - extend: 'amdaModel.ExecutableNode', + extend: 'amdaModel.ExecutableNode', + + singleton: true, + + fields: [ + {name: 'downloadType', type : 'string'}, + {name: 'object', type: 'object'}, + {name: 'realLinkedNode', type: 'amdaModel.AmdaNode'}, + {name: 'moduleId', type: 'string', defaultValue:'statistics-win'}, + {name: 'nodeType', type: 'string', defaultValue: 'statistics'}, + {name: 'objectDataModel', type: 'string', defaultValue:'amdaModel.Statistics'}, + {name: 'jobNode', type: 'string', defaultValue: 'amdaModel.BkgJobNode'} + ], - singleton: true, - - - fields: [ {name : 'downloadType', type : 'string'}, - {name: 'object', type: 'object'}, - {name: 'realLinkedNode', type: 'amdaModel.AmdaNode'}, - {name: 'moduleId', type: 'string', defaultValue:'statistics-win'}, - {name: 'nodeType', type: 'string', defaultValue: 'statistics'}, - {name: 'objectDataModel', type: 'string', defaultValue:'amdaModel.Statistics'}, - {name: 'jobNode', type: 'string', defaultValue: 'amdaModel.BkgJobNode'} - ], - - isExecutable: function(){ - return true; - } - /*, - - constructor : function(config){// - this.callParent(arguments); - this.set('nodeType',amdaModel.StatisticsNode.nodeType); - this.set('moduleId',myDesktopApp.dynamicModules.statistics.id); - this.set('ownerTreeId',amdaUI.ExplorerUI.OPE_TAB.TREE_ID); - this.set('objectDataModel',amdaModel.Statistics.$className); -// if (this.get('leaf')) this.set('iconCls', 'icon-catalog'); - } - */ + isExecutable: function(){ + return true; + } }); diff --git a/js/app/models/TimeTableNode.js b/js/app/models/TimeTableNode.js index 3d50811..8f218fb 100644 --- a/js/app/models/TimeTableNode.js +++ b/js/app/models/TimeTableNode.js @@ -6,12 +6,6 @@ * @brief Basic Model of Node corresponding to a amda Time Table * @author * @version $Id: TimeTableNode.js 1904 2013-11-25 12:42:02Z elena $ - * @todo - ******************************************************************************* - * FT Id : Date : Name - Description - ******************************************************************************* - * : :08/06/2011: CDA - Migration extjs4 - * : :09/06/2011: elena - all generic methods are now of InteractiveNode class */ Ext.define('amdaModel.TimeTableNode', { @@ -23,17 +17,16 @@ Ext.define('amdaModel.TimeTableNode', { objectName: 'Time Table' }, - constructor : function(config){ + constructor : function(config) + { this.callParent(arguments); - - this.set('nodeType',amdaModel.TimeTableNode.nodeType); - this.set('moduleId',myDesktopApp.dynamicModules.tt.id);//'timetab-win'); - this.set('objectDataModel','amdaModel.TimeTable'); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); + this.set('moduleId',myDesktopApp.dynamicModules.tt.id); + this.set('objectDataModel','amdaModel.TimeTable'); if (this.get('leaf')) this.set('iconCls', 'icon-timetable'); }, - localMenuItems : function() { + localMenuItems : function() + { var menuItems = [/*{ fnId : 'dire-shareNode', diff --git a/js/app/models/sharedTimeTableNode.js b/js/app/models/sharedTimeTableNode.js index 78ed5ea..12b4de0 100644 --- a/js/app/models/sharedTimeTableNode.js +++ b/js/app/models/sharedTimeTableNode.js @@ -6,12 +6,6 @@ * @brief Basic Model of Node corresponding to a amda Time Table * @author * @version $Id: sharedTimeTableNode.js 1916 2013-11-26 10:58:49Z elena $ - * @todo - ******************************************************************************* - * FT Id : Date : Name - Description - ******************************************************************************* - * : :08/06/2011: CDA - Migration extjs4 - * : :09/06/2011: elena - all generic methods are now of InteractiveNode class */ Ext.define('amdaModel.sharedTimeTableNode', { @@ -19,17 +13,14 @@ Ext.define('amdaModel.sharedTimeTableNode', { extend: 'amdaModel.InteractiveNode', statics: { - nodeType: 'sharedtimeTable', + nodeType: 'sharedtimeTable', objectName: 'Time Table' }, constructor : function(config){ this.callParent(arguments); - - this.set('nodeType',amdaModel.sharedTimeTableNode.nodeType); - this.set('moduleId',myDesktopApp.dynamicModules.tt.id);//'timetab-win'); - this.set('objectDataModel','amdaModel.TimeTable'); - this.set('ownerTreeId',amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); + this.set('moduleId',myDesktopApp.dynamicModules.tt.id); + this.set('objectDataModel','amdaModel.TimeTable'); if (this.get('leaf')) this.set('iconCls', 'icon-timetable'); }, -- libgit2 0.21.2