Commit 229c9223d33ce5a13793468fe5d2f8480cd096b3
Exists in
master
and in
109 other branches
Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM
Showing
23 changed files
with
319 additions
and
253 deletions
Show diff stats
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
js/app/controllers/ExplorerModule.js
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
js/app/views/DownloadUI.js
js/app/views/ExplorerUI.js
... | ... | @@ -96,7 +96,8 @@ Ext.define('amdaUI.ExplorerUI', { |
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('amdaUI.ExplorerUI', { |
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('amdaUI.FiltersUI', { |
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
js/app/views/ParameterUI.js
js/app/views/PlotUI.js
js/app/views/SearchUI.js
js/app/views/StatisticsUI.js
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('amdaUI.TimeTableOperationUI', { |
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('amdaUI.TimeTableUI', { |
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
js/app/views/VisuUI.js
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 | { | ... | ... |