diff --git a/lib/galaxy/webapps/reports/controllers/jobs.py b/lib/galaxy/webapps/reports/controllers/jobs.py index 3e6f4569cae..0989cb6ee55 100644 --- a/lib/galaxy/webapps/reports/controllers/jobs.py +++ b/lib/galaxy/webapps/reports/controllers/jobs.py @@ -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 ) diff --git a/lib/galaxy/webapps/reports/controllers/system.py b/lib/galaxy/webapps/reports/controllers/system.py index c15155371dc..dc6d3b36b90 100644 --- a/lib/galaxy/webapps/reports/controllers/system.py +++ b/lib/galaxy/webapps/reports/controllers/system.py @@ -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 = [] diff --git a/lib/galaxy/webapps/reports/controllers/users.py b/lib/galaxy/webapps/reports/controllers/users.py new file mode 100644 index 00000000000..cf7a04ab911 --- /dev/null +++ b/lib/galaxy/webapps/reports/controllers/users.py @@ -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 ) diff --git a/lib/galaxy/webapps/reports/templates/index.mako b/lib/galaxy/webapps/reports/templates/index.mako index 28bd782a006..ec971dca499 100644 --- a/lib/galaxy/webapps/reports/templates/index.mako +++ b/lib/galaxy/webapps/reports/templates/index.mako @@ -5,6 +5,7 @@

Galaxy Reports

+ @@ -12,6 +13,12 @@ + +
Job Information
Number of jobs today - displays the total number of jobs for today
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 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
Number of jobs per Internet domain - displays the number of jobs that have been submitted per Internet domain
+



+ + +
User Information
Number of registered users - displays the total number of registered users




diff --git a/lib/galaxy/webapps/reports/templates/jobs_per_domain.mako b/lib/galaxy/webapps/reports/templates/jobs_per_domain.mako new file mode 100644 index 00000000000..ffa2155072f --- /dev/null +++ b/lib/galaxy/webapps/reports/templates/jobs_per_domain.mako @@ -0,0 +1,35 @@ +<%inherit file="/base_panels.mako"/> + +<%def name="main_body()"> +
+

Jobs Per Domain

+

This report does not account for unauthenticated users.

+ %if msg: +
+ +
${msg}
+ %endif + + %if len( jobs ) == 0: + + %else: + + + + + <% ctr = 0 %> + %for job in jobs: + %if ctr % 2 == 1: + + %else: + + %endif + + + + <% ctr += 1 %> + %endfor + %endif +
There are no jobs
DomainTotal Jobs
${job[0]}${job[1]}
+ + diff --git a/lib/galaxy/webapps/reports/templates/jobs_per_month_all.mako b/lib/galaxy/webapps/reports/templates/jobs_per_month_all.mako index 397b87ba27f..fe2776a173a 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_per_month_all.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_per_month_all.mako @@ -3,7 +3,7 @@ <%def name="main_body()">

Jobs Per Month

-

Click Year-Month to view the number of jobs for each day of that month

+

Click Month to view the number of jobs for each day of that month

%if msg: @@ -11,10 +11,10 @@ %endif
${msg}
%if len( jobs ) == 0: - + %else: - + @@ -26,7 +26,7 @@ %else: %endif - + diff --git a/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako b/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako index 853546eafac..a84988e9a6d 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako @@ -3,7 +3,7 @@ <%def name="main_body()">

Jobs In Error Per Month

-

Click Year-Month to view the number of jobs in error for each day of that month

+

Click Month to view the number of jobs in error for each day of that month

%if msg:
There are no jobs
There are no jobs
Year-MonthMonth User Jobs Monitor Jobs Total
${job[0]}${job[4]} ${job[5]} ${job[1]} ${job[2]} ${job[3]}
@@ -11,10 +11,10 @@ %endif
${msg}
%if len( jobs ) == 0: - + %else: - + <% ctr = 0 %> @@ -24,7 +24,7 @@ %else: %endif - + <% ctr += 1 %> diff --git a/lib/galaxy/webapps/reports/templates/jobs_per_tool.mako b/lib/galaxy/webapps/reports/templates/jobs_per_tool.mako index ba9c4afe207..76af8ed8a63 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_per_tool.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_per_tool.mako @@ -11,7 +11,7 @@ %endif
There are no jobs in error
There are no jobs in error
Year-MonthMonth Jobs In Error
${job[0]}${job[2]} ${job[3]} ${job[1]}
%if len( jobs ) == 0: - + %else: @@ -24,7 +24,7 @@ %else: %endif - + <% ctr += 1 %> diff --git a/lib/galaxy/webapps/reports/templates/jobs_per_user.mako b/lib/galaxy/webapps/reports/templates/jobs_per_user.mako index 803f9756334..e2e7668579c 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_per_user.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_per_user.mako @@ -11,7 +11,7 @@ %endif
There are no jobs
There are no jobs
Tool id
${job[0]}${job[0]} ${job[1]}
%if len( jobs ) == 0: - + %else: @@ -24,7 +24,7 @@ %else: %endif - + <% ctr += 1 %> diff --git a/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako b/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako index fcbb55ba2b6..d36d757628d 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

