Commit 715ccfee0ae928890f486c60a8c4bcedee3fcd8d

Authored by Myriam Bouchemit
2 parents 91410688 9105562e

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

generic_data/Functions/functions.xml
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <functions> 2 <functions>
3 - <function name="mean_(,)" args="1" kind="time">  
4 - <prompt>input averaging time in secs</prompt>  
5 - <info_brief>average</info_brief>  
6 - <new_kernel>#sampling_classic</new_kernel>  
7 - </function>  
8 - <function name="median_(,)" args="1" kind="time">  
9 - <prompt>input averaging time in secs</prompt>  
10 - <info_brief>median average</info_brief>  
11 - <new_kernel>#median</new_kernel>  
12 - </function>  
13 - <function name="rms_(,)" args="1" kind="time">  
14 - <prompt>input averaging time in secs</prompt>  
15 - <info_brief>root mean square</info_brief>  
16 - <new_kernel>#rms</new_kernel>  
17 - </function>  
18 - <function name="min_(,)" args="1" kind="time">  
19 - <prompt>input window time in secs</prompt>  
20 - <info_brief>min() function</info_brief>  
21 - <new_kernel>#min</new_kernel>  
22 - </function>  
23 - <function name="max_(,)" args="1" kind="time">  
24 - <prompt>input window time in secs</prompt>  
25 - <info_brief>max() function</info_brief>  
26 - <new_kernel>#max</new_kernel>  
27 - </function>  
28 - <function name="var_(,)" args="1" kind="time">  
29 - <prompt>input window time in secs</prompt>  
30 - <info_brief>variance() function</info_brief>  
31 - <new_kernel>#var</new_kernel>  
32 - </function>  
33 - <function name="skew_(,)" args="1" kind="time">  
34 - <prompt>input window time in secs</prompt>  
35 - <info_brief>skewness() function</info_brief>  
36 - <new_kernel>#skew</new_kernel>  
37 - </function>  
38 - <function name="mean_sm_(,)" args="1" kind="sliding">  
39 - <prompt>input averaging time in secs</prompt>  
40 - <info_brief>average</info_brief>  
41 - <new_kernel>#sliding_average</new_kernel>  
42 - </function>  
43 - <function name="rms_sm_(,)" args="1" kind="sliding">  
44 - <prompt>input averaging time in secs</prompt>  
45 - <info_brief>root mean square</info_brief>  
46 - <new_kernel>#rms_sm</new_kernel>  
47 - </function>  
48 - <function name="min_sm_(,)" args="1" kind="sliding">  
49 - <prompt>input window time in secs</prompt>  
50 - <info_brief>min() function</info_brief>  
51 - <new_kernel>#min_sm</new_kernel>  
52 - </function>  
53 - <function name="max_sm_(,)" args="1" kind="sliding">  
54 - <prompt>input window time in secs</prompt>  
55 - <info_brief>max() function</info_brief>  
56 - <new_kernel>#max_sm</new_kernel>  
57 - </function>  
58 - <function name="var_sm_(,)" args="1" kind="sliding">  
59 - <prompt>input window time in secs</prompt>  
60 - <info_brief>variance() function</info_brief>  
61 - <new_kernel>#var_sm</new_kernel>  
62 - </function>  
63 - <function name="skew_sm_(,)" args="1" kind="sliding">  
64 - <prompt>input window time in secs</prompt>  
65 - <info_brief>skewness() function</info_brief>  
66 - <new_kernel>#skew_sm</new_kernel>  
67 - </function>  
68 - <function name="smooth_(,)" args="1" kind="sliding">  
69 - <prompt>input averaging time in secs</prompt>  
70 - <info_brief>smooths with a boxcar average</info_brief>  
71 - <new_kernel>#boxcar</new_kernel>  
72 - </function>  
73 - <!-- <function name="shiftN_(,)" args="1" kind="amda">  
74 - <prompt>input number of points N to delay by</prompt>  
75 - <info_brief>Delays array by N points back (N &lt; 0) and forth (N &gt; 0)</info_brief>  
76 - </function>-->  
77 - <function name="shiftT_(,)" args="1" kind="amda">  
78 - <prompt>input time interval T in secs to delay by</prompt>  
79 - <info_brief>Delays array by T secs back (T &lt; 0) and forth (T &gt; 0))</info_brief>  
80 - <new_kernel>#timeShift</new_kernel>  
81 - </function>  
82 - <!-- <function name="gsegsm_()" argv="vector" kind="amda">  
83 - <prompt/>  
84 - <info_brief>GSE to GSM transformation</info_brief>  
85 - <new_kernel>#framesTransformation</new_kernel>  
86 - </function>  
87 - <function name="gsesm_()" argv="vector" kind="amda">  
88 - <prompt/>  
89 - <info_brief>GSE to SM transformation</info_brief>  
90 - </function>-->  
91 - <function name="cross(,)" params="2" kind="vectors">  
92 - <info_brief>Cross product</info_brief>  
93 - <new_kernel>cross</new_kernel>  
94 - </function>  
95 - <function name="dot(,)" params="2" kind="vectors">  
96 - <info_brief>Dot product</info_brief>  
97 - <new_kernel>dot</new_kernel>  
98 - </function>  
99 - <function name="module()" kind="vectors">  
100 - <info_brief>Magnitude</info_brief>  
101 - <new_kernel>magnitude</new_kernel>  
102 - </function>  
103 - <function name="abs()" kind="math">  
104 - <info_brief>Absolute value</info_brief>  
105 - <new_kernel>abs</new_kernel>  
106 - </function>  
107 - <function name="acos()" kind="math">  
108 - <info_brief>Arc-cosine</info_brief>  
109 - <new_kernel>acos</new_kernel>  
110 - </function>  
111 - <function name="alog()" kind="math">  
112 - <info_brief>Natural logarithm</info_brief>  
113 - <new_kernel>log</new_kernel>  
114 - </function>  
115 - <function name="alog10()" kind="math">  
116 - <info_brief>Logarithm to the base 10</info_brief>  
117 - <new_kernel>log10</new_kernel>  
118 - </function>  
119 - <function name="asin()" kind="math">  
120 - <info_brief>Arc-sine</info_brief>  
121 - <new_kernel>asin</new_kernel>  
122 - </function>  
123 - <function name="atan()" kind="math">  
124 - <info_brief>Arc-tangent</info_brief>  
125 - <new_kernel>atan</new_kernel>  
126 - </function>  
127 - <function name="atan2(,)" kind="math">  
128 - <info_brief>Arc-tangent</info_brief>  
129 - <new_kernel>atan_2f</new_kernel>  
130 - </function>  
131 - <function name="ceil()" kind="math">  
132 - <info_brief>Closest integer greater than or equal to its argument</info_brief>  
133 - <new_kernel>Ceil</new_kernel>  
134 - </function>  
135 - <function name="cos()" kind="math">  
136 - <info_brief>cosine</info_brief>  
137 - <new_kernel>cos</new_kernel>  
138 - </function>  
139 - <function name="cosh()" kind="math">  
140 - <info_brief>Hyperbolic cosine</info_brief>  
141 - <new_kernel>cosh</new_kernel>  
142 - </function>  
143 - <function name="deriv_()" kind="math">  
144 - <info_brief>deriv() function with possibly unequal point spacing</info_brief>  
145 - <new_kernel>#deriv</new_kernel>  
146 - </function>  
147 - <function name="exp()" kind="math">  
148 - <info_brief>Natural exponential function</info_brief>  
149 - <new_kernel>exp</new_kernel>  
150 - </function>  
151 - <function name="fix()" kind="math">  
152 - <info_brief>Integer</info_brief>  
153 - <new_kernel>Fix</new_kernel>  
154 - </function>  
155 - <function name="floor()" kind="math">  
156 - <info_brief>Closest integer less than or equal to its argument</info_brief>  
157 - <new_kernel>Floor</new_kernel>  
158 - </function>  
159 - <function name="sign()" kind="math">  
160 - <info_brief>Sign</info_brief>  
161 - <new_kernel>Sign</new_kernel>  
162 - </function>  
163 - <function name="sin()" kind="math">  
164 - <info_brief>Sine</info_brief>  
165 - <new_kernel>sin</new_kernel>  
166 - </function>  
167 - <function name="sinh()" kind="math">  
168 - <info_brief>Hyperbolic sine</info_brief>  
169 - <new_kernel>sinh</new_kernel>  
170 - </function>  
171 - <function name="tan()" kind="math">  
172 - <info_brief>Tangent</info_brief>  
173 - <new_kernel>tan</new_kernel>  
174 - </function>  
175 - <function name="tanh()" kind="math">  
176 - <info_brief>Hyperbolic tangent</info_brief>  
177 - <new_kernel>tanh</new_kernel>  
178 - </function>  
179 - <function name="sqrt()" kind="math">  
180 - <info_brief>Square root</info_brief>  
181 - <new_kernel>sqrt</new_kernel>  
182 - </function> 3 + <function name="mean_(,)" args="1" kind="time">
  4 + <prompt>input averaging time in secs</prompt>
  5 + <info_brief>average</info_brief>
  6 + <new_kernel>#sampling_classic</new_kernel>
  7 + </function>
  8 + <function name="median_(,)" args="1" kind="time">
  9 + <prompt>input averaging time in secs</prompt>
  10 + <info_brief>median average</info_brief>
  11 + <new_kernel>#median</new_kernel>
  12 + </function>
  13 + <function name="rms_(,)" args="1" kind="time">
  14 + <prompt>input averaging time in secs</prompt>
  15 + <info_brief>root mean square</info_brief>
  16 + <new_kernel>#rms</new_kernel>
  17 + </function>
  18 + <function name="min_(,)" args="1" kind="time">
  19 + <prompt>input window time in secs</prompt>
  20 + <info_brief>min() function</info_brief>
  21 + <new_kernel>#min</new_kernel>
  22 + </function>
  23 + <function name="max_(,)" args="1" kind="time">
  24 + <prompt>input window time in secs</prompt>
  25 + <info_brief>max() function</info_brief>
  26 + <new_kernel>#max</new_kernel>
  27 + </function>
  28 + <function name="var_(,)" args="1" kind="time">
  29 + <prompt>input window time in secs</prompt>
  30 + <info_brief>variance() function</info_brief>
  31 + <new_kernel>#var</new_kernel>
  32 + </function>
  33 + <function name="skew_(,)" args="1" kind="time">
  34 + <prompt>input window time in secs</prompt>
  35 + <info_brief>skewness() function</info_brief>
  36 + <new_kernel>#skew</new_kernel>
  37 + </function>
  38 + <function name="mean_sm_(,)" args="1" kind="sliding">
  39 + <prompt>input averaging time in secs</prompt>
  40 + <info_brief>average</info_brief>
  41 + <new_kernel>#sliding_average</new_kernel>
  42 + </function>
  43 + <function name="rms_sm_(,)" args="1" kind="sliding">
  44 + <prompt>input averaging time in secs</prompt>
  45 + <info_brief>root mean square</info_brief>
  46 + <new_kernel>#rms_sm</new_kernel>
  47 + </function>
  48 + <function name="min_sm_(,)" args="1" kind="sliding">
  49 + <prompt>input window time in secs</prompt>
  50 + <info_brief>min() function</info_brief>
  51 + <new_kernel>#min_sm</new_kernel>
  52 + </function>
  53 + <function name="max_sm_(,)" args="1" kind="sliding">
  54 + <prompt>input window time in secs</prompt>
  55 + <info_brief>max() function</info_brief>
  56 + <new_kernel>#max_sm</new_kernel>
  57 + </function>
  58 + <function name="var_sm_(,)" args="1" kind="sliding">
  59 + <prompt>input window time in secs</prompt>
  60 + <info_brief>variance() function</info_brief>
  61 + <new_kernel>#var_sm</new_kernel>
  62 + </function>
  63 + <function name="skew_sm_(,)" args="1" kind="sliding">
  64 + <prompt>input window time in secs</prompt>
  65 + <info_brief>skewness() function</info_brief>
  66 + <new_kernel>#skew_sm</new_kernel>
  67 + </function>
  68 + <function name="smooth_(,)" args="1" kind="sliding">
  69 + <prompt>input averaging time in secs</prompt>
  70 + <info_brief>smooths with a boxcar average</info_brief>
  71 + <new_kernel>#boxcar</new_kernel>
  72 + </function>
  73 + <!-- <function name="shiftN_(,)" args="1" kind="amda">
  74 + <prompt>input number of points N to delay by</prompt>
  75 + <info_brief>Delays array by N points back (N &lt; 0) and forth (N &gt; 0)</info_brief>
  76 + </function>-->
  77 + <function name="shiftT_(,)" args="1" kind="amda">
  78 + <prompt>input time interval T in secs to delay by</prompt>
  79 + <info_brief>Delays array by T secs back (T &lt; 0) and forth (T &gt; 0))</info_brief>
  80 + <new_kernel>#timeShift</new_kernel>
  81 + </function>
  82 + <!-- <function name="gsegsm_()" argv="vector" kind="amda">
  83 + <prompt/>
  84 + <info_brief>GSE to GSM transformation</info_brief>
  85 + <new_kernel>#framesTransformation</new_kernel>
  86 + </function>
  87 + <function name="gsesm_()" argv="vector" kind="amda">
  88 + <prompt/>
  89 + <info_brief>GSE to SM transformation</info_brief>
  90 + </function>-->
  91 + <function name="angle(,)" params="2" kind="vectors">
  92 + <info_brief>Angle between two vectors</info_brief>
  93 + <new_kernel>angle</new_kernel>
  94 + </function>
  95 +
  96 + <function name="cross(,)" params="2" kind="vectors">
  97 + <info_brief>Cross product</info_brief>
  98 + <new_kernel>cross</new_kernel>
  99 + </function>
  100 +
  101 + <function name="dot(,)" params="2" kind="vectors">
  102 + <info_brief>Dot product</info_brief>
  103 + <new_kernel>dot</new_kernel>
  104 + </function>
  105 +
  106 + <function name="module()" kind="vectors">
  107 + <info_brief>Magnitude</info_brief>
  108 + <new_kernel>magnitude</new_kernel>
  109 + </function>
  110 +
  111 + <function name="abs()" kind="math">
  112 + <info_brief>Absolute value</info_brief>
  113 + <new_kernel>abs</new_kernel>
  114 + </function>
  115 + <function name="acos()" kind="math">
  116 + <info_brief>Arc-cosine</info_brief>
  117 + <new_kernel>acos</new_kernel>
  118 + </function>
  119 + <function name="alog()" kind="math">
  120 + <info_brief>Natural logarithm</info_brief>
  121 + <new_kernel>log</new_kernel>
  122 + </function>
  123 + <function name="alog10()" kind="math">
  124 + <info_brief>Logarithm to the base 10</info_brief>
  125 + <new_kernel>log10</new_kernel>
  126 + </function>
  127 + <function name="asin()" kind="math">
  128 + <info_brief>Arc-sine</info_brief>
  129 + <new_kernel>asin</new_kernel>
  130 + </function>
  131 + <function name="atan()" kind="math">
  132 + <info_brief>Arc-tangent</info_brief>
  133 + <new_kernel>atan</new_kernel>
  134 + </function>
  135 + <function name="atan2(,)" kind="math">
  136 + <info_brief>Arc-tangent</info_brief>
  137 + <new_kernel>atan_2f</new_kernel>
  138 + </function>
  139 + <function name="ceil()" kind="math">
  140 + <info_brief>Closest integer greater than or equal to its argument</info_brief>
  141 + <new_kernel>Ceil</new_kernel>
  142 + </function>
  143 + <function name="cos()" kind="math">
  144 + <info_brief>cosine</info_brief>
  145 + <new_kernel>cos</new_kernel>
  146 + </function>
  147 + <function name="cosh()" kind="math">
  148 + <info_brief>Hyperbolic cosine</info_brief>
  149 + <new_kernel>cosh</new_kernel>
  150 + </function>
  151 + <function name="deriv_()" kind="math">
  152 + <info_brief>deriv() function with possibly unequal point spacing</info_brief>
  153 + <new_kernel>#deriv</new_kernel>
  154 + </function>
  155 + <function name="exp()" kind="math">
  156 + <info_brief>Natural exponential function</info_brief>
  157 + <new_kernel>exp</new_kernel>
  158 + </function>
  159 + <function name="fix()" kind="math">
  160 + <info_brief>Integer</info_brief>
  161 + <new_kernel>Fix</new_kernel>
  162 + </function>
  163 + <function name="floor()" kind="math">
  164 + <info_brief>Closest integer less than or equal to its argument</info_brief>
  165 + <new_kernel>Floor</new_kernel>
  166 + </function>
  167 + <function name="sign()" kind="math">
  168 + <info_brief>Sign</info_brief>
  169 + <new_kernel>Sign</new_kernel>
  170 + </function>
  171 + <function name="sin()" kind="math">
  172 + <info_brief>Sine</info_brief>
  173 + <new_kernel>sin</new_kernel>
  174 + </function>
  175 + <function name="sinh()" kind="math">
  176 + <info_brief>Hyperbolic sine</info_brief>
  177 + <new_kernel>sinh</new_kernel>
  178 + </function>
  179 + <function name="tan()" kind="math">
  180 + <info_brief>Tangent</info_brief>
  181 + <new_kernel>tan</new_kernel>
  182 + </function>
  183 + <function name="tanh()" kind="math">
  184 + <info_brief>Hyperbolic tangent</info_brief>
  185 + <new_kernel>tanh</new_kernel>
  186 + </function>
  187 + <function name="sqrt()" kind="math">
  188 + <info_brief>Square root</info_brief>
  189 + <new_kernel>sqrt</new_kernel>
  190 + </function>
