Index: openacs-4/packages/acs-admin/www/auth/authority-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/Attic/authority-oracle.xql,v diff -u -N --- openacs-4/packages/acs-admin/www/auth/authority-oracle.xql 13 Jan 2005 13:54:41 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ - - -oracle8.1.6 - - - - - select job_id, - to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time_ansi, - to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time_ansi, - snapshot_p, - (select count(e1.entry_id) - from auth_batch_job_entries e1 - where e1.job_id = auth_batch_jobs.job_id) as num_actions, - (select count(e2.entry_id) - from auth_batch_job_entries e2 - where e2.job_id = auth_batch_jobs.job_id - and e2.success_p = 'f') as num_problems, - interactive_p, - message, - round((nvl(job_end_time, sysdate) - job_start_time) * 24*60*60) as run_time_seconds - from auth_batch_jobs - where authority_id = :authority_id - order by start_time_ansi - - - - Index: openacs-4/packages/acs-admin/www/auth/authority-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/Attic/authority-postgresql.xql,v diff -u -N --- openacs-4/packages/acs-admin/www/auth/authority-postgresql.xql 13 Jan 2005 13:54:41 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,29 +0,0 @@ - - -postgresql7.1 - - - - - select job_id, - to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time_ansi, - to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time_ansi, - snapshot_p, - (select count(e1.entry_id) - from auth_batch_job_entries e1 - where e1.job_id = auth_batch_jobs.job_id) as num_actions, - (select count(e2.entry_id) - from auth_batch_job_entries e2 - where e2.job_id = auth_batch_jobs.job_id - and e2.success_p = 'f') as num_problems, - interactive_p, - message, - trunc(extract(epoch from (coalesce(job_end_time, current_timestamp) - job_start_time))) as run_time_seconds - from auth_batch_jobs - where authority_id = :authority_id - order by start_time_ansi - - - - - Index: openacs-4/packages/acs-admin/www/auth/authority.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority.tcl,v diff -u -N -r1.25 -r1.26 --- openacs-4/packages/acs-admin/www/auth/authority.tcl 7 Apr 2018 19:41:47 -0000 1.25 +++ openacs-4/packages/acs-admin/www/auth/authority.tcl 14 Jun 2018 16:21:45 -0000 1.26 @@ -258,6 +258,9 @@ set display_batch_history_p [expr {$authority_exists_p && $ad_form_mode eq "display"}] if { $display_batch_history_p } { + + set yes [_ acs-kernel.common_Yes] + set no [_ acs-kernel.common_No] db_multirow -extend { job_url @@ -267,13 +270,32 @@ short_message actions_per_minute run_time - } batch_jobs select_batch_jobs {} { + run_time_seconds + } batch_jobs select_batch_jobs { + select job_id, + to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time_ansi, + to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time_ansi, + snapshot_p, + (select count(*) from auth_batch_job_entries + where job_id = auth_batch_jobs.job_id) as num_actions, + (select count(*) from auth_batch_job_entries + where job_id = auth_batch_jobs.job_id + and not success_p) as num_problems, + interactive_p, + message + from auth_batch_jobs + where authority_id = :authority_id + order by start_time_ansi + } { + set run_time_seconds [expr {[clock scan $end_time_ansi -format "%Y-%m-%d %H:%M:%S"] - + [clock scan $start_time_ansi -format "%Y-%m-%d %H:%M:%S"]}] + set job_url [export_vars -base batch-job { job_id }] set start_time_pretty [lc_time_fmt $start_time_ansi "%x %X"] set end_time_pretty [lc_time_fmt $end_time_ansi "%x %X"] - set interactive_pretty [ad_decode $interactive_p "t" "Yes" "No"] + set interactive_pretty [expr {$interactive_p eq "t" ? $yes : $no}] set short_message [string_truncate -len 30 -- $message] set actions_per_minute {}