Commit 7baca0ef72a79c0e738767713e8ea7fdb9d63baf

Authored by Elena.Budnik
1 parent cdb91ea6

user special settings

desktop.php
... ... @@ -91,7 +91,8 @@
91 91  
92 92 var helpDir = 'help/';
93 93 var isGuest = sessionID.match('guest');
94   -
  94 +
  95 + var max_uploaded_file_size = '<?php echo MAX_UPLOADED_FILESIZE; ?>';
95 96 var guestSessionDuration = '<?php echo GuestSessionDuration*60; ?>'; // in secs
96 97 var maxGuestTimeInterval = '<?php echo MaxGuestTimeInterval; ?>'; // in days
97 98  
... ...
help/dataMiningHOWTO
1 1 To construct a condition for data mining <i>drag</i> one of the AMDA parameters
2 2 from the parameter tree and <i>drop</i> onto the panel.
3   -<li>1. Use <b><i>FLOAT numbers<i></b> in math expressions;
4   -<li>2. <b>Enclose</b> your expression in <b>brackets</b> - <i>(1./2.*imf(0)) > 0</i>
  3 +<li>1. Use <b><i>FLOAT numbers<i></b> in math expressions
  4 +<li>2. <b>Enclose</b> your expression in<b>brackets</b> - <i>(1./2.*imf(0)) > 0</i>