183 </functions> 191 </functions>
help/parameters/curlometer.pdf 0 โ†’ 100644
No preview for this file type
@@ -63,12 +63,12 @@ @@ -63,12 +63,12 @@
63 })(window.location.search.substr(1).split('&')); 63 })(window.location.search.substr(1).split('&'));
64 64
65 if (qs["error"] && qs["error"] == "1") { 65 if (qs["error"] && qs["error"] == "1") {
66 - alert('Cannot connect to AMDA'); 66 + alert('Cannot connect to AMDA. \n Please check your username/password');
  67 + setLoginLoader(false);
67 return false; 68 return false;
68 } 69 }
69 70
70 setLoginLoader(false); 71 setLoginLoader(false);
71 -  
72 }; 72 };
73 </script> 73 </script>
74 <a href="mailto:amda@irap.omp.eu?subject=AMDA registration" id="Btn_Register"></a> 74 <a href="mailto:amda@irap.omp.eu?subject=AMDA registration" id="Btn_Register"></a>
js/app/AmdaApp.js
@@ -625,52 +625,10 @@ Ext.define(&#39;amdaApp.AmdaApp&#39;, { @@ -625,52 +625,10 @@ Ext.define(&#39;amdaApp.AmdaApp&#39;, {
625 'MB rests'); 625 'MB rests');
626 } 626 }
627 627
628 - if (isFirstVisit && !isGuest) {  
629 -  
630 - if (isMigration) { // isSpecialInfo  
631 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {  
632 - module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);  
633 - if ( isOldWS ) {  
634 - var win = myDesktopApp.getDesktop().getWindow(myDesktopApp.dynamicModules.info.id);  
635 - win.on({  
636 - show : function() {  
637 - Ext.Msg.show({  
638 - title:'Welcome to new AMDA',  
639 - msg: 'It is your first visit to the new version of AMDA.<br/>'+  
640 - 'Do you want to copy here your workspace from the old AMDA ?',  
641 - buttons: Ext.Msg.YESNO,  
642 - icon: Ext.Msg.QUESTION,  
643 - fn : function (btn) {  
644 - if (btn == 'yes') {  
645 - loadMask.show();  
646 - AmdaAction.convertWS(function(res,e){  
647 - var explorerModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.explorer.id);  
648 - explorerModule.filtersStore.reload();  
649 - loadMask.hide();  
650 -  
651 - if (res.success == true) {  
652 - myDesktopApp.infoMsgLong('<b>Your Wokspace has been copied to new AMDA</b><br/><br/> ' + res.msg);  
653 - }  
654 - else {  
655 - myDesktopApp.errorMsg(res.error);  
656 - }  
657 - });  
658 - }  
659 - }  
660 - });  
661 - },  
662 - scope : this });  
663 -  
664 - var yy = Ext.getBody().getViewSize().height / 3;  
665 - win.setPosition(0,yy,true);  
666 - }  
667 - })  
668 - }  
669 - else {  
670 - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function(module) {  
671 - module.createWindow();  
672 - });  
673 - } 628 + if (isFirstVisit && !isGuest) {
  629 + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function(module) {
  630 + module.createWindow();
  631 + });
