Commit 229c9223d33ce5a13793468fe5d2f8480cd096b3

Authored by Benjamin Renard
2 parents bb366693 42863f42

Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM

generic_data/jobs.json
1 1 {"nodes": [
2   - {"nodeType" : "bkgWorks", "text" : "Finished Jobs / Results", "id" : "result-treeRootNode", "children" :
  2 + {"nodeType" : "bkgWorks", "text" : "Finished Jobs / Results", "id" : "result-treeBase", "children" :
3 3 [{"nodeType" : "bkgWorks","text" : "Plot","id" : "resPlot-treeRootNode" },
4 4 {"nodeType" : "bkgWorks","text" : "Download","id" : "resDown-treeRootNode"},
5 5 {"nodeType" : "bkgWorks","text" : "Data Mining","id" : "resSearch-treeRootNode"},
6 6 {"nodeType" : "bkgWorks","text" : "Statistics","id" : "resStatistics-treeRootNode"}
7 7 ]
8 8 },
9   - {"nodeType" : "bkgWorks", "text" : "Jobs in Progress", "id" : "bkgjobs-treeRootNode", "children" :
  9 + {"nodeType" : "bkgWorks", "text" : "Jobs in Progress", "id" : "bkgjobs-treeBase", "children" :
10 10 [{"nodeType" : "bkgWorks","text" : "Plot","id" : "bkgPlot-treeRootNode" },
11 11 {"nodeType" : "bkgWorks","text" : "Download","id" : "bkgDown-treeRootNode"},
12 12 {"nodeType" : "bkgWorks","text" : "Data Mining","id" : "bkgSearch-treeRootNode"},
... ...
help/cdfTimeFormat
... ... @@ -6,7 +6,7 @@
6 6 <ul>
7 7 <li> EPOCH
8 8 <li> EPOCH16
9   - <li> <i>TBD : T2000</i>
  9 + <li> T2000
10 10 </ul>
11 11  
12 12  
... ...
js/app/controllers/ExplorerModule.js
... ... @@ -109,6 +109,7 @@ Ext.define(&#39;amdaDesktop.ExplorerModule&#39;,
109 109 title: 'Log',
110 110 id: 'LogPanel',
111 111 collapsible: true,
  112 + collapseMode: 'header',
112 113 iconCls: 'icon-align-left',
113 114 region: 'south',
114 115 split: true,
... ...
js/app/models/AmdaNode.js
... ... @@ -5,193 +5,197 @@
5 5 * @extends Ext.data.Model
6 6 * @brief Generic Model of Node for AMDA project
7 7 * @author CDA
8   - * @version $Id: AmdaNode.js 2544 2014-10-03 10:21:56Z elena $
9   - * @todo
10   - *******************************************************************************
11   - * FT Id : Date : Name - Description
12   - *******************************************************************************
13   - * : :08/06/2011: CDA - Migration extjs4
14 8 */
15 9 Ext.define('amdaModel.AmdaNode', {
16   - extend: 'Ext.data.TreeModel',
17   -
18   - requires: ['amdaReader.ExplorerReader'],
19   -
20   - fields: [
21   - {name: 'leaf', type: 'boolean'},
22   - {name: 'nodeType',type:'string'},
23   - {name: 'id', type: 'string'},
24   - {name:'text',type: 'string'},
25   - {name:'info',type: 'string'},
26   - {name: 'help', type: 'string', defaultValue: ''},
27   - {name:'rootNode', persist: false},
28   - {name: 'ownerTreeId', persist: false},
29   - {name: 'ownerTree', persist: false},
30   - {name: 'checked', defaultValue: null, persist: false}
31   - ],
32   -
33   - statics : {
34   - NEW_DIR_NAME : 'new Folder',
35   - MULTI_PREFIX : 'mult'
36   - },
37   -
38   - /**
39   - * @cfg proxy used to load nodes
40   - */
41   - proxy: {
42   - type: 'direct',
43   - // directFn: AmdaAction.getTree,
44   - api :
45   - {
46   - read: AmdaAction.getTree,
47   - update: AmdaAction.saveTree,
48   - create: AmdaAction.saveTree,
49   - destroy: AmdaAction.doNothing
  10 + extend: 'Ext.data.TreeModel',
  11 +
  12 + requires: ['amdaReader.ExplorerReader'],
  13 +
  14 + fields: [
  15 + {name: 'leaf', type: 'boolean'},
  16 + {name: 'nodeType',type:'string'},
  17 + {name: 'id', type: 'string'},
  18 + {name:'text',type: 'string'},
  19 + {name:'info',type: 'string'},
  20 + {name: 'help', type: 'string', defaultValue: ''},
  21 + {name:'rootNode', persist: false},
  22 + {name: 'ownerTreeId', persist: false},
  23 + {name: 'ownerTree', persist: false},
  24 + {name: 'checked', defaultValue: null, persist: false}
  25 + ],
  26 +
  27 + statics : {
  28 + NEW_DIR_NAME : 'new Folder',
  29 + MULTI_PREFIX : 'mult'
50 30 },
51   - paramsAsHash : true,
52   - reader: {
53   - type: 'explorer'
54   - }
55   - },
56   -
57   - /**
58   - * Abstract getter of complete array of item context menu
59   - * @return {Ext.Array} the complete array of item context menu
60   - */
61   - getAllContextMenuItems: Ext.emptyFn,
62   -
63   - /**
64   - * Abstract method call on click on item of context menu
65   - */
66   - onMenuItemClick: Ext.emptyFn,
67   -
68   - /**
69   - * Abstract Update Data method
70   - */
71   - update : Ext.emptyFn,
72   -
73   - /**
74   - * Abstract Rename Data method
75   - */
76   - rename : Ext.emptyFn,
77   -
78   - /**
79   - * Abstract Rename D&D Data method
80   - */
81   - renameDD : Ext.emptyFn,
82   -
83   - /**
84   - * Abstract Create Data method
85   - */
86   - create : Ext.emptyFn,
87   -
88   - /**
89   - * filtering method of context menu
90   - * @param {String} itemKind the kind of right clicked node
91   - * @return {Ext.Array} the Array of filtered item menu
92   - */
93   - getFilteredContextMenu : function(itemKind) {
94   - var menuitems = this.getAllContextMenuItems();
95   - if (menuitems && menuitems.length){
96   - for ( var i = 0; i < menuitems.length; i++) {
97   - var currentItem = menuitems[i];
98   - var myItemKind = Ext.util.Format.substr(currentItem.fnId, 0, 4);
99   - if (myItemKind === itemKind) {
100   - currentItem.hidden = false;
101   - }
102   - else {
103   - currentItem.hidden = true;
104   - }
105   - }
106   - return menuitems;
107   - } else {
108   - return null;
109   - }
110   - },
111   -
112   - getMultiContextMenu : function(){
113   - var menuitems = this.getMultiContextMenuItems();
114   - if (menuitems && menuitems.length){
115   - return menuitems;
116   - } else {
117   - return null;
118   - }
119   - },
120   -
121   - /**
122   - * get the kind of this node
123   - * @returns itemKind string
124   - */
125   - getNodeKind : function() {
126   - var itemKind;
127   - // if id of this node have root subcategory suffix
128   - if (this.id && Ext.util.Format.substr(this.id, -(amdaUI.ExplorerUI.ROOT_SUFFIX.length), this.id.length) === amdaUI.ExplorerUI.ROOT_SUFFIX ) {
129   - itemKind = amdaUI.ExplorerUI.ITEM_KIND_ROOT;
130   - }
131   - // if this node is a leaf and have no child
132   - else if (this.isLeaf()) {
133   - itemKind = amdaUI.ExplorerUI.ITEM_KIND_LEAF;
134   - }
135   - else if (this.get('isParameter')) {
136   - itemKind = amdaUI.ExplorerUI.ITEM_KIND_PARA;
137   - }
138   - else if (this.get('rank')) {
139   - itemKind = amdaUI.ExplorerUI.ITEM_KIND_MISS;
140   - }
141   - // other case
142   - else {
143   - itemKind = amdaUI.ExplorerUI.ITEM_KIND_DIRE;
144   - }
145   - return itemKind;
  31 +
  32 + /**
  33 + * @cfg proxy used to load nodes
  34 + */
  35 + proxy: {
  36 + type: 'direct',
  37 + api :
  38 + {
  39 + read: AmdaAction.getTree,
  40 + update: AmdaAction.saveTree,
  41 + create: AmdaAction.saveTree,
  42 + destroy: AmdaAction.doNothing
  43 + },
  44 + paramsAsHash : true,
  45 + reader: {
  46 + type: 'explorer'
  47 + }
  48 + },
  49 +
  50 + /**
  51 + * Abstract getter of complete array of item context menu
  52 + * @return {Ext.Array} the complete array of item context menu
  53 + */
  54 + getAllContextMenuItems: Ext.emptyFn,
  55 +
  56 + /**
  57 + * Abstract method call on click on item of context menu
  58 + */
  59 + onMenuItemClick: Ext.emptyFn,
  60 +
  61 + /**
  62 + * Abstract Update Data method
  63 + */
  64 + update : Ext.emptyFn,
  65 +
  66 + /**
  67 + * Abstract Rename Data method
  68 + */
  69 + rename : Ext.emptyFn,
  70 +
  71 + /**
  72 + * Abstract Rename D&D Data method
  73 + */
  74 + renameDD : Ext.emptyFn,
  75 +
  76 + /**
  77 + * Abstract Create Data method
  78 + */
  79 + create : Ext.emptyFn,
  80 +
  81 + /**
  82 + * filtering method of context menu
  83 + * @param {String} itemKind the kind of right clicked node
  84 + * @return {Ext.Array} the Array of filtered item menu
  85 + */
  86 + getFilteredContextMenu : function(itemKind) {
  87 + var menuitems = this.getAllContextMenuItems();
  88 +
  89 + var realmenuitems = 0;
  90 + if (menuitems && menuitems.length){
  91 + for ( var i = 0; i < menuitems.length; i++) {
  92 + var currentItem = menuitems[i];
  93 + var myItemKind = Ext.util.Format.substr(currentItem.fnId, 0, 4);
  94 + if (myItemKind === itemKind) {
  95 + realmenuitems ++;
  96 + currentItem.hidden = false;
  97 + }
  98 + else {
  99 + currentItem.hidden = true;
  100 + }
  101 + }
  102 + if ( realmenuitems == 0 )
  103 + return null;
  104 +
  105 + return menuitems;
  106 + } else {
  107 + return null;
  108 + }
  109 + },
  110 +
  111 + getMultiContextMenu : function(){
  112 + var menuitems = this.getMultiContextMenuItems();
  113 + if (menuitems && menuitems.length){
  114 + return menuitems;
  115 + } else {
  116 + return null;
  117 + }
  118 + },
  119 +
  120 + /**
  121 + * get the kind of this node
  122 + * @returns itemKind string
  123 + */
  124 + getNodeKind : function() {
  125 + var itemKind;
  126 + // if id of this node have root subcategory suffix
  127 + if (this.id && Ext.util.Format.substr(this.id, -(amdaUI.ExplorerUI.ROOT_SUFFIX.length), this.id.length) === amdaUI.ExplorerUI.ROOT_SUFFIX ) {
  128 + itemKind = amdaUI.ExplorerUI.ITEM_KIND_ROOT;
  129 + }
  130 + // if this node is a leaf and have no child
  131 + else if (this.isLeaf()) {
  132 + itemKind = amdaUI.ExplorerUI.ITEM_KIND_LEAF;
  133 + }
  134 + else if (this.get('isParameter')) {
  135 + itemKind = amdaUI.ExplorerUI.ITEM_KIND_PARA;
  136 + }
  137 + else if (this.get('rank')) {
  138 + itemKind = amdaUI.ExplorerUI.ITEM_KIND_MISS;
  139 + }
  140 + // base
  141 + else if (this.id && Ext.util.Format.substr(this.id, -(amdaUI.ExplorerUI.CAT_SUFFIX.length), this.id.length) === amdaUI.ExplorerUI.CAT_SUFFIX ) {
  142 + itemKind = amdaUI.ExplorerUI.ITEM_KIND_BASE;
  143 + }
  144 + // other case
  145 + else {
  146 + itemKind = amdaUI.ExplorerUI.ITEM_KIND_DIRE;
  147 + }
  148 +
  149 + return itemKind;
  150 + },
  151 +
  152 + /**
  153 + * Getter on context menu of this node
  154 + * @returns {Ext.menu.Menu} the contextMenu of this node
  155 + */
  156 + getContextMenuItems : function() {
  157 + // set the node kind
  158 + var itemKind = this.getNodeKind();
  159 + // filter the global context menu by node kind
  160 + var menuItems = this.getFilteredContextMenu(itemKind);
  161 + // return the context menu for this node
  162 + return menuItems;
  163 + },
  164 +
  165 + getContextMenuMultiItems : function() {
  166 + return this.getMultiContextMenu();
  167 + },
  168 +
  169 + /**
  170 + * Method to retrieve the root node corresponding to the nodeType of this node
  171 + * @return {amdaModel.AmdaNode} the root node of category of this node
  172 + */
  173 + getRootNode : function() {
  174 + if (!this.get('rootNode')) {
  175 + // if this node is the root of its category
  176 + if(this.getNodeKind() == amdaUI.ExplorerUI.ITEM_KIND_ROOT) {
  177 + this.set('rootNode',this);
  178 + } else {
  179 + // get resources tree panel
  180 + var tree = this.myGetOwnerTree();
  181 + var treeRoot = tree.getRootNode();
  182 + var rootNodeId = this.get('nodeType')+amdaUI.ExplorerUI.ROOT_SUFFIX;
  183 +
  184 + this.set('rootNode',treeRoot.findChild( 'id', rootNodeId, true));
  185 + }
  186 + }
  187 + return this.get('rootNode');
146 188 },
147 189  
148   - /**
149   - * Getter on context menu of this node
150   - * @returns {Ext.menu.Menu} the contextMenu of this node
151   - */
152   - getContextMenuItems : function() {
153   - // set the node kind
154   - var itemKind = this.getNodeKind();
155   - // filter the global context menu by node kind
156   - var menuItems = this.getFilteredContextMenu(itemKind);
157   - // return the context menu for this node
158   - return menuItems;
159   - },
160   -
161   - getContextMenuMultiItems : function() {
162   - return this.getMultiContextMenu();
163   - },
164   -
165   - /**
166   - * Method to retrieve the root node corresponding to the nodeType of this node
167   - * @return {amdaModel.AmdaNode} the root node of category of this node
168   - */
169   - getRootNode : function() {
170   - if (!this.get('rootNode')) {
171   - // if this node is the root of its category
172   - if(this.getNodeKind() == amdaUI.ExplorerUI.ITEM_KIND_ROOT) {
173   - this.set('rootNode',this);
174   - } else {
175   - // get resources tree panel
176   - var tree = this.myGetOwnerTree();
177   - var treeRoot = tree.getRootNode();
178   - var rootNodeId = this.get('nodeType')+amdaUI.ExplorerUI.ROOT_SUFFIX;
179   -
180   - this.set('rootNode',treeRoot.findChild( 'id', rootNodeId, true));
181   - }
182   - }
183   - return this.get('rootNode');
184   - },
185   -
186   - /**
187   - * getter on ownerTree (use ownerTreeId property)
188   - * @return {Ext.tree.Panel} the tree which contains this node
189   - */
190   - myGetOwnerTree : function() {
191   - if (!this.get('ownerTree')) {
192   - this.set('ownerTree',Ext.getCmp(this.get('ownerTreeId')));
193   - }
194   - return this.get('ownerTree');
195   - }
  190 + /**
  191 + * getter on ownerTree (use ownerTreeId property)
  192 + * @return {Ext.tree.Panel} the tree which contains this node
  193 + */
  194 + myGetOwnerTree : function() {
  195 + if (!this.get('ownerTree')) {
  196 + this.set('ownerTree',Ext.getCmp(this.get('ownerTreeId')));
  197 + }
  198 + return this.get('ownerTree');
  199 + }
196 200  
197 201 });
... ...
js/app/views/CatalogUI.js
... ... @@ -607,6 +607,7 @@ Ext.define(&#39;amdaUI.CatalogUI&#39;, {
607 607 region: 'south',
608 608 title: 'Information',
609 609 collapsible: true,
  610 + collapseMode: 'header',
610 611 height: 100,
611 612 autoHide: false,
612 613 bodyStyle: 'padding:5px',
... ...
js/app/views/DownloadUI.js
... ... @@ -768,6 +768,7 @@ Ext.define(&#39;amdaUI.DownloadUI&#39;, {
768 768 region: 'south',
769 769 title: 'Information',
770 770 collapsible: true,
  771 + collapseMode: 'header',
771 772 height: 100,
772 773 autoHide: false,
773 774 bodyStyle: 'padding:5px',
... ...
js/app/views/ExplorerUI.js
... ... @@ -96,7 +96,8 @@ Ext.define(&#39;amdaUI.ExplorerUI&#39;, {
96 96 CAT_SUFFIX: '-treeBase',
97 97 ROOT_SUFFIX: '-treeRootNode',
98 98 SUB_ROOT_SUFFIX : 'RootNode',
99   -
  99 +
  100 + ITEM_KIND_BASE : 'base',
100 101 ITEM_KIND_ROOT : 'root',
101 102 ITEM_KIND_LEAF : 'leaf',
102 103 ITEM_KIND_DIRE : 'dire',
... ... @@ -677,7 +678,7 @@ Ext.define(&#39;amdaUI.ExplorerUI&#39;, {
677 678 {
678 679 case 'info' :
679 680 myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function (module) {
680   - module.createWindow(record.get('help'), record.get('info'));
  681 + module.createWindow(record.get('help'), record.get('text'));
681 682 });
682 683 break;
683 684 }
... ...
js/app/views/FiltersUI.js
... ... @@ -1110,7 +1110,8 @@ Ext.define(&#39;amdaUI.FiltersUI&#39;, {
1110 1110 xtype: 'panel',
1111 1111 region: 'south',
1112 1112 title: 'Information',
1113   - collapsible: true,
  1113 + collapsible: true,
  1114 + collapseMode: 'header',
1114 1115 height: 103,
1115 1116 autoHide: false,
1116 1117 iconCls: 'icon-information',
... ...
js/app/views/MyDataUI.js
... ... @@ -836,6 +836,7 @@ Ext.define(&#39;amdaUI.MyDataUI&#39;, {
836 836 region: 'south',
837 837 title: 'Information',
838 838 collapsible: true,
  839 + collapseMode: 'header',
839 840 height: 100,
840 841 autoHide: false,
841 842 iconCls: 'icon-information',
... ...
js/app/views/ParameterUI.js
... ... @@ -544,6 +544,7 @@ Ext.define(&#39;amdaUI.ParameterUI&#39;,
544 544 xtype: 'panel', region: 'south',
545 545 title: 'Information',
546 546 collapsible: true,
  547 + collapseMode: 'header',
547 548 height: 100,
548 549 autoHide: false,
549 550 iconCls: 'icon-information',
... ...
js/app/views/PlotUI.js
... ... @@ -317,6 +317,7 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
317 317 region: 'south',
318 318 title: 'Information',
319 319 collapsible: true,
  320 + collapseMode: 'header',
320 321 height: 100,
321 322 autoHide: false,
322 323 bodyStyle: 'padding:5px',
... ...
js/app/views/SearchUI.js
... ... @@ -603,6 +603,7 @@ Ext.define(&#39;amdaUI.SearchUI&#39;,
603 603 xtype: 'panel', region: 'south',
604 604 title: 'Information',
605 605 collapsible: true,
  606 + collapseMode: 'header',
606 607 height: 100,
607 608 autoHide: false,
608 609 iconCls: 'icon-information',
... ...
js/app/views/StatisticsUI.js
... ... @@ -441,6 +441,7 @@ Ext.define(&#39;amdaUI.StatisticsUI&#39;,
441 441 region: 'south',
442 442 title: 'Information',
443 443 collapsible: true,
  444 + collapseMode: 'header',
444 445 height: 100,
445 446 autoHide: false,
446 447 bodyStyle: 'padding:5px',
... ...
js/app/views/TimeTableOperationUI.js
... ... @@ -6,10 +6,6 @@
6 6 * @brief Time Table Operations Module UI definition (View)
7 7 * @author Myriam
8 8 * @version $Id: TimeTableOperationUI.js 1937 2013-11-27 14:42:41Z myriam $
9   - ********************************************************************************
10   - * FT Id : Date : Name - Description
11   - *******************************************************************************
12   - * 01/09/2011: Myriam - Migration extjs4
13 9 */
14 10  
15 11 Ext.define('amdaUI.TimeTableOperationUI', {
... ... @@ -286,19 +282,20 @@ Ext.define(&#39;amdaUI.TimeTableOperationUI&#39;, {
286 282 ]
287 283 },
288 284 {
289   - xtype: 'panel',
290   - title: 'Information',
291   - region: 'south',
292   - height: 100,
293   - collapsible: true,
294   - layout: 'fit',
295   - autoHide: false,
296   - iconCls: 'icon-information',
297   - bodyStyle: 'padding:5px',
298   - loader: {
299   - autoLoad: true,
300   - url: helpDir+'ttOperationsHOWTO'
301   - }
  285 + xtype: 'panel',
  286 + title: 'Information',
  287 + region: 'south',
  288 + height: 100,
  289 + collapsible: true,
  290 + collapseMode: 'header',
  291 + layout: 'fit',
  292 + autoHide: false,
  293 + iconCls: 'icon-information',
  294 + bodyStyle: 'padding:5px',
  295 + loader: {
  296 + autoLoad: true,
  297 + url: helpDir+'ttOperationsHOWTO'
  298 + }
302 299 }
303 300 ]
304 301 };
... ...
js/app/views/TimeTableUI.js
... ... @@ -743,7 +743,8 @@ Ext.define(&#39;amdaUI.TimeTableUI&#39;, {
743 743 {
744 744 xtype: 'panel', region: 'south',
745 745 title: 'Information',
746   - collapsible: true,
  746 + collapsible: true,
  747 + collapseMode: 'header',
747 748 height: 100,
748 749 autoHide: false,
749 750 iconCls: 'icon-information',
... ...
js/app/views/UploadUI.js
... ... @@ -42,6 +42,7 @@ Ext.define(&#39;amdaUI.UploadUI&#39;, {
42 42 region: 'south',
43 43 title: 'Information',
44 44 collapsible: true,
  45 + collapseMode: 'header',
45 46 height: 100,
46 47 autoHide: false,
47 48 iconCls: 'icon-information',
... ...
js/app/views/VisuUI.js
... ... @@ -581,6 +581,7 @@ Ext.define(&#39;amdaUI.VisuUI&#39;, {
581 581 region: 'south',
582 582 title: 'Information',
583 583 collapsible: true,
  584 + collapseMode: 'header',
584 585 height: 100,
585 586 autoHide: false,
586 587 bodyStyle: 'padding:5px',
... ...
js/resources/css/amda.css
... ... @@ -151,7 +151,7 @@ Custom tool typ icons
151 151 }
152 152  
153 153 .ux-rangemenu-eq {
154   - background-image: url(../images/16x16//equals.png) !important;
  154 + background-image: url(../images/16x16/equals.png) !important;
155 155 }
156 156 /*
157 157 .icon-kill {
... ... @@ -202,13 +202,13 @@ background-image: url(../images/16x16/error.png) !important;
202 202 background-repeat: no-repeat;
203 203 }
204 204  
205   -.icon-addRsrc {
206   - background-image:url( ../images/32x32/1309360076_misc_22.png ) !important;
207   -}
  205 +/*.icon-addRsrc {*/
  206 + /*background-image:url( ../images/32x32/1309360076_misc_22.png ) !important;*/
  207 +/*}*/
208 208  
209   -.icon-removeRsrc {
210   - background-image:url( ../images/32x32/1309360153_misc_21.png ) !important;
211   -}
  209 +/*.icon-removeRsrc {*/
  210 + /*background-image:url( ../images/32x32/1309360153_misc_21.png ) !important;*/
  211 +/*}*/
212 212  
213 213 .plotPanelBgColor td {
214 214 color: black!important;
... ... @@ -239,38 +239,48 @@ background-image: url(../images/16x16/error.png) !important;
239 239 background-color: yellow !important;
240 240 }
241 241  
  242 +/* datasets information windows */
242 243  
243   -.infoWindow ul {
244   - margin-left: 20px;
245   - list-style-type: disc;
  244 +.infoWindow table.contact {
  245 + margin: -3px;
246 246 }
247 247  
248   -.infoWindow li {
249   - list-style-type: disc;
  248 +.infoWindow table.contact tr td:first-child {
  249 + vertical-align:top;
  250 + white-space: nowrap;
250 251 }
251 252  
252   -.infoWindow b {
  253 +.infoWindow table.contact tr td p {
  254 + margin-top: 0;
  255 +}
  256 +
  257 +.infoWindow h1 {
  258 + font-size: large;
253 259 color: #555555;
254   - }
  260 + text-transform: capitalize;
  261 + margin-left: -5px;
  262 +}
255 263  
256 264 .infoWindow h2 {
257   - padding-bottom: 3px;
258   - margin-bottom: 1em;
259   - color: #555555;
260   - }
  265 + font-size: small;
  266 + color: #222222;
  267 + margin-left: -5px;
  268 + margin-bottom: 7px;
  269 +}
261 270  
262   -.infoMsg h2 {
263   - padding-bottom: 3px;
264   - color: #555555;
265   - }
  271 +.infoWindow p {
  272 + margin: 3px 0px;
  273 + text-align: justify;
  274 +}
266 275  
267   -.infoMsg ul {
268   - padding-top: 3px;
269   - margin-left: 20px;
  276 +.infoWindow ul {
  277 + padding-left: 20px;
  278 + text-align: justify;
270 279 }
271 280  
272   -.infoMsg li {
273   - list-style-type: disc;
  281 +.infoWindow b {
  282 + font-size: 95%;
  283 + color: #555555;
274 284 }
275 285  
276 286 .plotPanelBgColor td div {
... ...
php/RemoteDataCenter/IPIM.php
... ... @@ -162,5 +162,22 @@ class IPIM extends SimulationDataCenterClass
162 162  
163 163 return $res;
164 164 }
  165 +
  166 + public function validateStartStop($fileName, $startTime, $stopTime)
  167 + {
  168 + $res = array();
  169 + exec('cdfstartstopfromdata '.IHMConfigClass::getLocalBasePath().$fileName, $start_stop);
  170 + $tempArr = explode(' ', $start_stop[0]);
  171 +
  172 + $res["start"] = date("Y-m-d\TH:i:s",(int)$tempArr[0]);
  173 + $res["stop"] = date("Y-m-d\TH:i:s",(int)$tempArr[1]);
  174 +
  175 + if ( strtotime($startTime) >= (int)$tempArr[1] || strtotime($stopTime) <= (int)$tempArr[0] )
  176 + $res["success"] = false;
  177 + else
  178 + $res["success"] = true;
  179 +
  180 + return $res;
  181 + }
165 182 }
166 183 ?>
... ...
php/RemoteDataCenter/ImpexParamManager.php
... ... @@ -158,9 +158,14 @@ class ImpexParamManager
158 158 }
159 159 elseif ($this->center->outputFormat == "CDF")
160 160 {
161   - $viID = $this->addFileToDb($mask, $localFile, $startTime, $stopTime, 'cdf');
  161 + $status= $this->center->validateStartStop($localFile, $startTime, $stopTime);
  162 +
  163 + $startTime = $status["start"];
  164 + $stopTime = $status["stop"];
  165 +
  166 + $viID = $this->addFileToDb($mask, $localFile, $startTime, $stopTime, 'cdf');
162 167 }
163   -
  168 +
164 169 if ($this->orbitTempFolder)
165 170 CommonClass::rrmdir($this->orbitTempFolder);
166 171 }
... ... @@ -196,7 +201,7 @@ class ImpexParamManager
196 201 public function addImpexData($param, $intervals, $templateArgs = NULL)
197 202 {
198 203 $this->initParam($param, $templateArgs);
199   -
  204 +
200 205 $start = $intervals[0]->getStart();
201 206 $duration = $intervals[0]->getDuration();
202 207  
... ... @@ -270,8 +275,17 @@ class ImpexParamManager
270 275 $viID = $this->addFileToDb($mask, $localFile, $startTime, $stopTime);
271 276 }
272 277 else if ($this->center->outputFormat == "CDF")
273   - {
274   - $viID = $this->addFileToDb($mask, $localFile, $startTime, $stopTime, 'cdf');
  278 + {
  279 + $status= $this->center->validateStartStop($localFile, $startTime, $stopTime);
  280 +
  281 + if ($status["success"]) {
  282 + $startTime = $status["start"];
  283 + $stopTime = $status["stop"];
  284 + $viID = $this->addFileToDb($mask, $localFile, $startTime, $stopTime, 'cdf');
  285 + }
  286 + else {
  287 + unlink(IHMConfigClass::getLocalBasePath().$localFile);
  288 + }
275 289 }
276 290  
277 291 if ($this->orbitTempFolder)
... ...
php/RemoteDataCenter/SimulationDataCenterClass.php
... ... @@ -495,6 +495,11 @@ class SimulationDataCenterClass extends RemoteDataCenterClass
495 495 }
496 496  
497 497 return $file;
498   - }
  498 + }
  499 +
  500 + public function validateStartStop($fileName, $startTime, $stopTime)
  501 + {
  502 + return array("success" => true, "start" => $startTime, "stop" => $stopTime);
  503 + }
499 504 }
500 505 ?>
... ...
php/classes/AmdaAction.php
... ... @@ -379,19 +379,19 @@ class AmdaAction
379 379  
380 380 if ( $child->tagName == 'parameter')
381 381 {
382   - if ($child->parentNode->hasAttribute('dataStart'))
  382 + if ($child->parentNode->hasAttribute('globalStart'))
383 383 {
384   - $globalStart = $child->parentNode->getAttribute('dataStart');
385   - $globalStop = $child->parentNode->getAttribute('dataStop');
  384 + $globalStart = $child->parentNode->getAttribute('globalStart');
  385 + $globalStop = $child->parentNode->getAttribute('globalStop');
386 386 }
387 387 }
388 388  
389 389 if ( $child->tagName == 'component')
390 390 {
391   - if ($child->parentNode->parentNode->hasAttribute('dataStart'))
  391 + if ($child->parentNode->parentNode->hasAttribute('globalStart'))
392 392 {
393   - $globalStart = $child->parentNode->parentNode->getAttribute('dataStart');
394   - $globalStop = $child->parentNode->parentNode->getAttribute('dataStop');
  393 + $globalStart = $child->parentNode->parentNode->getAttribute('globalStart');
  394 + $globalStop = $child->parentNode->parentNode->getAttribute('globalStop');
395 395 }
396 396 }
397 397  
... ...
update_amda/makeTree.php
... ... @@ -51,6 +51,7 @@
51 51 {
52 52 foreach ($observatories as $obs)
53 53 {
  54 + echo $obs->getAttribute('xml:id') . PHP_EOL;
54 55 if ($obs->hasAttribute('target'))
55 56 {
56 57 $target = $obs->getAttribute('target');
... ... @@ -73,16 +74,21 @@
73 74  
74 75 // check ID duplication
75 76 $allIds = array();
76   - foreach($localDom->getElementsByTagName('*') as $element)
77   - {
78   - $allIds[] = $element->getAttribute('xml:id');
  77 + /** @var DOMElement $element */
  78 +foreach($localDom->getElementsByTagName('*') as $element)
  79 + {
  80 + $id = $element->getAttribute('xml:id');
  81 + $allIds[] = $id;
  82 + if (!$id) {
  83 + echo 'No id in node ' . $element->tagName . PHP_EOL;
  84 + }
79 85 }
80 86 $arr = array_count_values($allIds);
81 87  
82   - print_r('DUPLICATED IDs : '.PHP_EOL);
83   - foreach ($arr as $key => $value)
84   - if ($value > 1) print_r($key.'=>'.$value.PHP_EOL);
85   -
  88 + foreach ($arr as $key => $value) {
  89 + if ($value > 1) print_r("id '$key' is duplicated $value times." . PHP_EOL);
  90 + }
  91 +
86 92 // set 'TBD' attribute - if the parameter is not checked yet
87 93 if (is_dir(TBD))
88 94 {
... ...