More Galaxy reports - this should suffice for a while...

Number of jobs today - displays the total number of jobs for today
Number of jobs per Internet domain - displays the number of jobs that have been submitted per Internet domain
Number of registered users - displays the total number of registered users
This commit is contained in:
Greg Von Kuster
2008-06-26 18:52:38 +00:00
parent 3539922e65
commit 27a34e9f21
22 changed files with 587 additions and 78 deletions
+214 -39
View File
@@ -1,6 +1,7 @@
import operator, os, socket
from datetime import datetime
from time import strftime
from time import mktime, strftime, localtime
from calendar import day_name, month_name
from galaxy.webapps.reports.base.controller import *
import galaxy.model
import pkg_resources
@@ -12,14 +13,111 @@ log = logging.getLogger( __name__ )
class Jobs( BaseController ):
@web.expose
def today_all( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
year = int( datetime.utcnow().strftime( "%Y" ) )
month = int( datetime.utcnow().strftime( "%m" ) )
day = int( datetime.utcnow().strftime( "%d" ) )
year_month_day = datetime.utcnow().strftime( "%Y-%m-%d" )
today = params.get( 'today', year_month_day )
engine = galaxy.model.mapping.metadata.engine
jobs = []
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
# Return weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12), day (1-31)
def weekday( year, month, day ):
secs = mktime( ( year, month, day, 0, 0, 0, 0, 0, 0 ) )
tuple = localtime( secs )
return tuple[6]
day_of_week = weekday( year, month, day )
day_label = params.get( 'day_label', day_name[ day_of_week ] )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
day_of_month = datetime.utcnow().strftime( "%d" )
s = """
SELECT
wanted_year_month_day AS year_month_day,
wanted_day_of_month AS day_of_month,
num_jobs AS num_jobs,
num_jobs_to_subtract AS num_monitor_jobs,
wanted_day_label AS day_label
FROM
(SELECT
year_month_day AS year_month_day,
day_of_month AS day_of_month,
num_jobs_to_subtract AS num_jobs_to_subtract,
to_char(a_timestamp, 'Day') AS day_label
FROM
(SELECT
substr(job.create_time, 1, 10) AS year_month_day,
substr(job.create_time, 9, 2) AS day_of_month,
count(substr(job.create_time, 1, 10)) AS num_jobs_to_subtract,
to_timestamp(substr(job.create_time, 1, 10), 'YYYY-MM-DD+02') AS a_timestamp
FROM
job
LEFT OUTER JOIN history ON job.history_id = history.id
LEFT OUTER JOIN galaxy_user ON history.user_id = galaxy_user.id
WHERE
substr(job.create_time, 1, 10) = '%s'
AND
galaxy_user.email = '%s'
GROUP BY
substr(job.create_time, 9, 2),
substr(job.create_time, 1, 10)) AS fubar
) AS total_fubar
FULL JOIN
(SELECT
year_month_day AS wanted_year_month_day,
day_of_month AS wanted_day_of_month,
num_jobs AS num_jobs,
to_char(a_timestamp, 'Day') AS wanted_day_label
FROM
(SELECT
foo.create_time AS year_month_day,
foo.day_of_month AS day_of_month,
count(foo.create_time) AS num_jobs,
to_timestamp(foo.create_time, 'YYYY-MM-DD+02') AS a_timestamp
FROM
(SELECT
substr(job.create_time, 1, 10) AS create_time,
substr(job.create_time, 9, 2) AS day_of_month
FROM
job
WHERE
substr(job.create_time, 1, 10) = '%s'
GROUP BY
day_of_month,
job.create_time) AS foo
GROUP BY
day_of_month,
create_time
ORDER BY
create_time DESC) AS bar
) AS foobar
ON
foobar.wanted_year_month_day = total_fubar.year_month_day
ORDER BY
year_month_day DESC
""" % ( today, monitor_email, today )
job_rows = engine.text( s ).execute().fetchall()
for job in job_rows:
try:
num_user_jobs = job.num_jobs - job.num_monitor_jobs
except:
num_user_jobs = job.num_jobs
jobs.append( ( job.day_label, job.year_month_day, num_user_jobs, job.num_monitor_jobs, job.num_jobs, job.day_of_month ) )
return trans.fill_template( 'jobs_today_all.mako', day_label=day_label, month_label=month_label, year_label=year_label, day_of_month=day_of_month, month=month, jobs=jobs, msg=msg )
@web.expose
def specified_month_all( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
year_month = datetime.utcnow().strftime( "%Y-%m" )
month = params.get( 'id', year_month )
month = params.get( 'month', year_month )
engine = galaxy.model.mapping.metadata.engine
jobs = []
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
s = """
SELECT
wanted_year_month_day AS year_month_day,
@@ -91,15 +189,18 @@ class Jobs( BaseController ):
num_user_jobs = job.num_jobs - job.num_monitor_jobs
except:
num_user_jobs = job.num_jobs
jobs.append( ( job.day_label, job.year_month_day, num_user_jobs, job.num_monitor_jobs, job.num_jobs ) )
return trans.fill_template( 'jobs_specified_month_all.mako', month=month, jobs=jobs, msg=msg )
jobs.append( ( job.day_label, job.year_month_day, num_user_jobs, job.num_monitor_jobs, job.num_jobs, job.day_of_month ) )
return trans.fill_template( 'jobs_specified_month_all.mako', month_label=month_label, year_label=year_label, month=month, jobs=jobs, msg=msg )
@web.expose
def specified_month_in_error( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
month = datetime.utcnow().strftime( "%Y-%m" )
year_month = datetime.utcnow().strftime( "%Y-%m" )
month = params.get( 'month', year_month )
engine = galaxy.model.mapping.metadata.engine
jobs = []
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
s = """
SELECT
year_month_day AS year_month_day,
@@ -133,8 +234,8 @@ class Jobs( BaseController ):
""" % ( month )
job_rows = engine.text( s ).execute().fetchall()
for job in job_rows:
jobs.append( ( job.day_label, job.year_month_day, job.num_jobs ) )
return trans.fill_template( 'jobs_specified_month_in_error.mako', month=month, jobs=jobs, msg=msg )
jobs.append( ( job.day_label, job.year_month_day, job.num_jobs, job.day_of_month ) )
return trans.fill_template( 'jobs_specified_month_in_error.mako', month_label=month_label, year_label=year_label, month=month, jobs=jobs, msg=msg )
@web.expose
def specified_date_in_error( self, trans, **kwd ):
params = util.Params( kwd )
@@ -142,7 +243,11 @@ class Jobs( BaseController ):
engine = galaxy.model.mapping.metadata.engine
jobs = []
today = datetime.utcnow().strftime( "%Y-%m-%d" )
specified_date = params.get( 'id', today )
specified_date = params.get( 'specified_date', today )
day_label = params.get( 'day_label', datetime.utcnow().strftime( "%d" ) )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
day_of_month = params.get( 'day_of_month', datetime.utcnow().strftime( "%d" ) )
s = """
SELECT
job.id AS id,
@@ -178,7 +283,7 @@ class Jobs( BaseController ):
except:
pass
jobs.append( ( job.state, job.id, job.create_time, job.update_time, job.session_id, job.tool_id, job.user_email, remote_host, job.command_line, job.stderr, job.stack_trace, job.info ) )
return trans.fill_template( 'jobs_specified_date_in_error.mako', specified_date=specified_date, jobs=jobs, msg=msg )
return trans.fill_template( 'jobs_specified_date_in_error.mako', specified_date=specified_date, day_label=day_label, month_label=month_label, year_label=year_label, day_of_month=day_of_month, jobs=jobs, msg=msg )
@web.expose
def specified_date_all( self, trans, **kwd ):
params = util.Params( kwd )
@@ -186,8 +291,12 @@ class Jobs( BaseController ):
engine = galaxy.model.mapping.metadata.engine
jobs = []
today = datetime.utcnow().strftime( "%Y-%m-%d" )
specified_date = params.get( 'id', today )
specified_date = params.get( 'specified_date', today )
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
day_label = params.get( 'day_label', datetime.utcnow().strftime( "%d" ) )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
day_of_month = params.get( 'day_of_month', datetime.utcnow().strftime( "%d" ) )
s = """
SELECT
job.id AS id,
@@ -223,7 +332,7 @@ class Jobs( BaseController ):
except:
pass
jobs.append( ( job.state, job.id, job.create_time, job.update_time, job.session_id, job.tool_id, job.user_email, remote_host, job.command_line, job.stderr, job.stack_trace, job.info ) )
return trans.fill_template( 'jobs_specified_date_all.mako', specified_date=specified_date, jobs=jobs, msg=msg )
return trans.fill_template( 'jobs_specified_date_all.mako', specified_date=specified_date, day_label=day_label, month_label=month_label, year_label=year_label, day_of_month=day_of_month, jobs=jobs, msg=msg )
@web.expose
def all_unfinished( self, trans, **kwd ):
params = util.Params( kwd )
@@ -346,20 +455,31 @@ class Jobs( BaseController ):
jobs = []
s = """
SELECT
count(id) AS num_jobs,
substr(create_time, 1, 7) AS year_month
num_jobs AS num_jobs,
year_month AS year_month,
to_char(a_timestamp, 'Month') AS month_label,
to_char(a_timestamp, 'YYYY') AS year_label
FROM
job
WHERE
state = 'error'
GROUP BY
year_month
ORDER BY
year_month DESC
(SELECT
num_jobs AS num_jobs,
year_month AS year_month,
to_timestamp(year_month, 'YYYY-MM-DD') AS a_timestamp
FROM
(SELECT
count(id) AS num_jobs,
substr(create_time, 1, 7) AS year_month
FROM
job
WHERE
state = 'error'
GROUP BY
year_month
ORDER BY
year_month DESC) AS foo) AS bar
"""
job_rows = engine.text( s ).execute().fetchall()
for job in job_rows:
jobs.append( ( job.year_month, job.num_jobs ) )
jobs.append( ( job.year_month, job.num_jobs, job.month_label, job.year_label ) )
return trans.fill_template( 'jobs_per_month_in_error.mako', jobs=jobs, msg=msg )
@web.expose
def per_user( self, trans, **kwd ):
@@ -391,7 +511,7 @@ class Jobs( BaseController ):
msg = ''
engine = galaxy.model.mapping.metadata.engine
jobs = []
email = params.get( 'id', 'monitor@bx.psu.edu' )
email = params.get( 'email', 'monitor@bx.psu.edu' )
# The @ char has been converted to an 'X'
email = email.replace( 'X', '@' )
s = """
@@ -422,7 +542,7 @@ class Jobs( BaseController ):
""" % email
job_rows = engine.text( s ).execute().fetchall()
for job in job_rows:
jobs.append( ( job.year_month, job.num_jobs ) )
jobs.append( ( job.year_month, job.num_jobs, job.month_label, job.year_label ) )
return trans.fill_template( 'jobs_user_per_month.mako', email=email, jobs=jobs, msg=msg )
@web.expose
def user_for_month( self, trans, **kwd ):
@@ -430,11 +550,13 @@ class Jobs( BaseController ):
msg = ''
engine = galaxy.model.mapping.metadata.engine
jobs = []
email = params.get( 'id', 'monitor@bx.psu.edu' )
email = params.get( 'email', 'monitor@bx.psu.edu' )
# The @ char has been converted to an 'X'
email = email.replace( 'X', '@' )
year_month = datetime.utcnow().strftime( "%Y-%m" )
month = params.get( 'month', year_month )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
s = """
SELECT
job.id AS id,
@@ -470,7 +592,7 @@ class Jobs( BaseController ):
except:
pass
jobs.append( ( job.state, job.id, job.create_time, job.update_time, job.session_id, job.tool_id, job.user_email, remote_host, job.command_line, job.stderr, job.stack_trace, job.info ) )
return trans.fill_template( 'jobs_user_for_month.mako', email=email, month=month, jobs=jobs, msg=msg )
return trans.fill_template( 'jobs_user_for_month.mako', email=email, month=month, month_label=month_label, year_label=year_label, jobs=jobs, msg=msg )
@web.expose
def per_tool( self, trans, **kwd ):
params = util.Params( kwd )
@@ -496,23 +618,34 @@ class Jobs( BaseController ):
msg = ''
engine = galaxy.model.mapping.metadata.engine
jobs = []
tool_id = params.get( 'id', 'Add a column1' )
s = """
tool_id = params.get( 'tool_id', 'Add a column1' )
s = """
SELECT
count(id) AS num_jobs,
substr(create_time, 1, 7) AS year_month
num_jobs AS num_jobs,
year_month AS year_month,
to_char(a_timestamp, 'Month') AS month_label,
to_char(a_timestamp, 'YYYY') AS year_label
FROM
job
WHERE
tool_id = '%s'
GROUP BY
year_month
ORDER BY
year_month DESC
(SELECT
num_jobs AS num_jobs,
year_month AS year_month,
to_timestamp(year_month, 'YYYY-MM-DD') AS a_timestamp
FROM
(SELECT
count(id) AS num_jobs,
substr(create_time, 1, 7) AS year_month
FROM
job
WHERE
tool_id = '%s'
GROUP BY
year_month
ORDER BY
year_month DESC) AS foo) AS bar
""" % tool_id
job_rows = engine.text( s ).execute().fetchall()
for job in job_rows:
jobs.append( ( job.year_month, job.num_jobs ) )
jobs.append( ( job.year_month, job.num_jobs, job.month_label, job.year_label ) )
return trans.fill_template( 'jobs_tool_per_month.mako', tool_id=tool_id, jobs=jobs, msg=msg )
@web.expose
def tool_for_month( self, trans, **kwd ):
@@ -520,9 +653,11 @@ class Jobs( BaseController ):
msg = ''
engine = galaxy.model.mapping.metadata.engine
jobs = []
tool_id = params.get( 'id', 'Add a column1' )
tool_id = params.get( 'tool_id', 'Add a column1' )
year_month = datetime.utcnow().strftime( "%Y-%m" )
month = params.get( 'month', year_month )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
s = """
SELECT
job.id AS id,
@@ -558,4 +693,44 @@ class Jobs( BaseController ):
except:
pass
jobs.append( ( job.state, job.id, job.create_time, job.update_time, job.session_id, job.tool_id, job.user_email, remote_host, job.command_line, job.stderr, job.stack_trace, job.info ) )
return trans.fill_template( 'jobs_tool_for_month.mako', tool_id=tool_id, month=month, jobs=jobs, msg=msg )
return trans.fill_template( 'jobs_tool_for_month.mako', tool_id=tool_id, month=month, month_label=month_label, year_label=year_label, jobs=jobs, msg=msg )
@web.expose
def per_domain( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
engine = galaxy.model.mapping.metadata.engine
jobs = []
s = """
SELECT
substr(bar.first_pass_domain, bar.dot_position, 4) AS domain,
count(job_id) AS num_jobs
FROM
(SELECT
user_email AS user_email,
first_pass_domain,
position('.' in first_pass_domain) AS dot_position,
job_id AS job_id
FROM
(SELECT
email AS user_email,
substr(email, char_length(email)-3, char_length(email)) AS first_pass_domain,
job.id AS job_id
FROM
job
LEFT OUTER JOIN galaxy_session ON galaxy_session.id = job.session_id
LEFT OUTER JOIN galaxy_user ON galaxy_session.user_id = galaxy_user.id
WHERE
job.session_id = galaxy_session.id
AND
galaxy_session.user_id = galaxy_user.id
) AS foo
) AS bar
GROUP BY
domain
ORDER BY
num_jobs DESC
"""
job_rows = engine.text( s ).execute().fetchall()
for job in job_rows:
jobs.append( ( job.domain, job.num_jobs ) )
return trans.fill_template( 'jobs_per_domain.mako', jobs=jobs, msg=msg )
@@ -155,7 +155,7 @@ class System( BaseController ):
def disk_usage( self, trans, **kwd ):
file_path = trans.app.config.file_path
disk_usage = self.get_disk_usage( file_path )
min_file_size = 1000 # 4 Gb
min_file_size = 2**32 # 4 Gb
file_size_str = nice_size( min_file_size )
d = trans.model.Dataset
datasets = []
@@ -0,0 +1,128 @@
from datetime import datetime
from calendar import day_name, month_name
from galaxy.webapps.reports.base.controller import *
import galaxy.model
import pkg_resources
pkg_resources.require( "sqlalchemy>=0.3" )
#from sqlalchemy import eagerload, desc
import sqlalchemy
import logging
log = logging.getLogger( __name__ )
class Users( BaseController ):
@web.expose
def registered_users( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
engine = galaxy.model.mapping.metadata.engine
s = """
SELECT
count(id) AS num_users
FROM
galaxy_user
"""
rows = engine.text( s ).execute().fetchall()
num_users = rows[0].num_users
return trans.fill_template( 'registered_users.mako', num_users=num_users, msg=msg )
@web.expose
def registered_users_per_month( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
engine = galaxy.model.mapping.metadata.engine
users = []
s = """
SELECT
num_users AS num_users,
year_month AS year_month,
to_char(a_timestamp, 'Month') AS month_label,
to_char(a_timestamp, 'YYYY') AS year_label
FROM
(SELECT
num_users AS num_users,
year_month AS year_month,
to_timestamp(year_month, 'YYYY-MM-DD') AS a_timestamp
FROM
(SELECT
count(id) AS num_users,
substr(create_time, 1, 7) AS year_month
FROM
galaxy_user
GROUP BY
year_month
ORDER BY
year_month DESC) AS foo) AS bar
"""
user_rows = engine.text( s ).execute().fetchall()
for user in user_rows:
users.append( ( user.year_month, user.num_users, user.month_label, user.year_label ) )
return trans.fill_template( 'registered_users_per_month.mako', users=users, msg=msg )
@web.expose
def specified_month( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
year_month = datetime.utcnow().strftime( "%Y-%m" )
month = params.get( 'month', year_month )
engine = galaxy.model.mapping.metadata.engine
users = []
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
s = """
SELECT
year_month_day AS year_month_day,
day_of_month AS day_of_month,
num_users AS num_users,
to_char(a_timestamp, 'Day') AS day_label
FROM
(SELECT
foo.create_time AS year_month_day,
foo.day_of_month AS day_of_month,
count(foo.create_time) AS num_users,
to_timestamp(foo.create_time, 'YYYY-MM-DD') AS a_timestamp
FROM
(SELECT
substr(create_time, 1, 10) AS create_time,
substr(create_time, 9, 2) AS day_of_month
FROM
galaxy_user
WHERE
substr(create_time, 1, 7) = '%s'
GROUP BY
day_of_month,
create_time) AS foo
GROUP BY
day_of_month,
create_time
ORDER BY
create_time DESC) AS bar
""" % month
user_rows = engine.text( s ).execute().fetchall()
for user in user_rows:
users.append( ( user.year_month_day, user.day_of_month, user.num_users, user.day_label ) )
return trans.fill_template( 'registered_users_specified_month.mako', month_label=month_label, year_label=year_label, month=month, users=users, msg=msg )
@web.expose
def specified_date( self, trans, **kwd ):
params = util.Params( kwd )
msg = ''
engine = galaxy.model.mapping.metadata.engine
users = []
today = datetime.utcnow().strftime( "%Y-%m-%d" )
specified_date = params.get( 'specified_date', today )
day_label = params.get( 'day_label', datetime.utcnow().strftime( "%d" ) )
month_label = params.get( 'month_label', month_name[ int( datetime.utcnow().strftime( "%m" ) ) ] )
year_label = params.get( 'year_label', datetime.utcnow().strftime( "%Y" ) )
day_of_month = params.get( 'day_of_month', datetime.utcnow().strftime( "%d" ) )
s = """
SELECT
email AS email
FROM
galaxy_user
WHERE
substr(create_time, 1, 10) = '%s'
ORDER BY
email
""" % ( specified_date )
user_rows = engine.text( s ).execute().fetchall()
for user in user_rows:
users.append( ( user.email ) )
return trans.fill_template( 'registered_users_specified_date.mako', specified_date=specified_date, day_label=day_label, month_label=month_label, year_label=year_label, day_of_month=day_of_month, users=users, msg=msg )
@@ -5,6 +5,7 @@
<h3 align="center">Galaxy Reports</h3>
<table align="center" width="40%" class="colored">
<tr><td><div class="reportTitle">Job Information</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='today_all' )}">Number of jobs today</a> - displays the total number of jobs for today</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='specified_month_all' )}">Number of jobs per day for current month</a> - displays days of the current month with the total number of jobs for each day</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='specified_month_in_error' )}">Number of jobs in error per day for current month</a> - displays days of the current month with the total number of jobs in error for each day</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='all_unfinished' )}">All unfinished jobs</a> - displays jobs that are currently in a "new" state, a "queued" state or a "running" state</div></td></tr>
@@ -12,6 +13,12 @@
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='per_month_in_error' )}">Number of jobs in error per month</a> - displays a list of months with the total number of jobs in error for each month</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='per_user' )}">Number of jobs per user</a> - displays users sorted in descending order by the number of jobs they have submitted</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='per_tool' )}">Number of jobs per tool</a> - displays tools sorted in alphabetical order by tool id and the number of jobs created by the tool</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='per_domain' )}">Number of jobs per Internet domain</a> - displays the number of jobs that have been submitted per Internet domain</div></td></tr>
</table>
<br clear="left"/><br/><br/><br/>
<table align="center" width="40%" class="colored">
<tr><td><div class="reportTitle">User Information</div></td></tr>
<tr><td><div class="reportBody"><a href="${h.url_for( controller='users', action='registered_users' )}">Number of registered users</a> - displays the total number of registered users</div></td></tr>
</table>
<br clear="left"/><br/><br/><br/>
<table align="center" width="40%" class="colored">
@@ -0,0 +1,35 @@
<%inherit file="/base_panels.mako"/>
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs Per Domain</h3>
<h4 align="center">This report does not account for unauthenticated users.</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
</table>
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr><td colspan="2">There are no jobs</td></tr>
%else:
<tr class="header">
<td>Domain</td>
<td>Total Jobs</td>
</tr>
<% ctr = 0 %>
%for job in jobs:
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td>${job[0]}</td>
<td>${job[1]}</td>
</tr>
<% ctr += 1 %>
%endfor
%endif
</table>
</div>
</%def>
@@ -3,7 +3,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs Per Month</h3>
<h4 align="center">Click Year-Month to view the number of jobs for each day of that month</h4>
<h4 align="center">Click Month to view the number of jobs for each day of that month</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
@@ -11,10 +11,10 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs</td></tr>
<tr><td colspan="4">There are no jobs</td></tr>
%else:
<tr class="header">
<td>Year-Month</td>
<td>Month</td>
<td>User Jobs</td>
<td>Monitor Jobs</td>
<td>Total</td>
@@ -26,7 +26,7 @@
%else:
<tr class="tr">
%endif
<td><a href="${h.url_for( controller='jobs', action='specified_month_all', id=job[0] )}">${job[0]}</a></td>
<td><a href="${h.url_for( controller='jobs', action='specified_month_all', month=job[0], month_label=job[4].strip(), year_label=job[5] )}">${job[4]}&nbsp;${job[5]}</a></td>
<td>${job[1]}</td>
<td>${job[2]}</td>
<td>${job[3]}</td>
@@ -3,7 +3,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs In Error Per Month</h3>
<h4 align="center">Click Year-Month to view the number of jobs in error for each day of that month</h4>
<h4 align="center">Click Month to view the number of jobs in error for each day of that month</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
@@ -11,10 +11,10 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs in error</td></tr>
<tr><td colspan="2">There are no jobs in error</td></tr>
%else:
<tr class="header">
<td>Year-Month</td>
<td>Month</td>
<td>Jobs In Error</td>
</tr>
<% ctr = 0 %>
@@ -24,7 +24,7 @@
%else:
<tr class="tr">
%endif
<td><a href="${h.url_for( controller='jobs', action='specified_month_in_error', id=job[0] )}">${job[0]}</a></td>
<td><a href="${h.url_for( controller='jobs', action='specified_month_in_error', month=job[0], month_label=job[2].strip(), year_label=job[3] )}">${job[2]}&nbsp;${job[3]}</a></td>
<td>${job[1]}</td>
</tr>
<% ctr += 1 %>
@@ -11,7 +11,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs</td></tr>
<tr><td colspan="2">There are no jobs</td></tr>
%else:
<tr class="header">
<td>Tool id</td>
@@ -24,7 +24,7 @@
%else:
<tr class="tr">
%endif
<td><a href="${h.url_for( controller='jobs', action='tool_per_month', id=job[0] )}">${job[0]}</a></td>
<td><a href="${h.url_for( controller='jobs', action='tool_per_month', tool_id=job[0] )}">${job[0]}</a></td>
<td>${job[1]}</td>
</tr>
<% ctr += 1 %>
@@ -11,7 +11,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs</td></tr>
<tr><td colspan="2">There are no jobs</td></tr>
%else:
<tr class="header">
<td>User</td>
@@ -24,7 +24,7 @@
%else:
<tr class="tr">
%endif
<td><a href="${h.url_for( controller='jobs', action='user_per_month', id=job[0] )}">${job[0]}</a></td>
<td><a href="${h.url_for( controller='jobs', action='user_per_month', email=job[0] )}">${job[0]}</a></td>
<td>${job[1]}</td>
</tr>
<% ctr += 1 %>
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">All Jobs for ${specified_date}</h3>
<h3 align="center">All Jobs for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</h3>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
@@ -10,7 +10,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr><td colspan="5">There are no jobs for ${specified_date}</td></tr>
<tr><td colspan="5">There are no jobs for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</td></tr>
%else:
%for job in jobs:
<%
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">All Jobs in Error for ${specified_date}</h3>
<h3 align="center">All Jobs in Error for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</h3>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
@@ -10,7 +10,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr><td colspan="5">There are no jobs in error for ${specified_date}</td></tr>
<tr><td colspan="5">There are no jobs in error for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</td></tr>
%else:
%for job in jobs:
<tr class="headererror">
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">All Jobs for ${month}</h3>
<h3 align="center">All Jobs for ${month_label}&nbsp;${year_label}</h3>
<h4 align="center">Click Total Jobs to see jobs for that day</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
@@ -11,7 +11,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs for ${month}</td></tr>
<tr><td colspan="5">There are no jobs for ${month_label}&nbsp;${year_label}</td></tr>
%else:
<tr class="header">
<td>Day</td>
@@ -28,10 +28,10 @@
<tr class="tr">
%endif
<td>${job[0]}</td>
<td>${job[1]}</td>
<td>${month_label}&nbsp;${job[5]},&nbsp;${year_label}</td>
<td>${job[2]}</td>
<td>${job[3]}</td>
<td><a href="${h.url_for( controller='jobs', action='specified_date_all', id=job[1] )}">${job[4]}</a></td>
<td><a href="${h.url_for( controller='jobs', action='specified_date_all', specified_date=job[1], day_label=job[0], month_label=month_label, year_label=year_label, day_of_month=job[5] )}">${job[4]}</a></td>
</tr>
<% ctr += 1 %>
%endfor
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs in Error for ${month}</h3>
<h3 align="center">Jobs in Error for ${month_label}&nbsp;${year_label}</h3>
<h4 align="center">Click Jobs in Error to view jobs in error for that day</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
@@ -11,7 +11,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs in error for ${month}</td></tr>
<tr><td colspan="3">There are no jobs in error for ${month_label}&nbsp;${year_label}</td></tr>
%else:
<tr class="header">
<td>Day</td>
@@ -26,8 +26,8 @@
<tr class="tr">
%endif
<td>${job[0]}</td>
<td>${job[1]}</td>
<td><a href="${h.url_for( controller='jobs', action='specified_date_in_error', id=job[1] )}">${job[2]}</a></td>
<td>${month_label}&nbsp;${job[3]},&nbsp;${year_label}</td>
<td><a href="${h.url_for( controller='jobs', action='specified_date_in_error', specified_date=job[1], day_label=job[0], month_label=month_label, year_label=year_label, day_of_month=job[3] )}">${job[2]}</a></td>
</tr>
<% ctr += 1 %>
%endfor
@@ -0,0 +1,41 @@
<%inherit file="/base_panels.mako"/>
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">All Jobs for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</h3>
<h4 align="center">Click Total Jobs to see jobs for today</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
</table>
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr><td colspan="5">There are no jobs for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</td></tr>
%else:
<tr class="header">
<td>Day</td>
<td>Date</td>
<td>User Jobs</td>
<td>Monitor Jobs</td>
<td>Total Jobs</td>
</tr>
<% ctr = 0 %>
%for job in jobs:
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td>${job[0]}</td>
<td>${month_label}&nbsp;${job[5]},&nbsp;${year_label}</td>
<td>${job[2]}</td>
<td>${job[3]}</td>
<td><a href="${h.url_for( controller='jobs', action='specified_date_all', specified_date=job[1], day_label=job[0], month_label=month_label, year_label=year_label, day_of_month=job[5] )}">${job[4]}</a></td>
</tr>
<% ctr += 1 %>
%endfor
%endif
</table>
</div>
</%def>
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs for tool ${tool_id} during ${month}</h3>
<h3 align="center">Jobs for tool "${tool_id}" during ${month_label}&nbsp;${year_label}</h3>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
@@ -10,7 +10,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs for ${tool_id} during ${month}</td></tr>
<tr><td colspan="5">There are no jobs for ${tool_id} during ${month_label}&nbsp;${year_label}</td></tr>
%else:
%for job in jobs:
<%
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs per month for tool ${tool_id}</h3>
<h3 align="center">Jobs per month for tool "${tool_id}"</h3>
<h4 align="center">Click Total Jobs to see the tool's jobs for that month</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
@@ -11,10 +11,10 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs</td></tr>
<tr><td colspan="2">There are no jobs for tool "${tool_id}"</td></tr>
%else:
<tr class="header">
<td>Year-Month</td>
<td>Month</td>
<td>Total Jobs</td>
</tr>
<% ctr = 0 %>
@@ -24,8 +24,8 @@
%else:
<tr class="tr">
%endif
<td>${job[0]}</td>
<td><a href="${h.url_for( controller='jobs', action='tool_for_month', id=tool_id, month=job[0] )}">${job[1]}</a></td>
<td>${job[2]}&nbsp;${job[3]}</td>
<td><a href="${h.url_for( controller='jobs', action='tool_for_month', tool_id=tool_id, month_label=job[2].strip(), year_label=job[3], month=job[0] )}">${job[1]}</a></td>
</tr>
<% ctr += 1 %>
%endfor
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs for user ${email} during ${month}</h3>
<h3 align="center">Jobs for user "${email}" during ${month_label}&nbsp;${year_label}</h3>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
@@ -10,7 +10,7 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs for ${email} during ${month}</td></tr>
<tr><td colspan="5">There are no jobs for user "${email}" during ${month_label}&nbsp;${year_label}</td></tr>
%else:
%for job in jobs:
<%
@@ -2,7 +2,7 @@
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Jobs per month for user ${email}</h3>
<h3 align="center">Jobs per month for user "${email}"</h3>
<h4 align="center">Click Total Jobs to see the user's jobs for that month</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
@@ -11,10 +11,10 @@
%endif
<table align="center" width="60%" class="colored">
%if len( jobs ) == 0:
<tr class="header"><td colspan="5">There are no jobs</td></tr>
<tr><td colspan="2">There are no jobs for user "${email}"</td></tr>
%else:
<tr class="header">
<td>Year-Month</td>
<td>Month</td>
<td>Total Jobs</td>
</tr>
<% ctr = 0 %>
@@ -24,8 +24,8 @@
%else:
<tr class="tr">
%endif
<td>${job[0]}</td>
<td><a href="${h.url_for( controller='jobs', action='user_for_month', id=email, month=job[0] )}">${job[1]}</a></td>
<td>${job[2]}&nbsp;${job[3]}</td>
<td><a href="${h.url_for( controller='jobs', action='user_for_month', email=email, month_label=job[2].strip(), year_label=job[3], month=job[0] )}">${job[1]}</a></td>
</tr>
<% ctr += 1 %>
%endfor
@@ -0,0 +1,21 @@
<%inherit file="/base_panels.mako"/>
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">Registered Users</h3>
<h4 align="center">Click Number of Registered Users to see the number of user registrations per month</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
</table>
%endif
<table align="center" width="25%" class="colored">
%if num_users == 0:
<tr><td>There are no registered users</td></tr>
%else:
<tr class="header"><td align="center">Number of Registered Users</td></tr>
<tr class="tr"><td align="center"><a href="${h.url_for( controller='users', action='registered_users_per_month' )}">${num_users}</a></td></tr>
%endif
</table>
</div>
</%def>
@@ -0,0 +1,35 @@
<%inherit file="/base_panels.mako"/>
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">User Registrations Per Month</h3>
<h4 align="center">Click Month to view the number of user registrations for each day of that month</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
</table>
%endif
<table align="center" width="30%" class="colored">
%if len( users ) == 0:
<tr><td colspan="2">There are no registered users</td></tr>
%else:
<tr class="header">
<td>Month</td>
<td>Number of Registrations</td>
</tr>
<% ctr = 0 %>
%for user in users:
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td><a href="${h.url_for( controller='users', action='specified_month', month=user[0], month_label=user[2].strip(), year_label=user[3] )}">${user[2]}&nbsp;${user[3]}</a></td>
<td>${user[1]}</td>
</tr>
<% ctr += 1 %>
%endfor
%endif
</table>
</div>
</%def>
@@ -0,0 +1,32 @@
<%inherit file="/base_panels.mako"/>
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">User Registrations for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</h3>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
</table>
%endif
<table align="center" width="30%" class="colored">
%if len( users ) == 0:
<tr><td colspan="2">There are no user registrations for ${day_label},&nbsp;${month_label}&nbsp;${day_of_month},&nbsp;${year_label}</td></tr>
%else:
<tr class="header">
<td>Email</td>
</tr>
<% ctr = 0 %>
%for user in users:
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td>${user}</td>
</tr>
<% ctr += 1 %>
%endfor
%endif
</table>
</div>
</%def>
@@ -0,0 +1,35 @@
<%inherit file="/base_panels.mako"/>
<%def name="main_body()">
<div class="reportBody">
<h3 align="center">User Registrations for ${month_label}&nbsp;${year_label}</h3>
<h4 align="center">Click Day to see user registrations for that day</h4>
%if msg:
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
<tr><td class="ok_bgr">${msg}</td></tr>
</table>
%endif
<table align="center" width="60%" class="colored">
%if len( users ) == 0:
<tr><td colspan="2">There are no user registrations for ${month_label}&nbsp;${year_label}</td></tr>
%else:
<tr class="header">
<td>Day</td>
<td>New Registrations</td>
</tr>
<% ctr = 0 %>
%for user in users:
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
<td><a href="${h.url_for( controller='users', action='specified_date', specified_date=user[0], day_label=user[3], month_label=month_label, year_label=year_label, day_of_month=user[1] )}">${user[3]},&nbsp;${month_label}&nbsp;${user[1]},&nbsp;${year_label}</a></td>
<td>${user[2]}</td>
</tr>
<% ctr += 1 %>
%endfor
%endif
</table>
</div>
</%def>