674 } 632 }
675 else { 633 else {
676 if (isSpecialInfo && !isNewInfo) { 634 if (isSpecialInfo && !isNewInfo) {
js/app/views/ExplorerUI.js
@@ -597,7 +597,7 @@ Ext.define(&#39;amdaUI.ExplorerUI&#39;, { @@ -597,7 +597,7 @@ Ext.define(&#39;amdaUI.ExplorerUI&#39;, {
597 case 'localParam' : 597 case 'localParam' :
598 case 'remoteParam': 598 case 'remoteParam':
599 case 'remoteSimuParam': 599 case 'remoteSimuParam':
600 - record.createAlias(record); 600 + record.createPlot(record);
601 break; 601 break;
602 case 'bkgWorks' : 602 case 'bkgWorks' :
603 if (!record.get('object')) { 603 if (!record.get('object')) {
js/app/views/ParameterUI.js
@@ -441,7 +441,7 @@ Ext.define(&#39;amdaUI.ParameterUI&#39;, @@ -441,7 +441,7 @@ Ext.define(&#39;amdaUI.ParameterUI&#39;,
441 allowBlank : false, blankText : 'Time Step is required', 441 allowBlank : false, blankText : 'Time Step is required',
442 name : 'timestep', 442 name : 'timestep',
443 minValue : 0.001, 443 minValue : 0.001,
444 - decimalPrecision : 3, 444 + decimalPrecision : 10,
445 hideTrigger: true, 445 hideTrigger: true,
446 width: 150, 446 width: 150,
447 //validateOnChange: false, 447 //validateOnChange: false,
js/app/views/PlotTabResultUI.js
@@ -376,6 +376,7 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, { @@ -376,6 +376,7 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
376 376
377 updatePlotImage: function(configResult, newPlot) { 377 updatePlotImage: function(configResult, newPlot) {
378 this.crtContext = configResult.context; 378 this.crtContext = configResult.context;
  379 +
379 380
380 this.crtTTFileIndex = configResult.ttFileIndex; 381 this.crtTTFileIndex = configResult.ttFileIndex;
381 382
@@ -509,15 +510,8 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, { @@ -509,15 +510,8 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
509 var ttFileIndex = this.crtTTFileIndex; 510 var ttFileIndex = this.crtTTFileIndex;
510 var ttintervalIndex = this.crtContext.page.ttIndex; 511 var ttintervalIndex = this.crtContext.page.ttIndex;
511 512
512 - if (ttintervalIndex <= 0){  
513 - if (ttFileIndex <= 0){  
514 - myDesktopApp.errorMsg('You are on the first interval of your request');  
515 - return;  
516 - }  
517 - else {  
518 - --ttFileIndex;  
519 - ttintervalIndex = 0;  
520 - } 513 + if (ttintervalIndex <= 0 && ttFileIndex>0){
  514 + --ttFileIndex;
521 } 515 }
522 else 516 else
523 --ttintervalIndex; 517 --ttintervalIndex;
@@ -533,6 +527,7 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, { @@ -533,6 +527,7 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
533 var ttintervalIndex = this.crtContext.page.ttIndex; 527 var ttintervalIndex = this.crtContext.page.ttIndex;
534 528
535 if (ttintervalIndex >= this.crtContext.page.ttNbIntervals-1){ 529 if (ttintervalIndex >= this.crtContext.page.ttNbIntervals-1){
  530 +
536 ++ttFileIndex; 531 ++ttFileIndex;
537 ttintervalIndex = 0; 532 ttintervalIndex = 0;
538 } 533 }
php/classes/AmdaAction.php
@@ -367,11 +367,11 @@ class AmdaAction @@ -367,11 +367,11 @@ class AmdaAction
367 $disable = $child->hasAttribute('group'); 367 $disable = $child->hasAttribute('group');
368 368
369 if ($disable) { 369 if ($disable) {
370 - if ($child->getAttribute("group") !== "TBD") {  
371 - $info .= "<br/><b>Restricted Access</b>"; 370 + if ($child->getAttribute("group") === "TBD") {
  371 + $info .= "<br/><b>Under Testing</b>";
372 } 372 }
373 else { 373 else {
374 - $info .= "<br/><b>Sorry! Not finished yet...</b>"; 374 + $info .= "<br/><b>Restricted Access : Group ".$child->getAttribute('group')."</b>";
375 } 375 }
376 } 376 }
377 else { 377 else {
@@ -1031,7 +1031,6 @@ class AmdaAction @@ -1031,7 +1031,6 @@ class AmdaAction
1031 */ 1031 */
1032 public function compilParam($obj) 1032 public function compilParam($obj)
1033 { 1033 {
1034 -//error_log(print_r($obj,TRUE));  
1035 return $this->executeRequest($obj, FunctionTypeEnumClass::PARAMSGEN); 1034 return $this->executeRequest($obj, FunctionTypeEnumClass::PARAMSGEN);
1036 } 1035 }
1037 1036
@@ -1375,12 +1374,6 @@ class AmdaAction @@ -1375,12 +1374,6 @@ class AmdaAction
1375 return $dd->getUserInfo(); 1374 return $dd->getUserInfo();
1376 } 1375 }
1377 1376
1378 - public function convertWS()  
1379 - {  
1380 - $dd = new UserMgr();  
1381 - return $dd->convertWS();  
1382 - }  
1383 -  
1384 // $obj ={"Object":"Earth","RunCount":"2", 1377 // $obj ={"Object":"Earth","RunCount":"2",
1385 // "SW_Density_value":"10","SW_Density_weight":"1","SW_Density_scale":"7","SW_Temperature_value":"100", ....} 1378 // "SW_Density_value":"10","SW_Density_weight":"1","SW_Density_scale":"7","SW_Temperature_value":"100", ....}
1386 public function getRun($obj) 1379 public function getRun($obj)
php/classes/FilesMgr.php
@@ -273,7 +273,7 @@ class FilesMgr extends AmdaObjectMgr @@ -273,7 +273,7 @@ class FilesMgr extends AmdaObjectMgr
273 while (!feof($handler) && !$StartTime) { 273 while (!feof($handler) && !$StartTime) {
274 $oneLine = trim(preg_replace('/\s+/', ' ', fgets($handler))); 274 $oneLine = trim(preg_replace('/\s+/', ' ', fgets($handler)));
275 $elems = explode(' ', $oneLine); 275 $elems = explode(' ', $oneLine);
276 - if ((strlen($elems[0]) < 16) || !($time = strtotime($elems[0]))) { 276 + if ((strlen($elems[0]) < 15) || !($time = strtotime($elems[0]))) {
277 $i++; 277 $i++;
278 continue; 278 continue;
279 } 279 }
@@ -310,7 +310,7 @@ class FilesMgr extends AmdaObjectMgr @@ -310,7 +310,7 @@ class FilesMgr extends AmdaObjectMgr
310 while (!feof($handler) && !$StartTime) { 310 while (!feof($handler) && !$StartTime) {
311 $oneLine = trim(preg_replace('/\s+/', ' ', fgets($handler))); 311 $oneLine = trim(preg_replace('/\s+/', ' ', fgets($handler)));
312 $elems = explode(' ',$oneLine); 312 $elems = explode(' ',$oneLine);
313 - if (strlen($elems[0]) < 16 || !($time = strtotime($elems[0]))) { 313 + if (strlen($elems[0]) < 15 || !($time = strtotime($elems[0]))) {
314 $i++; 314 $i++;
315 continue; 315 continue;
316 } 316 }
@@ -532,7 +532,7 @@ class FilesMgr extends AmdaObjectMgr @@ -532,7 +532,7 @@ class FilesMgr extends AmdaObjectMgr
532 $i++; 532 $i++;
533 if (!$timeDouble) 533 if (!$timeDouble)
534 { 534 {
535 - if (strlen($elems[0]) >= 16 && ($time = strtotime($elems[0]))) 535 + if (strlen($elems[0]) >= 15 && ($time = strtotime($elems[0])))
536 { 536 {
537 $found = true; 537 $found = true;
538 break; 538 break;
php/classes/UserMgr.php
@@ -26,7 +26,7 @@ class UserMgr @@ -26,7 +26,7 @@ class UserMgr
26 protected $paramMgr, $baseExtXml; 26 protected $paramMgr, $baseExtXml;
27 27
28 public $isFirst = false; 28 public $isFirst = false;
29 - public $isOldWS = true; 29 + public $isOldWS = false;
30 public $isNewInfo = false; 30 public $isNewInfo = false;
31 public $isSpecialInfo = null; 31 public $isSpecialInfo = null;
32 public $isGuest = false; 32 public $isGuest = false;
@@ -461,39 +461,6 @@ class UserMgr @@ -461,39 +461,6 @@ class UserMgr
461 /***************************************************************** 461 /*****************************************************************
462 * PUBLIC FUNCTIONS 462 * PUBLIC FUNCTIONS
463 *****************************************************************/ 463 *****************************************************************/
464 - // migration from old to new AMDA  
465 - public function convertWS()  
466 - {  
467 - $convert = new UserWsTransfer($this->user);  
468 -  
469 - $res = $convert->checkWS();  
470 - if (!$res['success']) return $res;  
471 -  
472 - $res = $convert->transferMyData();  
473 - $msg = $res['msg'];  
474 -  
475 - $res = $convert->transferDerived();  
476 - $msg .= $res['msg'];  
477 -  
478 - $res = $convert->transferTimeTables();  
479 - $msg .= $res['msg'];  
480 -  
481 - $res = $convert->transferConditions();  
482 - $msg .= $res['msg'];  
483 -  
484 -// $res = $convert->transferRequests();  
485 -// $msg .= $res['msg'];  
486 -  
487 - $res = $convert->transferFilters();  
488 - $msg .= $res['msg'];  
489 -  
490 - $info = $this->amdaClient->getUserInfo($this->user);  
491 - $email = $info["email"];  
492 -  
493 - $convert->sendMail($email,$msg);  
494 - // error_log('Transfer workspace from old AMDA for '.$this->user, 1, 'amda@irap.omp.eu');  
495 - return array('success' => true, 'msg' => $msg);  
496 - }  
497 464
498 public function setPath() 465 public function setPath()
499 { 466 {
@@ -547,16 +514,6 @@ class UserMgr @@ -547,16 +514,6 @@ class UserMgr
547 die("Login for ".$this->user." failed: Can't create WS dirs"); 514 die("Login for ".$this->user." failed: Can't create WS dirs");
548 } 515 }
549 $this->isFirst = true; 516 $this->isFirst = true;
550 -  
551 - if ($this->isGuest) {  
552 - $this->isOldWS = false;  
553 - }  
554 - else {  
555 - $convert = new UserWsTransfer($this->user);  
556 - $res = $convert->checkWS();  
557 - if (!$res['success'])  
558 - $this->isOldWS = false;  
559 - }  
560 } 517 }
561 518
562 if (file_exists($this->userdir.'newLogin')) { 519 if (file_exists($this->userdir.'newLogin')) {
@@ -714,34 +671,34 @@ class UserMgr @@ -714,34 +671,34 @@ class UserMgr
714 return $wsSize; 671 return $wsSize;
715 } 672 }
716 673
717 - // http://www.ilovejackdaniels.com/php/email-address-validation/ 674 + // http://www.ilovejackdaniels.com/php/email-address-validation/
718 public function check_email_address($email) 675 public function check_email_address($email)
719 { 676 {
720 // First, we check that there's one @ symbol, and that the lengths are right 677 // First, we check that there's one @ symbol, and that the lengths are right
721 - if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) 678 + if (!preg_match("/^[^@]{1,64}@[^@]{1,255}$/", $email))
722 { 679 {
723 // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. 680 // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
724 return false; 681 return false;
725 } 682 }
726 - 683 +
727 // Split it into sections to make life easier 684 // Split it into sections to make life easier
728 $email_array = explode("@", $email); 685 $email_array = explode("@", $email);
729 $local_array = explode(".", $email_array[0]); 686 $local_array = explode(".", $email_array[0]);
730 for ($i = 0; $i < sizeof($local_array); $i++) 687 for ($i = 0; $i < sizeof($local_array); $i++)
731 { 688 {
732 - if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { 689 + if (!preg_match("@^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$@", $local_array[$i])) {
733 return false; 690 return false;
734 } 691 }
735 } 692 }
736 693
737 - if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name 694 + if (!preg_match("/^\[?[0-9\.]+\]?$/", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
738 $domain_array = explode(".", $email_array[1]); 695 $domain_array = explode(".", $email_array[1]);
739 if (sizeof($domain_array) < 2) { 696 if (sizeof($domain_array) < 2) {
740 return false; // Not enough parts to domain 697 return false; // Not enough parts to domain
741 } 698 }
742 for ($i = 0; $i < sizeof($domain_array); $i++) 699 for ($i = 0; $i < sizeof($domain_array); $i++)
743 { 700 {
744 - if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { 701 + if (!preg_match("/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/", $domain_array[$i])) {
745 return false; 702 return false;
746 } 703 }
747 } 704 }
php/classes/UserWsTransfer.php deleted
@@ -1,639 +0,0 @@ @@ -1,639 +0,0 @@
1 -<?php  
2 -/**  
3 - * @class UserWsTransfer  
4 - */  
5 -  
6 -class UserWsTransfer {  
7 -  
8 - private $oldWs, $newWs, $Mgr;  
9 - private $oldWsDir, $newWsDir;  
10 - private $ws_deleted, $wsd_deleted, $pairs, $specParams, $postPairs;  
11 -  
12 - function __construct($user)  
13 - {  
14 - define('OLDUSERPATH', 'http://cdpp1.irap.omp.eu/AMDA-NG/data/');  
15 - // define('OLDUSERPATH', 'http://amda-dev.irap.omp.eu/~budnik/AMDA-NG4/trunk/data/');  
16 - define('NEWUSERPATH', USERPATH);  
17 - define('TRANSFERUSER', $user);  
18 - define('CONVERSIONDIR', DATAPATH."migration/");  
19 -  
20 - $this->oldWs = new DomDocument("1.0");  
21 - $this->newWs = new DomDocument("1.0");  
22 -  
23 - $this->oldWsDir = OLDUSERPATH.TRANSFERUSER.'/WS/';  
24 - $this->newWsDir = NEWUSERPATH.TRANSFERUSER.'/WS/';  
25 -  
26 - if (!is_dir(NEWUSERPATH.TRANSFERUSER.'/WS'))  
27 - mkdir(NEWUSERPATH.TRANSFERUSER.'/WS', 0775);  
28 -  
29 - $this->ws_deleted = array();  
30 - $this->wsd_deleted = array();  
31 - $this->getModified();  
32 - $this->getReprocessed();  
33 - $this->getSpectra();  
34 - }  
35 -  
36 - private function getObsolete() {  
37 -  
38 - $deletedXML = new DomDocument("1.0");  
39 - $deletedXML->load(CONVERSIONDIR."Deleted.xml");  
40 - $deletedNodes = $deletedXML->getElementsByTagName('deleted');  
41 -  
42 - $deleted = array();  
43 - foreach ($deletedNodes as $node)  
44 - $deleted[] = $node->getAttribute('xml:id');  
45 -  
46 - return $deleted;  
47 - }  
48 -  
49 - private function getNotreadyFunctions() {  
50 -  
51 - $deletedXML = new DomDocument("1.0");  
52 - $deletedXML->load(CONVERSIONDIR."Functions.xml");  
53 - $deletedNodes = $deletedXML->getElementsByTagName('deleted');  
54 -  
55 - $notready = array();  
56 - foreach ($deletedNodes as $node)  
57 - $notready[] = $node->getAttribute('xml:id');  
58 -  
59 - return $notready;  
60 - }  
61 -  
62 - private function getNotready() {  
63 -  
64 - $deletedXML = new DomDocument("1.0");  
65 - $deletedXML->load(CONVERSIONDIR."NotReady.xml");  
66 - $deletedNodes = $deletedXML->getElementsByTagName('deleted');  
67 -  
68 - $notready = array();  
69 - foreach ($deletedNodes as $node)  
70 - $notready[] = $node->getAttribute('xml:id');  
71 -  
72 - return $notready;  
73 - }  
74 -  
75 - private function deleteParam($exp, $deleted)  
76 - {  
77 - $toDelete = false;  
78 -  
79 - if (count($deleted) > 0)  
80 - foreach ($deleted as $item) {  
81 - if (strpos($exp, $item) !== false) {  
82 - $toDelete = true;  
83 - break;  
84 - }  
85 - }  
86 -  
87 - return $toDelete;  
88 - }  
89 -  
90 - private function getWs($exp)  
91 - {  
92 - $ws = array();  
93 -  
94 - if (strpos($exp, 'ws_') !== false) {  
95 - $arr = $this->delimitIt($exp);  
96 - foreach ($arr as $item) {  
97 - if (strpos($item, 'ws_') !== false)  
98 - $ws[] = substr($item,3);  
99 - }  
100 - return $ws;  
101 - }  
102 - return false;  
103 - }  
104 -  
105 - private function delimitIt($chain) {  
106 -  
107 - $delimiter = '[]+,/*()^<>&|=[-]+';  
108 - $array = split($delimiter,$chain);  
109 - if (trim(end($array)) == "") array_pop($array);  
110 -  
111 - return $array;  
112 - }  
113 -  
114 - private function getModified()  
115 - {  
116 - $convertXML = new DomDocument("1.0");  
117 - $modifiedFile = CONVERSIONDIR.'Modified.xml';  
118 -  
119 - if (!$convertXML->load($modifiedFile))  
120 - error_log('ERROR loading '.$modifiedFile,1,email);  
121 - $convertedNodes = $convertXML->getElementsByTagName('param_convert');  
122 -  
123 - foreach ($convertedNodes as $item) {  
124 - $pairs[$item->getAttribute('oldid')] = $item->getAttribute('xml:id');  
125 - }  
126 - krsort($pairs, SORT_NATURAL);  
127 -  
128 - $this->pairs = $pairs;  
129 - }  
130 -  
131 - private function getReprocessed()  
132 - {  
133 - $convertXML = new DomDocument("1.0");  
134 - $modifiedFile = CONVERSIONDIR.'PostProcess.xml';  
135 -  
136 - if (!$convertXML->load($modifiedFile))  
137 - error_log('ERROR loading '.$modifiedFile,1,email);  
138 - $convertedNodes = $convertXML->getElementsByTagName('param_convert');  
139 -  
140 - foreach ($convertedNodes as $item) {  
141 - $pairs[$item->getAttribute('oldid')] = $item->getAttribute('xml:id');  
142 - }  
143 - krsort($pairs, SORT_NATURAL);  
144 -  
145 - $this->postPairs = $pairs;  
146 - }  
147 -  
148 - private function getSpectra()  
149 - {  
150 - $convertXML = new DomDocument("1.0");  
151 - $modifiedFile = CONVERSIONDIR.'SpectraModifs.xml';  
152 -  
153 - if (!$convertXML->load($modifiedFile))  
154 - error_log('ERROR loading '.$modifiedFile,1,email);  
155 - $convertedNodes = $convertXML->getElementsByTagName('deleted');  
156 -  
157 - foreach ($convertedNodes as $item) {  
158 - $this->specParams[] = $item->getAttribute('xml:id');  
159 - }  
160 - }  
161 -  
162 - private function updateParams($expression)  
163 - {  
164 - $newExp = strtr($expression, $this->pairs);  
165 - if (!empty($this->postPairs))  
166 - $expFinal = strtr($newExp, $this->postPairs);  
167 -  
168 - return $expFinal;  
169 - }  
170 -  
171 -  
172 - protected function createDom()  
173 - {  
174 - $types = array('param' => 'derived', 'mydata' => 'myData');  
175 -  
176 - $rootElement = $this->newWs->createElement('ws');  
177 - foreach ($types as $key => $value)  
178 - {  
179 - $contentId = $value.'Param-treeRootNode';  
180 - $contentTag = $key.'List';  
181 - $typeElement = $this->newWs->createElement($contentTag);  
182 - $typeElement->setAttribute('xml:id', $contentId);  
183 - $rootElement->appendChild($typeElement);  
184 - }  
185 -  
186 - $this->newWs->appendChild($rootElement);  
187 - $this->newWs->save($this->newWsDir.'WsParams.xml');  
188 - }  
189 -  
190 - public function urlExists($url)  
191 - {  
192 - $handle = curl_init($url);  
193 - curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);  
194 -  
195 - $response = curl_exec($handle);  
196 - $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);  
197 - curl_close($handle);  
198 -  
199 - if($httpCode >= 200 && $httpCode <= 400 || $httpCode == 403) {  
200 - return true;  
201 - } else {  
202 - return false;  
203 - }  
204 - }  
205 -  
206 - public function checkWS()  
207 - {  
208 - // old ws  
209 - if (!$this->urlExists(OLDUSERPATH.TRANSFERUSER)) {  
210 - error_log('no '.TRANSFERUSER.' at old AMDA',1,email);  
211 - return array('success' => false, 'error' => 'Sorry, it seems you have no account at old AMDA');  
212 - }  
213 -  
214 - if (!$this->urlExists($this->oldWsDir)) {  
215 - error_log('no ws.xml for '.TRANSFERUSER,1,email);  
216 - return array('success' => false, 'error' => 'Sorry, we failed to find your workspace at old AMDA');  
217 - }  
218 -  
219 - return array('success' => true);  
220 - }  
221 -  
222 - public function transferDerived()  
223 - {  
224 - $msg = '<hr><br/><b><i>Derived Params:</i></b><br/><br/>';  
225 - $msg .= '<i>Note</i> : Parameters made from Remote Base parameters are not copied <br/><br/>';  
226 - if (!$this->oldWs->load($this->oldWsDir.'WsParams.xml')) {  
227 - error_log('cannot load WsParams.xml for '.TRANSFERUSER,1,email);  
228 - return array('success' => false, 'error' => 'Sorry, we failed to get your Derived Params from old AMDA');  
229 - }  
230 -  
231 - if (!file_exists($this->newWsDir.'WsParams.xml'))  
232 - $this->createDom();  
233 - else  
234 - $this->newWs->load($this->newWsDir.'WsParams.xml');  
235 -  
236 - $deleted = $this->getObsolete();  
237 -  
238 - $notready = $this->getNotready();  
239 - $notreadyFunctions = $this->getNotreadyFunctions();  
240 -  
241 - $wsParamNode = $this->newWs->getElementsByTagName('paramList')->item(0);  
242 -  
243 - $wsParamsOld = $this->oldWs->getElementsByTagName('param');  
244 -  
245 - if ($wsParamsOld->length == 0) {  
246 - return array('success' => true, 'msg' => 'No parameters');  
247 - }  
248 -  
249 - $paramXml = new DomDocument("1.0");  
250 -  
251 - $msg .= 'Some expressions could have problems while being processed by new kernel <br/> - <b>Please send us feedback in this case.</b><br><br>Not copied derived parameters :<br/>';  
252 -  
253 - foreach ($wsParamsOld as $param) {  
254 - $id = $param->getAttribute('xml:id');  
255 - $name = $param->getAttribute('name');  
256 -  
257 - $expression = $param->getAttribute('buildchain');  
258 -  
259 - if ($this->deleteParam($expression,$deleted)) {  
260 - $msg .= '<li><i>'.$name.'</i> : uses obsolete param<br/> '.$expression.'<br/>';  
261 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
262 - $this->ws_deleted[] = $name;  
263 - continue;  
264 - }  
265 -  
266 - if ($this->deleteParam($expression,$notready)) {  
267 - $msg .= '<li><i>'.$name.'</i> : uses param not ready yet <br/> '.$expression.'<br/>';  
268 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
269 - $this->ws_deleted[] = $name;  
270 - continue;  
271 - }  
272 -  
273 - if ($this->deleteParam($expression,$notreadyFunctions)) {  
274 - $msg .= '<li><i>'.$name.'</i> : uses function not ready yet <br/> '.$expression.'<br/>';  
275 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
276 - $this->ws_deleted[] = $name;  
277 - continue;  
278 - }  
279 -  
280 - if (!empty($this->wsd_deleted))  
281 - if ($this->deleteParam($expression,$this->wsd_deleted)) {  
282 - $msg .= '<li><i>'.$name.'</i> : uses obsolete myData param<br/> '.$expression.'<br/>';  
283 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
284 - $this->ws_deleted[] = $name;  
285 - continue;  
286 - }  
287 -  
288 - if ($this->deleteParam($expression,array("CDAWEB","MAPSKP","VEXGRAZ","IMPEX"))) {  
289 - $msg .= '<li><i>'.$name.'</i> : uses remote params <br/> '.$expression.'<br/>';  
290 - $this->ws_deleted[] = $name;  
291 - continue;  
292 - }  
293 -  
294 - if ($this->deleteParam($expression,$this->specParams)) {  
295 - $msg .= '<li><i>'.$name.'</i> : too much difference <br/> '.$expression.'<br/>';  
296 - $this->ws_deleted[] = $name;  
297 - continue;  
298 - }  
299 -  
300 - $expressionUpdated = $this->updateParams($expression);  
301 -  
302 - $wsParamNode->appendChild($this->newWs->importNode($param));  
303 -  
304 - $paramXml->load($this->oldWsDir.$id.'.xml');  
305 - $expressionNode = $paramXml->getElementsByTagName('buildchain')->item(0);  
306 - $expressionNode->nodeValue = $expressionUpdated;  
307 - $paramXml->save($this->newWsDir.$id.'.xml');  
308 -  
309 - $nodeInWS = $this->newWs->getElementById($id);  
310 - if ($nodeInWS) {  
311 - $buildchain = $nodeInWS->getAttribute('buildchain');  
312 - $buildchainUpdated = $this->updateParams($buildchain);  
313 -  
314 - $nodeInWS->setAttribute('buildchain',$buildchainUpdated);  
315 - }  
316 - }  
317 -  
318 - // check of 'ws bricks' were deleted  
319 - $newParams = $this->newWs->getElementsByTagName('param');  
320 - $xp = new domxpath($this->newWs);  
321 - $paramsToRemove = array();  
322 -  
323 - foreach ($newParams as $param) {  
324 - $id = $param->getAttribute('xml:id');  
325 - $name = $param->getAttribute('name');  
326 -  
327 - $expression = $param->getAttribute('buildchain');  
328 - if ($wsParams = $this->getWs($expression)) {  
329 - foreach ($wsParams as $wsParam) {  
330 - $res = $xp->query("//param[@name='".trim($wsParam)."']");  
331 - if ($res->length == 0) {  
332 - if (file_exists($this->newWsDir.$id.'.xml')) { // Delete only once  
333 - unlink($this->newWsDir.$id.'.xml');  
334 - $paramsToRemove[] = $param;  
335 - $this->ws_deleted[] = $name;  
336 - $msg .= '<li><i>'.$name.'</i> : uses obsolete / not ready ws param : <br/> '.$expression.'<br/>';  
337 - }  
338 - }  
339 - }  
340 - }  
341 - }  
342 -  
343 - if (count($paramsToRemove) > 0)  
344 - foreach ($paramsToRemove as $paramToRemove) {  
345 - $paramToRemove->parentNode->removeChild($paramToRemove);  
346 - }  
347 -  
348 - $this->newWs->save($this->newWsDir.'WsParams.xml');  
349 - $copied = $newParams->length - count($paramsToRemove);  
350 -  
351 - $msg .= '<br/><i>Copied : </i>'.$copied.' derived parameters<br/><br/><hr>';  
352 - return array('success' => true, 'msg' => $msg);  
353 - }  
354 -  
355 - public function transferTimeTables()  
356 - {  
357 - $msg = '<b><i>Time Tables:</i></b><br/><br/>';  
358 -  
359 - // get old time tab list  
360 - $this->newWs->load($this->oldWsDir.'Tt.xml');  
361 - $timeTabs = $this->newWs->getElementsByTagName('timetab');  
362 - if ($timeTabs->length == 0) {  
363 - $msg .= 'No time tables';  
364 - return array('success' => true, 'msg' => $msg);  
365 - }  
366 -  
367 - $oldTtDir = OLDUSERPATH.TRANSFERUSER."/TT/";  
368 - $newTtDir = NEWUSERPATH.TRANSFERUSER."/TT/";  
369 - foreach ($timeTabs as $tab) {  
370 - $id = $tab->getAttribute('xml:id');  
371 - copy($oldTtDir.$id.'.xml', $newTtDir.$id.'.xml');  
372 - }  
373 -  
374 - $this->newWs->save($this->newWsDir.'Tt.xml');  
375 - $msg .= '<i>Copied : </i>'.$timeTabs->length.' time tables<br/><br/><hr>';  
376 - return array('success' => true, 'msg' => $msg);  
377 - }  
378 -  
379 - public function transferConditions()  
380 - {  
381 - $msg = '<b><i>Requests</i></b><br/><br/>';  
382 - $msg .= '<i>Note :</i> Plot requests are not copied : too much difference between new and old AMDA versions<br/<br/><br/>';  
383 - $oldRequestXml = new DomDocument("1.0");  
384 - $newRequestXml = new DomDocument("1.0");  
385 -  
386 - if (!@$oldRequestXml->load($this->oldWsDir.'Request.xml')){  
387 - $msg .= ' No Requests File<br/>';  
388 - return array('success' => true, 'msg' => $msg);  
389 - }  
390 -  
391 - $condNodes = $oldRequestXml->getElementsByTagName('condition');  
392 - if ($condNodes->length == 0) {  
393 - $msg .= ' no DataMining requests to copy<br/>';  
394 - return array('success' => true, 'msg' => $msg);  
395 - }  
396 -  
397 - if (!file_exists($this->newWsDir.'Request.xml')) {  
398 - $types = array('request', 'condition');  
399 -  
400 - $rootElement = $newRequestXml->createElement('ws');  
401 - foreach ($types as $type)  
402 - {  
403 - $contentId = $type.'-treeRootNode';  
404 - $contentTag = $type.'List';  
405 - $typeElement = $newRequestXml->createElement($contentTag);  
406 - $typeElement->setAttribute('xml:id', $contentId);  
407 - $rootElement->appendChild($typeElement);  
408 - }  
409 -  
410 - $newRequestXml->appendChild($rootElement);  
411 - }  
412 - else  
413 - $newRequestXml->load($this->newWsDir.'Request.xml');  
414 -  
415 - $conditionRoot = $newRequestXml->getElementsByTagName('conditionList')->item(0);  
416 -  
417 - $condDir = OLDUSERPATH.TRANSFERUSER."/REQ/";  
418 -  
419 - $deleted = $this->getObsolete();  
420 - $notready = $this->getNotready();  
421 - $msg .= 'Some expressions could have problems while being processed by new kernel <br/> - <b>Please send us feedback in this case.</b><br/><br>  
422 - Not copied DataMining requests :<br/>';  
423 -  
424 - foreach ($condNodes as $condNode) {  
425 - $id = $condNode->getAttribute('xml:id');  
426 - $name = $condNode->getAttribute('name');  
427 - $cond = file($condDir.$id, FILE_IGNORE_NEW_LINES);  
428 -  
429 - $condObj = json_decode($cond[0]);  
430 - $expression = $condObj->expression;  
431 - if ($this->deleteParam($expression, $deleted)) {  
432 - $msg .= '<li><i>'.$name.'</i> : uses obsolete parameters<br/> '.$expression.'<br/>';  
433 - $cond_deleted[] = $name;  
434 - continue;  
435 - }  
436 -  
437 - if ($this->deleteParam($expression,$notready)) {  
438 - $msg .= '<li><i>'.$name.'</i> : uses param not ready yet<br/> '.$expression.'<br/>';  
439 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
440 - $cond_deleted[] = $name;  
441 - continue;  
442 - }  
443 -  
444 - if (!empty($this->wsd_deleted))  
445 - if ($this->deleteParam($expression,$this->wsd_deleted)) {  
446 - $msg .= '<li><i>'.$name.'</i> : uses obsolete myData parameters<br/> '.$expression.'<br/>';  
447 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
448 - $cond_deleted[] = $name;  
449 - continue;  
450 - }  
451 -  
452 - if (!empty($this->ws_deleted))  
453 - if ($this->deleteParam($expression,$this->ws_deleted)) {  
454 - $msg .= '<li><i>'.$name.'</i> : uses obsolete derived parameters<br/> '.$expression.'<br/>';  
455 - // error_log( 'For INFO : DELETED '.$expression,1,email);  
456 - $cond_deleted[] = $name;  
457 - continue;  
458 - }  
459 -  
460 - if ($this->deleteParam($expression,array("CDAWEB","MAPSKP","VEXGRAZ","IMPEX"))) {  
461 - $msg .= '<li><i>'.$name.'</i> : uses remote params <br/> '.$expression.'<br/>';  
462 - $cond_deleted[] = $name;  
463 - continue;  
464 - }  
465 -  
466 - if ($this->deleteParam($expression,$this->specParams)) {  
467 - $msg .= '<li><i>'.$name.'</i> : too much difference <br/> '.$expression.'<br/>';  
468 - $cond_deleted[] = $name;  
469 - continue;  
470 - }  
471 - $expressionUpdated = $this->updateParams($expression);  
472 - $condObj->expression = $expressionUpdated;  
473 - file_put_contents(NEWUSERPATH.TRANSFERUSER."/REQ/".$id, json_encode($condObj));  
474 - $conditionRoot->appendChild($newRequestXml->importNode($condNode));  
475 - }  
476 -  
477 - $newRequestXml->save($this->newWsDir.'Request.xml');  
478 -  
479 - return array('success' => true, 'msg' => $msg);  
480 - }  
481 -  
482 - public function transferMyData()  
483 - {  
484 - $msg = '<hr><b><i>MyData Parameters / My Files:</i></b><br/><br/>';  
485 - $msg.= '<i>Note :</i> CEF format is not implemented<br/><br/>';  
486 -  
487 - if (!$this->oldWs->load($this->oldWsDir.'WsParams.xml')) {  
488 - error_log('cannot load WsParams.xml for '.TRANSFERUSER,1,email);  
489 - return array('success' => false, 'error' => 'Sorry, we failed to get your MyData Params from old AMDA');  
490 - }  
491 -  
492 - if (!file_exists($this->newWsDir.'WsParams.xml'))  
493 - $this->createDom();  
494 - else  
495 - $this->newWs->load($this->newWsDir.'WsParams.xml');  
496 -  
497 - $BaseXml = new DomDocument("1.0");  
498 - $FilesXml = new DomDocument("1.0");  
499 -  
500 - // get old params  
501 - $wsdParamsOld = $this->oldWs->getElementsByTagName('mydata');  
502 -  
503 - if ($wsdParamsOld->length == 0) {  
504 - return array('success' => true, 'msg' => 'You have no MyData parameters');  
505 - }  
506 -  
507 - if (!$BaseXml->load(OLDUSERPATH.TRANSFERUSER.'/DATA/base.xml')) {  
508 - return array('success' => false, 'msg' => 'base description corrupted');  
509 - }  
510 -  
511 - if (!$FilesXml->load($this->oldWsDir.'Files.xml')) {  
512 - return array('success' => false, 'msg' => 'files description corrupted');  
513 - }  
514 -  
515 - $this->newWs->load($this->newWsDir.'WsParams.xml');  
516 - $paramDom = new DomDocument("1.0");  
517 -  
518 - $msg.= ' Not copied parameters : <br/>';  
519 - foreach ($wsdParamsOld as $wsdParamOld) {  
520 - $format = $wsdParamOld->getAttribute('format');  
521 - $name = $wsdParamOld->getAttribute('name');  
522 - $id = $wsdParamOld->getAttribute('xml:id');  
523 - $mask = $wsdParamOld->getAttribute('mask');  
524 - if ($format == 'cef') {  
525 - $deletedVi[] = $mask;  
526 - $msg .= '<li><i>'.$name.'</i><br/>';  
527 - $this->wsd_deleted[] = 'wsd_'.$name;  
528 - }  
529 - else {  
530 - $desc = $wsdParamOld->getAttribute('desc');  
531 - $start = substr($desc,0,16).':00';  
532 - $stop = substr($desc,17).':00';  
533 - $wsdParamOld->setAttribute('desc', $start.'-'.$stop);  
534 -  
535 - $this->newWs->getElementsByTagName('mydataList')->item(0)->appendChild($this->newWs->importNode($wsdParamOld));  
536 -  
537 - $paramDom->load($this->oldWsDir.$id.'.xml');  
538 - $descNode = $paramDom->getElementsByTagName('desc')->item(0);  
539 - $descNode->nodeValue = $start.'-'.$stop;  
540 - $paramDom->save($this->newWsDir.$id.'.xml');  
541 -  
542 - $fileFormat[$mask] = $format === 'txt' ? 'ASCII' : strtoupper($format);  
543 - }  
544 - }  
545 -  
546 - $this->newWs->save($this->newWsDir.'WsParams.xml');  
547 -  
548 - // First delete CEF files  
549 - $xpBase = new domxpath($BaseXml);  
550 - if (count($deletedVi) > 0)  
551 - foreach ($deletedVi as $vi) {  
552 - $maskNode = $xpBase->query("//mask[.='".$vi."']");  
553 - if ( $maskNode->length == 0 )  
554 - error_log('No '.$vi.' in '.TRANSFERUSER.'/DATA/base.xml',1,email);  
555 - else {  
556 - $viNode = $maskNode->item(0)->parentNode;  
557 - $viNode->parentNode->removeChild($viNode);  
558 - }  
559 - }  
560 - // Then modify base.xml : xml:id => id  
561 - $viNodes = $BaseXml->getElementsByTagName('vi');  
562 - foreach ($viNodes as $viNode) {  
563 - $id = $viNode->getAttribute('xml:id');  
564 - $viNode->removeAttribute('xml:id');  
565 - $viNode->setAttribute('id',$id);  
566 - $mask = $viNode->getElementsByTagName('mask')->item(0)->nodeValue;  
567 - $viNode->setAttribute('format', $fileFormat[$mask]);  
568 - }  
569 -  
570 - $BaseXml->save(NEWUSERPATH.TRANSFERUSER.'/DATA/base.xml');  
571 -  
572 - $msg .= 'Not copied files :<br/>';  
573 -  
574 - $filesNodes = $FilesXml->getElementsByTagName('file');  
575 - foreach ($filesNodes as $file) {  
576 - $fileName = $file->getAttribute('name');  
577 - $format = $file->getAttribute('format');  
578 - if ($format == 'cef') {  
579 - $deletedFiles[] = $file->getAttribute('xml:id');  
580 - }  
581 - else {  
582 - if (!@copy(OLDUSERPATH.TRANSFERUSER.'/DATA/'.$fileName,NEWUSERPATH.TRANSFERUSER.'/DATA/'.$fileName))  
583 - $msg .= $fileName.'<br/>';  
584 - }  
585 - }  
586 -  
587 - if (count($deletedVi) > 0)  
588 - foreach ($deletedVi as $vi) {  
589 - $node = $BaseXml->getElementById($vi);  
590 - if ($node) {  
591 - $node->parentNode->removeChild($node);  
592 - }  
593 - }  
594 -  
595 -  
596 - if (count($deletedFiles) > 0)  
597 - foreach ($deletedFiles as $vi) {  
598 - $node = $FilesXml->getElementById($vi);  
599 - if ($node) {  
600 - $msg .= '<li><i>'.$vi.'</i> <br/>';  
601 - $node->parentNode->removeChild($node);  
602 - }  
603 - }  
604 -  
605 - $FilesXml->save($this->newWsDir.'Files.xml');  
606 -  
607 - return array('success' => true, 'msg' => $msg);  
608 - }  
609 -  
610 - public function transferFilters()  
611 - {  
612 - $msg = '<hr><br/><br/><b><i>Filters:</i></b><br/><br/>';  
613 -  
614 - if (!curl_init($this->oldWsDir.'Filters.xml')) {  
615 - return array('success' => true, 'msg' => 'No filters at old AMDA');  
616 - }  
617 -  
618 - $filterXml = new DomDocument("1.0");  
619 - if (!$filterXml->load($this->oldWsDir.'Filters.xml')) {  
620 - return array('success' => false, 'error' => 'Cannot load filters from old AMDA');  
621 - }  
622 -  
623 - $filterXml->save($this->newWsDir.'Filters.xml');  
624 - $msg .= 'Filters have been copied</br>';  
625 - return array('success' => true, 'msg' => $msg);  
626 - }  
627 -  
628 - function sendMail($email, $msg)  
629 - {  
630 - $subject = 'Your workspace has been copied to new AMDA';  
631 -  
632 - $headers = "From: amda@irap.omp.eu " . "\r\n".  
633 - "Reply-To: amda@irap.omp.eu " . "\r\n".  
634 - "Content-type: text/html\r\n";  
635 - $msg = "<html><b>Your Workspace has been copied to new AMDA</b><br/><br/>".$msg."</html>";  
636 - mail($email, $subject, $msg, $headers);  
637 - }  
638 -}  
639 -?>  
640 \ No newline at end of file 0 \ No newline at end of file
php/config.php
@@ -51,13 +51,6 @@ define(&#39;MAX_FILE_INDEX_TO_SHOW&#39;, 100); @@ -51,13 +51,6 @@ define(&#39;MAX_FILE_INDEX_TO_SHOW&#39;, 100);
51 // private key used to be considerate as a trust client for some functions of DD web service 51 // private key used to be considerate as a trust client for some functions of DD web service
52 define('DDSERVICE_PRIVATEKEY', '!%p856Dc'); 52 define('DDSERVICE_PRIVATEKEY', '!%p856Dc');
53 53
54 -  
55 -// BATCH JOBS section  
56 -//define('JOBTIMEOUT', '1'); // one cycle secs to sleep to allow job be executed  
57 -//define('PLOT_CYCLES_NUMBER', 500); // cycles number for PNG  
58 -//define('JOB_CYCLES_NUMBER', 5); // cycles number for all the jobs  
59 -//define('TIMEOUT', '100'); //TODO secs wait before job is killed OR 'max_execution_time' - kill automatic?  
60 -  
61 // EPN-TAP services 54 // EPN-TAP services
62 define('EPNTAP_APIS', 'http://voparis-tap.obspm.fr/__system__/tap/run/tap/sync'); 55 define('EPNTAP_APIS', 'http://voparis-tap.obspm.fr/__system__/tap/run/tap/sync');
63 define('EPNTAP_AMDA', 'http://cdpp-epntap.irap.omp.eu/__system__/tap/run/tap/sync'); 56 define('EPNTAP_AMDA', 'http://cdpp-epntap.irap.omp.eu/__system__/tap/run/tap/sync');
@@ -157,7 +150,6 @@ $API = array( @@ -157,7 +150,6 @@ $API = array(
157 'saveTTCacheIntervalsInTT'=>array('len'=>1), 150 'saveTTCacheIntervalsInTT'=>array('len'=>1),
158 'initObjectCache'=>array ('len'=>2), 151 'initObjectCache'=>array ('len'=>2),
159 'initObjectCacheFromObject'=>array('len'=>2), 152 'initObjectCacheFromObject'=>array('len'=>2),
160 - 'initForChart'=>array('len'=>5),  
161 'initObjectCacheFromTmpObject'=>array('len'=>3), 153 'initObjectCacheFromTmpObject'=>array('len'=>3),
162 'initObjectCacheFromUploadedFile'=>array('len'=>3), 154 'initObjectCacheFromUploadedFile'=>array('len'=>3),
163 'initObjectCacheFromCatalog'=>array('len'=>2), 155 'initObjectCacheFromCatalog'=>array('len'=>2),
@@ -186,7 +178,6 @@ $API = array( @@ -186,7 +178,6 @@ $API = array(
186 'resetFilter'=>array('len'=>0), 178 'resetFilter'=>array('len'=>0),
187 'logout'=>array('len'=>1), 179 'logout'=>array('len'=>1),
188 'getUserInfo'=>array('len'=>0), 180 'getUserInfo'=>array('len'=>0),
189 - 'convertWS'=>array('len'=>0),  
190 'getRun'=>array('len'=>1), 181 'getRun'=>array('len'=>1),
191 'addRun'=>array('len'=>1), 182 'addRun'=>array('len'=>1),
192 //AKKA - New action to clean user WS 183 //AKKA - New action to clean user WS
php/src/cdfsamplingfromdata.c
1 -/* $Id: cdf constant samplig from data $ */ 1 +/* $Id: cdf constant sampling from data $ */
2 2
3 #include <stdio.h> 3 #include <stdio.h>
4 #include <stdlib.h> 4 #include <stdlib.h>
@@ -150,6 +150,5 @@ int main(int argc, char *argv[]) @@ -150,6 +150,5 @@ int main(int argc, char *argv[])
150 if ((cstatus = CDFlib(CLOSE_, CDF_, NULL_)) != CDF_OK) 150 if ((cstatus = CDFlib(CLOSE_, CDF_, NULL_)) != CDF_OK)
151 cdf_handle_error (cstatus); 151 cdf_handle_error (cstatus);
152 152
153 - // fprintf(stdout,"%d %f\n",min[1], (float)min[0]/100.0);  
154 fprintf(stdout,"%f\n",(float)sampling/10.0); 153 fprintf(stdout,"%f\n",(float)sampling/10.0);
155 } 154 }
update_amda/updateEnv.sh
@@ -39,7 +39,7 @@ if [[ ${AMDAINTERNALDIR: -1} != &quot;/&quot; ]]; then @@ -39,7 +39,7 @@ if [[ ${AMDAINTERNALDIR: -1} != &quot;/&quot; ]]; then
39 fi 39 fi
40 40
41 #SPASE Registry definitions 41 #SPASE Registry definitions
42 -export SPASE_REPO="http://amda-registry.irap.omp.eu/resolver" 42 +export SPASE_REPO="http://amda-registry.irap.omp.eu/amda-registry/resolver"
43 #Remote SPASE Registry to get Person' Info 43 #Remote SPASE Registry to get Person' Info
44 export SPASE_REMOTE="http://www.spase-group.org/smwg/resolver" 44 export SPASE_REMOTE="http://www.spase-group.org/smwg/resolver"
45 # for SPASE Registy MAJ 45 # for SPASE Registy MAJ