Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-developer-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
acs-developer-support
Commits
9c117799
Commit
9c117799
authored
Nov 03, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Updated to OpenACS 5.9.1
parent
2291e011
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
69 additions
and
52 deletions
+69
-52
acs-developer-support.info
acs-developer-support.info
+6
-5
footer.adp
lib/footer.adp
+2
-2
toolbar.adp
lib/toolbar.adp
+2
-2
toolbar.tcl
lib/toolbar.tcl
+18
-2
acs-developer-support-init.tcl
tcl/acs-developer-support-init.tcl
+1
-1
acs-developer-support-procs.tcl
tcl/acs-developer-support-procs.tcl
+21
-20
css-edit.tcl
www/css-edit.tcl
+1
-1
css-list.tcl
www/css-list.tcl
+1
-1
css-make-live.tcl
www/css-make-live.tcl
+1
-1
developer-support-example.adp
www/doc/developer-support-example.adp
+2
-2
index.adp
www/doc/index.adp
+8
-8
index.tcl
www/index.tcl
+1
-2
request-info.tcl
www/request-info.tcl
+2
-2
search.adp
www/search.adp
+1
-1
set-user.tcl
www/set-user.tcl
+1
-1
set.tcl
www/set.tcl
+1
-1
No files found.
acs-developer-support.info
View file @
9c117799
...
...
@@ -8,20 +8,21 @@
<singleton-p>
t
</singleton-p>
<auto-mount>
ds
</auto-mount>
<version
name=
"5.9.
0"
url=
"http://openacs.org/repository/download/apm/acs-developer-support-5.9.0
.apm"
>
<version
name=
"5.9.
1"
url=
"http://openacs.org/repository/download/apm/acs-developer-support-5.9.1
.apm"
>
<owner
url=
"mailto:lars@pinds.com"
>
Lars Pind
</owner>
<summary>
Profiling for requests including database timing information.
</summary>
<release-date>
201
5-10-04
</release-date>
<release-date>
201
7-08-06
</release-date>
<vendor
url=
"http://openacs.org"
>
OpenACS
</vendor>
<description
format=
"text/html"
>
Developer support stores timing and other logged information for requests
to support debugging and tuning and supports user switching and a Tcl Shell to invoke arbitrary tcl code on the server.
</description>
<maturity>
3
</maturity>
<provides
url=
"acs-developer-support"
version=
"5.9.0"
/>
<requires
url=
"acs-kernel"
version=
"5.9.0"
/>
<provides
url=
"acs-developer-support"
version=
"5.9.1"
/>
<requires
url=
"acs-tcl"
version=
"5.9.1"
/>
<requires
url=
"acs-kernel"
version=
"5.9.1"
/>
<requires
url=
"acs-templating"
version=
"5.9.
0
"
/>
<requires
url=
"acs-templating"
version=
"5.9.
1
"
/>
<callbacks>
</callbacks>
...
...
lib/footer.adp
View file @
9c117799
...
...
@@ -5,7 +5,7 @@
</if>
<if @comments:rowcount@ gt 0>
<multiple name="comments">
<
b>Comment:</b
> <pre>@comments.text;noi18n@</pre><br>
<
strong>Comment:</strong
> <pre>@comments.text;noi18n@</pre><br>
</multiple>
<hr>
</if>
...
...
@@ -17,7 +17,7 @@
Faked user: @fake_user_name@ <if @fake_user_email@ not nil>(@fake_user_email@)</if> [user_id #@fake_user_id@] <a href="@unfake_url@">(Unfake)</a><br>
</if>
<else>
Faked user: <
i>Not faking.</i
><br>
Faked user: <
em>Not faking.</em
><br>
</else>
Change faked user: <if @search_p@ eq "0"><select name="user_id">
<multiple name="users">
...
...
lib/toolbar.adp
View file @
9c117799
...
...
@@ -8,7 +8,7 @@
<td class="actions">
<ul>
<multiple name="ds_buttons">
<li><a href="@ds_buttons.toggle_url@" class="@ds_buttons.state@" title="@ds_buttons.title@">@ds_buttons.label@</a></li>
<li><a
id="ACS_DS_@ds_buttons.label@"
href="@ds_buttons.toggle_url@" class="@ds_buttons.state@" title="@ds_buttons.title@">@ds_buttons.label@</a></li>
</multiple>
</ul>
</td>
...
...
@@ -53,7 +53,7 @@
<input type="hidden" name="name_weight" value="5">
<input type="hidden" name="param_weight" value="3">
<input type="hidden" name="doc_weight" value="2">
<input name="query_string"
onfocus="if(this.value=='Search API')this.value='';" onblur="if(this.value=='')this.value='Search API';" value
="Search API">
<input name="query_string"
placeholder
="Search API">
<input type="submit" value="Go"></div>
</form>
</td>
...
...
lib/toolbar.tcl
View file @
9c117799
...
...
@@ -44,14 +44,30 @@ if { $show_p } {
multirow append ds_buttons ADP
\
"Toggle ADP reveal"
\
{
javascript:void
(
d=document
);
void
(
el=d.getElementsByTagName
(
'span'
));
for
(
i=0
;
i<el.length
;
i++
){
if
(
el
[
i
]
.className=='developer-support-adp-file-on'
){
void
(
el
[
i
]
.className='developer-support-adp-file-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-adp-file-off'
){
void
(
el
[
i
]
.className='developer-support-adp-file-on'
)}}};
void
(
el=d.getElementsByTagName
(
'div'
));
for
(
i=0
;
i<el.length
;
i++
){
if
(
el
[
i
]
.className=='developer-support-adp-box-on'
){
void
(
el
[
i
]
.className='developer-support-adp-box-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-adp-box-off'
){
void
(
el
[
i
]
.className='developer-support-adp-box-on'
)}};
if
(
el
[
i
]
.className=='developer-support-adp-output-on'
){
void
(
el
[
i
]
.className='developer-support-adp-output-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-adp-output-off'
){
void
(
el
[
i
]
.className='developer-support-adp-output-on'
)}};}}
\
\#
\
[
ad_decode
[
ds_adp_reveal_enabled_p
]
1
"on"
"off"
]
template::add_body_script -script
{
document.getElementById
(
'ACS_DS_ADP'
)
.addEventListener
(
'click', function
(
event
)
{
var el=document.getElementsByTagName
(
'span'
);
event.preventDefault
();
for
(
i=0
;
i<el.length
;
i++
){
if
(
el
[
i
]
.className=='developer-support-adp-file-on'
){
void
(
el
[
i
]
.className='developer-support-adp-file-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-adp-file-off'
){
void
(
el
[
i
]
.className='developer-support-adp-file-on'
)}}};
void
(
el=document.getElementsByTagName
(
'div'
));
for
(
i=0
;
i<el.length
;
i++
){
if
(
el
[
i
]
.className=='developer-support-adp-box-on'
){
void
(
el
[
i
]
.className='developer-support-adp-box-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-adp-box-off'
){
void
(
el
[
i
]
.className='developer-support-adp-box-on'
)}};
if
(
el
[
i
]
.className=='developer-support-adp-output-on'
){
void
(
el
[
i
]
.className='developer-support-adp-output-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-adp-output-off'
){
void
(
el
[
i
]
.className='developer-support-adp-output-on'
)}};}
});
}
multirow append ds_buttons FOT
\
"Toggle Footer display"
\
{
javascript:void
(
d=document
);
void
(
el=d.getElementsByTagName
(
'div'
));
for
(
i=0
;
i<el.length
;
i++
){
if
(
el
[
i
]
.className=='developer-support-footer'
){
void
(
el
[
i
]
.className='developer-support-footer-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-footer-off'
){
void
(
el
[
i
]
.className='developer-support-footer'
)}}};}
\
\#
\
off
template::add_body_script -script
{
document.getElementById
(
'ACS_DS_FOT'
)
.addEventListener
(
'click', function
(
event
)
{
var el=document.getElementsByTagName
(
'div'
);
event.preventDefault
();
for
(
i=0
;
i<el.length
;
i++
){
if
(
el
[
i
]
.className=='developer-support-footer'
){
void
(
el
[
i
]
.className='developer-support-footer-off'
)}
else
{
if
(
el
[
i
]
.className=='developer-support-footer-off'
){
void
(
el
[
i
]
.className='developer-support-footer'
)}}};
});
}
set oacs_shell_url
"
${ds_url}
shell"
set auto_test_url
[
site_node::get_package_url -package_key acs-automated-testing
]
set request_info_url
[
export_vars -base
"
${ds_url}
request-info"
{
{
request
{[
ad_conn request
]}
}
}]
...
...
tcl/acs-developer-support-init.tcl
View file @
9c117799
...
...
@@ -12,7 +12,7 @@ if { ![nsv_exists ds_properties enabled_p] } {
nsv_set ds_properties enabled_p
[
parameter::get -package_id
[
ds_instance_id
]
-parameter EnabledOnStartupP -default 0
]
# Take the IP list
(
space or comma sep
erated
)
and turn it into a t
cl list.
# Take the IP list
(
space or comma sep
arated
)
and turn it into a T
cl list.
set IPs
[
list
]
foreach ip
[
lsort
-unique
[
split
[
parameter::get -package_id
[
ds_instance_id
]
-parameter EnabledIPs -default *
]
{
,
}]]
{
if
{
$ip
eq
"*"
}
{
...
...
tcl/acs-developer-support-procs.tcl
View file @
9c117799
# $Id$
# File: developer-support-procs.tcl
# Author: Jon Salz <jsalz@mit.edu>
# Date: 22 Apr 2000
# Description: Provides routines used to aggregate request/response information for debugging.
ad_library
{
Provides routines used to aggregate request/response information for debugging.
@author Jon Salz <jsalz@mit.edu>
@creation-date 22 Apr 2000
}
ad_proc -private ds_instance_id
{}
{
@return The instance of a running acs developer support.
}
{
return
[
util_memoize
[
list
db_string acs_kernel_id_get
{
select package_id from apm_packages
where package_key = 'acs-developer-support'
and rownum=1
}
-default 0
]]
return
[
util_memoize
[
list
db_string acs_kernel_id_get
{}
-default 0
]]
}
ad_proc -public ds_permission_p
{}
{
...
...
@@ -45,7 +43,7 @@
}
else
{
ns_log Warning
"
$user
_id doesn't have
$privilege
on object
$object
_id"
ad_return_forbidden
"Permission Denied"
"<blockquote>
<p>You don't have permission to
$privilege
[
db_string name
{
select acs_object.name
(
:object_id
)
from dual
}]
.</p>
<p>You don't have permission to
$privilege
[
db_string name
{}]
.</p>
</blockquote>"
}
ad_script_abort
...
...
@@ -205,7 +203,7 @@
if
{
$ds
_url ne
""
}
{
append out
[
subst
{
<a href=
"
$ds
_url"
>Developer Support Home</a> -
<a href=
"
$
ds
_url/
request-info?request=
$::ad
_conn(request)"
>Request Information</a><br>
<a href=
"
$
{ds_url}
request-info?request=
$::ad
_conn(request)"
>Request Information</a><br>
}]
}
else
{
ns_log Error
"ACS-Developer-Support: Unable to offer link to Developer Support
\
...
...
@@ -229,7 +227,8 @@
if
{
[
nsv_exists ds_request
$::ad
_conn
(
request
)
.conn
]
}
{
array set conn
[
nsv_get ds_request
$::ad
_conn
(
request
)
.conn
]
if
{
[
info
exists conn
(
startclicks
)]
}
{
append out
"Page served in
[
format
"%.f"
[
expr
{
([
clock
clicks -milliseconds
]
-
$conn
(
startclicks
))
}]]
ms<br>
\n
"
set time
[
format
"%.f"
[
expr
{
([
clock
clicks -microseconds
]
-
$conn
(
startclicks
))
/1000.0
}]]
append out
"Page served in
$time
ms<br>
\n
"
}
}
...
...
@@ -278,7 +277,7 @@
if
{
[
nsv_exists ds_request
$::ad
_conn
(
request
)
.conn
]
}
{
array set conn
[
nsv_get ds_request
$::ad
_conn
(
request
)
.conn
]
if
{
[
info
exists conn
(
startclicks
)]
}
{
set result
[
format
"%.f"
[
expr
{
([
clock
clicks -mi
lliseconds
]
-
$conn
(
startclicks
))
}]]
set result
[
format
"%.f"
[
expr
{
([
clock
clicks -mi
croseconds
]
-
$conn
(
startclicks
))
/1000.0
}]]
}
}
}
...
...
@@ -318,6 +317,7 @@
ds_add start
[
ns_time
]
ds_add conn startclicks
[
ad_conn start_clicks
]
for
{
set i 0
}
{
$i
<
[
ns_set size
[
ad_conn headers
]]
}
{
incr i
}
{
ds_add headers
[
ns_set key
[
ad_conn headers
]
$i
]
[
ns_set value
[
ad_conn headers
]
$i
]
}
...
...
@@ -411,7 +411,8 @@
set kill_count 0
foreach name
$names
{
if
{
[
regexp
{
^
([
0-9
]
+
)
\.
}
$name
""
request
]
&&
[
expr
{
$request
<=
$max
_request
}]
}
{
&&
$request
<=
$max
_request
}
{
incr kill_count
nsv_unset ds_request
$name
}
...
...
@@ -441,7 +442,7 @@
ad_proc -public ds_user_select_widget
{}
{
Build a select widget for all users in the system, for quick user switching. Very
expensive
(
returns a big file
)
for
openacs
instances with a large number of users,
expensive
(
returns a big file
)
for
OpenACS
instances with a large number of users,
so perhaps best used on test instances.
}
{
set user_id
[
ad_conn user_id
]
...
...
@@ -488,7 +489,7 @@
set ds_url
[
ds_support_url
]
if
{
$ds
_url ne
""
}
{
return
[
subst
{
<form action=
"
$
ds
_url/
set-user"
method=
"get"
>
<form action=
"
$
{ds_url}
set-user"
method=
"get"
>
$you
_are
$you
_are_really
Change user: <select name=
"user_id"
>
...
...
@@ -609,7 +610,7 @@ ad_proc -private ds_replace_get_user_procs { enabled_p } {
}
ad_proc -private ds_watch_packages
{}
{
Watch
t
cl libraries and xql files for packages listed
Watch
T
cl libraries and xql files for packages listed
in the PackageWatchList parameter on server startup.
@author Peter Marklund
...
...
@@ -668,13 +669,13 @@ ad_proc -public ds_profile { command {tag {}} } {
if
{
$tag
eq
""
}
{
error
"Tag parameter is required"
}
set ::ds_profile__start_clock
(
$tag
)
[
clock
clicks -mi
lli
seconds
]
set ::ds_profile__start_clock
(
$tag
)
[
clock
clicks -mi
cro
seconds
]
}
stop
{
if
{
[
info
exists ::ds_profile__start_clock
(
$tag
)]
&&
$::ds
_profile__start_clock
(
$tag
)
ne
""
}
{
ds_add prof
$tag
\
[
expr
{[
clock
clicks -mi
lli
seconds
]
-
$::ds
_profile__start_clock
(
$tag
)}]
[
expr
{[
clock
clicks -mi
cro
seconds
]
-
$::ds
_profile__start_clock
(
$tag
)}]
unset ::ds_profile__start_clock
(
$tag
)
}
else
{
ns_log Warning
"ds_profile stop called without a corresponding call to ds_profile start, with tag
$tag
"
...
...
www/css-edit.tcl
View file @
9c117799
...
...
@@ -8,7 +8,7 @@ ad_page_contract {
}
{
{
file_location
}
{
css_location
}
{
return_url
"/"
}
{
return_url
:localurl
"/"
}
}
-properties
{
}
-validate
{
}
-errors
{
...
...
www/css-list.tcl
View file @
9c117799
...
...
@@ -8,7 +8,7 @@ ad_page_contract {
@creation-date 2007-09-29
@cvs-id $Id$
}
{
{
return_url
""
}
{
return_url
:localurl
""
}
{
css_list
}
}
-properties
{
}
-validate
{
...
...
www/css-make-live.tcl
View file @
9c117799
...
...
@@ -26,7 +26,7 @@ set target $file_location
set
source
[
content::revision::get_cr_file_path -revision_id
$revision
_id
]
#todo check if files are stored in db
file
copy -force
$source
$target
file
copy -force
--
$source
$target
ad_returnredirect
$return
_url_2
...
...
www/doc/developer-support-example.adp
View file @
9c117799
<property name="context">{/doc/acs-developer-support {Developer Support}} {Request Information}</property>
<property name="context">{/doc/acs-developer-support {
ACS
Developer Support}} {Request Information}</property>
<property name="doc(title)">Request Information</property>
<master>
<h2>Request Information</h2>
...
...
@@ -552,7 +552,7 @@ select ad_group_member_p(1472, system_administrator_group_id) from dual
<td align="right" bgcolor="#DDDDDD" nowrap="nowrap">
1 ms </td><td bgcolor="#DDDDDD">releasehandle nsdb3 (log pool)</td>
</tr><tr>
<td bgcolor="black" align="right"><font color="white"><
b> 3678 ms </b
></font></td><th align="left">(total)</th>
<td bgcolor="black" align="right"><font color="white"><
strong> 3678 ms </strong
></font></td><th align="left">(total)</th>
</tr>
</table></blockquote>
<hr>
...
...
www/doc/index.adp
View file @
9c117799
<property name="context">{/doc/acs-developer-support {Developer Support}} {ACS Developer Support}</property>
<property name="context">{/doc/acs-developer-support {
ACS
Developer Support}} {ACS Developer Support}</property>
<property name="doc(title)">ACS Developer Support</property>
<master>
<h1>ACS Developer Support</h1>
...
...
@@ -17,16 +17,16 @@ in:
<h2>The Big Picture</h2>
<p>Software development is a big feedback loop: a developer writes
something, tests it, and then repeats until the results are
satisfactory. It
's important to streamline this cycle by having a
development environment which makes it easy to analyze what the
satisfactory. It
's important to streamline this cycle by having
a
development environment which makes it easy to analyze what the
software is doing under the hood.</p>
<h2>Peeking Under the Hood</h2>
<p>Our development environment previously consisted largely of
Emacs, and <tt>tail -f
/web/servername/log/servername-error.log</tt>. Now this has been
augmented: <tt>ad_footer</tt> and <tt>ad_admin_footer</tt> now
display a link entitled <
i>Developer Information</i>. (You can use
the <tt>ds_link</tt> procedure to generate the link yourself.)
display a link entitled <
em>Developer Information</em>. (You can
use
the <tt>ds_link</tt> procedure to generate the link yourself.)
Following the link displays a screenful of information
including:</p>
<ul>
...
...
@@ -47,15 +47,15 @@ anyone else would pose a huge security risk.</p>
Tired of using <tt>ns_log</tt>
to instrument your code, then
grokking the error log to see what
's wrong with your page? Use th
e
<tt>ds_comment</tt>
grokking the error log to see what
's wrong with your page? Us
e
the
<tt>ds_comment</tt>
routine instead:
<blockquote><pre>
ds_comment "Foo is $foo"
</pre></blockquote>
Your comment will show up at the bottom of the page, beneath the
<
i>Developer Information</i
>
<
em>Developer Information</em
>
link (but only for site-wide
administrators). It will also be displayed on the Developer
Information page itself.
...
...
www/index.tcl
View file @
9c117799
...
...
@@ -122,7 +122,6 @@ if { [llength $requests] == 0 } {
unset conn
}
array set conn
[
nsv_get ds_request
$request
]
if
{
[
catch
{
set start
[
ns_fmttime
[
lindex
[
nsv_get ds_request
"
$id.start
"
]
0
]
"%T"
]
}]
}
{
...
...
@@ -130,7 +129,7 @@ if { [llength $requests] == 0 } {
}
if
{
[
info
exists conn
(
startclicks
)]
&&
[
info
exists conn
(
endclicks
)]
}
{
set duration
"
[
expr
{
(
$conn
(
endclicks
)
-
$conn
(
startclicks
))}]
ms"
set duration
"
[
expr
{
(
$conn
(
endclicks
)
-
$conn
(
startclicks
))
/ 1000.0
}]
ms"
}
else
{
set duration
""
}
...
...
www/request-info.tcl
View file @
9c117799
...
...
@@ -114,10 +114,10 @@ if { [info exists property(rp)] } {
continue
}
set duration
[
format
"%.1f ms"
[
expr
{
$endclicks
-
$startclicks
}]]
set duration
[
format
"%.1f ms"
[
expr
{
(
$endclicks
-
$startclicks
)
/1000.0
}]]
if
{
[
info
exists conn
(
startclicks
)]
}
{
append body
"<li>
[
format
"%+06.1f"
[
expr
{
(
$startclicks
-
$conn
(
startclicks
))
}]]
ms: "
append body
"<li>
[
format
"%+06.1f"
[
expr
{
(
$startclicks
-
$conn
(
startclicks
))
/1000.0
}]]
ms: "
}
else
{
append body
"<li>"
}
...
...
www/search.adp
View file @
9c117799
...
...
@@ -13,7 +13,7 @@
<if @gone_p@ false>
<if @matches:rowcount@ gt 0>
<multiple name="matches">
<div style="border-bottom: 1px solid black;"><p>@matches.file_links;noquote@ <
b>@matches.page@</b
> @matches.size@ bytes</p><pre>@matches.excerpt;noquote@</pre></div>
<div style="border-bottom: 1px solid black;"><p>@matches.file_links;noquote@ <
strong>@matches.page@</strong
> @matches.size@ bytes</p><pre>@matches.excerpt;noquote@</pre></div>
</multiple>
</if>
<else>
...
...
www/set-user.tcl
View file @
9c117799
...
...
@@ -2,7 +2,7 @@ ad_page_contract {
A hack that will allow us to simulate being a different user
}
{
user_id:naturalnum,notnull
return_url
return_url
:localurl
}
##NOTE THIS DOESN'T REQUIRE ADMIN SO THAT WE CAN DO USER SWITCHING
...
...
www/set.tcl
View file @
9c117799
...
...
@@ -8,7 +8,7 @@ ad_page_contract {
}
{
field
enabled_p:boolean
{
return_url
"."
}
{
return_url
:localurl
"."
}
}
ds_require_permission
[
ad_conn package_id
]
"admin"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment