mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Galaxy Jobs reports
Number of jobs per day for current month - displays days of the current month with the total number of jobs for each day Number of jobs in error per day for current month - displays days of the current month with the total number of jobs in error for each day All unfinished jobs - displays jobs that are currently in a "new" state, a "queued" state or a "running" state Number of jobs per month - displays a list of months with the total number of jobs for each month Number of jobs in error per month - displays a list of months with the total number of jobs in error for each month Number of jobs per user - displays users sorted in descending order by the number of jobs they have submitted Number of jobs per tool - displays tools sorted in alphabetical order by tool id and the number of jobs created by the tool
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import operator, os
|
||||
import operator, os, socket
|
||||
from datetime import datetime
|
||||
from time import strftime
|
||||
from galaxy.webapps.reports.base.controller import *
|
||||
@@ -12,84 +12,79 @@ log = logging.getLogger( __name__ )
|
||||
|
||||
class Jobs( BaseController ):
|
||||
@web.expose
|
||||
def index( self, trans, **kwd ):
|
||||
def specified_month_all( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
|
||||
jobs = self.current_month( trans, **kwd )
|
||||
return trans.fill_template( 'jobs_current_month.mako', jobs=jobs, msg=msg )
|
||||
|
||||
@web.expose
|
||||
def current_month( self, trans, **kwd ):
|
||||
month = datetime.utcnow().strftime( "%Y-%m" )
|
||||
year_month = datetime.utcnow().strftime( "%Y-%m" )
|
||||
month = params.get( 'id', year_month )
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
|
||||
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
|
||||
s = """
|
||||
SELECT
|
||||
wanted_year_month_day AS year_month_day,
|
||||
num_jobs AS num_jobs,
|
||||
num_jobs_to_subtract AS num_monitor_jobs,
|
||||
wanted_day_label AS day_label
|
||||
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
|
||||
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
|
||||
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, 7) = '%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 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
|
||||
substr(job.create_time, 1, 10) AS create_time,
|
||||
substr(job.create_time, 9, 2) AS day_of_month
|
||||
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, 7) = '%s'
|
||||
AND
|
||||
galaxy_user.email = 'monitor@bx.psu.edu'
|
||||
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, 7) = '%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
|
||||
""" % ( month, 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
|
||||
""" % ( month, monitor_email, month )
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
try:
|
||||
@@ -97,5 +92,470 @@ class Jobs( BaseController ):
|
||||
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 jobs
|
||||
|
||||
return trans.fill_template( 'jobs_specified_month_all.mako', 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" )
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
s = """
|
||||
SELECT
|
||||
year_month_day AS year_month_day,
|
||||
day_of_month AS day_of_month,
|
||||
num_jobs AS num_jobs,
|
||||
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_jobs,
|
||||
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
|
||||
job
|
||||
WHERE
|
||||
state = 'error'
|
||||
AND
|
||||
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 )
|
||||
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 )
|
||||
@web.expose
|
||||
def specified_date_in_error( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
today = datetime.utcnow().strftime( "%Y-%m-%d" )
|
||||
specified_date = params.get( 'id', today )
|
||||
s = """
|
||||
SELECT
|
||||
job.id AS id,
|
||||
job.state AS state,
|
||||
substr(job.create_time, 1, 19) AS create_time,
|
||||
substr(job.update_time, 1, 19) AS update_time,
|
||||
job.tool_id AS tool_id,
|
||||
job.command_line AS command_line,
|
||||
job.stderr AS stderr,
|
||||
job.session_id AS session_id,
|
||||
job.traceback as stack_trace,
|
||||
job.info as info,
|
||||
galaxy_user.email AS user_email,
|
||||
galaxy_session.remote_addr AS remote_address
|
||||
FROM
|
||||
job
|
||||
LEFT OUTER JOIN history ON job.history_id = history.id
|
||||
LEFT OUTER JOIN galaxy_user ON history.user_id = galaxy_user.id
|
||||
LEFT OUTER JOIN galaxy_session ON job.session_id = galaxy_session.id
|
||||
WHERE
|
||||
state = 'error'
|
||||
AND
|
||||
substr(job.create_time, 1, 10) = '%s'
|
||||
ORDER BY
|
||||
job.id DESC
|
||||
""" % specified_date
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
remote_host = job.remote_address
|
||||
if job.remote_address:
|
||||
try:
|
||||
remote_host = socket.gethostbyaddr( job.remote_address )[0]
|
||||
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 )
|
||||
@web.expose
|
||||
def specified_date_all( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
today = datetime.utcnow().strftime( "%Y-%m-%d" )
|
||||
specified_date = params.get( 'id', today )
|
||||
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
|
||||
s = """
|
||||
SELECT
|
||||
job.id AS id,
|
||||
job.state AS state,
|
||||
substr(job.create_time, 1, 19) AS create_time,
|
||||
substr(job.update_time, 1, 19) AS update_time,
|
||||
job.tool_id AS tool_id,
|
||||
job.command_line AS command_line,
|
||||
job.stderr AS stderr,
|
||||
job.session_id AS session_id,
|
||||
job.traceback as stack_trace,
|
||||
job.info as info,
|
||||
galaxy_user.email AS user_email,
|
||||
galaxy_session.remote_addr AS remote_address
|
||||
FROM
|
||||
job
|
||||
LEFT OUTER JOIN history ON job.history_id = history.id
|
||||
LEFT OUTER JOIN galaxy_user ON history.user_id = galaxy_user.id
|
||||
LEFT OUTER JOIN galaxy_session ON job.session_id = galaxy_session.id
|
||||
WHERE
|
||||
substr(job.create_time, 1, 10) = '%s'
|
||||
AND
|
||||
galaxy_user.email != '%s'
|
||||
ORDER BY
|
||||
job.id DESC
|
||||
""" % ( specified_date, monitor_email )
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
remote_host = job.remote_address
|
||||
if job.remote_address:
|
||||
try:
|
||||
remote_host = socket.gethostbyaddr( job.remote_address )[0]
|
||||
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 )
|
||||
@web.expose
|
||||
def all_unfinished( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
s = """
|
||||
SELECT
|
||||
job.id AS id,
|
||||
job.state AS state,
|
||||
substr(job.create_time, 1, 19) AS create_time,
|
||||
substr(job.update_time, 1, 19) AS update_time,
|
||||
job.tool_id AS tool_id,
|
||||
job.command_line AS command_line,
|
||||
job.stderr AS stderr,
|
||||
job.session_id AS session_id,
|
||||
job.traceback as stack_trace,
|
||||
job.info as info,
|
||||
galaxy_user.email AS user_email,
|
||||
galaxy_session.remote_addr AS remote_address
|
||||
FROM
|
||||
job
|
||||
LEFT OUTER JOIN history ON job.history_id = history.id
|
||||
LEFT OUTER JOIN galaxy_user ON history.user_id = galaxy_user.id
|
||||
LEFT OUTER JOIN galaxy_session ON job.session_id = galaxy_session.id
|
||||
WHERE
|
||||
job.state = 'running'
|
||||
OR
|
||||
job.state = 'queued'
|
||||
OR
|
||||
job.state = 'new'
|
||||
ORDER BY
|
||||
job.update_time DESC
|
||||
"""
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
remote_host = job.remote_address
|
||||
if job.remote_address:
|
||||
try:
|
||||
remote_host = socket.gethostbyaddr( job.remote_address )[0]
|
||||
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_all_unfinished.mako', jobs=jobs, msg=msg )
|
||||
@web.expose
|
||||
def per_month_all( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' )
|
||||
s = """
|
||||
SELECT
|
||||
wanted_year_month AS year_month,
|
||||
num_jobs AS num_jobs,
|
||||
num_monitor_jobs AS num_monitor_jobs,
|
||||
wanted_month_label AS month_label,
|
||||
wanted_year_label AS year_label
|
||||
FROM
|
||||
(SELECT
|
||||
year_month AS year_month,
|
||||
num_monitor_jobs AS num_monitor_jobs,
|
||||
to_timestamp(year_month, 'YYYY-MM-DD+02') AS a_timestamp
|
||||
FROM
|
||||
(SELECT
|
||||
substr(job.create_time, 1, 7) AS year_month,
|
||||
count(substr(job.create_time, 1, 10)) AS num_monitor_jobs
|
||||
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
|
||||
galaxy_user.email = '%s'
|
||||
GROUP BY
|
||||
substr(job.create_time, 1, 7)
|
||||
) AS fubar
|
||||
) AS total_fubar
|
||||
FULL JOIN
|
||||
(SELECT
|
||||
num_jobs AS num_jobs,
|
||||
wanted_year_month AS wanted_year_month,
|
||||
to_char(a_timestamp, 'Month') AS wanted_month_label,
|
||||
to_char(a_timestamp, 'YYYY') AS wanted_year_label
|
||||
FROM
|
||||
(SELECT
|
||||
num_jobs AS num_jobs,
|
||||
wanted_year_month AS wanted_year_month,
|
||||
to_timestamp(wanted_year_month, 'YYYY-MM-DD+02' ) AS a_timestamp
|
||||
FROM
|
||||
(SELECT
|
||||
count(id) AS num_jobs,
|
||||
substr(create_time, 1, 7) AS wanted_year_month
|
||||
FROM
|
||||
job
|
||||
GROUP BY
|
||||
substr(create_time, 1, 7)
|
||||
ORDER BY
|
||||
substr(create_time, 1, 7) DESC) AS foo
|
||||
) AS bar
|
||||
) AS foobar
|
||||
ON
|
||||
foobar.wanted_year_month = total_fubar.year_month
|
||||
ORDER BY
|
||||
year_month DESC
|
||||
""" % monitor_email
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
if job.num_jobs is None:
|
||||
job.num_jobs = 0
|
||||
if job.num_monitor_jobs is None:
|
||||
job.num_monitor_jobs = 0
|
||||
num_user_jobs = job.num_jobs - job.num_monitor_jobs
|
||||
jobs.append( ( job.year_month, num_user_jobs, job.num_monitor_jobs, job.num_jobs, job.month_label, job.year_label ) )
|
||||
return trans.fill_template( 'jobs_per_month_all.mako', jobs=jobs, msg=msg )
|
||||
@web.expose
|
||||
def per_month_in_error( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
s = """
|
||||
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
|
||||
"""
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
jobs.append( ( job.year_month, job.num_jobs ) )
|
||||
return trans.fill_template( 'jobs_per_month_in_error.mako', jobs=jobs, msg=msg )
|
||||
@web.expose
|
||||
def per_user( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
s = """
|
||||
SELECT
|
||||
galaxy_user.email AS user_email,
|
||||
count(job.id) AS num_jobs
|
||||
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
|
||||
GROUP BY
|
||||
user_email
|
||||
ORDER BY
|
||||
num_jobs DESC,
|
||||
user_email
|
||||
"""
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
jobs.append( ( job.user_email, job.num_jobs ) )
|
||||
return trans.fill_template( 'jobs_per_user.mako', jobs=jobs, msg=msg )
|
||||
@web.expose
|
||||
def user_per_month( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
email = params.get( 'id', 'monitor@bx.psu.edu' )
|
||||
# The @ char has been converted to an 'X'
|
||||
email = email.replace( 'X', '@' )
|
||||
s = """
|
||||
SELECT
|
||||
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
|
||||
(SELECT
|
||||
num_jobs AS num_jobs,
|
||||
year_month AS year_month,
|
||||
to_timestamp(year_month, 'YYYY-MM-DD') AS a_timestamp
|
||||
FROM
|
||||
(SELECT
|
||||
count(job.id) AS num_jobs,
|
||||
substr(job.create_time, 1, 7) AS year_month
|
||||
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
|
||||
galaxy_user.email = '%s'
|
||||
GROUP BY
|
||||
year_month
|
||||
ORDER BY
|
||||
year_month DESC) AS foo) AS bar
|
||||
""" % email
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
jobs.append( ( job.year_month, job.num_jobs ) )
|
||||
return trans.fill_template( 'jobs_user_per_month.mako', email=email, jobs=jobs, msg=msg )
|
||||
@web.expose
|
||||
def user_for_month( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
email = params.get( 'id', '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 )
|
||||
s = """
|
||||
SELECT
|
||||
job.id AS id,
|
||||
job.state AS state,
|
||||
substr(job.create_time, 1, 19) AS create_time,
|
||||
substr(job.update_time, 1, 19) AS update_time,
|
||||
job.tool_id AS tool_id,
|
||||
job.command_line AS command_line,
|
||||
job.stderr AS stderr,
|
||||
job.session_id AS session_id,
|
||||
job.traceback as stack_trace,
|
||||
job.info as info,
|
||||
galaxy_user.email AS user_email,
|
||||
galaxy_session.remote_addr AS remote_address
|
||||
FROM
|
||||
job
|
||||
LEFT OUTER JOIN history ON job.history_id = history.id
|
||||
LEFT OUTER JOIN galaxy_user ON history.user_id = galaxy_user.id
|
||||
LEFT OUTER JOIN galaxy_session ON job.session_id = galaxy_session.id
|
||||
WHERE
|
||||
galaxy_user.email = '%s'
|
||||
AND
|
||||
substr(job.create_time, 1, 7) = '%s'
|
||||
ORDER BY
|
||||
job.id DESC
|
||||
""" % ( email, month )
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
remote_host = job.remote_address
|
||||
if job.remote_address:
|
||||
try:
|
||||
remote_host = socket.gethostbyaddr( job.remote_address )[0]
|
||||
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 )
|
||||
@web.expose
|
||||
def per_tool( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
s = """
|
||||
SELECT
|
||||
tool_id AS tool_id,
|
||||
count(tool_id) AS times_run
|
||||
FROM
|
||||
job
|
||||
GROUP BY tool_id
|
||||
ORDER BY tool_id
|
||||
"""
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
jobs.append( ( job.tool_id, job.times_run ) )
|
||||
return trans.fill_template( 'jobs_per_tool.mako', jobs=jobs, msg=msg )
|
||||
@web.expose
|
||||
def tool_per_month( self, trans, **kwd ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
tool_id = params.get( 'id', 'Add a column1' )
|
||||
s = """
|
||||
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
|
||||
""" % tool_id
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
jobs.append( ( job.year_month, job.num_jobs ) )
|
||||
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 ):
|
||||
params = util.Params( kwd )
|
||||
msg = ''
|
||||
engine = galaxy.model.mapping.metadata.engine
|
||||
jobs = []
|
||||
tool_id = params.get( 'id', 'Add a column1' )
|
||||
year_month = datetime.utcnow().strftime( "%Y-%m" )
|
||||
month = params.get( 'month', year_month )
|
||||
s = """
|
||||
SELECT
|
||||
job.id AS id,
|
||||
job.state AS state,
|
||||
substr(job.create_time, 1, 19) AS create_time,
|
||||
substr(job.update_time, 1, 19) AS update_time,
|
||||
job.tool_id AS tool_id,
|
||||
job.command_line AS command_line,
|
||||
job.stderr AS stderr,
|
||||
job.session_id AS session_id,
|
||||
job.traceback as stack_trace,
|
||||
job.info as info,
|
||||
galaxy_user.email AS user_email,
|
||||
galaxy_session.remote_addr AS remote_address
|
||||
FROM
|
||||
job
|
||||
LEFT OUTER JOIN history ON job.history_id = history.id
|
||||
LEFT OUTER JOIN galaxy_user ON history.user_id = galaxy_user.id
|
||||
LEFT OUTER JOIN galaxy_session ON job.session_id = galaxy_session.id
|
||||
WHERE
|
||||
tool_id = '%s'
|
||||
AND
|
||||
substr(job.create_time, 1, 7) = '%s'
|
||||
ORDER BY
|
||||
job.id DESC
|
||||
""" % ( tool_id, month )
|
||||
job_rows = engine.text( s ).execute().fetchall()
|
||||
for job in job_rows:
|
||||
remote_host = job.remote_address
|
||||
if job.remote_address:
|
||||
try:
|
||||
remote_host = socket.gethostbyaddr( job.remote_address )[0]
|
||||
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 )
|
||||
|
||||
@@ -19,7 +19,4 @@ class Report( BaseController ):
|
||||
blog_url = trans.app.config.get( "blog_url", "http://g2.trac.bx.psu.edu/blog" )
|
||||
screencasts_url = trans.app.config.get( "screencasts_url", "http://g2.trac.bx.psu.edu/wiki/ScreenCasts" )
|
||||
return trans.fill_template( "masthead.mako", brand=brand, wiki_url=wiki_url, blog_url=blog_url,bugs_email=bugs_email, screencasts_url=screencasts_url )
|
||||
@web.expose
|
||||
def main_frame( self, trans ):
|
||||
return trans.fill_template( "main_frame.mako" )
|
||||
|
||||
|
||||
@@ -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 = 2**32 # 4 Gb
|
||||
min_file_size = 1000 # 4 Gb
|
||||
file_size_str = nice_size( min_file_size )
|
||||
d = trans.model.Dataset
|
||||
datasets = []
|
||||
|
||||
@@ -59,12 +59,13 @@ div.reportParamHelp a
|
||||
div.reportBody
|
||||
{
|
||||
background: #FFFFFF;
|
||||
background-image: url(report_body_bg.png);
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
padding: 5px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
width: 100%;
|
||||
scrolling: no;
|
||||
}
|
||||
|
||||
div.reportBody div.reportTitle
|
||||
@@ -258,7 +259,46 @@ table.colored tr.header
|
||||
border-bottom: solid #d8b365 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.colored tr.headernew
|
||||
{
|
||||
background: #add8e6;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
border-bottom: solid #d8b365 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
table.colored tr.headerqueued
|
||||
{
|
||||
background: #ee82ee;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
border-bottom: solid #d8b365 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
table.colored tr.headerrunning
|
||||
{
|
||||
background: #ffff00;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
border-bottom: solid #d8b365 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
table.colored tr.headererror
|
||||
{
|
||||
background: #ff0000;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
border-bottom: solid #d8b365 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
table.colored tr.headerok
|
||||
{
|
||||
background: #008000;
|
||||
background-repeat: repeat-x;
|
||||
background-position: top;
|
||||
border-bottom: solid #d8b365 1px;
|
||||
font-weight: bold;
|
||||
}
|
||||
table.colored tr
|
||||
{
|
||||
background: white;
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>${self.title()}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
${self.stylesheets()}
|
||||
${self.javascripts()}
|
||||
</head>
|
||||
<body>
|
||||
${next.body()}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
## Default title
|
||||
<%def name="title()"></%def>
|
||||
|
||||
## Default stylesheets
|
||||
<%def name="stylesheets()">
|
||||
<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
|
||||
</%def>
|
||||
|
||||
## Default javascripts
|
||||
<%def name="javascripts()">
|
||||
## <!--[if lt IE 7]>
|
||||
## <script type='text/javascript' src="/static/scripts/IE7.js"> </script>
|
||||
## <![endif]-->
|
||||
</%def>
|
||||
@@ -6,13 +6,15 @@
|
||||
|
||||
## Default stylesheets
|
||||
<%def name="stylesheets()">
|
||||
<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
|
||||
</%def>
|
||||
|
||||
## Default javascripts
|
||||
<%def name="javascripts()">
|
||||
<!--[if lt IE 7]>
|
||||
<script type='text/javascript' src="/static/scripts/IE7.js"> </script>
|
||||
<script type='text/javascript' src="/static/scripts/ie7-recalc.js"> </script>
|
||||
<script type='text/javascript' src="/static/scripts/IE7.js"></script>
|
||||
<script type='text/javascript' src="/static/scripts/IE8.js"></script>
|
||||
<script type='text/javascript' src="/static/scripts/ie7-recalc.js"></script>
|
||||
<![endif]-->
|
||||
</%def>
|
||||
|
||||
@@ -22,25 +24,27 @@
|
||||
|
||||
## Masthead
|
||||
<%def name="masthead()">
|
||||
<iframe name="galaxy_masthead" src="${h.url_for( 'masthead' )}" width="38" height="100%" frameborder="0" scroll="no" style="margin: 0; border: 0 none; width: 100%; height: 38px; overflow: hidden;"> </iframe>
|
||||
<iframe name="galaxy_masthead" src="${h.url_for( '/root/masthead' )}" width="100%" height="38" frameborder="0" scrolling="no" style="margin: 0; border: 0 none; width: 100%; height: 38px; overflow: hidden;"> </iframe>
|
||||
</%def>
|
||||
|
||||
## Document
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>${self.title()}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
${self.javascripts()}
|
||||
${self.stylesheets()}
|
||||
</head>
|
||||
<body scroll="no">
|
||||
<body>
|
||||
## Background displays first
|
||||
<div id="background"></div>
|
||||
## Layer iframes over backgrounds
|
||||
## Layer masthead iframe over background
|
||||
<div id="masthead">
|
||||
${self.masthead()}
|
||||
</div>
|
||||
<div id="center">
|
||||
${self.center_panel()}
|
||||
## Display main report body
|
||||
<div id="main_body">
|
||||
${self.main_body()}
|
||||
</div>
|
||||
## Allow other body level elements
|
||||
${next.body()}
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
<%def name="center_panel()">
|
||||
## Display the reports in the middle frame
|
||||
<%
|
||||
center_url = h.url_for( 'main_frame' )
|
||||
%>
|
||||
<iframe name="main_frame" id="main_frame" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"> </iframe>
|
||||
<%def name="main_body()">
|
||||
## Display the available reports
|
||||
<div class="body">
|
||||
<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='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>
|
||||
<tr><td><div class="reportBody"><a href="${h.url_for( controller='jobs', action='per_month_all' )}">Number of jobs per month</a> - displays a list of months with the total number of jobs for each month</div></td></tr>
|
||||
<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>
|
||||
</table>
|
||||
<br clear="left"/><br/><br/><br/>
|
||||
<table align="center" width="40%" class="colored">
|
||||
<tr><td><div class="reportTitle">System Information</div></td></tr>
|
||||
<tr><td><div class="reportBody"><a href="${h.url_for( controller='system', action='index' )}">Disk space, old histories and datasets</a> - displays history and dataset information including disk space allocation where datasets are stored</div></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">All Unfinished Jobs</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="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr><td colspan="5">There are no unfinished jobs</td></tr>
|
||||
%else:
|
||||
%for job in jobs:
|
||||
<%
|
||||
state = job[0]
|
||||
if state == 'new':
|
||||
rowdef = '<tr class="headernew">'
|
||||
elif state == 'queued':
|
||||
rowdef = '<tr class="headerqueued">'
|
||||
elif state == 'running':
|
||||
rowdef = '<tr class="headerrunning">'
|
||||
%>
|
||||
${rowdef}
|
||||
<td>State</td>
|
||||
<td>Job Id</td>
|
||||
<td>Create Time</td>
|
||||
<td>Update Time</td>
|
||||
<td>Session Id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${job[0]}</td>
|
||||
<td>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</td>
|
||||
<td>${job[4]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="3">Tool</td>
|
||||
<td colspan="2">User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">${job[5]}</td>
|
||||
<td colspan="2">${job[6]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Remote Host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[7]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Command Line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[8]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stderr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[9]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stack Trace</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[10]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[11]}</td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,39 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%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>
|
||||
%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 class="header"><td colspan="5">There are no jobs</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Year-Month</td>
|
||||
<td>User Jobs</td>
|
||||
<td>Monitor Jobs</td>
|
||||
<td>Total</td>
|
||||
</tr>
|
||||
<% ctr = 0 %>
|
||||
%for job in jobs:
|
||||
%if ctr % 2 == 1:
|
||||
<tr class="odd_row">
|
||||
%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>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</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">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>
|
||||
%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 class="header"><td colspan="5">There are no jobs in error</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Year-Month</td>
|
||||
<td>Jobs In Error</td>
|
||||
</tr>
|
||||
<% ctr = 0 %>
|
||||
%for job in jobs:
|
||||
%if ctr % 2 == 1:
|
||||
<tr class="odd_row">
|
||||
%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>${job[1]}</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">Jobs Per Tool</h3>
|
||||
<h4 align="center">Click Tool Id to view jobs per month for that tool</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 class="header"><td colspan="5">There are no jobs</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Tool id</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><a href="${h.url_for( controller='jobs', action='tool_per_month', id=job[0] )}">${job[0]}</a></td>
|
||||
<td>${job[1]}</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">Jobs Per User</h3>
|
||||
<h4 align="center">Click User to view jobs per month for that user</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 class="header"><td colspan="5">There are no jobs</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>User</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><a href="${h.url_for( controller='jobs', action='user_per_month', id=job[0] )}">${job[0]}</a></td>
|
||||
<td>${job[1]}</td>
|
||||
</tr>
|
||||
<% ctr += 1 %>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,87 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">All Jobs for ${specified_date}</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="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr><td colspan="5">There are no jobs for ${specified_date}</td></tr>
|
||||
%else:
|
||||
%for job in jobs:
|
||||
<%
|
||||
state = job[0]
|
||||
if state == 'new':
|
||||
rowdef = '<tr class="headernew">'
|
||||
elif state == 'queued':
|
||||
rowdef = '<tr class="headerqueued">'
|
||||
elif state == 'running':
|
||||
rowdef = '<tr class="headerrunning">'
|
||||
elif state == 'error':
|
||||
rowdef = '<tr class="headererror">'
|
||||
elif state == 'ok':
|
||||
rowdef = '<tr class="headerok">'
|
||||
%>
|
||||
${rowdef}
|
||||
<td>State</td>
|
||||
<td>Job Id</td>
|
||||
<td>Create Time</td>
|
||||
<td>Update Time</td>
|
||||
<td>Session Id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${job[0]}</td>
|
||||
<td>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</td>
|
||||
<td>${job[4]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="3">Tool</td>
|
||||
<td colspan="2">User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">${job[5]}</td>
|
||||
<td colspan="2">${job[6]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Remote Host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[7]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Command Line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[8]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stderr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[9]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stack Trace</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[10]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[11]}</td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,74 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">All Jobs in Error for ${specified_date}</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="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr><td colspan="5">There are no jobs in error for ${specified_date}</td></tr>
|
||||
%else:
|
||||
%for job in jobs:
|
||||
<tr class="headererror">
|
||||
<td>State</td>
|
||||
<td>Job Id</td>
|
||||
<td>Create Time</td>
|
||||
<td>Update Time</td>
|
||||
<td>Session Id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${job[0]}</td>
|
||||
<td>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</td>
|
||||
<td>${job[4]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="3">Tool</td>
|
||||
<td colspan="2">User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">${job[5]}</td>
|
||||
<td colspan="2">${job[6]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Remote Host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[7]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Command Line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[8]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stderr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[9]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stack Trace</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[10]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[11]}</td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
+14
-22
@@ -1,34 +1,28 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
<html>
|
||||
<head>
|
||||
<title>Jobs for current month</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h3 align="center">Jobs for Current Month</h3>
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">All Jobs for ${month}</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">
|
||||
<tr><td class="ok_bgr">${msg}</td></tr>
|
||||
</table>
|
||||
%endif
|
||||
<table align="center" width="60%" class="colored">
|
||||
<tr><td colspan="5"><div class="reportTitle">Jobs for Current Month</div></td></tr>
|
||||
%if len( jobs ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no jobs for the current month</td></tr>
|
||||
<tr class="header"><td colspan="5">There are no jobs for ${month}</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Day</td>
|
||||
<td>Date</td>
|
||||
<td>User Jobs</td>
|
||||
<td>Monitor Jobs</td>
|
||||
<td>Total</td>
|
||||
<td>Total Jobs</td>
|
||||
</tr>
|
||||
<%
|
||||
ctr = 0
|
||||
%>
|
||||
<% ctr = 0 %>
|
||||
%for job in jobs:
|
||||
%if len( jobs ) > 2 and ctr % 2 == 1:
|
||||
%if ctr % 2 == 1:
|
||||
<tr class="odd_row">
|
||||
%else:
|
||||
<tr class="tr">
|
||||
@@ -37,13 +31,11 @@
|
||||
<td>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</td>
|
||||
<td>${job[4]}</td>
|
||||
<td><a href="${h.url_for( controller='jobs', action='specified_date_all', id=job[1] )}">${job[4]}</a></td>
|
||||
</tr>
|
||||
<%
|
||||
ctr += 1
|
||||
%>
|
||||
<% ctr += 1 %>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,37 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">Jobs in Error for ${month}</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">
|
||||
<tr><td class="ok_bgr">${msg}</td></tr>
|
||||
</table>
|
||||
%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>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Day</td>
|
||||
<td>Date</td>
|
||||
<td>Jobs in Error</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>
|
||||
<td><a href="${h.url_for( controller='jobs', action='specified_date_in_error', id=job[1] )}">${job[2]}</a></td>
|
||||
</tr>
|
||||
<% ctr += 1 %>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,87 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">Jobs for tool ${tool_id} during ${month}</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="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no jobs for ${tool_id} during ${month}</td></tr>
|
||||
%else:
|
||||
%for job in jobs:
|
||||
<%
|
||||
state = job[0]
|
||||
if state == 'new':
|
||||
rowdef = '<tr class="headernew">'
|
||||
elif state == 'queued':
|
||||
rowdef = '<tr class="headerqueued">'
|
||||
elif state == 'running':
|
||||
rowdef = '<tr class="headerrunning">'
|
||||
elif state == 'error':
|
||||
rowdef = '<tr class="headererror">'
|
||||
elif state == 'ok':
|
||||
rowdef = '<tr class="headerok">'
|
||||
%>
|
||||
${rowdef}
|
||||
<td>State</td>
|
||||
<td>Job Id</td>
|
||||
<td>Create Time</td>
|
||||
<td>Update Time</td>
|
||||
<td>Session Id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${job[0]}</td>
|
||||
<td>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</td>
|
||||
<td>${job[4]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="3">Tool</td>
|
||||
<td colspan="2">User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">${job[5]}</td>
|
||||
<td colspan="2">${job[6]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Remote Host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[7]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Command Line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[8]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stderr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[9]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stack Trace</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[10]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[11]}</td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,35 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<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">
|
||||
<tr><td class="ok_bgr">${msg}</td></tr>
|
||||
</table>
|
||||
%endif
|
||||
<table align="center" width="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no jobs</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Year-Month</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><a href="${h.url_for( controller='jobs', action='tool_for_month', id=tool_id, month=job[0] )}">${job[1]}</a></td>
|
||||
</tr>
|
||||
<% ctr += 1 %>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,87 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<h3 align="center">Jobs for user ${email} during ${month}</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="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no jobs for ${email} during ${month}</td></tr>
|
||||
%else:
|
||||
%for job in jobs:
|
||||
<%
|
||||
state = job[0]
|
||||
if state == 'new':
|
||||
rowdef = '<tr class="headernew">'
|
||||
elif state == 'queued':
|
||||
rowdef = '<tr class="headerqueued">'
|
||||
elif state == 'running':
|
||||
rowdef = '<tr class="headerrunning">'
|
||||
elif state == 'error':
|
||||
rowdef = '<tr class="headererror">'
|
||||
elif state == 'ok':
|
||||
rowdef = '<tr class="headerok">'
|
||||
%>
|
||||
${rowdef}
|
||||
<td>State</td>
|
||||
<td>Job Id</td>
|
||||
<td>Create Time</td>
|
||||
<td>Update Time</td>
|
||||
<td>Session Id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${job[0]}</td>
|
||||
<td>${job[1]}</td>
|
||||
<td>${job[2]}</td>
|
||||
<td>${job[3]}</td>
|
||||
<td>${job[4]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="3">Tool</td>
|
||||
<td colspan="2">User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">${job[5]}</td>
|
||||
<td colspan="2">${job[6]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Remote Host</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[7]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Command Line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[8]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stderr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[9]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Stack Trace</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[10]}</td>
|
||||
</tr>
|
||||
<tr class="header">
|
||||
<td colspan="5">Info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">${job[11]}</td>
|
||||
</tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
<tr><td colspan="5"> </td></tr>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -0,0 +1,35 @@
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<div class="reportBody">
|
||||
<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">
|
||||
<tr><td class="ok_bgr">${msg}</td></tr>
|
||||
</table>
|
||||
%endif
|
||||
<table align="center" width="60%" class="colored">
|
||||
%if len( jobs ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no jobs</td></tr>
|
||||
%else:
|
||||
<tr class="header">
|
||||
<td>Year-Month</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><a href="${h.url_for( controller='jobs', action='user_for_month', id=email, month=job[0] )}">${job[1]}</a></td>
|
||||
</tr>
|
||||
<% ctr += 1 %>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
@@ -1,21 +0,0 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
<html>
|
||||
<head>
|
||||
<title>Galaxy Reports</title>
|
||||
<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="body">
|
||||
<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='index' )}">Current Month</a></div></td></tr>
|
||||
</table>
|
||||
<br clear="left"/><br/><br/><br/>
|
||||
<table align="center" width="40%" class="colored">
|
||||
<tr><td><div class="reportTitle">System Information</div></td></tr>
|
||||
<tr><td><div class="reportBody"><a href="${h.url_for( controller='system', action='index' )}">Disk space, old histories and datasets</a></div></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,7 +6,6 @@
|
||||
<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
|
||||
<link href="${h.url_for('/static/style/masthead.css')}" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body class="mastheadPage">
|
||||
<table width="100%" cellspacing="0" border="0">
|
||||
<tr valign="middle">
|
||||
@@ -21,11 +20,10 @@
|
||||
| <a target="_blank" href="${screencasts_url}">screencasts</a>
|
||||
| <a target="_blank" href="${blog_url}">blog</a>
|
||||
|
||||
<a target="main_frame" href="${h.url_for( controller='root', action='main_frame' )}">Galaxy Reports Home</a>
|
||||
<a target="_top" href="${h.url_for( controller='root', action='index' )}">Galaxy Reports Home</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,92 +1,82 @@
|
||||
<%inherit file="/base.mako"/>
|
||||
<html>
|
||||
<head>
|
||||
<title>Galaxy System Management</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h3 align="center">Old Histories and Datasets</h3>
|
||||
%if msg:
|
||||
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
|
||||
<tr><td class="ok_bgr">${msg}</td></tr>
|
||||
</table>
|
||||
%endif
|
||||
<%inherit file="/base_panels.mako"/>
|
||||
|
||||
<%def name="main_body()">
|
||||
<h3 align="center">Old Histories and Datasets</h3>
|
||||
%if msg:
|
||||
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
|
||||
<tr>
|
||||
<td>
|
||||
<form method="post" action="system">
|
||||
<p>
|
||||
<button name="action" value="userless_histories">Number of Histories</button>
|
||||
that are not associate with a user and were last updated more than
|
||||
<input type="textfield" value="${userless_histories_days}" size="3" name="userless_histories_days">
|
||||
days ago.
|
||||
</p>
|
||||
<p>
|
||||
<button name="action" value="deleted_histories">Number of Histories</button>
|
||||
that were deleted more than
|
||||
<input type="textfield" value="${deleted_histories_days}" size="3" name="deleted_histories_days">
|
||||
days ago but have not yet been purged.
|
||||
</p>
|
||||
<p>
|
||||
<button name="action" value="deleted_datasets">Number of Datasets</button>
|
||||
that were deleted more than
|
||||
<input type="textfield" value="${deleted_datasets_days}" size="3" name="deleted_datasets_days">
|
||||
days ago but have not yet been purged.
|
||||
</p>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="ok_bgr">${msg}</td></tr>
|
||||
</table>
|
||||
<br clear="left" /><br />
|
||||
<h3 align="center">Current Disk Space Where Datasets are Stored</h3>
|
||||
<table align="center" width="60%" class="colored">
|
||||
<tr><td colspan="5"><div class="reportTitle">Disk Usage for ${file_path}</div></td></tr>
|
||||
%endif
|
||||
<table align="center" width="70%" class="border" cellpadding="5" cellspacing="5">
|
||||
<tr>
|
||||
<td>
|
||||
<form method="post" action="system">
|
||||
<p>
|
||||
<button name="action" value="userless_histories">Number of Histories</button>
|
||||
that are not associate with a user and were last updated more than
|
||||
<input type="textfield" value="${userless_histories_days}" size="3" name="userless_histories_days">
|
||||
days ago.
|
||||
</p>
|
||||
<p>
|
||||
<button name="action" value="deleted_histories">Number of Histories</button>
|
||||
that were deleted more than
|
||||
<input type="textfield" value="${deleted_histories_days}" size="3" name="deleted_histories_days">
|
||||
days ago but have not yet been purged.
|
||||
</p>
|
||||
<p>
|
||||
<button name="action" value="deleted_datasets">Number of Datasets</button>
|
||||
that were deleted more than
|
||||
<input type="textfield" value="${deleted_datasets_days}" size="3" name="deleted_datasets_days">
|
||||
days ago but have not yet been purged.
|
||||
</p>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br clear="left" /><br />
|
||||
<h3 align="center">Current Disk Space Where Datasets are Stored</h3>
|
||||
<table align="center" width="60%" class="colored">
|
||||
<tr><td colspan="5"><div class="reportTitle">Disk Usage for ${file_path}</div></td></tr>
|
||||
<tr class="header">
|
||||
<td>File System</td>
|
||||
<td>Disk Size</td>
|
||||
<td>Used</td>
|
||||
<td>Available</td>
|
||||
<td>Percent Used</td>
|
||||
</tr>
|
||||
<tr class="tr">
|
||||
<td>${disk_usage[0]}</td>
|
||||
<td>${disk_usage[1]}</td>
|
||||
<td>${disk_usage[2]}</td>
|
||||
<td>${disk_usage[3]}</td>
|
||||
<td>${disk_usage[4]}</td>
|
||||
</tr>
|
||||
%if len( datasets ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no datasets larger than ${file_size_str}</td></tr>
|
||||
%else:
|
||||
<tr><td colspan="5"><div class="reportTitle">${len( datasets )} largest datasets over ${file_size_str}</div></td></tr>
|
||||
<tr class="header">
|
||||
<td>File System</td>
|
||||
<td>Disk Size</td>
|
||||
<td>Used</td>
|
||||
<td>Available</td>
|
||||
<td>Percent Used</td>
|
||||
<td>File</td>
|
||||
<td>Last Updated</td>
|
||||
<td>History ID</td>
|
||||
<td>Deleted</td>
|
||||
<td>Size on Disk</td>
|
||||
</tr>
|
||||
<tr class="tr">
|
||||
<td>${disk_usage[0]}</td>
|
||||
<td>${disk_usage[1]}</td>
|
||||
<td>${disk_usage[2]}</td>
|
||||
<td>${disk_usage[3]}</td>
|
||||
<td>${disk_usage[4]}</td>
|
||||
</tr>
|
||||
%if len( datasets ) == 0:
|
||||
<tr class="header"><td colspan="5">There are no datasets larger than ${file_size_str}</td></tr>
|
||||
%else:
|
||||
<tr><td colspan="5"><div class="reportTitle">${len( datasets )} largest datasets over ${file_size_str}</div></td></tr>
|
||||
<tr class="header">
|
||||
<td>File</td>
|
||||
<td>Last Updated</td>
|
||||
<td>History ID</td>
|
||||
<td>Deleted</td>
|
||||
<td>Size on Disk</td>
|
||||
<% ctr = 0 %>
|
||||
%for dataset in datasets:
|
||||
%if ctr % 2 == 1:
|
||||
<tr class="odd_row">
|
||||
%else:
|
||||
<tr class="tr">
|
||||
%endif
|
||||
<td>dataset_${dataset[0]}.dat</td>
|
||||
<td>${dataset[1]}</td>
|
||||
<td>${dataset[2]}</td>
|
||||
<td>${dataset[3]}</td>
|
||||
<td>${dataset[4]}</td>
|
||||
</tr>
|
||||
<%
|
||||
ctr = 0
|
||||
%>
|
||||
%for dataset in datasets:
|
||||
%if len( datasets ) > 2 and ctr % 2 == 1:
|
||||
<tr class="odd_row">
|
||||
%else:
|
||||
<tr class="tr">
|
||||
%endif
|
||||
<td>dataset_${dataset[0]}.dat</td>
|
||||
<td>${dataset[1]}</td>
|
||||
<td>${dataset[2]}</td>
|
||||
<td>${dataset[3]}</td>
|
||||
<td>${dataset[4]}</td>
|
||||
</tr>
|
||||
<%
|
||||
ctr += 1
|
||||
%>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<% ctr += 1 %>
|
||||
%endfor
|
||||
%endif
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
Reference in New Issue
Block a user