5 5 <li>3. Use <b>&</b> as <i>AND</i> and <b>|</b> as <i>OR</i> and <b>enclose</b> every logical block in <b>brackets</b> - <i>(imf(0) > 0) & ((5.*imf(1)) < -5)
6 6  
... ...
js/app/AmdaApp.js
... ... @@ -8,94 +8,94 @@
8 8 */
9 9  
10 10 Ext.define('amdaApp.AmdaApp', {
11   - extend: 'Ext.ux.desktop.App',
12   -
13   - requires: [
14   - 'Ext.window.MessageBox',
15   - 'Ext.ux.desktop.ShortcutModel',
16   - 'amdaUI.SampToolBarUI',
17   - 'amdaDesktop.DynamicModule',
18   - 'MyDesktop.Settings'
19   - ],
20   -
21   - dynamicModules: {
22   - visu : {
23   - id : 'visu-win',
24   - icon : 'icon-visu_catalog',
25   - title : 'Visualization',
26   - source : 'amdaDesktop.VisuModule',
27   - useLauncher : true
28   - },
29   - statistics : {
30   - id : 'statistics-win',
31   - icon : 'icon-statistics',
32   - title : 'Statistics',
33   - source : 'amdaDesktop.StatisticsModule',
34   - useLauncher : true
35   - },
36   - catalog : {
37   - id : 'catalog-win',
38   - icon : 'icon-catalog',
39   - title : 'Manage catalogs',
40   - source : 'amdaDesktop.CatalogModule',
41   - useLauncher : true
42   - },
43   - param : {
44   - id : 'param-win',
45   - icon : 'icon-parameters',
46   - title : 'Create/modify parameters',
47   - source : 'amdaDesktop.ParameterModule',
48   - useLauncher : true
49   - },
50   - tt : {
51   - id : 'timetab-win',
52   - icon : 'icon-manage-tt',
53   - title : 'Manage Time Tables',
54   - source : 'amdaDesktop.TimeTableModule',
55   - useLauncher : true
56   - },
57   - tt_op : {
58   - id : 'ttsOpe-win',
59   - icon : 'icon-tts',
60   - title : 'Operations on Time Tables',
61   - source : 'amdaDesktop.TimeTableOperationModule',
62   - useLauncher : true
63   - },
64   - plot : {
65   - id : 'plot-win',
66   - icon : 'icon-plot',
67   - title : 'Plot Manager',
68   - source : 'amdaDesktop.PlotModule',
69   - useLauncher : true
70   - },
71   - search : {
72   - id : 'search-win',
73   - icon : 'icon-search',
74   - title : 'Data Mining',
75   - source : 'amdaDesktop.SearchModule',
76   - useLauncher : true
77   - },
78   - download : {
79   - id : 'down-win',
80   - icon : 'icon-download',
81   - title : 'Download data',
82   - source : 'amdaDesktop.DownloadModule',
83   - useLauncher : true
84   - },
85   - upload : {
86   - id : 'up-win',
87   - icon : 'icon-mydata',
88   - title : 'Upload data',
89   - source : 'amdaDesktop.UploadModule',
90   - useLauncher : true
91   - },
92   - interop : {
93   - id : 'interop-win',
94   - icon : 'icon-interop',
95   - title : 'Interoperability',
96   - source : 'amdaDesktop.InteropModule',
97   - useLauncher : true
98   - },
  11 + extend: 'Ext.ux.desktop.App',
  12 +
  13 + requires: [
  14 + 'Ext.window.MessageBox',
  15 + 'Ext.ux.desktop.ShortcutModel',
  16 + 'amdaUI.SampToolBarUI',
  17 + 'amdaDesktop.DynamicModule',
  18 + 'MyDesktop.Settings'
  19 + ],
  20 +
  21 + dynamicModules: {
  22 + visu : {
  23 + id : 'visu-win',
  24 + icon : 'icon-visu_catalog',
  25 + title : 'Visualization',
  26 + source : 'amdaDesktop.VisuModule',
  27 + useLauncher : true
  28 + },
  29 + statistics : {
  30 + id : 'statistics-win',
  31 + icon : 'icon-statistics',
  32 + title : 'Statistics',
  33 + source : 'amdaDesktop.StatisticsModule',
  34 + useLauncher : true
  35 + },
  36 + catalog : {
  37 + id : 'catalog-win',
  38 + icon : 'icon-catalog',
  39 + title : 'Manage catalogs',
  40 + source : 'amdaDesktop.CatalogModule',
  41 + useLauncher : true
  42 + },
  43 + param : {
  44 + id : 'param-win',
  45 + icon : 'icon-parameters',
  46 + title : 'Create/modify parameters',
  47 + source : 'amdaDesktop.ParameterModule',
  48 + useLauncher : true
  49 + },
  50 + tt : {
  51 + id : 'timetab-win',
  52 + icon : 'icon-manage-tt',
  53 + title : 'Manage Time Tables',
  54 + source : 'amdaDesktop.TimeTableModule',
  55 + useLauncher : true
  56 + },
  57 + tt_op : {
  58 + id : 'ttsOpe-win',
  59 + icon : 'icon-tts',
  60 + title : 'Operations on Time Tables',
  61 + source : 'amdaDesktop.TimeTableOperationModule',
  62 + useLauncher : true
  63 + },
  64 + plot : {
  65 + id : 'plot-win',
  66 + icon : 'icon-plot',
  67 + title : 'Plot Manager',
  68 + source : 'amdaDesktop.PlotModule',
  69 + useLauncher : true
  70 + },
  71 + search : {
  72 + id : 'search-win',
  73 + icon : 'icon-search',
  74 + title : 'Data Mining',
  75 + source : 'amdaDesktop.SearchModule',
  76 + useLauncher : true
  77 + },
  78 + download : {
  79 + id : 'down-win',
  80 + icon : 'icon-download',
  81 + title : 'Download data',
  82 + source : 'amdaDesktop.DownloadModule',
  83 + useLauncher : true
  84 + },
  85 + upload : {
  86 + id : 'up-win',
  87 + icon : 'icon-mydata',
  88 + title : 'Upload data',
  89 + source : 'amdaDesktop.UploadModule',
  90 + useLauncher : true
  91 + },
  92 + interop : {
  93 + id : 'interop-win',
  94 + icon : 'icon-interop',
  95 + title : 'Interoperability',
  96 + source : 'amdaDesktop.InteropModule',
  97 + useLauncher : true
  98 + },
99 99 epntap : {
100 100 id : 'epntap-win',
101 101 icon : 'icon-interop',
... ... @@ -103,399 +103,372 @@ Ext.define(&#39;amdaApp.AmdaApp&#39;, {
103 103 source : 'amdaDesktop.EpnTapModule',
104 104 useLauncher : false
105 105 },
106   - info : {
107   - id : 'info-win',
108   - icon : 'icon-information',
109   - title : 'About AMDA',
110   - source : 'amdaDesktop.AboutModule',
111   - useLauncher : false
112   - },
113   - explorer : {
114   - id : 'explorer-win',
115   - icon : 'icon-elements',
116   - title : 'Workspace Explorer',
117   - source : 'amdaDesktop.ExplorerModule',
118   - useLauncher : false
119   - },
120   - my_data : {
121   - id : 'mydata-win',
122   - icon : 'icon-mydata',
123   - title : 'Define parameter',
124   - source : 'amdaDesktop.MyDataModule',
125   - useLauncher : false
126   - },
127   - help : {
128   - id : 'help-win',
129   - icon : 'icon-help',
130   - title : 'Help',
131   - source : 'amdaDesktop.HelpModule',
132   - useLauncher : false
133   - },
134   - feedback : {
135   - id : 'feed-win',
136   - icon : 'icon-feedback',
137   - title : 'Feedback',
138   - source : 'amdaDesktop.FeedbackModule',
139   - useLauncher : false
140   - },
141   - filters : {
142   - id : 'filters-win',
143   - icon : 'icon-filter',
144   - title : 'Filters',
145   - source : 'amdaDesktop.FiltersModule',
146   - useLauncher : false
147   - },
148   - result : {
149   - id : 'result-win',
150   - contentId : 'resultUI',
151   - icon : 'icon-results',
152   - title : 'Results',
153   - source : 'amdaDesktop.ResultModule',
154   - useLauncher : false
155   - },
156   - astro : {
157   - id : 'astroimages-win',
158   - icon : 'icon-interop',
159   - title : 'Astronomical Images',
160   - source : 'amdaDesktop.AstroImagesModule',
161   - useLauncher : false
162   - }
163   - },
164   -
165   -// IDs of Modules working with parameters; used in Alias Node
166   - paramModulesID : ['plot-win', 'param-win', 'search-win', 'down-win'],
167   -
168   -// Important system constants
169   - MAX_UPLOADED_FILE_SIZE : 30000000, // 30MB
170   -
171   - listeners : {
  106 + info : {
  107 + id : 'info-win',
  108 + icon : 'icon-information',
  109 + title : 'About AMDA',
  110 + source : 'amdaDesktop.AboutModule',
  111 + useLauncher : false
  112 + },
  113 + explorer : {
  114 + id : 'explorer-win',
  115 + icon : 'icon-elements',
  116 + title : 'Workspace Explorer',
  117 + source : 'amdaDesktop.ExplorerModule',
  118 + useLauncher : false
  119 + },
  120 + my_data : {
  121 + id : 'mydata-win',
  122 + icon : 'icon-mydata',
  123 + title : 'Define parameter',
  124 + source : 'amdaDesktop.MyDataModule',
  125 + useLauncher : false
  126 + },
  127 + help : {
  128 + id : 'help-win',
  129 + icon : 'icon-help',
  130 + title : 'Help',
  131 + source : 'amdaDesktop.HelpModule',
  132 + useLauncher : false
  133 + },
  134 + feedback : {
  135 + id : 'feed-win',
  136 + icon : 'icon-feedback',
  137 + title : 'Feedback',
  138 + source : 'amdaDesktop.FeedbackModule',
  139 + useLauncher : false
  140 + },
  141 + filters : {
  142 + id : 'filters-win',
  143 + icon : 'icon-filter',
  144 + title : 'Filters',
  145 + source : 'amdaDesktop.FiltersModule',
  146 + useLauncher : false
  147 + },
  148 + result : {
  149 + id : 'result-win',
  150 + contentId : 'resultUI',
  151 + icon : 'icon-results',
  152 + title : 'Results',
  153 + source : 'amdaDesktop.ResultModule',
  154 + useLauncher : false
  155 + },
  156 + astro : {
  157 + id : 'astroimages-win',
  158 + icon : 'icon-interop',
  159 + title : 'Astronomical Images',
  160 + source : 'amdaDesktop.AstroImagesModule',
  161 + useLauncher : false
  162 + }
  163 + },
  164 +
  165 + // IDs of Modules working with parameters; used in Alias Node
  166 + //TODO stats-win
  167 + paramModulesID : ['plot-win', 'param-win', 'search-win', 'down-win'],
  168 +
  169 + // Important system constants
  170 + MAX_UPLOADED_FILE_SIZE : max_uploaded_file_size, // in B, from my_config.php
  171 +
  172 + listeners : {
172 173 scope : this,
173 174 beforeunload : function ()
174 175 {
175   -
176 176 var interopModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id);
177 177 if (interopModule)
178 178 interopModule.forceSampDisconnect();
179 179 return true;
180 180 },
181 181 ready : function ()
182   - {
183   - //AKKA - Clean user WS
184   - AmdaAction.cleanUserWS(function(res,e){},this);
  182 + {
  183 + //AKKA - Clean user WS
  184 + AmdaAction.cleanUserWS(function(res,e){},this);
185 185 }
186   - },
187   -
188   - init: function() {
189   - // custom logic before getXYZ methods get called...
190   -
191   - this.callParent();
192   -
193   - // now ready...
194   - //override createWindow method of desktop
195   - Ext.override(Ext.ux.desktop.Desktop, {
196   - createWindow: function (config, cls) {
197   - var me = this;
198   - var win = this.callParent([config,cls]);
199   - win.on({
200   - boxready: function (w) {
201   - w.dd.xTickSize = me.xTickSize;
202   - w.dd.yTickSize = me.yTickSize;
203   -
204   - if (w.resizer) {
205   - w.resizer.widthIncrement = me.xTickSize;
206   - w.resizer.heightIncrement = me.yTickSize;
207   - }
208   -
209   - if (w.y < 0)
210   - w.el.setY(0);
211   -
212   - if (w.x + w.width > me.el.getWidth())
213   - w.el.setX(me.el.getWidth()-w.width);
214   -
215   - if (w.y + w.height > me.el.getHeight())
216   - w.el.setY((me.el.getHeight()-w.height > 0) ? me.el.getHeight()-w.height : 0);
217   -
218   - },
219   - single: true
220   - });
221   - return win;
222   - }
223   - });
224   -
225   - },
226   -//create InfoBox
227   - infoMsg : function(msg) {
228   - Ext.Msg.show({
229   - title: 'AMDA Info',
230   - cls: 'infoMsg',
231   - msg: msg,
232   - modal: false,
233   - autoScroll: true,
234   - resizable: true,
235   - icon: Ext.Msg.INFO,
236   - buttons: Ext.Msg.OK
237   - });
238 186 },
239 187  
240   -//create WarningBox
241   - warningMsg : function(msg) {
242   - Ext.Msg.show({
243   - title: 'Attention',
244   - msg: msg,
245   - icon: Ext.Msg.WARNING,
246   - buttons: Ext.Msg.OK
247   - });
  188 + init: function()
  189 + {
  190 + // custom logic before getXYZ methods get called...
  191 + this.callParent();
  192 +
  193 + // now ready...
  194 + //override createWindow method of desktop
  195 + Ext.override(Ext.ux.desktop.Desktop, {
  196 + createWindow: function (config, cls) {
  197 + var me = this;
  198 + var win = this.callParent([config,cls]);
  199 + win.on({
  200 + boxready: function (w) {
  201 + w.dd.xTickSize = me.xTickSize;
  202 + w.dd.yTickSize = me.yTickSize;
  203 +
  204 + if (w.resizer) {
  205 + w.resizer.widthIncrement = me.xTickSize;
  206 + w.resizer.heightIncrement = me.yTickSize;
  207 + }
  208 +
  209 + if (w.y < 0)
  210 + w.el.setY(0);
  211 +
  212 + if (w.x + w.width > me.el.getWidth())
  213 + w.el.setX(me.el.getWidth()-w.width);
  214 +
  215 + if (w.y + w.height > me.el.getHeight())
  216 + w.el.setY((me.el.getHeight()-w.height > 0) ? me.el.getHeight()-w.height : 0);
  217 +
  218 + },
  219 + single: true
  220 + });
  221 + return win;
  222 + }
  223 + });
  224 + },
  225 +
  226 + //create InfoBox
  227 + infoMsg : function(msg) {
  228 + Ext.Msg.show({
  229 + title: 'AMDA Info',
  230 + cls: 'infoMsg',
  231 + msg: msg,
  232 + modal: false,
  233 + autoScroll: true,
  234 + resizable: true,
  235 + icon: Ext.Msg.INFO,
  236 + buttons: Ext.Msg.OK
  237 + });
  238 + },
  239 +
  240 + //create WarningBox
  241 + warningMsg : function(msg) {
  242 + Ext.Msg.show({
  243 + title: 'Attention',
  244 + msg: msg,
  245 + icon: Ext.Msg.WARNING,
  246 + buttons: Ext.Msg.OK
  247 + });
  248 + },
  249 +
  250 + //create ErrorBox
  251 + errorMsg : function(msg) {
  252 + Ext.Msg.show({
  253 + title: 'Failure',
  254 + msg: msg,
  255 + icon: Ext.Msg.ERROR,
  256 + buttons: Ext.Msg.OK
  257 + });
  258 + },
  259 +
  260 + getModules : function(){
  261 + var allModules = [];
  262 +
  263 + //Add dynamic modules
  264 + Ext.Object.each(this.dynamicModules, function(key, def) {
  265 + allModules.push(new amdaDesktop.DynamicModule(def.id, def.icon, def.title, def.source, def.useLauncher));
  266 + });
  267 +
  268 + return allModules;
248 269 },
249 270  
250   -//create ErrorBox
251   - errorMsg : function(msg) {
252   - Ext.Msg.show({
253   - title: 'Failure',
254   - msg: msg,
255   - icon: Ext.Msg.ERROR,
256   - buttons: Ext.Msg.OK
257   - });
  271 + getDesktopConfig: function ()
  272 + {
  273 + var me = this, ret = me.callParent();
  274 +
  275 + var desktopId = 'AmdaDesktop';
  276 + var wallpaper = Ext.state.Manager.getProvider().get(desktopId+'_wallpaper');
  277 + if (!wallpaper)
  278 + wallpaper = 'js/resources/images/desktop/wallpapers/Cdpp2.jpg';
  279 + return Ext.apply(ret, {
  280 + id : desktopId,
  281 + contextMenuItems: [
  282 + { text: 'Change Settings', handler: me.onSettings, scope: me }
  283 + ],
  284 + shortcuts: Ext.create('Ext.data.Store', {
  285 + model: 'Ext.ux.desktop.ShortcutModel',
  286 + data: [
  287 + { name: 'Help', iconCls: 'help', module: 'help-win' },
  288 + { name: 'Create/Modify parameter', iconCls: 'edit', module: 'param-win' },
  289 + { name: 'Plot data', iconCls: 'plot', module: 'plot-win'},
  290 + { name: 'Data mining', iconCls: 'search', module: 'search-win'},
  291 + { name: 'Statistics', iconCls: 'statistics', module: 'statistics-win'},
  292 + { name: 'Download data', iconCls: 'download_manager', module: 'down-win'},
  293 + { name: 'Upload data', iconCls: 'mydata', module: 'up-win'},
  294 + { name: 'Manage TimeTables', iconCls: 'timeTable', module: 'timetab-win' },
  295 + { name: 'TimeTables operations', iconCls: 'operations', module: 'ttsOpe-win' },
  296 + { name: 'Manage catalogs', iconCls: 'catalog', module: 'catalog-win'},
  297 + { name: 'Visualize catalogs', iconCls: 'visu_catalog', module: 'visu-win'},
  298 + { name: 'Interoperability', iconCls: 'interop', module: 'interop-win' }
  299 + ]
  300 + }),
  301 +
  302 + wallpaper: wallpaper,
  303 + wallpaperStretch: false
  304 + });
258 305 },
259 306  
260   - getModules : function(){
261   - var allModules = [];
262   -
263   - //Add dynamic modules
264   - Ext.Object.each(this.dynamicModules, function(key, def) {
265   - allModules.push(new amdaDesktop.DynamicModule(def.id, def.icon, def.title, def.source, def.useLauncher));
266   - });
267   -
268   - return allModules;
269   - },
270   -
271   - getDesktopConfig: function () {
272   - var me = this, ret = me.callParent();
273   -
274   - var desktopId = 'AmdaDesktop';
275   - var wallpaper = Ext.state.Manager.getProvider().get(desktopId+'_wallpaper');
276   - if (!wallpaper)
277   - wallpaper = 'js/resources/images/desktop/wallpapers/Cdpp2.jpg';
278   - return Ext.apply(ret, {
279   - id : desktopId,
280   - contextMenuItems: [
281   - { text: 'Change Settings', handler: me.onSettings, scope: me }
282   - ],
283   -
284   - shortcuts: Ext.create('Ext.data.Store', {
285   - model: 'Ext.ux.desktop.ShortcutModel',
286   - data: [
287   - { name: 'Help', iconCls: 'help', module: 'help-win' },
288   - { name: 'Create/Modify parameter', iconCls: 'edit', module: 'param-win' },
289   - { name: 'Plot data', iconCls: 'plot', module: 'plot-win'},
290   - { name: 'Data mining', iconCls: 'search', module: 'search-win'},
291   - { name: 'Statistics', iconCls: 'statistics', module: 'statistics-win'},
292   - { name: 'Download data', iconCls: 'download_manager', module: 'down-win'},
293   - { name: 'Upload data', iconCls: 'mydata', module: 'up-win'},
294   - { name: 'Manage TimeTables', iconCls: 'timeTable', module: 'timetab-win' },
295   - { name: 'TimeTables operations', iconCls: 'operations', module: 'ttsOpe-win' },
296   - { name: 'Manage catalogs', iconCls: 'catalog', module: 'catalog-win'},
297   - { name: 'Visualize catalogs', iconCls: 'visu_catalog', module: 'visu-win'},
298   - { name: 'Interoperability', iconCls: 'interop', module: 'interop-win' }
299   - ]
300   - }),
301   -
302   - wallpaper: wallpaper,
303   - wallpaperStretch: false
304   - });
305   - },
306   -
307   - // config for the start menu
308   - getStartConfig : function() {
309   - var me = this, ret = me.callParent();
310   - return Ext.apply(ret, {
311   - title: sessionID,
312   - iconCls: 'icon-user',
313   - height: 270,
314   - toolConfig: {
315   - width: 130,
316   - items: [
317   - {
318   - text:'Settings',
319   - iconCls:'settings',
320   - handler: me.onSettings,
321   - scope: me
322   - },
323   - '-',
324   - /* {
325   - text : 'Manage Workspaces',
326   - iconCls : 'icon-manage-ws',
327   - id : 'mngws-win-tool',
328   - scope : this,
329   - disabled: true,
330   - handler : function(obj, e) {
331   - e.stopEvent();
332   - var moduleId = obj.el.id;
333   - var module = this.getModule(moduleId.replace('-tool', ''));
334   - if (module) {
335   - module.createWindow();
336   - }
337   - }
338   - }, {
339   - text : 'Manage Resources',
340   - iconCls : 'icon-manage-resrc',
341   - id : 'resrc-win-tool',
342   - disabled : true,
343   - handler : function(obj, e) {
344   - e.stopEvent();
345   - var moduleId = obj.el.id;
346   - var module = this.getModule(moduleId.replace('-tool', ''));
347   - if (module) {
348   - module.createWindow();
349   - }
350   - },
351   - scope : this
352   - },
353   - */
354   - {
355   - text : 'Profile',
356   - iconCls : 'icon-user',
357   - id : 'profile-win-tool',
358   - handler : function(obj, e) {
359   - e.stopEvent();
360   - AmdaAction.getUserInfo(this.onGetUserInfo,this);
361   - },
362   - scope : this
363   - },{
364   - text : 'Feedback',
365   - iconCls : 'icon-feedback',
366   - id : 'feed-win-tool',
367   - handler : function(obj, e) {
368   - e.stopEvent();
369   - var moduleId = obj.el.id;
370   - this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
371   - module.createWindow();
372   - });
373   -
374   - },
375   - scope : this
376   - }, {
377   - text : 'Help',
378   - iconCls : 'icon-help',
379   - id : 'help-win-tool',
380   - scope : this,
381   - handler : function(obj, e) {
382   - e.stopEvent();
383   - var moduleId = obj.el.id;
384   - this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
385   - module.createWindow();
386   - });
387   - }
388   - }, {
389   - text : 'About AMDA',
390   - iconCls : 'icon-information',
391   - id : 'info-win-tool',
392   - scope : this,
393   - handler : function(obj, e) {
394   - e.stopEvent();
395   - var moduleId = obj.el.id;
396   - this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
397   - module.createWindow();
398   - });
399   - }
400   - }, '-', {
401   - text : 'Workspaces',
402   - iconCls : 'icon-ws',
403   - disabled: true,
404   - scope : this
405   - }, '-', {
406   - text : 'Logout',
407   - iconCls : 'logout',
408   - scope : this,
409   - handler : me.onLogout
410   - }
411   - ]
412   - }
413   - });
414   - },
415   -
416   - getModuleDefinition: function(id) {
417   - return this.getModule(id);
418   - },
419   -
420   - getLoadedModule: function(id, forceLoad, onReady) {
421   - var moduleDef = this.getModuleDefinition(id);
422   - if (!moduleDef)
423   - return null;
424   - if (!moduleDef.isReady())
425   - {
426   - if (forceLoad)
427   - {
428   - //loadMask.show();
429   - moduleDef.get(function (module) {
430   - //loadMask.hide();
431   - if (onReady)
432   - onReady(module);
433   - });
434   - }
435   - return null;
436   - }
437   - if (onReady)
  307 + // config for the start menu
  308 + getStartConfig : function()
  309 + {
  310 + var me = this, ret = me.callParent();
  311 + return Ext.apply(ret, {
  312 + title: sessionID,
  313 + iconCls: 'icon-user',
  314 + height: 270,
  315 + toolConfig: {
  316 + width: 130,
  317 + items: [
  318 + {
  319 + text:'Settings',
  320 + iconCls:'settings',
  321 + handler: me.onSettings,
  322 + scope: me
  323 + }, '-',
  324 + {
  325 + text : 'Profile',
  326 + iconCls : 'icon-user',
  327 + id : 'profile-win-tool',
  328 + handler : function(obj, e) {
  329 + e.stopEvent();
  330 + AmdaAction.getUserInfo(this.onGetUserInfo,this);
  331 + },
  332 + scope : this
  333 + },
  334 + {
  335 + text : 'Feedback',
  336 + iconCls : 'icon-feedback',
  337 + id : 'feed-win-tool',
  338 + handler : function(obj, e) {
  339 + e.stopEvent();
  340 + var moduleId = obj.el.id;
  341 + this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
  342 + module.createWindow();
  343 + });
  344 + },
  345 + scope : this
  346 + },
  347 + {
  348 + text : 'Help',
  349 + iconCls : 'icon-help',
  350 + id : 'help-win-tool',
  351 + scope : this,
  352 + handler : function(obj, e) {
  353 + e.stopEvent();
  354 + var moduleId = obj.el.id;
  355 + this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
  356 + module.createWindow();
  357 + });
  358 + }
  359 + },
  360 + {
  361 + text : 'About AMDA',
  362 + iconCls : 'icon-information',
  363 + id : 'info-win-tool',
  364 + scope : this,
  365 + handler : function(obj, e) {
  366 + e.stopEvent();
  367 + var moduleId = obj.el.id;
  368 + this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
  369 + module.createWindow();
  370 + });
  371 + }
  372 + }, '-',
  373 + {
  374 + text : 'Workspaces',
  375 + iconCls : 'icon-ws',
  376 + disabled: true,
  377 + scope : this
  378 + }, '-',
  379 + {
  380 + text : 'Logout',
  381 + iconCls : 'logout',
  382 + scope : this,
  383 + handler : me.onLogout
  384 + }
  385 + ]
  386 + }
  387 + });
  388 + },
  389 +
  390 + getModuleDefinition: function(id) {
  391 + return this.getModule(id);
  392 + },
  393 +
  394 + getLoadedModule: function(id, forceLoad, onReady) {
  395 + var moduleDef = this.getModuleDefinition(id);
  396 + if (!moduleDef)
  397 + return null;
  398 + if (!moduleDef.isReady())
  399 + {
  400 + if (forceLoad)
  401 + {
  402 + //loadMask.show();
  403 + moduleDef.get(function (module) {
  404 + //loadMask.hide();
  405 + if (onReady)
  406 + onReady(module);
  407 + });
  408 + }
  409 + return null;
  410 + }
  411 + if (onReady)
438 412 onReady(moduleDef.get());
439   - return moduleDef.get();
440   - },
441   -
442   - getTaskbarConfig: function () {
443   - var ret = this.callParent();
444   - return Ext.apply(ret, {
445   - quickStart: [],
446   - trayItems: [
447   - {
448   - name: this.dynamicModules.feedback.title, iconCls: 'icon-feedback',
449   - tooltip: { text: this.dynamicModules.feedback.title, align: 'bl-tl' },
450   - overflowText: this.dynamicModules.feedback.title,
451   - iconCls: this.dynamicModules.feedback.icon,
452   - scope: this,
453   - handler : function(obj, e) {
454   - e.stopEvent();
455   - this.getLoadedModule(this.dynamicModules.feedback.id, true, function(module) {
456   - module.createWindow();
457   - });
458   - }
459   - },
460   - {
461   - name: this.dynamicModules.info.title, iconCls: 'icon-information',
462   - tooltip: { text: this.dynamicModules.info.title, align: 'bl-tl' },
463   - overflowText: this.dynamicModules.info.title,
464   - iconCls: this.dynamicModules.info.icon,
465   - scope: this,
466   - handler : function(obj, e) {
467   - e.stopEvent();
468   - this.getLoadedModule(this.dynamicModules.info.id, true, function(module) {
469   - module.createWindow();
470   - });
471   - }
472   - },
473   - {
474   - name: 'Logout', iconCls : 'logout',
475   - tooltip: { text: 'Logout', align: 'bl-tl' },
476   - overflowText: 'Logout',
477   - scope : this,
478   - handler : this.onLogout
479   - },
480   - '-',
481   - { xtype: 'trayclock', flex: 1 }
482   - ]
483   - });
484   - },
485   -
486   - onLogout: function (obj,e) {
487   - e.stopEvent();
488   - // var interopModule = this.getModule(amdaDesktop.InteropModule.id);
489   - if (isGuest) {
490   - this.guestLogout();
491   - }
492   - else {
493   - this.saveSessionState();
494   - }
495   - },
496   -
497   - onGetUserInfo : function (result, e){
498   - var t = e.getTransaction();
  413 + return moduleDef.get();
  414 + },
  415 +
  416 + getTaskbarConfig: function ()
  417 + {
  418 + var ret = this.callParent();
  419 + return Ext.apply(ret, {
  420 + quickStart: [],
  421 + trayItems: [
  422 + {
  423 + name: this.dynamicModules.feedback.title, iconCls: 'icon-feedback',
  424 + tooltip: { text: this.dynamicModules.feedback.title, align: 'bl-tl' },
  425 + overflowText: this.dynamicModules.feedback.title,
  426 + iconCls: this.dynamicModules.feedback.icon,
  427 + scope: this,
  428 + handler : function(obj, e) {
  429 + e.stopEvent();
  430 + this.getLoadedModule(this.dynamicModules.feedback.id, true, function(module) {
  431 + module.createWindow();
  432 + });
  433 + }
  434 + },
  435 + {
  436 + name: this.dynamicModules.info.title, iconCls: 'icon-information',
  437 + tooltip: { text: this.dynamicModules.info.title, align: 'bl-tl' },
  438 + overflowText: this.dynamicModules.info.title,
  439 + iconCls: this.dynamicModules.info.icon,
  440 + scope: this,
  441 + handler : function(obj, e) {
  442 + e.stopEvent();
  443 + this.getLoadedModule(this.dynamicModules.info.id, true, function(module) {
  444 + module.createWindow();
  445 + });
  446 + }
  447 + },
  448 + {
  449 + name: 'Logout', iconCls : 'logout',
  450 + tooltip: { text: 'Logout', align: 'bl-tl' },
  451 + overflowText: 'Logout',
  452 + scope : this,
  453 + handler : this.onLogout
  454 + }, '-',
  455 + { xtype: 'trayclock', flex: 1 }
  456 + ]
  457 + });
  458 + },
  459 +
  460 + onLogout: function (obj,e) {
  461 + e.stopEvent();
  462 + if (isGuest) {
  463 + this.guestLogout();
  464 + }
  465 + else {
  466 + this.saveSessionState();
  467 + }
  468 + },
  469 +
  470 + onGetUserInfo : function (result, e){
  471 + var t = e.getTransaction();
499 472 if (e.status)
500 473 {
501 474 if (result && result.success)
... ... @@ -523,149 +496,137 @@ Ext.define(&#39;amdaApp.AmdaApp&#39;, {
523 496 }
524 497 },
525 498  
  499 + guestLogout: function() {
  500 + Ext.Msg.show({
  501 + title : 'Logout',
  502 + msg :'Your guest workspace is to be deleted. Continue logout ?',
  503 + buttons : Ext.Msg.YESNO,
  504 + iconCls : 'logout',
  505 + fn : function(btn) {
  506 + if (btn == 'yes'){
  507 + AmdaAction.logout(true, function(){
  508 + sessionID = '';
  509 + window.location.href ='index.html';
  510 + });
  511 + }
  512 + }
  513 + });
  514 + },
526 515  
527   - guestLogout: function()
528   - {
529   - Ext.Msg.show({
530   - title : 'Logout',
531   - msg :'Your guest workspace is to be deleted. Continue logout ?',
532   - buttons : Ext.Msg.YESNO,
533   - iconCls : 'logout',
534   - fn : function(btn) {
535   - if (btn == 'yes')
536   - {
537   - AmdaAction.logout(true, function(){
538   - sessionID = '';
539   - window.location.href ='index.html';
540   - });
541   - }
542   - }
543   - });
544   - },
545   -
546   - forceLogout: function()
547   - {
548   - // myDesktopApp.warningMsg('Your guest session is finished');
549   - AmdaAction.logout(true, function(){
550   - sessionID = '';
551   - window.location.href ='index.html';
552   - });
553   - },
554   -
555   - saveSessionState : function()
556   - {
557   - var me = this;
558   - Ext.Msg.show({
559   - title : 'Logout',
560   - msg :'Do you want to keep current windows sizes and locations<br/> for the next sessions?',
561   - buttons : Ext.Msg.YESNOCANCEL,
562   - iconCls : 'logout',
563   - fn : function(btn) {
564   - if (btn == 'yes')
565   - {
566   - //set wallpaper
567   - Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper());
568   - //
569   - Ext.state.Manager.getProvider().on({
570   - scope : this,
571   - aftersave : function(provider)
572   - {
573   - sessionID = '';
574   - window.location.href ='index.html';
575   - }
576   - });
577   - Ext.state.Manager.getProvider().saveState();
578   - AmdaAction.logout();
579   - }
580   - else if (btn == 'no')
581   - {
582   - Ext.state.Manager.getProvider().on({
583   - scope : this,
584   - aftersave : function(provider)
585   - {
586   - sessionID = '';
587   - window.location.href ='index.html';
588   - }
589   - });
590   - Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper());
591   - Ext.state.Manager.getProvider().saveLastTime();
592   - AmdaAction.logout();
593   - }
594   - }
595   - });
596   - },
597   -
598   - onSettings: function () {
599   - var dlg = new MyDesktop.Settings({
600   - desktop: this.desktop
601   - });
602   - dlg.show();
603   - },
604   -
605   - /**
606   - * initialization at the start of AMDA-NG webApplication
607   - */
608   - initProject : function() {
609   - moduleIds = new Ext.util.MixedCollection();
610   - // Adding Workspace Explorer Id
611   - moduleIds.add(this.dynamicModules.explorer.id);
612   -
613   - moduleIds.each(function(item) {
614   - this.getLoadedModule(item, true, function (module) {
615   - module.createWindow();
616   - });
617   - }, this);
618   -
619   - if (freeSpace < diskQuota / 20) {
620   - myDesktopApp.warningMsg('Think of cleaning up your work space.<br/>Only ' +
621   - Math.round(freeSpace/1024/1024)+ 'MB of '+Math.round(diskQuota/1024/1024) +
622   - 'MB rests');
623   - }
624   -
625   - if (isFirstVisit && !isGuest) {
626   - if (isSpecialInfo) {
627   - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
628   - module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);
  516 + forceLogout: function(){
  517 + // myDesktopApp.warningMsg('Your guest session is finished');
  518 + AmdaAction.logout(true, function(){
  519 + sessionID = '';
  520 + window.location.href ='index.html';
629 521 });
630   - } else {
  522 + },
631 523  
632   - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function(module) {
633   - module.createWindow();
  524 + saveSessionState : function()
  525 + {
  526 + var me = this;
  527 + Ext.Msg.show({
  528 + title : 'Logout',
  529 + msg :'Do you want to keep current windows sizes and locations<br/> for the next sessions?',
  530 + buttons : Ext.Msg.YESNOCANCEL,
  531 + iconCls : 'logout',
  532 + fn : function(btn) {
  533 + if (btn == 'yes'){
  534 + //set wallpaper
  535 + Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper());
  536 + Ext.state.Manager.getProvider().on({
  537 + scope : this,
  538 + aftersave : function(provider) {
  539 + sessionID = '';
  540 + window.location.href ='index.html';
  541 + }
  542 + });
  543 + Ext.state.Manager.getProvider().saveState();
  544 + AmdaAction.logout();
  545 + }
  546 + else if (btn == 'no')
  547 + {
  548 + Ext.state.Manager.getProvider().on({
  549 + scope : this,
  550 + aftersave : function(provider) {
  551 + sessionID = '';
  552 + window.location.href ='index.html';
  553 + }
  554 + });
  555 + Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper());
  556 + Ext.state.Manager.getProvider().saveLastTime();
  557 + AmdaAction.logout();
  558 + }
  559 + }
634 560 });
635   - }
636   - }
637   - else {
638   - if (isSpecialInfo && !isNewInfo) {
639   - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
640   - module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);
641   - });
642   - }
643   - }
644   -
645   - if (isNewInfo) {
646   - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
647   - // module.createWindow('releaseNotes.' + AMDAVERSION, 'New Release V'+ AMDAVERSION);
648   - module.createWindow(news, 'Amda Latest News');
649   - });
650   - }
651   -
652   - if (isGuest) {
653   - myDesktopApp.warningMsg("Welcome to Guest Session<br/>Guest session lasts for "+
654   - guestSessionDuration/3600+" h maximum<br/>"+
655   - "For extended use time and functionalities (saved sessions)<br/> please register at amda@irap.omp.eu");
656   - Ext.Function.defer(myDesktopApp.warningMsg,(guestSessionDuration-300)*1000, this, ["Your session will be closed in 5 min!"]);
657   - Ext.Function.defer(myDesktopApp.forceLogout, guestSessionDuration*1000);
658   - }
659   -
660   -
661   -
662   - this.desktop.taskbar.tray.width = 130;
663   - this.desktop.taskbar.insert(4,new amdaUI.SampToolBarUI({id : 'samptb', onSwitchConnect : function ()
664   - {
665   - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id, true, function(module) {
666   - module.switchSampConnect();
667   - });
668   -
669   - }}));
670   - }
  561 + },
  562 +
  563 + onSettings: function () {
  564 + var dlg = new MyDesktop.Settings({
  565 + desktop: this.desktop
  566 + });
  567 + dlg.show();
  568 + },
  569 +
  570 + /**
  571 + * initialization at the start of AMDA-NG webApplication
  572 + */
  573 + initProject : function()
  574 + {
  575 + moduleIds = new Ext.util.MixedCollection();
  576 + // Adding Workspace Explorer Id
  577 + moduleIds.add(this.dynamicModules.explorer.id);
  578 +
  579 + moduleIds.each(function(item) {
  580 + this.getLoadedModule(item, true, function (module) {
  581 + module.createWindow();
  582 + });
  583 + }, this);
  584 +
  585 + if (freeSpace < diskQuota / 20) {
  586 + myDesktopApp.warningMsg('Think of cleaning up your work space.<br/>Only ' +
  587 + Math.round(freeSpace/1024/1024)+ 'MB of '+Math.round(diskQuota/1024/1024) +
  588 + 'MB rests');
  589 + }
  590 +
  591 + if (isFirstVisit && !isGuest) {
  592 + if (isSpecialInfo) {
  593 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
  594 + module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);
  595 + });
  596 + } else {
  597 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function(module) {
  598 + module.createWindow();
  599 + });
  600 + }
  601 + }
  602 + else {
  603 + if (isSpecialInfo && !isNewInfo) {
  604 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
  605 + module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);
  606 + });
  607 + }
  608 + }
  609 +
  610 + if (isNewInfo) {
  611 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
  612 + // module.createWindow('releaseNotes.' + AMDAVERSION, 'New Release V'+ AMDAVERSION);
  613 + module.createWindow(news, 'Amda Latest News');
  614 + });
  615 + }
  616 +
  617 + if (isGuest) {
  618 + myDesktopApp.warningMsg("Welcome to Guest Session<br/>Guest session lasts for "+
  619 + guestSessionDuration/3600+" h maximum<br/>"+
  620 + "For extended use time and functionalities (saved sessions)<br/> please register at amda@irap.omp.eu");
  621 + Ext.Function.defer(myDesktopApp.warningMsg,(guestSessionDuration-300)*1000, this, ["Your session will be closed in 5 min!"]);
  622 + Ext.Function.defer(myDesktopApp.forceLogout, guestSessionDuration*1000);
  623 + }
  624 +
  625 + this.desktop.taskbar.tray.width = 130;
  626 + this.desktop.taskbar.insert(4,new amdaUI.SampToolBarUI({id : 'samptb', onSwitchConnect : function () {
  627 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id, true, function(module) {
  628 + module.switchSampConnect();
  629 + });
  630 + }}));
  631 + }