All Jobs for ${specified_date}

+

All Jobs for ${day_label}, ${month_label} ${day_of_month}, ${year_label}

%if msg:
There are no jobs
There are no jobs
User
${job[0]}${job[0]} ${job[1]}
@@ -10,7 +10,7 @@ %endif
${msg}
%if len( jobs ) == 0: - + %else: %for job in jobs: <% diff --git a/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako b/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako index eb6967b4749..8e7a1f24889 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

All Jobs in Error for ${specified_date}

+

All Jobs in Error for ${day_label}, ${month_label} ${day_of_month}, ${year_label}

%if msg:
There are no jobs for ${specified_date}
There are no jobs for ${day_label}, ${month_label} ${day_of_month}, ${year_label}
@@ -10,7 +10,7 @@ %endif
${msg}
%if len( jobs ) == 0: - + %else: %for job in jobs: diff --git a/lib/galaxy/webapps/reports/templates/jobs_specified_month_all.mako b/lib/galaxy/webapps/reports/templates/jobs_specified_month_all.mako index 0196640fbf5..ec5b61c127d 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_specified_month_all.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_month_all.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

All Jobs for ${month}

+

All Jobs for ${month_label} ${year_label}

Click Total Jobs to see jobs for that day

%if msg:
There are no jobs in error for ${specified_date}
There are no jobs in error for ${day_label}, ${month_label} ${day_of_month}, ${year_label}
@@ -11,7 +11,7 @@ %endif
%if len( jobs ) == 0: - + %else: @@ -28,10 +28,10 @@ %endif - + - + <% ctr += 1 %> %endfor diff --git a/lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako b/lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako index 5bf16ccc1b2..35d109a6867 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

Jobs in Error for ${month}

+

Jobs in Error for ${month_label} ${year_label}

Click Jobs in Error to view jobs in error for that day

%if msg:
There are no jobs for ${month}
There are no jobs for ${month_label} ${year_label}
Day
${job[0]}${job[1]}${month_label} ${job[5]}, ${year_label} ${job[2]} ${job[3]}${job[4]}${job[4]}
@@ -11,7 +11,7 @@ %endif
%if len( jobs ) == 0: - + %else: @@ -26,8 +26,8 @@ %endif - - + + <% ctr += 1 %> %endfor diff --git a/lib/galaxy/webapps/reports/templates/jobs_today_all.mako b/lib/galaxy/webapps/reports/templates/jobs_today_all.mako new file mode 100644 index 00000000000..b43fe3a0ec8 --- /dev/null +++ b/lib/galaxy/webapps/reports/templates/jobs_today_all.mako @@ -0,0 +1,41 @@ +<%inherit file="/base_panels.mako"/> + +<%def name="main_body()"> +
+

All Jobs for ${day_label}, ${month_label} ${day_of_month}, ${year_label}

+

Click Total Jobs to see jobs for today

+ %if msg: +
There are no jobs in error for ${month}
There are no jobs in error for ${month_label} ${year_label}
Day
${job[0]}${job[1]}${job[2]}${month_label} ${job[3]}, ${year_label}${job[2]}
+ +
${msg}
+ %endif + + %if len( jobs ) == 0: + + %else: + + + + + + + + <% ctr = 0 %> + %for job in jobs: + %if ctr % 2 == 1: + + %else: + + %endif + + + + + + + <% ctr += 1 %> + %endfor + %endif +
There are no jobs for ${day_label}, ${month_label} ${day_of_month}, ${year_label}
DayDateUser JobsMonitor JobsTotal Jobs
${job[0]}${month_label} ${job[5]}, ${year_label}${job[2]}${job[3]}${job[4]}
+
+ diff --git a/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako b/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako index 99306d6e44c..1755fa3d84e 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

Jobs for tool ${tool_id} during ${month}

+

Jobs for tool "${tool_id}" during ${month_label} ${year_label}

%if msg: @@ -10,7 +10,7 @@ %endif
${msg}
%if len( jobs ) == 0: - + %else: %for job in jobs: <% diff --git a/lib/galaxy/webapps/reports/templates/jobs_tool_per_month.mako b/lib/galaxy/webapps/reports/templates/jobs_tool_per_month.mako index 8a308ebbebf..bbb74e8cc41 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_tool_per_month.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_tool_per_month.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

Jobs per month for tool ${tool_id}

+

Jobs per month for tool "${tool_id}"

Click Total Jobs to see the tool's jobs for that month

%if msg:
There are no jobs for ${tool_id} during ${month}
There are no jobs for ${tool_id} during ${month_label} ${year_label}
@@ -11,10 +11,10 @@ %endif
%if len( jobs ) == 0: - + %else: - + <% ctr = 0 %> @@ -24,8 +24,8 @@ %else: %endif - - + + <% ctr += 1 %> %endfor diff --git a/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako b/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako index fa65d9e3bdd..f7669aa4451 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

Jobs for user ${email} during ${month}

+

