Commit 38ec1ca029eff6ac7ab7221080cf85785c452ab0
Exists in
master
and in
110 other branches
Merge branch 'master' into upload_cdf_upgrade
Showing
5 changed files
with
242 additions
and
221 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"}, |
... | ... |
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/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', |
... | ... | @@ -679,7 +680,7 @@ Ext.define('amdaUI.ExplorerUI', { |
679 | 680 | { |
680 | 681 | case 'info' : |
681 | 682 | myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function (module) { |
682 | - module.createWindow(record.get('help'), record.get('info')); | |
683 | + module.createWindow(record.get('help'), record.get('text')); | |
683 | 684 | }); |
684 | 685 | break; |
685 | 686 | } |
... | ... |
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 { |
... | ... |
update_amda/makeTree.php
... | ... | @@ -55,6 +55,7 @@ |
55 | 55 | { |
56 | 56 | foreach ($observatories as $obs) |
57 | 57 | { |
58 | + echo $obs->getAttribute('xml:id') . PHP_EOL; | |
58 | 59 | if ($obs->hasAttribute('target')) |
59 | 60 | { |
60 | 61 | $target = $obs->getAttribute('target'); |
... | ... | @@ -77,16 +78,21 @@ |
77 | 78 | |
78 | 79 | // check ID duplication |
79 | 80 | $allIds = array(); |
80 | - foreach($localDom->getElementsByTagName('*') as $element) | |
81 | - { | |
82 | - $allIds[] = $element->getAttribute('xml:id'); | |
81 | + /** @var DOMElement $element */ | |
82 | +foreach($localDom->getElementsByTagName('*') as $element) | |
83 | + { | |
84 | + $id = $element->getAttribute('xml:id'); | |
85 | + $allIds[] = $id; | |
86 | + if (!$id) { | |
87 | + echo 'No id in node ' . $element->tagName . PHP_EOL; | |
88 | + } | |
83 | 89 | } |
84 | 90 | $arr = array_count_values($allIds); |
85 | 91 | |
86 | - print_r('DUPLICATED IDs : '.PHP_EOL); | |
87 | - foreach ($arr as $key => $value) | |
88 | - if ($value > 1) print_r($key.'=>'.$value.PHP_EOL); | |
89 | - | |
92 | + foreach ($arr as $key => $value) { | |
93 | + if ($value > 1) print_r("id '$key' is duplicated $value times." . PHP_EOL); | |
94 | + } | |
95 | + | |
90 | 96 | // set 'TBD' attribute - if the parameter is not checked yet |
91 | 97 | if (is_dir(TBD)) |
92 | 98 | { |
... | ... |