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 -N -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/xotcl-request-monitor/www/last-requests.tcl 25 Jan 2020 14:13:46 -0000 1.11.2.2 +++ openacs-4/packages/xotcl-request-monitor/www/last-requests.tcl 25 Jan 2020 14:15:14 -0000 1.11.2.3 @@ -21,9 +21,9 @@ set person [person::get_person_info -person_id $request_key] set user_string "[dict get $person first_names] [dict get $person last_name]" set tmp_url [acs_community_member_url -user_id $request_key] - append user_string " ($request_key)" + append user_string " ($request_key)" } else { - set user_string $request_key + set user_string $request_key } append title $user_string @@ -51,7 +51,7 @@ AnchorField url -label "URL" Field pa -label "Peer Address" } \ - -no_data "no requests for this user recorded" + -no_data "no requests for this user recorded" set all [expr {!$all}] set requests [throttle users last_requests $request_key] @@ -65,20 +65,20 @@ set exclude 0 foreach pattern $hide_patterns { if {[string match $pattern $url]} { - set exclude 1 - incr hidden - break + set exclude 1 + incr hidden + break } } if {$exclude} continue } set diff [expr {$last_timestamp-$timestamp}] set url_label [ad_string_truncate_middle -len 70 $url] t1 add -time [clock format $timestamp] \ - -timediff $diff \ - -url $url_label \ - -url.href "[ad_url]$url" \ - -pa $pa + -timediff $diff \ + -url $url_label \ + -url.href "[ad_url]$url" \ + -pa $pa } set user_string "$hidden requests hidden." 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 -N -r1.13.2.3 -r1.13.2.4 --- openacs-4/packages/xotcl-request-monitor/www/stat-details.tcl 25 Jan 2020 14:13:46 -0000 1.13.2.3 +++ openacs-4/packages/xotcl-request-monitor/www/stat-details.tcl 25 Jan 2020 14:15:14 -0000 1.13.2.4 @@ -26,9 +26,9 @@ set hide_patterns [parameter::get -parameter hide-requests -default {*.css}] array set apps { - calendar 1 acs-templating 1 forums 1 file-storage 1 one-community 1 - xowiki 1 - annotations 1 gradebook 1 homework 1 lecturecast 1 res 1 + calendar 1 acs-templating 1 forums 1 file-storage 1 one-community 1 + xowiki 1 + annotations 1 gradebook 1 homework 1 lecturecast 1 res 1 } array set vuh { ical 1 @@ -144,7 +144,7 @@ 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} @@ -159,7 +159,7 @@ Action new -label "$with_param_label($with_param)" -url $url_param -tooltip "with_param_tooltip($with_param)" Action new -label "$with_apps_label($with_apps)" -url $url_apps -tooltip "with_apps_tooltip($with_apps)" Action new -label "Delete Statistics" -url flush-url-statistics \ - -tooltip "Delete URL Statistics" + -tooltip "Delete URL Statistics" }] \ -columns { AnchorField url -label "Request" -orderby url @@ -179,28 +179,28 @@ if {!$all} { set exclude 0 foreach pattern $hide_patterns { - if {[string match $pattern $url]} { - set exclude 1 - incr hidden - break - } + if {[string match $pattern $url]} { + set exclude 1 + incr hidden + break + } } if {$exclude} continue } - - t1 add -url [ad_string_truncate_middle -len 80 $url] \ - -url.href [expr {[string match "*...*" $url] ? "" : "[ad_url]$url" }] \ - -totaltime [lindex $l 1] \ - -cnt [lindex $l 2] \ - -avg $avg \ - -total [format %.2f%% [expr {[lindex $l 1]*100.0/$total}]] + + t1 add -url [ad_string_truncate_middle -len 80 $url] \ + -url.href [expr {[string match "*...*" $url] ? "" : "[ad_url]$url" }] \ + -totaltime [lindex $l 1] \ + -cnt [lindex $l 2] \ + -avg $avg \ + -total [format %.2f%% [expr {[lindex $l 1]*100.0/$total}]] } set t1 [t1 asHTML] append user_string "Grand Total Avg Response time: " \ - [format %6.2f $total_avg] " seconds/call " \ - "(base: $total_cnt requests)
" + [format %6.2f $total_avg] " seconds/call " \ + "(base: $total_cnt requests)
" append user_string "$hidden requests hidden." if {$hidden>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 -N -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/xotcl-request-monitor/www/last100.tcl 4 Jul 2019 18:14:43 -0000 1.12.2.1 +++ openacs-4/packages/xotcl-request-monitor/www/last100.tcl 25 Jan 2020 14:17:59 -0000 1.12.2.2 @@ -1,7 +1,7 @@ ad_page_contract { Displays last 100 requests in the system - @author Gustaf Neumann + @author Gustaf Neumann @cvs-id $Id$ } -query { @@ -21,9 +21,9 @@ Class create CustomField -volatile \ -instproc render-data {row} { html::div -style { - border: 1px solid #a1a5a9; padding: 0px 5px 0px 5px; background: #e2e2e2} { - html::t [$row set ${:name}] - } + border: 1px solid #a1a5a9; padding: 0px 5px 0px 5px; background: #e2e2e2} { + html::t [$row set ${:name}] + } } TableWidget create t1 -volatile \ 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 -N -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/xotcl-request-monitor/www/last101.tcl 8 Jul 2019 20:29:16 -0000 1.9.2.1 +++ openacs-4/packages/xotcl-request-monitor/www/last101.tcl 25 Jan 2020 14:17:59 -0000 1.9.2.2 @@ -19,9 +19,9 @@ Class create CustomField -volatile \ -instproc render-data {row} { html::div -style { - border: 1px solid #a1a5a9; padding: 0px 5px 0px 5px; background: #e2e2e2} { - html::t [$row set ${:name}] - } + border: 1px solid #a1a5a9; padding: 0px 5px 0px 5px; background: #e2e2e2} { + html::t [$row set ${:name}] + } } TableWidget create t1 -volatile \ @@ -70,89 +70,89 @@ html::head { html::title {html::t "XOTcl Request Monitor"} html::link -rel stylesheet -type text/css -media all -href \ - /resources/acs-developer-support/acs-developer-support.css + /resources/acs-developer-support/acs-developer-support.css html::link -rel stylesheet -type text/css -media all -href \ - /resources/acs-templating/lists.css + /resources/acs-templating/lists.css html::link -rel stylesheet -type text/css -media all -href \ - /resources/acs-templating/forms.css + /resources/acs-templating/forms.css html::link -rel stylesheet -type text/css -media all -href \ - /resources/acs-subsite/default-master.css + /resources/acs-subsite/default-master.css html::link -rel stylesheet -type text/css -media all -href \ - /resources/dotlrn/dotlrn-toolbar.css + /resources/dotlrn/dotlrn-toolbar.css html::script -type "text/javascript" -src "/resources/acs-subsite/core.js" \ - -language "javascript" {} + -language "javascript" {} html::link -rel "shortcut icon" \ - -href "/resources/theme-selva/Selva/default/images/myicon.ico" + -href "/resources/theme-selva/Selva/default/images/myicon.ico" html::link -rel "stylesheet" -type "text/css" \ - -href "/resources/theme-selva/Selva/default/Selva.css" -media "all" + -href "/resources/theme-selva/Selva/default/Selva.css" -media "all" } html::body { html::div -id wrapper { - html::div -id header { - html::img -src /resources/theme-selva/Selva/images/dotLRN-logo.gif \ - -alt Logo - } - html::br - html::div -id site-header { - html::div -id breadcrumbs { - html::div -id context-bar { - html::a -href / {html::t "Main Site"} - html::t -disableOutputEscaping "»\n" - html::a -href "/request-monitor" {html::t "XOTcl Request Monitor"} - html::t -disableOutputEscaping "»\n" - html::t ${:context} - html::div -style "clear:both;" - } - html::div -id status { - html::div -class "action-list users-online" { - html::a -href "/shared/whos-online" { - html::t "1 member online" - } - html::t "|" - html::a -href "/register/logout" \ - -title "Von yourdomain Network abmelden" { - html::t Abmelden - } - } - html::div -class "user-greeting" { - html::t "Willkommen, Gustaf Neumann! |" - } - } - } - } ;# end of site header - html::div -id "youarehere" { - html::t ${:title} - } - html::br - html::div -id "portal-navigation" { - html::ul { - html::li {html::a -href "/dotlrn/" {html::t "My Space"}} - html::li {html::a -href "/theme-selva/courses" {html::t "Courses"}} - html::li {html::a -href "/theme-selva/communities" {html::t "Communities"}} - html::li {html::a -href "/pvt/home" {html::t "Einstellungen"}} - html::li {html::a -href "/dotlrn/control-panel" {html::t "Tools"}} - } - } + html::div -id header { + html::img -src /resources/theme-selva/Selva/images/dotLRN-logo.gif \ + -alt Logo + } + html::br + html::div -id site-header { + html::div -id breadcrumbs { + html::div -id context-bar { + html::a -href / {html::t "Main Site"} + html::t -disableOutputEscaping "»\n" + html::a -href "/request-monitor" {html::t "XOTcl Request Monitor"} + html::t -disableOutputEscaping "»\n" + html::t ${:context} + html::div -style "clear:both;" + } + html::div -id status { + html::div -class "action-list users-online" { + html::a -href "/shared/whos-online" { + html::t "1 member online" + } + html::t "|" + html::a -href "/register/logout" \ + -title "Von yourdomain Network abmelden" { + html::t Abmelden + } + } + html::div -class "user-greeting" { + html::t "Willkommen, Gustaf Neumann! |" + } + } + } + } ;# end of site header + html::div -id "youarehere" { + html::t ${:title} + } + html::br + html::div -id "portal-navigation" { + html::ul { + html::li {html::a -href "/dotlrn/" {html::t "My Space"}} + html::li {html::a -href "/theme-selva/courses" {html::t "Courses"}} + html::li {html::a -href "/theme-selva/communities" {html::t "Communities"}} + html::li {html::a -href "/pvt/home" {html::t "Einstellungen"}} + html::li {html::a -href "/dotlrn/control-panel" {html::t "Tools"}} + } + } - html::div -id "portal-subnavigation" { - html::div -id "portal-subnavigation-links" { - html::ul { - html::li { - html::a -href "/dotlrn/?page_num=0" {html::t "Eigene Startseite"} - } - html::li { - html::a -href "/dotlrn/?page_num=1" {html::t "Eigener Kalender"} - } - html::li { - html::a -href "/dotlrn/?page_num=2" {html::t "Eigene Dateien"} - } - } - } - } + html::div -id "portal-subnavigation" { + html::div -id "portal-subnavigation-links" { + html::ul { + html::li { + html::a -href "/dotlrn/?page_num=0" {html::t "Eigene Startseite"} + } + html::li { + html::a -href "/dotlrn/?page_num=1" {html::t "Eigener Kalender"} + } + html::li { + html::a -href "/dotlrn/?page_num=2" {html::t "Eigene Dateien"} + } + } + } + } - html::div -id "portal" { - set slave [tmpl::div] - } + html::div -id "portal" { + set slave [tmpl::div] + } } } html::t "hello footer" 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 -N -r1.5 -r1.5.2.1 --- openacs-4/packages/xotcl-request-monitor/www/throttle-statistics.tcl 27 Jun 2018 16:22:55 -0000 1.5 +++ openacs-4/packages/xotcl-request-monitor/www/throttle-statistics.tcl 25 Jan 2020 14:17:59 -0000 1.5.2.1 @@ -17,12 +17,12 @@ template::list::create \ -name url_statistics \ - -elements { + -elements { time {label Time} type {label Type} user { - label Userid - link_url_col user_url} + label Userid + link_url_col user_url} IPaddress {label "IP Address"} URL {label "URL"} } Index: openacs-4/packages/xotcl-request-monitor/www/users-in-community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/users-in-community.tcl,v diff -u -N -r1.8 -r1.8.2.1 --- openacs-4/packages/xotcl-request-monitor/www/users-in-community.tcl 29 Jun 2018 17:27:19 -0000 1.8 +++ openacs-4/packages/xotcl-request-monitor/www/users-in-community.tcl 25 Jan 2020 14:17:59 -0000 1.8.2.1 @@ -23,7 +23,7 @@ } foreach e [lsort -decreasing -index 0 \ - [throttle users in_community $community_id]] { + [throttle users in_community $community_id]] { lassign $e timestamp requestor if {[info exists listed($requestor)]} continue set listed($requestor) 1 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 -N -r1.16 -r1.16.2.1 --- openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl 29 Jun 2018 17:27:19 -0000 1.16 +++ openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl 25 Jan 2020 14:17:59 -0000 1.16.2.1 @@ -19,7 +19,7 @@ # get value from package parameters set peer_groups [parameter::get -parameter peer-groups \ - -default {*wlan* *dsl* *.com *.net *.org}] + -default {*wlan* *dsl* *.com *.net *.org}] set admin [acs_user::site_wide_admin_p] #set admin 0 @@ -38,24 +38,24 @@ -columns [subst { AnchorField name -label "User" -orderby name Field online_time -label "Last Activity" -html { align right } \ - -orderby online_time + -orderby online_time Field vpm -label "Views per min" -html { align center } -orderby vpm if {$admin} { - Field activity -label "Activity" -html { align right } -orderby activity - AnchorField hits -label "Hits" -orderby hits - Field switches -label "Switches" -html { align center } -orderby switches - Field peer_address -label "Peer" -orderby peer_address + Field activity -label "Activity" -html { align right } -orderby activity + AnchorField hits -label "Hits" -orderby hits + Field switches -label "Switches" -html { align center } -orderby switches + Field peer_address -label "Peer" -orderby peer_address } }] \ - -no_data "no registered users online" + -no_data "no registered users online" foreach cat $peer_groups {set peer_cat_count($cat) 0} set peer_cat_count(others) 0 # this proc is used only for caching purposes proc my_hostname pa { - if {[catch {set peer [ns_hostbyaddr $pa]}]} { return $pa } + if {[catch {set peer [ns_hostbyaddr $pa]}]} { return $pa } return "$peer ($pa)" #return "$peer" } @@ -72,20 +72,20 @@ # it was an IP address set user_label $user_id set user_url "" - } + } set timestamp [lindex $smooth 2] set last_request_minutes [expr {[clock seconds]/60 - $timestamp}] - + set peer $pa if {$admin} { catch {set peer [util_memoize [string tolower \ - [list ::template::my_hostname $pa]]]} + [list ::template::my_hostname $pa]]]} set match 0 foreach cat $peer_groups { if {[string match "$cat *" $peer]} { - incr peer_cat_count($cat) - set match 1 - break + incr peer_cat_count($cat) + set match 1 + break } } if {!$match} { @@ -97,21 +97,21 @@ set detail_url "last-requests?request_key=$user_id" lappend users [list $user_label \ - $user_url \ - $last_request_minutes "$last_request_minutes minutes ago" \ - [format %.2f [lindex $smooth 0]] \ - $hits $loadparam $detail_url \ - $switches \ - $peer \ - $user_id \ - [throttle views_per_minute $user_id] \ - ] + $user_url \ + $last_request_minutes "$last_request_minutes minutes ago" \ + [format %.2f [lindex $smooth 0]] \ + $hits $loadparam $detail_url \ + $switches \ + $peer \ + $user_id \ + [throttle views_per_minute $user_id] \ + ] } 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} @@ -137,20 +137,20 @@ foreach e [lsort $type $order -index $index $users] { if {$admin} { - t1 add -name [lindex $e 0] \ - -name.href [lindex $e 1] \ - -online_time [lindex $e 3] \ - -activity [lindex $e 4] \ - -hits [lindex $e 6] \ - -hits.href [lindex $e 7] \ - -switches [lindex $e 8] \ - -vpm [format %.2f [lindex $e 11]] \ - -peer_address [lindex $e 9] + t1 add -name [lindex $e 0] \ + -name.href [lindex $e 1] \ + -online_time [lindex $e 3] \ + -activity [lindex $e 4] \ + -hits [lindex $e 6] \ + -hits.href [lindex $e 7] \ + -switches [lindex $e 8] \ + -vpm [format %.2f [lindex $e 11]] \ + -peer_address [lindex $e 9] } else { - t1 add -name [lindex $e 0] \ - -name.href [lindex $e 1] \ - -online_time [lindex $e 3] \ - -vpm [format %.2f [lindex $e 11]] + t1 add -name [lindex $e 0] \ + -name.href [lindex $e 1] \ + -online_time [lindex $e 3] \ + -vpm [format %.2f [lindex $e 11]] } }