Jobs for user "${email}" during ${month_label} ${year_label}

%if msg:
There are no jobs
There are no jobs for tool "${tool_id}"
Year-MonthMonth Total Jobs
${job[0]}${job[1]}${job[2]} ${job[3]}${job[1]}
@@ -10,7 +10,7 @@ %endif
${msg}
%if len( jobs ) == 0: - + %else: %for job in jobs: <% diff --git a/lib/galaxy/webapps/reports/templates/jobs_user_per_month.mako b/lib/galaxy/webapps/reports/templates/jobs_user_per_month.mako index 8176212fc81..4220462b8bd 100644 --- a/lib/galaxy/webapps/reports/templates/jobs_user_per_month.mako +++ b/lib/galaxy/webapps/reports/templates/jobs_user_per_month.mako @@ -2,7 +2,7 @@ <%def name="main_body()">
-

Jobs per month for user ${email}

+

Jobs per month for user "${email}"

Click Total Jobs to see the user's jobs for that month

%if msg:
There are no jobs for ${email} during ${month}
There are no jobs for user "${email}" during ${month_label} ${year_label}
@@ -11,10 +11,10 @@ %endif
%if len( jobs ) == 0: - + %else: - + <% ctr = 0 %> @@ -24,8 +24,8 @@ %else: %endif - - + + <% ctr += 1 %> %endfor diff --git a/lib/galaxy/webapps/reports/templates/registered_users.mako b/lib/galaxy/webapps/reports/templates/registered_users.mako new file mode 100644 index 00000000000..1f4d73783ad --- /dev/null +++ b/lib/galaxy/webapps/reports/templates/registered_users.mako @@ -0,0 +1,21 @@ +<%inherit file="/base_panels.mako"/> + +<%def name="main_body()"> +
+

Registered Users

+

Click Number of Registered Users to see the number of user registrations per month

+ %if msg: +
There are no jobs
There are no jobs for user "${email}"
Year-MonthMonth Total Jobs
${job[0]}${job[1]}${job[2]} ${job[3]}${job[1]}
+ +
${msg}
+ %endif + + %if num_users == 0: + + %else: + + + %endif +
There are no registered users
Number of Registered Users
${num_users}
+
+ diff --git a/lib/galaxy/webapps/reports/templates/registered_users_per_month.mako b/lib/galaxy/webapps/reports/templates/registered_users_per_month.mako new file mode 100644 index 00000000000..e95a2bfda9b --- /dev/null +++ b/lib/galaxy/webapps/reports/templates/registered_users_per_month.mako @@ -0,0 +1,35 @@ +<%inherit file="/base_panels.mako"/> + +<%def name="main_body()"> +
+

User Registrations Per Month

+

Click Month to view the number of user registrations for each day of that month

+ %if msg: + + +
${msg}
+ %endif + + %if len( users ) == 0: + + %else: + + + + + <% ctr = 0 %> + %for user in users: + %if ctr % 2 == 1: + + %else: + + %endif + + + + <% ctr += 1 %> + %endfor + %endif +
There are no registered users
MonthNumber of Registrations
${user[2]} ${user[3]}${user[1]}
+
+ diff --git a/lib/galaxy/webapps/reports/templates/registered_users_specified_date.mako b/lib/galaxy/webapps/reports/templates/registered_users_specified_date.mako new file mode 100644 index 00000000000..f02952076ea --- /dev/null +++ b/lib/galaxy/webapps/reports/templates/registered_users_specified_date.mako @@ -0,0 +1,32 @@ +<%inherit file="/base_panels.mako"/> + +<%def name="main_body()"> +
+

User Registrations for ${day_label}, ${month_label} ${day_of_month}, ${year_label}

+ %if msg: + + +
${msg}
+ %endif + + %if len( users ) == 0: + + %else: + + + + <% ctr = 0 %> + %for user in users: + %if ctr % 2 == 1: + + %else: + + %endif + + + <% ctr += 1 %> + %endfor + %endif +
There are no user registrations for ${day_label}, ${month_label} ${day_of_month}, ${year_label}
Email
${user}
+
+ diff --git a/lib/galaxy/webapps/reports/templates/registered_users_specified_month.mako b/lib/galaxy/webapps/reports/templates/registered_users_specified_month.mako new file mode 100644 index 00000000000..71a16d4a1fe --- /dev/null +++ b/lib/galaxy/webapps/reports/templates/registered_users_specified_month.mako @@ -0,0 +1,35 @@ +<%inherit file="/base_panels.mako"/> + +<%def name="main_body()"> +
+

User Registrations for ${month_label} ${year_label}

+

Click Day to see user registrations for that day

+ %if msg: + + +
${msg}
+ %endif + + %if len( users ) == 0: + + %else: + + + + + <% ctr = 0 %> + %for user in users: + %if ctr % 2 == 1: + + %else: + + %endif + + + + <% ctr += 1 %> + %endfor + %endif +
There are no user registrations for ${month_label} ${year_label}
DayNew Registrations
${user[3]}, ${month_label} ${user[1]}, ${year_label}${user[2]}
+
+