Index: openacs-4/packages/xotcl-request-monitor/www/throttle-statistics.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/throttle-statistics.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xotcl-request-monitor/www/throttle-statistics.tcl 27 Oct 2014 16:42:03 -0000 1.3 +++ openacs-4/packages/xotcl-request-monitor/www/throttle-statistics.tcl 7 Aug 2017 23:48:30 -0000 1.4 @@ -11,6 +11,7 @@ } set title "Throttle statistics" +set context [list $title] set throttle_statistics [throttle statistics] set data [throttle url_statistics] @@ -22,24 +23,30 @@ user { label Userid link_url_col user_url} - IPadress {label "IP Address"} + IPaddress {label "IP Address"} URL {label "URL"} } -multirow create url_statistics type user user_url time IPadress URL +multirow create url_statistics type user user_url time IPaddress URL foreach l [lsort -index 2 $data] { - lassign $l type user time IPadress URL - if {[string match "*.*" $user]} { + lassign $l type uid time IPaddress URL + if {![string is integer -strict $uid]} { set user "Anonymous" set user_url "" } else { - acs_user::get -user_id $user -array userinfo - set user_url /acs-admin/users/one?user_id=$user + acs_user::get -user_id $uid -array userinfo set user "$userinfo(first_names) $userinfo(last_name)" + set user_url [acs_community_member_admin_url -user_id $uid] } set time [clock format $time -format "%Y-%m-%d %H:%M:%S"] - multirow append url_statistics $type $user $user_url $time $IPadress $URL + multirow append url_statistics $type $user $user_url $time $IPaddress $URL } #set throttle_url_statistics [throttle url_statistics] + +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: