Commit f8c653e3a74a4ed3c518d43c0cd5342a504f405f
Exists in
master
and in
106 other branches
Merge branch 'master' into sum-components-indexes
Showing
3 changed files
with
24 additions
and
17 deletions
Show diff stats
js/app/views/ExplorerUI.js
... | ... | @@ -214,7 +214,7 @@ Ext.define('amdaUI.ExplorerUI', { |
214 | 214 | var tree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); |
215 | 215 | tree.getStore().sort([ |
216 | 216 | { sorterFn: function(o1, o2){ |
217 | - if (o1.get('nodeType') !== 'localParam') | |
217 | + if (o1.get('nodeType') !== 'localParam' || o1.get('isParameter')) | |
218 | 218 | return; |
219 | 219 | |
220 | 220 | return o1.get('text').toUpperCase() < o2.get('text').toUpperCase() ? -1 : 1; |
... | ... | @@ -267,7 +267,7 @@ Ext.define('amdaUI.ExplorerUI', { |
267 | 267 | sorters:[{ direction: 'ASC' , |
268 | 268 | sorterFn: function(o1, o2){ |
269 | 269 | |
270 | - if (o1.get('nodeType') == 'localParam' || o1.get('nodeType') == 'myData') { | |
270 | + if ((o1.get('nodeType') == 'localParam' && !o1.get('isParameter')) || o1.get('nodeType') == 'myData') { | |
271 | 271 | return o1.get('text').toUpperCase() < o2.get('text').toUpperCase() ? -1 : 1; |
272 | 272 | } |
273 | 273 | |
... | ... |
js/app/views/MyDataUI.js
... | ... | @@ -396,15 +396,15 @@ Ext.define('amdaUI.MyDataUI', { |
396 | 396 | } |
397 | 397 | |
398 | 398 | if (maskParts.length == 2) { |
399 | - if (this.fileObject.get('fileName').indexOf(maskParts[1]) < 0) { | |
400 | - myDesktopApp.warningMsg('No correspondance between ' +mask+' and '+this.fileObject.get('fileName')); | |
401 | - return false; | |
402 | - } | |
403 | - } | |
404 | - | |
405 | - if ((maskParts[0].length + maskParts[1].length) < 6) { | |
406 | - myDesktopApp.warningMsg('Mask cannot be shorter than 6 letters'); | |
407 | - return false; | |
399 | + if (this.fileObject.get('fileName').indexOf(maskParts[1]) < 0) { | |
400 | + myDesktopApp.warningMsg('No correspondance between ' +mask+' and '+this.fileObject.get('fileName')); | |
401 | + return false; | |
402 | + } | |
403 | + | |
404 | + if ((maskParts[0].length + maskParts[1].length) < 6) { | |
405 | + myDesktopApp.warningMsg('Mask cannot be shorter than 6 letters'); | |
406 | + return false; | |
407 | + } | |
408 | 408 | } |
409 | 409 | |
410 | 410 | return true; |
... | ... |
php/classes/AmdaStats.php
... | ... | @@ -74,7 +74,7 @@ class AmdaStats { |
74 | 74 | |
75 | 75 | $doc2 = new DomDocument("1.0"); |
76 | 76 | if ($year == null) $year = date("Y"); |
77 | - | |
77 | + | |
78 | 78 | $users=glob(USERPATH."*"); |
79 | 79 | foreach ($users as $user) { |
80 | 80 | $name2 = $user."/Stats$year.xml"; |
... | ... | @@ -82,7 +82,7 @@ class AmdaStats { |
82 | 82 | if (!file_exists($name2)) continue; |
83 | 83 | |
84 | 84 | $doc2->load($name2); |
85 | - | |
85 | + | |
86 | 86 | foreach ($tags as $tag) { |
87 | 87 | $tag1 = $this->statXml->getElementsByTagName($tag)->item(0); |
88 | 88 | $tag2 = $doc2->getElementsByTagName($tag)->item(0); |
... | ... | @@ -100,7 +100,7 @@ class AmdaStats { |
100 | 100 | $this->getModulesStat(null,null,true); |
101 | 101 | // write data statistics as json |
102 | 102 | $this->getDataStat(0,null,null,true); |
103 | - | |
103 | + | |
104 | 104 | return $this->statXml->save(StatsXml); |
105 | 105 | } |
106 | 106 | |
... | ... | @@ -210,6 +210,7 @@ class AmdaStats { |
210 | 210 | $TOTALarray = array(); |
211 | 211 | $STARTarray = array(); |
212 | 212 | $STOParray = array(); |
213 | + $usersArray = array(); | |
213 | 214 | |
214 | 215 | foreach ($this->tasks as $task) { |
215 | 216 | $theTask = $this->statXml->getElementsByTagName($task)->item(0); |
... | ... | @@ -219,10 +220,14 @@ class AmdaStats { |
219 | 220 | foreach ($items as $item){ |
220 | 221 | $VIs = $item->getElementsByTagName('dataset'); |
221 | 222 | $time = strtotime($item->getAttribute('date')); |
222 | - | |
223 | + $user = $item->getAttribute('user'); | |
224 | + | |
223 | 225 | foreach ($VIs as $VI) { |
224 | 226 | $id = $VI->nodeValue; |
225 | 227 | if ($id) { |
228 | + | |
229 | + $usersArray[$id][$user]++; | |
230 | + | |
226 | 231 | if ($TASKarray[$id]) { |
227 | 232 | $TASKarray[$id]++; |
228 | 233 | $TOTALarray[$id]++; |
... | ... | @@ -251,7 +256,7 @@ class AmdaStats { |
251 | 256 | } |
252 | 257 | $VIarray[$task] = $TASKarray; |
253 | 258 | } |
254 | - | |
259 | + | |
255 | 260 | $GENERALarray = array(); |
256 | 261 | arsort($TOTALarray); |
257 | 262 | |
... | ... | @@ -264,12 +269,14 @@ class AmdaStats { |
264 | 269 | $mining = $VIarray['mining'][$key]; |
265 | 270 | $print = $VIarray['print'][$key]; |
266 | 271 | $stat = $VIarray['statistics'][$key]; |
272 | + $uniqueUsers = count($usersArray[$key]); | |
273 | + | |
267 | 274 | if ($key != 'undefined') |
268 | 275 | { |
269 | 276 | $GENERALarray[] = array('id' => $key, 'number' => $value, 'percent' => $value, |
270 | 277 | 'plot' => $plot, 'mining' => $mining, |
271 | 278 | 'print' => $print,'statistics' => $stat, |
272 | - 'start' => $viStart, 'stop' => $viStop); | |
279 | + 'start' => $viStart, 'stop' => $viStop, 'unique' => $uniqueUsers); | |
273 | 280 | |
274 | 281 | $Ntotal += $value; |
275 | 282 | } |
... | ... |