1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/1a868f109ed9/ Changeset: 1a868f109ed9 User: marten Date: 2013-09-09 19:24:15 Summary: reworked some jobs from the reports webapp and modified templates accordingly forces NO session for the DB because it is not needed Affected #: 10 files diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -341,6 +341,8 @@ self.__user = None self.galaxy_session = None self.error_message = None + + if self.environ.get('is_api_request', False): # With API requests, if there's a key, use it and associate the # user with the transaction. @@ -348,6 +350,8 @@ # If an error message is set here, it's sent back using # trans.show_error in the response -- in expose_api. self.error_message = self._authenticate_api( session_cookie ) + elif self.app.name == "reports": + self.galaxy_session = None else: #This is a web request, get or create session. self._ensure_valid_session( session_cookie ) diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 lib/galaxy/webapps/reports/controllers/jobs.py --- a/lib/galaxy/webapps/reports/controllers/jobs.py +++ b/lib/galaxy/webapps/reports/controllers/jobs.py @@ -47,26 +47,23 @@ return query # We are either filtering on a date like YYYY-MM-DD or on a month like YYYY-MM, # so we need to figure out which type of date we have - if column_filter.count( '-' ) == 2: - # We are filtering on a date like YYYY-MM-DD + if column_filter.count( '-' ) == 2: # We are filtering on a date like YYYY-MM-DD year, month, day = map( int, column_filter.split( "-" ) ) start_date = date( year, month, day ) end_date = start_date + timedelta( days=1 ) - return query.filter( and_( self.model_class.table.c.create_time >= start_date, - self.model_class.table.c.create_time < end_date ) ) - if column_filter.count( '-' ) == 1: - # We are filtering on a month like YYYY-MM + if column_filter.count( '-' ) == 1: # We are filtering on a month like YYYY-MM year, month = map( int, column_filter.split( "-" ) ) start_date = date( year, month, 1 ) end_date = start_date + timedelta( days=calendar.monthrange( year, month )[1] ) - return query.filter( and_( self.model_class.table.c.create_time >= start_date, + + return query.filter( and_( self.model_class.table.c.create_time >= start_date, self.model_class.table.c.create_time < end_date ) ) # Grid definition use_async = False model_class = model.Job title = "Jobs" - template='/webapps/reports/grid.mako' + template = '/webapps/reports/grid.mako' default_sort_key = "id" columns = [ JobIdColumn( "Id", @@ -112,12 +109,21 @@ num_rows_per_page = 50 preserve_state = False use_paging = True + def build_initial_query( self, trans, **kwd ): + params = util.Params( kwd ) + monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + monitor_user_id = get_monitor_id( trans, monitor_email ) return trans.sa_session.query( self.model_class ) \ .join( model.User ) \ + .filter( model.Job.table.c.user_id != monitor_user_id )\ .enable_eagerloads( False ) class Jobs( BaseUIController ): + """ + Class contains functions for querying data requested by user via the webapp. It exposes the functions and + responds to requests with the filled .mako templates. + """ specified_date_list_grid = SpecifiedDateListGrid() @@ -160,7 +166,7 @@ if job.user: kwd[ 'email' ] = job.user.email else: - kwd[ 'email' ] = None # For anonymous users + kwd[ 'email' ] = None # For anonymous users return trans.response.send_redirect( web.url_for( controller='jobs', action='user_per_month', **kwd ) ) @@ -169,11 +175,20 @@ elif operation == "unfinished": kwd[ 'f-state' ] = 'Unfinished' return self.specified_date_list_grid( trans, **kwd ) + @web.expose def specified_month_all( self, trans, **kwd ): + """ + Queries the DB for all jobs in given month, defaults to current month. + """ + message = '' + params = util.Params( kwd ) - message = '' monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + + # In case we don't know which is the monitor user we will query for all jobs + monitor_user_id = get_monitor_id( trans, monitor_email ) + # If specified_date is not received, we'll default to the current month specified_date = kwd.get( 'specified_date', datetime.utcnow().strftime( "%Y-%m-%d" ) ) specified_month = specified_date[ :7 ] @@ -182,32 +197,43 @@ end_date = start_date + timedelta( days=calendar.monthrange( year, month )[1] ) month_label = start_date.strftime( "%B" ) year_label = start_date.strftime( "%Y" ) - q = sa.select( ( sa.func.date( model.Job.table.c.create_time ).label( 'date' ), - sa.func.sum( sa.case( [ ( model.User.table.c.email == monitor_email, 1 ) ], else_=0 ) ).label( 'monitor_jobs' ), - sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = sa.and_( model.Job.table.c.create_time >= start_date, - model.Job.table.c.create_time < end_date ), - from_obj = [ sa.outerjoin( model.Job.table, model.User.table ) ], - group_by = [ 'date' ], - order_by = [ sa.desc( 'date' ) ] ) + + + month_jobs = sa.select( ( sa.func.date( model.Job.table.c.create_time ).label( 'date' ), + sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), + whereclause=sa.and_( model.Job.table.c.user_id != monitor_user_id, + model.Job.table.c.create_time >= start_date, + model.Job.table.c.create_time < end_date ), + from_obj=[ model.Job.table ], + group_by=[ 'date' ], + order_by=[ sa.desc( 'date' ) ] ) + jobs = [] - for row in q.execute(): + for row in month_jobs.execute(): jobs.append( ( row.date.strftime( "%A" ), - row.date, - row.total_jobs - row.monitor_jobs, - row.monitor_jobs, + row.date.strftime( "%d" ), row.total_jobs, - row.date.strftime( "%d" ) ) ) + row.date + ) ) return trans.fill_template( '/webapps/reports/jobs_specified_month_all.mako', month_label=month_label, year_label=year_label, month=month, jobs=jobs, + is_user_jobs_only=monitor_user_id, message=message ) @web.expose def specified_month_in_error( self, trans, **kwd ): + """ + Queries the DB for the user jobs in error. + """ + message = '' params = util.Params( kwd ) - message = '' + monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + + # In case we don't know which is the monitor user we will query for all jobs instead + monitor_user_id = get_monitor_id( trans, monitor_email ) + # If specified_date is not received, we'll default to the current month specified_date = kwd.get( 'specified_date', datetime.utcnow().strftime( "%Y-%m-%d" ) ) specified_month = specified_date[ :7 ] @@ -216,16 +242,19 @@ end_date = start_date + timedelta( days=calendar.monthrange( year, month )[1] ) month_label = start_date.strftime( "%B" ) year_label = start_date.strftime( "%Y" ) - q = sa.select( ( sa.func.date( model.Job.table.c.create_time ).label( 'date' ), - sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = sa.and_( model.Job.table.c.state == 'error', - model.Job.table.c.create_time >= start_date, - model.Job.table.c.create_time < end_date ), - from_obj = [ sa.outerjoin( model.Job.table, model.User.table ) ], - group_by = [ 'date' ], - order_by = [ sa.desc( 'date' ) ] ) + + month_jobs_in_error = sa.select( ( sa.func.date( model.Job.table.c.create_time ).label( 'date' ), + sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), + whereclause=sa.and_( model.Job.table.c.user_id != monitor_user_id, + model.Job.table.c.state == 'error', + model.Job.table.c.create_time >= start_date, + model.Job.table.c.create_time < end_date ), + from_obj=[ model.Job.table ], + group_by=[ 'date' ], + order_by=[ sa.desc( 'date' ) ] ) + jobs = [] - for row in q.execute(): + for row in month_jobs_in_error.execute(): jobs.append( ( row.date.strftime( "%A" ), row.date, row.total_jobs, @@ -235,62 +264,98 @@ year_label=year_label, month=month, jobs=jobs, - message=message ) + message=message, + is_user_jobs_only=monitor_user_id ) @web.expose def per_month_all( self, trans, **kwd ): + """ + Queries the DB for all jobs. Avoids monitor jobs. + """ + + message = '' params = util.Params( kwd ) - message = '' monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) - q = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ).label( 'date' ), - sa.func.sum( sa.case( [( model.User.table.c.email == monitor_email, 1 )], else_=0 ) ).label( 'monitor_jobs' ), - sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - from_obj = [ sa.outerjoin( model.Job.table, model.User.table ) ], - group_by = [ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], - order_by = [ sa.desc( 'date' ) ] ) + + # In case we don't know which is the monitor user we will query for all jobs + monitor_user_id = get_monitor_id( trans, monitor_email ) + + jobs_by_month = sa.select( ( sa.func.date_trunc( 'month', model.Job.table.c.create_time ).label( 'date' ), + sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), + whereclause=model.Job.table.c.user_id != monitor_user_id, + from_obj=[ model.Job.table ], + group_by=[ 'date' ], + order_by=[ sa.desc( 'date' ) ] ) + jobs = [] - for row in q.execute(): - jobs.append( ( row.date.strftime( "%Y-%m" ), - row.total_jobs - row.monitor_jobs, - row.monitor_jobs, + for row in jobs_by_month.execute(): + jobs.append( ( + row.date.strftime( "%Y-%m" ), row.total_jobs, row.date.strftime( "%B" ), - row.date.strftime( "%Y" ) ) ) + row.date.strftime( "%y" ) + ) ) + return trans.fill_template( '/webapps/reports/jobs_per_month_all.mako', jobs=jobs, + is_user_jobs_only=monitor_user_id, message=message ) @web.expose def per_month_in_error( self, trans, **kwd ): + """ + Queries the DB for user jobs in error. Filters out monitor jobs. + """ + + message = '' params = util.Params( kwd ) - message = '' - q = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ).label( 'date' ), - sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = model.Job.table.c.state == 'error', - from_obj = [ model.Job.table ], - group_by = [ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], - order_by = [ sa.desc( 'date' ) ] ) + monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + + # In case we don't know which is the monitor user we will query for all jobs + monitor_user_id = get_monitor_id( trans, monitor_email ) + + jobs_in_error_by_month = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ).label( 'date' ), + sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), + whereclause=sa.and_ ( model.Job.table.c.state == 'error', + model.Job.table.c.user_id != monitor_user_id ), + from_obj=[ model.Job.table ], + group_by=[ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], + order_by=[ sa.desc( 'date' ) ] ) + jobs = [] - for row in q.execute(): + for row in jobs_in_error_by_month.execute(): jobs.append( ( row.date.strftime( "%Y-%m" ), row.total_jobs, row.date.strftime( "%B" ), - row.date.strftime( "%Y" ) ) ) + row.date.strftime( "%y" ) ) ) return trans.fill_template( '/webapps/reports/jobs_per_month_in_error.mako', jobs=jobs, - message=message ) + message=message, + is_user_jobs_only=monitor_user_id ) + @web.expose def per_user( self, trans, **kwd ): params = util.Params( kwd ) message = '' + monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + jobs = [] - q = sa.select( ( model.User.table.c.email.label( 'user_email' ), + jobs_per_user = sa.select( ( model.User.table.c.email.label( 'user_email' ), sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - from_obj = [ sa.outerjoin( model.Job.table, model.User.table ) ], - group_by = [ 'user_email' ], - order_by = [ sa.desc( 'total_jobs' ), 'user_email' ] ) - for row in q.execute(): - jobs.append( ( row.user_email, + from_obj=[ sa.outerjoin( model.Job.table, model.User.table ) ], + group_by=[ 'user_email' ], + order_by=[ sa.desc( 'total_jobs' ), 'user_email' ] ) + for row in jobs_per_user.execute(): + if ( row.user_email == None ): + jobs.append ( ( 'Anonymous', + row.total_jobs ) ) + elif ( row.user_email == monitor_email ): + continue + else: + jobs.append( ( row.user_email, row.total_jobs ) ) - return trans.fill_template( '/webapps/reports/jobs_per_user.mako', jobs=jobs, message=message ) + return trans.fill_template( '/webapps/reports/jobs_per_user.mako', + jobs=jobs, + message=message ) + @web.expose def user_per_month( self, trans, **kwd ): params = util.Params( kwd ) @@ -298,13 +363,13 @@ email = util.restore_text( params.get( 'email', '' ) ) q = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ).label( 'date' ), sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = sa.and_( model.Job.table.c.session_id == model.GalaxySession.table.c.id, + whereclause=sa.and_( model.Job.table.c.session_id == model.GalaxySession.table.c.id, model.GalaxySession.table.c.user_id == model.User.table.c.id, model.User.table.c.email == email ), - from_obj = [ sa.join( model.Job.table, model.User.table ) ], - group_by = [ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], - order_by = [ sa.desc( 'date' ) ] ) + from_obj=[ sa.join( model.Job.table, model.User.table ) ], + group_by=[ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], + order_by=[ sa.desc( 'date' ) ] ) jobs = [] for row in q.execute(): jobs.append( ( row.date.strftime( "%Y-%m" ), @@ -314,34 +379,51 @@ return trans.fill_template( '/webapps/reports/jobs_user_per_month.mako', email=util.sanitize_text( email ), jobs=jobs, message=message ) + @web.expose def per_tool( self, trans, **kwd ): + message = '' + params = util.Params( kwd ) - message = '' + monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + + # In case we don't know which is the monitor user we will query for all jobs + monitor_user_id = get_monitor_id( trans, monitor_email ) + jobs = [] q = sa.select( ( model.Job.table.c.tool_id.label( 'tool_id' ), sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - from_obj = [ model.Job.table ], - group_by = [ 'tool_id' ], - order_by = [ 'tool_id' ] ) + whereclause=model.Job.table.c.user_id != monitor_user_id, + from_obj=[ model.Job.table ], + group_by=[ 'tool_id' ], + order_by=[ 'tool_id' ] ) for row in q.execute(): jobs.append( ( row.tool_id, row.total_jobs ) ) return trans.fill_template( '/webapps/reports/jobs_per_tool.mako', jobs=jobs, - message=message ) + message=message, + is_user_jobs_only=monitor_user_id ) + @web.expose def tool_per_month( self, trans, **kwd ): + message = '' + params = util.Params( kwd ) - message = '' + monitor_email = params.get( 'monitor_email', 'monitor@bx.psu.edu' ) + + # In case we don't know which is the monitor user we will query for all jobs + monitor_user_id = get_monitor_id( trans, monitor_email ) + tool_id = params.get( 'tool_id', 'Add a column1' ) specified_date = params.get( 'specified_date', datetime.utcnow().strftime( "%Y-%m-%d" ) ) q = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ).label( 'date' ), sa.func.count( model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = model.Job.table.c.tool_id == tool_id, - from_obj = [ model.Job.table ], - group_by = [ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], - order_by = [ sa.desc( 'date' ) ] ) + whereclause=sa.and_( model.Job.table.c.tool_id == tool_id, + model.Job.table.c.user_id != monitor_user_id ), + from_obj=[ model.Job.table ], + group_by=[ sa.func.date_trunc( 'month', sa.func.date( model.Job.table.c.create_time ) ) ], + order_by=[ sa.desc( 'date' ) ] ) jobs = [] for row in q.execute(): jobs.append( ( row.date.strftime( "%Y-%m" ), @@ -352,7 +434,9 @@ specified_date=specified_date, tool_id=tool_id, jobs=jobs, - message=message ) + message=message, + is_user_jobs_only=monitor_user_id ) + @web.expose def job_info( self, trans, **kwd ): params = util.Params( kwd ) @@ -362,49 +446,20 @@ return trans.fill_template( '/webapps/reports/job_info.mako', job=job, message=message ) - @web.expose - def per_domain( self, trans, **kwd ): - # TODO: rewrite using alchemy - params = util.Params( kwd ) - message = '' - engine = model.mapping.metadata.engine - jobs = [] - s = """ - SELECT - substr(bar.first_pass_domain, bar.dot_position, 4) AS domain, - count(job_id) AS total_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 - total_jobs DESC - """ - job_rows = engine.text( s ).execute().fetchall() - for job in job_rows: - jobs.append( ( job.domain, job.total_jobs ) ) - return trans.fill_template( '/webapps/reports/jobs_per_domain.mako', jobs=jobs, message=message ) ## ---- Utility methods ------------------------------------------------------- def get_job( trans, id ): return trans.sa_session.query( trans.model.Job ).get( trans.security.decode_id( id ) ) + +def get_monitor_id( trans, monitor_email ): + """ + A convenience method to obtain the monitor job id. + """ + monitor_user_id = None + monitor_row = trans.sa_session.query( trans.model.User.table.c.id ) \ + .filter( trans.model.User.table.c.email == monitor_email ) \ + .first() + if monitor_row is not None: + monitor_user_id = monitor_row[0] + return monitor_user_id diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_per_domain.mako --- a/templates/webapps/reports/jobs_per_domain.mako +++ /dev/null @@ -1,35 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -%if message: - ${render_msg( message, 'done' )} -%endif - -<div class="toolForm"> - <div class="toolFormBody"> - <h3 align="center">Jobs Per Domain</h3> - <h4 align="center">This report does not account for unauthenticated users.</h4> - <table align="center" width="60%" class="colored"> - %if len( jobs ) == 0: - <tr><td colspan="2">There are no jobs</td></tr> - %else: - <tr class="header"> - <td>Domain</td> - <td>Total Jobs</td> - </tr> - <% ctr = 0 %> - %for job in jobs: - %if ctr % 2 == 1: - <tr class="odd_row"> - %else: - <tr class="tr"> - %endif - <td>${job[0]}</td> - <td>${job[1]}</td> - </tr> - <% ctr += 1 %> - %endfor - %endif - </table> - </div> -</div> diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_per_month_all.mako --- a/templates/webapps/reports/jobs_per_month_all.mako +++ b/templates/webapps/reports/jobs_per_month_all.mako @@ -7,17 +7,19 @@ <div class="toolForm"><div class="toolFormBody"> - <h3 align="center">Jobs Per Month</h3> - <h4 align="center">Click Month to view the number of jobs for each day of that month</h4> + <h4 align="center">Jobs Per Month</h4> + <h5 align="center">Click Month to view details.</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: - <tr><td colspan="4">There are no jobs</td></tr> + <tr><td colspan="4">There are no jobs.</td></tr> %else: <tr class="header"><td>Month</td> - <td>User Jobs</td> - <td>Monitor Jobs</td> - <td>Total</td> + %if is_user_jobs_only: + <td>User Jobs</td> + %else: + <td>User + Monitor Jobs</td> + %endif </tr><% ctr = 0 %> %for job in jobs: @@ -26,10 +28,8 @@ %else: <tr class="tr"> %endif - <td><a href="${h.url_for( controller='jobs', action='specified_month_all', specified_date=job[0]+'-01' )}">${job[4]} ${job[5]}</a></td> + <td><a href="${h.url_for( controller='jobs', action='specified_month_all', specified_date=job[0]+'-01' )}">${job[2]} ${job[3]}</a></td><td>${job[1]}</td> - <td>${job[2]}</td> - <td>${job[3]}</td></tr><% ctr += 1 %> %endfor diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_per_month_in_error.mako --- a/templates/webapps/reports/jobs_per_month_in_error.mako +++ b/templates/webapps/reports/jobs_per_month_in_error.mako @@ -7,15 +7,19 @@ <div class="toolForm"><div class="toolFormBody"> - <h3 align="center">Jobs In Error Per Month</h3> - <h4 align="center">Click Month to view the number of jobs in error for each day of that month</h4> + <h4 align="center">Jobs In Error Per Month</h4> + <h5 align="center">Click Month to view details.</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: - <tr><td colspan="2">There are no jobs in the error state</td></tr> + <tr><td colspan="2">There are no jobs in the error state.</td></tr> %else: <tr class="header"><td>Month</td> - <td>Jobs In Error</td> + %if is_user_jobs_only: + <td>User Jobs in Error</td> + %else: + <td>User + Monitor Jobs in Error</td> + %endif </tr><% ctr = 0 %> %for job in jobs: diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_per_tool.mako --- a/templates/webapps/reports/jobs_per_tool.mako +++ b/templates/webapps/reports/jobs_per_tool.mako @@ -7,15 +7,19 @@ <div class="toolForm"><div class="toolFormBody"> - <h3 align="center">Jobs Per Tool</h3> - <h4 align="center">Click Tool Id to view jobs per month for that tool</h4> + <h4 align="center">Jobs Per Tool</h4> + <h5 align="center">Click Tool Id to view details</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: - <tr><td colspan="2">There are no jobs</td></tr> + <tr><td colspan="2">There are no jobs.</td></tr> %else: <tr class="header"><td>Tool id</td> - <td>Total Jobs</td> + %if is_user_jobs_only: + <td>User Jobs</td> + %else: + <td>User + Monitor Jobs</td> + %endif </tr><% ctr = 0 %> %for job in jobs: diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_per_user.mako --- a/templates/webapps/reports/jobs_per_user.mako +++ b/templates/webapps/reports/jobs_per_user.mako @@ -7,11 +7,11 @@ <div class="toolForm"><div class="toolFormBody"> - <h3 align="center">Jobs Per User</h3> - <h4 align="center">Click User to view jobs per month for that user</h4> + <h4 align="center">Jobs Per User</h4> + <h5 align="center">Click User to view details.</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: - <tr><td colspan="2">There are no jobs</td></tr> + <tr><td colspan="2">There are no jobs.</td></tr> %else: <tr class="header"><td>User</td> diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_specified_month_all.mako --- a/templates/webapps/reports/jobs_specified_month_all.mako +++ b/templates/webapps/reports/jobs_specified_month_all.mako @@ -7,8 +7,8 @@ <div class="toolForm"><div class="toolFormBody"> - <h3 align="center">All Jobs for ${month_label} ${year_label}</h3> - <h4 align="center">Click Total Jobs to see jobs for that day</h4> + <h4 align="center">Jobs for ${month_label} ${year_label}</h4> + <h5 align="center">Click Jobs to see their details</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: <tr><td colspan="5">There are no jobs for ${month_label} ${year_label}</td></tr> @@ -16,9 +16,11 @@ <tr class="header"><td>Day</td><td>Date</td> - <td>User Jobs</td> - <td>Monitor Jobs</td> - <td>Total Jobs</td> + %if is_user_jobs_only: + <td>User Jobs</td> + %else: + <td>User + Monitor Jobs</td> + %endif </tr><% ctr = 0 %> %for job in jobs: @@ -28,10 +30,8 @@ <tr class="tr"> %endif <td>${job[0]}</td> - <td>${month_label} ${job[5]}, ${year_label}</td> - <td>${job[2]}</td> - <td>${job[3]}</td> - <td><a href="${h.url_for( controller='jobs', action='specified_date_handler', specified_date=job[1], webapp='reports' )}">${job[4]}</a></td> + <td>${month_label} ${job[1]}, ${year_label}</td> + <td><a href="${h.url_for( controller='jobs', action='specified_date_handler', specified_date=job[3], webapp='reports' )}">${job[2]}</a></td></tr><% ctr += 1 %> %endfor diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_specified_month_in_error.mako --- a/templates/webapps/reports/jobs_specified_month_in_error.mako +++ b/templates/webapps/reports/jobs_specified_month_in_error.mako @@ -7,8 +7,8 @@ <div class="toolForm"><div class="toolFormBody"> - <h3 align="center">Jobs in Error for ${month_label} ${year_label}</h3> - <h4 align="center">Click Jobs in Error to view jobs in error for that day</h4> + <h4 align="center">Jobs in Error for ${month_label} ${year_label}</h4> + <h5 align="center">Click Jobs to see their details</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: <tr><td colspan="3">There are no jobs in the error state for ${month_label} ${year_label}</td></tr> @@ -16,7 +16,11 @@ <tr class="header"><td>Day</td><td>Date</td> - <td>Jobs in Error</td> + %if is_user_jobs_only: + <td>User Jobs in Error</td> + %else: + <td>User + Monitor Jobs in Error</td> + %endif </tr><% ctr = 0 %> %for job in jobs: diff -r b62b2b4daeacc819016d6208078fa1fdd5b467c4 -r 1a868f109ed985b738c709422dbd6cccbc5cdd32 templates/webapps/reports/jobs_tool_per_month.mako --- a/templates/webapps/reports/jobs_tool_per_month.mako +++ b/templates/webapps/reports/jobs_tool_per_month.mako @@ -7,15 +7,19 @@ <div class="toolForm"><div class="toolFormBody"> - <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> + <h4 align="center">Jobs per month for tool "${tool_id}"</h4> + <h5 align="center">Click Jobs to view details</h5><table align="center" width="60%" class="colored"> %if len( jobs ) == 0: <tr><td colspan="2">There are no jobs for tool "${tool_id}"</td></tr> %else: <tr class="header"><td>Month</td> - <td>Total Jobs</td> + %if is_user_jobs_only: + <td>User Jobs</td> + %else: + <td>User + Monitor Jobs</td> + %endif </tr><% ctr = 0 %> %for job in jobs: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.