Index: openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl,v diff -u -r1.16.2.4 -r1.16.2.5 --- openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl 20 Jan 2022 09:59:46 -0000 1.16.2.4 +++ openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl 25 Mar 2022 19:49:55 -0000 1.16.2.5 @@ -59,7 +59,7 @@ return "$peer ($pa)" #return "$peer" } - +ns_log notice USERS=[throttle users active -full] set users [list] foreach element [throttle users active -full] { lassign $element user_id pa timestamp hits smooth switches @@ -106,20 +106,13 @@ ] } -switch -glob $orderby { - *,desc {set order -decreasing} - *,asc {set order -increasing} -} -switch -glob $orderby { - name,* {set index 0; set type -dictionary} - online_time,* {set index 3; set type -dictionary} - activity,* {set index 5; set type -integer} - hits,* {set index 5; set type -dictionary} - switches,* {set index 8; set type -integer} - peer_address,* {set index 9; set type -dictionary} - vpm,* {set index 11; set type -real} -} +lassign [split $orderby ,] att order +set order [ad_decode $order desc decreasing asc increasing increasing] +set type [ad_decode $att activity integer switches integer vpm real dictionary] +ns_log notice "ORDERBY $orderby -> [list t1 orderby -order $order -type $type $att]" +t1 orderby -order $order -type $type $att + if {$admin} { set total $peer_cat_count(others) foreach cat $peer_groups {incr total $peer_cat_count($cat)} @@ -136,8 +129,7 @@ set summarize_categories "" } - -foreach e [lsort $type $order -index $index $users] { +foreach e $users { if {$admin} { t1 add -name [lindex $e 0] \ -name.href [lindex $e 1] \