Index: openacs-4/www/templates/bug-tracker.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/templates/Attic/bug-tracker.adp,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/www/templates/bug-tracker.adp 27 May 2009 06:53:21 -0000 1.1.2.1
@@ -0,0 +1,33 @@
+
Bug Tracker Summary for package @package_key@
+
+
+
+
+ Open Bugs: |
+ @open@ |
+
+
+ Latest Bug Opened: |
+ @bug.date@ @bug.summary@
+ This package has no open bugs.
+ |
+
+
+ Latest Bug Fixed: |
+ @fix.date@ @fix.summary@.
+ No bugs have been fixed in this package.
+ |
+
+
+ Top Bug Submitters: |
+ <%=[acs_community_member_link -user_id @submitters.user_id@] %> (@submitters.count@) |
+
+
+ Top Bug Fixers: |
+ <%=[acs_community_member_link -user_id @fixers.user_id@] %> (@fixers.count@) |
+
+
+
+
+ There is no package with the name "@package_key@".
+
Index: openacs-4/www/templates/bug-tracker.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/templates/Attic/bug-tracker.tcl,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/www/templates/bug-tracker.tcl 27 May 2009 06:53:21 -0000 1.1.2.1
@@ -0,0 +1,109 @@
+# Purpose: Show a quick summary of bug-tracker information about a
+# specific OpenACS package.
+# param: package_key (such as acs-admin or lars-blogger)
+
+# Each OpenACS package is represented in the bugtracker as a
+# component. The component name is unfortunately not exactly the same
+# as the package_key, so it needs to be massaged.
+
+# We take care of all the special cases and handle the default at the
+# end. Most package_key(s) can be converted to component_name(s) by
+# simply removing the dashes
+
+switch $package_key {
+ openacs {set component_name "1-OpenACS General"}
+ acs-bootstrap-installer {set component_name "ACS Bootstrap/Installer"}
+ acs-core-docs {set component_name "ACS Core Documents"}
+ acs-lang {set component_name "ACS Language"}
+ acs-ldap-authentication {set component_name "ACS LDAP Authentication (deprecated)"}
+ adserver {set component_name "Ad Server"}
+ authorize-gateway {set component_name "Authorize.net Gateway"}
+ acs-automated-testing {set component_name "Automated Testing"}
+ bug-tracker {set component_name "BugTracker"}
+ dotlrn-fs {set component_name "dotLRN File Storage Applet"}
+ dotlrn-wps {set component_name "dotLRN Wimpy Point Applet"}
+ fs-portlet {set component_name "File Storage Portlet"}
+ ims-ent {set component_name "IMS Enterprise"}
+ payflowpro {set component_name "PayflowPro Gateway"}
+ ref-timezones {set component_name "Reference Data - Timezone"}
+ ref-us-zipcodes {set component_name "Reference Data - US Zip Codes"}
+ spam {set component_name "Spam System"}
+ theme-selva {set component_name "theme-selva"}
+ oacs-dav {set component_name "WebDAV Support"}
+ wp-slim {set component_name "Wimpy Point Slim"}
+ xml-rpc {set component_name "XML-RPC"}
+ default {set component_name [string map {"-" " "} $package_key]}
+}
+
+if { [db_0or1row pkg_exists "select component_id from bt_components where lower(component_name)=lower(:component_name)"] } {
+ set pkg_exists_p 1
+
+ set all_bugs_query "
+ select bug_number, summary, to_char(creation_date, 'YYYY-MM-DD') as date,
+ st.short_name
+ from bt_bugs b,
+ workflow_cases c,
+ workflow_case_fsm fsm,
+ workflow_fsm_states st
+ where b.component_id=:component_id
+ and b.bug_id=c.object_id
+ and c.case_id=fsm.case_id
+ and fsm.current_state=st.state_id
+ order by creation_date desc
+ "
+
+ # walk through all the bugs, counting the open bugs
+ # and saving the most recent bug and fix
+ set open 0; set bug_exists_p 0; set fix_exists_p 0
+ db_foreach all_bugs $all_bugs_query {
+ if { $short_name eq "open" } {
+ incr open
+ if { ! $bug_exists_p } {
+ # most recent bug entered
+ set bug_exists_p 1
+ array set bug [list summary $summary num $bug_number date $date]
+ }
+ } else {
+ if { ! $fix_exists_p } {
+ # most recent bug fixed
+ set fix_exists_p 1
+ array set fix [list summary $summary num $bug_number date $date]
+ }
+ }
+ }
+
+ # find prolific submitter
+ db_multirow submitters submitters "
+ select creation_user as user_id,
+ count(bug_id) as count
+ from bt_bugs
+ where component_id=:component_id
+ group by creation_user
+ order by count(bug_id) desc
+ limit 5"
+
+ # find prolific fixer
+ # This query overcounts if a bug is resolved more than once. But
+ # it's a huge pain to find out the true resolver in those cases,
+ # so I'm keeping the overcount
+ db_multirow fixers fixers "
+ select count(b.bug_id) as count,
+ o.creation_user as user_id
+ from bt_bugs b,
+ workflow_cases c,
+ workflow_case_log l,
+ workflow_actions a,
+ acs_objects o
+ where b.component_id=:component_id
+ and b.bug_id=c.object_id
+ and c.case_id=l.case_id
+ and l.action_id=a.action_id
+ and a.short_name='resolve'
+ and l.entry_id=o.object_id
+ group by o.creation_user
+ order by count(b.bug_id) desc
+ limit 5"
+} else {
+ set pkg_exists_p 0
+}
+
Index: openacs-4/www/templates/info-file.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/templates/Attic/info-file.adp,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/www/templates/info-file.adp 27 May 2009 06:53:21 -0000 1.1.2.1
@@ -0,0 +1,20 @@
+Package specification Summary for package @package_key@
+
+
+
+ Description |
+ @info.description@ |
+
+
+ Maturity |
+ @maturity@ |
+
+
+ This package depends on: |
+ None@deps.name@ |
+
+
+ Packages that depend on @package_key@ |
+ None@dependees.name@ |
+
+
Index: openacs-4/www/templates/info-file.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/templates/Attic/info-file.tcl,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/www/templates/info-file.tcl 27 May 2009 06:53:21 -0000 1.1.2.1
@@ -0,0 +1,40 @@
+# Purpose: show summary of package specification (.info file)
+#
+# param: package_key (like acs-admin or lars-blogger)
+
+array set info [apm_read_package_info_file [apm_package_info_file_path $package_key]]
+
+set maturity [apm::package_version::attributes::maturity_int_to_text \
+ $info(maturity)]
+
+# what packages does $package_key depend on
+multirow create deps name
+foreach p $info(requires) {
+ multirow append deps [lindex $p 0]
+}
+
+# get installed packages which depend on $package_key
+db_multirow dependees dependees {
+ select v.package_key as name
+ from apm_package_versions v,
+ apm_package_dependencies d
+ where v.version_id=d.version_id
+ and d.dependency_type='requires'
+ and d.service_uri=:package_key
+ order by v.package_key
+}
+
+# append uninstalled packages which depend on $package_key
+apm_get_package_repository -array repository
+foreach key [array names repository] {
+ array unset pkg
+ array set pkg $repository($key)
+ set requires_list $pkg(requires)
+ foreach require $requires_list {
+ if { [string eq $package_key [lindex $require 0]] } {
+ multirow append dependees $key
+ break
+ }
+ }
+}
+
Index: openacs-4/www/templates/metrics.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/templates/Attic/metrics.adp,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/www/templates/metrics.adp 27 May 2009 06:53:21 -0000 1.1.2.1
@@ -0,0 +1,44 @@
+Code Metrics Summary for package @package_key@
+
+
+
+ # Tcl Procs |
+ @tcl_metrics.procs@
+ |
+
+ # Tcl Lines |
+ @tcl_metrics.lines@
+ |
+
+ # Automated Tests |
+ @test_metrics.procs@
+ |
+
+ # Stored Procedures |
+ PG: @pg_metrics.procs@ ORA: @ora_metrics.procs@
+ |
+
+ # SQL Lines |
+ PG: @pg_metrics.lines@ ORA: @ora_metrics.lines@
+ |
+
+ # ADP pages |
+ @adp_metrics.count@
+ |
+
+ # ADP lines |
+ @adp_metrics.lines@
+ |
+
+ # Include pages (@package_key@/lib/) |
+ @lib_metrics.count@
+ |
+
+ # Documentation pages |
+ @doc_metrics.count@
+ |
+
+ # Documentation lines |
+ @doc_metrics.lines@
+ |
+
Index: openacs-4/www/templates/metrics.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/www/templates/Attic/metrics.tcl,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/www/templates/metrics.tcl 27 May 2009 06:53:21 -0000 1.1.2.1
@@ -0,0 +1,33 @@
+# Purpose: Show a summary of files within a package. This includes metrics
+# like '# of procs', '# of lines'
+#
+# param: package_key (such as acs-admin or lars-blogger)
+
+apm::metrics -package_key $package_key \
+ -file_type tcl_procs \
+ -array tcl_metrics
+
+apm::metrics -package_key $package_key \
+ -file_type test_procs \
+ -array test_metrics
+
+apm::metrics -package_key $package_key \
+ -file_type documentation \
+ -array doc_metrics
+
+apm::metrics -package_key $package_key \
+ -file_type include_page \
+ -array lib_metrics
+
+apm::metrics -package_key $package_key \
+ -file_type content_page \
+ -array adp_metrics
+
+apm::metrics -package_key $package_key \
+ -file_type data_model_pg \
+ -array pg_metrics
+
+apm::metrics -package_key $package_key \
+ -file_type data_model_ora \
+ -array ora_metrics
+