mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fixes for jobs reports.
This commit is contained in:
@@ -139,8 +139,10 @@ class Jobs( BaseController ):
|
||||
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 @@ class Jobs( BaseController ):
|
||||
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 @@ class Jobs( BaseController ):
|
||||
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 @@ class Jobs( BaseController ):
|
||||
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 @@ class Jobs( BaseController ):
|
||||
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 @@ class Jobs( BaseController ):
|
||||
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
|
||||
|
||||
@@ -252,7 +252,7 @@ table.colored td
|
||||
|
||||
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.header
|
||||
}
|
||||
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.headernew
|
||||
}
|
||||
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.headerwaiting
|
||||
}
|
||||
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.headerqueued
|
||||
}
|
||||
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.headerrunning
|
||||
}
|
||||
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;
|
||||
@@ -307,6 +315,22 @@ table.colored tr.headerok
|
||||
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;
|
||||
font-weight: bold;
|
||||
}
|
||||
table.colored tr
|
||||
{
|
||||
background: white;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user