Index: openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info,v diff -u -r1.15.2.15 -r1.15.2.16 --- openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info 25 Feb 2022 12:56:17 -0000 1.15.2.15 +++ openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info 25 Mar 2022 19:49:55 -0000 1.15.2.16 @@ -8,7 +8,7 @@ t request-monitor - + Gustaf Neumann WU Vienna Request Monitor with user tracking functionality @@ -33,10 +33,10 @@ BSD-Style 2 - + - + Index: openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl 25 Feb 2022 12:56:17 -0000 1.4.2.2 +++ openacs-4/packages/xotcl-request-monitor/www/active-communities.tcl 25 Mar 2022 19:49:55 -0000 1.4.2.3 @@ -21,7 +21,10 @@ } lassign [split $orderby ,] att order -t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att +t1 orderby \ + -order [ad_decode $order desc decreasing asc increasing increasing] \ + -type [ad_decode $att count integer dictionary] \ + $att foreach {community_id users} [throttle users active_communities] { if {$community_id eq ""} continue Index: openacs-4/packages/xotcl-request-monitor/www/last-requests.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/last-requests.tcl,v diff -u -r1.11.2.4 -r1.11.2.5 --- openacs-4/packages/xotcl-request-monitor/www/last-requests.tcl 6 Apr 2020 17:16:59 -0000 1.11.2.4 +++ openacs-4/packages/xotcl-request-monitor/www/last-requests.tcl 25 Mar 2022 19:49:55 -0000 1.11.2.5 @@ -53,6 +53,12 @@ } \ -no_data "no requests for this user recorded" +lassign [split $orderby ,] att order +t1 orderby \ + -order [ad_decode $order desc decreasing asc increasing increasing] \ + -type [ad_decode $att diff integer dictionary] \ + $att + set all [expr {!$all}] set requests [throttle users last_requests $request_key] #set last_timestamp [lindex $requests end 0] Index: openacs-4/packages/xotcl-request-monitor/www/last100.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/last100.tcl,v diff -u -r1.12.2.3 -r1.12.2.4 --- openacs-4/packages/xotcl-request-monitor/www/last100.tcl 6 Apr 2020 17:16:59 -0000 1.12.2.3 +++ openacs-4/packages/xotcl-request-monitor/www/last100.tcl 25 Mar 2022 19:49:55 -0000 1.12.2.4 @@ -35,7 +35,10 @@ } lassign [split $orderby ,] att order -t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att +t1 orderby \ + -order [ad_decode $order desc decreasing asc increasing increasing] \ + -type [ad_decode $att ms integer dictionary] \ + $att foreach l $stat { lassign $l timestamp c url ms requestor Index: openacs-4/packages/xotcl-request-monitor/www/last101.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/last101.tcl,v diff -u -r1.9.2.4 -r1.9.2.5 --- openacs-4/packages/xotcl-request-monitor/www/last101.tcl 6 Apr 2020 17:16:59 -0000 1.9.2.4 +++ openacs-4/packages/xotcl-request-monitor/www/last101.tcl 25 Mar 2022 19:49:55 -0000 1.9.2.5 @@ -33,7 +33,10 @@ } lassign [split $orderby ,] att order -t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att +t1 orderby \ + -order [ad_decode $order desc decreasing asc increasing increasing] \ + -type [ad_decode $att ms integer dictionary] \ + $att foreach l $stat { lassign $l timestamp c url ms requestor Index: openacs-4/packages/xotcl-request-monitor/www/stat-details.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/stat-details.tcl,v diff -u -r1.13.2.4 -r1.13.2.5 --- openacs-4/packages/xotcl-request-monitor/www/stat-details.tcl 25 Jan 2020 14:15:14 -0000 1.13.2.4 +++ openacs-4/packages/xotcl-request-monitor/www/stat-details.tcl 25 Mar 2022 19:49:55 -0000 1.13.2.5 @@ -141,18 +141,6 @@ set url_apps [export_vars -base [ad_conn url] {all {with_apps $not_with_apps} with_param}] set url_param [export_vars -base [ad_conn url] {all with_apps {with_param $not_with_param}}] -switch -glob $orderby { - *,desc {set order -decreasing} - *,asc {set order -increasing} -} -switch -glob $orderby { - url,* {set index 0; set type -dictionary} - totaltime,* {set index 1; set type -integer} - cnt,* {set index 2; set type -integer} - avg,* {set index 3; set type -real} -} - - TableWidget create t1 -volatile \ -actions [subst { Action new -label "$show_all_label($all)" -url $url_all -tooltip "show_all_tooltip($all)" @@ -196,6 +184,12 @@ -total [format %.2f%% [expr {[lindex $l 1]*100.0/$total}]] } +lassign [split $orderby ,] att order +t1 orderby \ + -order [ad_decode $order desc decreasing asc increasing increasing] \ + -type [ad_decode $att totaltime integer cnt integer avg real dictionary] \ + $att + set t1 [t1 asHTML] append user_string "Grand Total Avg Response time: " \ Index: openacs-4/packages/xotcl-request-monitor/www/whos-online-today.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/whos-online-today.tcl,v diff -u -r1.9.2.5 -r1.9.2.6 --- openacs-4/packages/xotcl-request-monitor/www/whos-online-today.tcl 6 Apr 2020 17:16:59 -0000 1.9.2.5 +++ openacs-4/packages/xotcl-request-monitor/www/whos-online-today.tcl 25 Mar 2022 19:49:55 -0000 1.9.2.6 @@ -55,23 +55,11 @@ ] } -switch -glob $orderby { - *,desc {set order -decreasing} - *,asc {set order -increasing} -} -switch -glob $orderby { - name,* {set index 0; set type -dictionary} - date,* {set index 2; set type -integer} -} - -foreach e [lsort $type $order -index $index $users] { - if {$admin} { - t1 add -name [lindex $e 0] \ - -name.href [lindex $e 1] \ - -date [lindex $e 3] \ - } -} - +lassign [split $orderby ,] att order +t1 orderby \ + -order [ad_decode $order desc decreasing asc increasing increasing] \ + -type [ad_decode $att date integer dictionary] \ + $att set t1 [t1 asHTML] # Local variables: 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] \