671 632 });
... ...
php/classes/UserMgr.php
... ... @@ -163,7 +163,40 @@ class UserMgr
163 163  
164 164 return $specialGrpNode;
165 165 }
166   -
  166 +
  167 + public function setSpecialSettings()
  168 + {
  169 + $userSettings = new DomDocument("1.0");
  170 +
  171 + if (!$userSettings->load(specialSettingsXml)) {
  172 + define("DISK_QUOTA", DISK_QUOTA_standard);
  173 + return;
  174 + }
  175 +
  176 + $theUser = $userSettings->getElementById($this->user);
  177 + if (!$theUser) {
  178 + define("DISK_QUOTA", DISK_QUOTA_standard);
  179 + return;
  180 + }
  181 + $settings = $theUser->getElementsByTagName("setting");
  182 + if ($settings->length == 0) {
  183 + define("DISK_QUOTA", DISK_QUOTA_standard);
  184 + return;
  185 + }
  186 +
  187 + foreach ($settings as $setting) {
  188 + $key = $setting->getAttribute("name");
  189 + $value = $setting->getAttribute("value");
  190 + $isSetting = $setting->hasAttribute("isSetting");
  191 + if ($isSetting) {
  192 + ini_set("$key",$value);
  193 + }
  194 + else {
  195 + // Attention !!! CONSTANT cannot be redefined
  196 + define("$key",$value);
  197 + }
  198 + }
  199 + }
