[hg] galaxy 1619: Fixes for jobs reports.
details: http://www.bx.psu.edu/hg/galaxy/rev/9ce784bcab86 changeset: 1619:9ce784bcab86 user: Greg Von Kuster <greg@bx.psu.edu> date: Tue Nov 11 09:52:20 2008 -0500 description: Fixes for jobs reports. 8 file(s) affected in this change: lib/galaxy/webapps/reports/controllers/jobs.py lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako diffs (277 lines): diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/controllers/jobs.py --- a/lib/galaxy/webapps/reports/controllers/jobs.py Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/controllers/jobs.py Tue Nov 11 09:52:20 2008 -0500 @@ -139,8 +139,10 @@ galaxy.model.Job.table.c.create_time >= start_date, galaxy.model.Job.table.c.create_time < end_date ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, - galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, - galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], + galaxy.model.History.table ) \ + .outerjoin( galaxy.model.User.table ) \ + .outerjoin( galaxy.model.GalaxySession.table, + galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) jobs = [] for row in q.execute(): @@ -197,8 +199,10 @@ whereclause = sa.and_( galaxy.model.Job.table.c.create_time >= start_date, galaxy.model.Job.table.c.create_time < end_date ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, - galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, - galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], + galaxy.model.History.table ) \ + .outerjoin( galaxy.model.User.table ) \ + .outerjoin( galaxy.model.GalaxySession.table, + galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) jobs = [] for row in q.execute(): @@ -245,13 +249,14 @@ galaxy.model.Job.table.c.info, ( galaxy.model.User.table.c.email ).label( 'user_email' ), galaxy.model.GalaxySession.table.c.remote_addr ), - whereclause = sa.or_( galaxy.model.Job.table.c.state == 'running', - galaxy.model.Job.table.c.state == 'queued', - galaxy.model.Job.table.c.state == 'waiting', - galaxy.model.Job.table.c.state == 'new' ), + whereclause = sa.not_( sa.or_( galaxy.model.Job.table.c.state == 'ok', + galaxy.model.Job.table.c.state == 'error', + galaxy.model.Job.table.c.state == 'deleted' ) ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, - galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, - galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], + galaxy.model.History.table ) \ + .outerjoin( galaxy.model.User.table ) \ + .outerjoin( galaxy.model.GalaxySession.table, + galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) for row in q.execute(): remote_host = row.remote_addr @@ -379,8 +384,10 @@ galaxy.model.Job.table.c.create_time >= start_date, galaxy.model.Job.table.c.create_time < end_date ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, - galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, - galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], + galaxy.model.History.table ) \ + .outerjoin( galaxy.model.User.table ) \ + .outerjoin( galaxy.model.GalaxySession.table, + galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) for row in q.execute(): remote_host = row.remote_addr @@ -467,8 +474,10 @@ galaxy.model.Job.table.c.create_time >= start_date, galaxy.model.Job.table.c.create_time < end_date ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, - galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, - galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], + galaxy.model.History.table ) \ + .outerjoin( galaxy.model.User.table ) \ + .outerjoin( galaxy.model.GalaxySession.table, + galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) for row in q.execute(): remote_host = row.remote_addr @@ -498,6 +507,7 @@ msg=msg ) @web.expose def per_domain( self, trans, **kwd ): + # TODO: rewrite using alchemy params = util.Params( kwd ) msg = '' engine = galaxy.model.mapping.metadata.engine diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css --- a/lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css Tue Nov 11 09:52:20 2008 -0500 @@ -252,7 +252,7 @@ table.colored tr.header { - background: #ebd9b2; + background: #EBD9B2; background-image: url(report_title_bg.png); background-repeat: repeat-x; background-position: top; @@ -261,7 +261,7 @@ } table.colored tr.headernew { - background: #add8e6; + background: #ADD8E6; background-repeat: repeat-x; background-position: top; border-bottom: solid #d8b365 1px; @@ -269,7 +269,7 @@ } table.colored tr.headerwaiting { - background: #ebd9b2; + background: #FF6600; background-repeat: repeat-x; background-position: top; border-bottom: solid #d8b365 1px; @@ -277,7 +277,7 @@ } table.colored tr.headerqueued { - background: #ee82ee; + background: #EE82EE; background-repeat: repeat-x; background-position: top; border-bottom: solid #d8b365 1px; @@ -285,7 +285,7 @@ } table.colored tr.headerrunning { - background: #ffff00; + background: #FFFF00; background-repeat: repeat-x; background-position: top; border-bottom: solid #d8b365 1px; @@ -293,7 +293,15 @@ } table.colored tr.headererror { - background: #ff0000; + background: #FF0000; + background-repeat: repeat-x; + background-position: top; + border-bottom: solid #d8b365 1px; + font-weight: bold; +} +table.colored tr.headerdeleted +{ + background: #9900FF; background-repeat: repeat-x; background-position: top; border-bottom: solid #d8b365 1px; @@ -302,6 +310,22 @@ table.colored tr.headerok { background: #008000; + background-repeat: repeat-x; + background-position: top; + border-bottom: solid #d8b365 1px; + font-weight: bold; +} +table.colored tr.headerupload +{ + background: #336699; + background-repeat: repeat-x; + background-position: top; + border-bottom: solid #d8b365 1px; + font-weight: bold; +} +table.colored tr.headerunknown +{ + background: #FF6666; background-repeat: repeat-x; background-position: top; border-bottom: solid #d8b365 1px; diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako --- a/lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako Tue Nov 11 09:52:20 2008 -0500 @@ -23,6 +23,10 @@ rowdef = '<tr class="headerqueued">' elif state == 'running': rowdef = '<tr class="headerrunning">' + elif state == 'upload': + rowdef = '<tr class="headerupload">' + else: + rowdef = '<tr class="headerunknown">' %> ${rowdef} <td>State</td> diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako --- a/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako Tue Nov 11 09:52:20 2008 -0500 @@ -11,7 +11,7 @@ %endif <table align="center" width="60%" class="colored"> %if len( jobs ) == 0: - <tr><td colspan="2">There are no jobs in error</td></tr> + <tr><td colspan="2">There are no jobs in the deleted or error state</td></tr> %else: <tr class="header"> <td>Month</td> diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako --- a/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako Tue Nov 11 09:52:20 2008 -0500 @@ -26,9 +26,13 @@ elif state == 'error': rowdef = '<tr class="headererror">' elif state == 'deleted': - rowdef = '<tr class="headererror">' + rowdef = '<tr class="headerdeleted">' + elif state == 'upload': + rowdef = '<tr class="headerupload">' elif state == 'ok': rowdef = '<tr class="headerok">' + else: + rowdef = '<tr class="headerunknown">' %> ${rowdef} <td>State</td> diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako --- a/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako Tue Nov 11 09:52:20 2008 -0500 @@ -10,10 +10,19 @@ %endif <table align="center" width="60%" class="colored"> %if len( jobs ) == 0: - <tr><td colspan="5">There are no jobs in error for ${day_label}, ${month_label} ${day_of_month}, ${year_label}</td></tr> + <tr><td colspan="5">There are no jobs in the deleted or error state for ${day_label}, ${month_label} ${day_of_month}, ${year_label}</td></tr> %else: %for job in jobs: - <tr class="headererror"> + <% + state = job[0] + if state == 'error': + rowdef = '<tr class="headererror">' + elif state == 'deleted': + rowdef = '<tr class="headerdeleted">' + else: + rowdef = '<tr class="headerunknown">' + %> + ${rowdef} <td>State</td> <td>Job Id</td> <td>Create Time</td> diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako --- a/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako Tue Nov 11 09:52:20 2008 -0500 @@ -26,9 +26,13 @@ elif state == 'error': rowdef = '<tr class="headererror">' elif state == 'deleted': - rowdef = '<tr class="headererror">' + rowdef = '<tr class="headerdeleted">' + elif state == 'upload': + rowdef = '<tr class="headerupload">' elif state == 'ok': rowdef = '<tr class="headerok">' + else: + rowdef = '<tr class="headerunknown">' %> ${rowdef} <td>State</td> diff -r e8f25fc7dde0 -r 9ce784bcab86 lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako --- a/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako Mon Nov 10 15:38:29 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako Tue Nov 11 09:52:20 2008 -0500 @@ -26,9 +26,13 @@ elif state == 'error': rowdef = '<tr class="headererror">' elif state == 'deleted': - rowdef = '<tr class="headererror">' + rowdef = '<tr class="headerdeleted">' + elif state == 'upload': + rowdef = '<tr class="headerupload">' elif state == 'ok': rowdef = '<tr class="headerok">' + else: + rowdef = '<tr class="headerunknown">' %> ${rowdef} <td>State</td>
participants (1)
-
Greg Von Kuster