167 200 /*
168 201 * Totally replace IMPEX staff in user remote tree
169 202 */
... ...
php/config.php
... ... @@ -47,7 +47,7 @@ define(&quot;MaxGuestTimeInterval&quot;, 10); // days
47 47 /*-----------------------END GUESTS LOGIN section --------*/
48 48  
49 49 // user WS size limit
50   -define('DISK_QUOTA', 1024*1024*200); // 200MB
  50 +define('DISK_QUOTA_standard', 1024*1024*200); // 200MB
51 51 // max lines of uploaded ascii file to show
52 52 define('MAX_FILE_INDEX_TO_SHOW', 100);
53 53 // private key used to be considerate as a trust client for some functions of DD web service
... ... @@ -76,6 +76,7 @@ ini_set(&#39;user_agent&#39;, &#39;Mozilla/5.0 (X11; U; Linux i686; en-US; rv:7.0) Gecko/201
76 76 // SHOULD BE DEFINED IN MASTER /etc/php.ini !!!
77 77 // ini_set('upload_max_filesize',100000000);
78 78 // ini_set('post_max_size',1050000000);
  79 +
79 80 /*-----------------------END PHP run-time settings --------*/
80 81  
81 82 // General Info dirs
... ...
php/my_config.php
... ... @@ -20,7 +20,7 @@ define(&#39;SYS_BIN&#39;, &#39;/bin:/usr/bin/:/usr/local/bin/&#39;);
20 20 define('BASE_PATH', IHM_SRC_DIR);
21 21  
22 22 //DD WebServices
23   -define('INFOSITE', 'http://cdpp.irap.omp.eu/BASE/');
  23 +define('INFOSITE', 'http://amda-dev.irap.omp.eu/BASE/');
24 24 //log for AmdaUpdate/AmdaInstall
25 25 define('log', IHM_SRC_DIR.'LOG');
26 26 // User apache
... ... @@ -38,6 +38,9 @@ define(&#39;DDLIB&#39;,&#39;/opt/local/lib/&#39;);
38 38 define('DD_WSDL','http://amda-dev.irap.omp.eu/BASE/DDService/dd.wsdl');
39 39 define('TITLE', 'AMDANEW-Test');
40 40  
  41 +// real upload_max_filesize is defined in /etc/php.ini : ini_get('upload_max_filesize')
  42 +// here for additional flexibility
  43 +define('MAX_UPLOADED_FILESIZE',30000000); // in bytes !!!
41 44  
42 45 $is64 = true;
43 46  
... ...