Changeset 1619:9ce784bcab86
- Timestamp:
- 11/11/08 09:52:20
(2 months ago)
- Author:
- Greg Von Kuster <greg@bx.psu.edu>
- branch:
- default
- Message:
Fixes for jobs reports.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1607 |
r1619 |
|
| 140 | 140 | galaxy.model.Job.table.c.create_time < end_date ), |
|---|
| 141 | 141 | from_obj = [ sa.outerjoin( galaxy.model.Job.table, |
|---|
| 142 | | galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, |
|---|
| 143 | | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| | 142 | galaxy.model.History.table ) \ |
|---|
| | 143 | .outerjoin( galaxy.model.User.table ) \ |
|---|
| | 144 | .outerjoin( galaxy.model.GalaxySession.table, |
|---|
| | 145 | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| 144 | 146 | order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) |
|---|
| 145 | 147 | jobs = [] |
|---|
| … | … | |
| 198 | 200 | galaxy.model.Job.table.c.create_time < end_date ), |
|---|
| 199 | 201 | from_obj = [ sa.outerjoin( galaxy.model.Job.table, |
|---|
| 200 | | galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, |
|---|
| 201 | | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| | 202 | galaxy.model.History.table ) \ |
|---|
| | 203 | .outerjoin( galaxy.model.User.table ) \ |
|---|
| | 204 | .outerjoin( galaxy.model.GalaxySession.table, |
|---|
| | 205 | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| 202 | 206 | order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) |
|---|
| 203 | 207 | jobs = [] |
|---|
| … | … | |
| 246 | 250 | ( galaxy.model.User.table.c.email ).label( 'user_email' ), |
|---|
| 247 | 251 | galaxy.model.GalaxySession.table.c.remote_addr ), |
|---|
| 248 | | whereclause = sa.or_( galaxy.model.Job.table.c.state == 'running', |
|---|
| 249 | | galaxy.model.Job.table.c.state == 'queued', |
|---|
| 250 | | galaxy.model.Job.table.c.state == 'waiting', |
|---|
| 251 | | galaxy.model.Job.table.c.state == 'new' ), |
|---|
| 252 | | from_obj = [ sa.outerjoin( galaxy.model.Job.table, |
|---|
| 253 | | galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, |
|---|
| 254 | | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| | 252 | whereclause = sa.not_( sa.or_( galaxy.model.Job.table.c.state == 'ok', |
|---|
| | 253 | galaxy.model.Job.table.c.state == 'error', |
|---|
| | 254 | galaxy.model.Job.table.c.state == 'deleted' ) ), |
|---|
| | 255 | from_obj = [ sa.outerjoin( galaxy.model.Job.table, |
|---|
| | 256 | galaxy.model.History.table ) \ |
|---|
| | 257 | .outerjoin( galaxy.model.User.table ) \ |
|---|
| | 258 | .outerjoin( galaxy.model.GalaxySession.table, |
|---|
| | 259 | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| 255 | 260 | order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) |
|---|
| 256 | 261 | for row in q.execute(): |
|---|
| … | … | |
| 380 | 385 | galaxy.model.Job.table.c.create_time < end_date ), |
|---|
| 381 | 386 | from_obj = [ sa.outerjoin( galaxy.model.Job.table, |
|---|
| 382 | | galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, |
|---|
| 383 | | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| | 387 | galaxy.model.History.table ) \ |
|---|
| | 388 | .outerjoin( galaxy.model.User.table ) \ |
|---|
| | 389 | .outerjoin( galaxy.model.GalaxySession.table, |
|---|
| | 390 | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| 384 | 391 | order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) |
|---|
| 385 | 392 | for row in q.execute(): |
|---|
| … | … | |
| 468 | 475 | galaxy.model.Job.table.c.create_time < end_date ), |
|---|
| 469 | 476 | from_obj = [ sa.outerjoin( galaxy.model.Job.table, |
|---|
| 470 | | galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, |
|---|
| 471 | | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| | 477 | galaxy.model.History.table ) \ |
|---|
| | 478 | .outerjoin( galaxy.model.User.table ) \ |
|---|
| | 479 | .outerjoin( galaxy.model.GalaxySession.table, |
|---|
| | 480 | galaxy.model.Job.table.c.session_id == galaxy.model.GalaxySession.table.c.id ) ], |
|---|
| 472 | 481 | order_by = [ sa.desc( galaxy.model.Job.table.c.id ) ] ) |
|---|
| 473 | 482 | for row in q.execute(): |
|---|
| … | … | |
| 499 | 508 | @web.expose |
|---|
| 500 | 509 | def per_domain( self, trans, **kwd ): |
|---|
| | 510 | # TODO: rewrite using alchemy |
|---|
| 501 | 511 | params = util.Params( kwd ) |
|---|
| 502 | 512 | msg = '' |
|---|
| r1607 |
r1619 |
|
| 253 | 253 | table.colored tr.header |
|---|
| 254 | 254 | { |
|---|
| 255 | | background: #ebd9b2; |
|---|
| | 255 | background: #EBD9B2; |
|---|
| 256 | 256 | background-image: url(report_title_bg.png); |
|---|
| 257 | 257 | background-repeat: repeat-x; |
|---|
| … | … | |
| 262 | 262 | table.colored tr.headernew |
|---|
| 263 | 263 | { |
|---|
| 264 | | background: #add8e6; |
|---|
| | 264 | background: #ADD8E6; |
|---|
| 265 | 265 | background-repeat: repeat-x; |
|---|
| 266 | 266 | background-position: top; |
|---|
| … | … | |
| 270 | 270 | table.colored tr.headerwaiting |
|---|
| 271 | 271 | { |
|---|
| 272 | | background: #ebd9b2; |
|---|
| | 272 | background: #FF6600; |
|---|
| 273 | 273 | background-repeat: repeat-x; |
|---|
| 274 | 274 | background-position: top; |
|---|
| … | … | |
| 278 | 278 | table.colored tr.headerqueued |
|---|
| 279 | 279 | { |
|---|
| 280 | | background: #ee82ee; |
|---|
| | 280 | background: #EE82EE; |
|---|
| 281 | 281 | background-repeat: repeat-x; |
|---|
| 282 | 282 | background-position: top; |
|---|
| … | … | |
| 286 | 286 | table.colored tr.headerrunning |
|---|
| 287 | 287 | { |
|---|
| 288 | | background: #ffff00; |
|---|
| | 288 | background: #FFFF00; |
|---|
| 289 | 289 | background-repeat: repeat-x; |
|---|
| 290 | 290 | background-position: top; |
|---|
| … | … | |
| 294 | 294 | table.colored tr.headererror |
|---|
| 295 | 295 | { |
|---|
| 296 | | background: #ff0000; |
|---|
| | 296 | background: #FF0000; |
|---|
| | 297 | background-repeat: repeat-x; |
|---|
| | 298 | background-position: top; |
|---|
| | 299 | border-bottom: solid #d8b365 1px; |
|---|
| | 300 | font-weight: bold; |
|---|
| | 301 | } |
|---|
| | 302 | table.colored tr.headerdeleted |
|---|
| | 303 | { |
|---|
| | 304 | background: #9900FF; |
|---|
| 297 | 305 | background-repeat: repeat-x; |
|---|
| 298 | 306 | background-position: top; |
|---|
| … | … | |
| 303 | 311 | { |
|---|
| 304 | 312 | background: #008000; |
|---|
| | 313 | background-repeat: repeat-x; |
|---|
| | 314 | background-position: top; |
|---|
| | 315 | border-bottom: solid #d8b365 1px; |
|---|
| | 316 | font-weight: bold; |
|---|
| | 317 | } |
|---|
| | 318 | table.colored tr.headerupload |
|---|
| | 319 | { |
|---|
| | 320 | background: #336699; |
|---|
| | 321 | background-repeat: repeat-x; |
|---|
| | 322 | background-position: top; |
|---|
| | 323 | border-bottom: solid #d8b365 1px; |
|---|
| | 324 | font-weight: bold; |
|---|
| | 325 | } |
|---|
| | 326 | table.colored tr.headerunknown |
|---|
| | 327 | { |
|---|
| | 328 | background: #FF6666; |
|---|
| 305 | 329 | background-repeat: repeat-x; |
|---|
| 306 | 330 | background-position: top; |
|---|
| r1607 |
r1619 |
|
| 24 | 24 | elif state == 'running': |
|---|
| 25 | 25 | rowdef = '<tr class="headerrunning">' |
|---|
| | 26 | elif state == 'upload': |
|---|
| | 27 | rowdef = '<tr class="headerupload">' |
|---|
| | 28 | else: |
|---|
| | 29 | rowdef = '<tr class="headerunknown">' |
|---|
| 26 | 30 | %> |
|---|
| 27 | 31 | ${rowdef} |
|---|
| r1607 |
r1619 |
|
| 12 | 12 | <table align="center" width="60%" class="colored"> |
|---|
| 13 | 13 | %if len( jobs ) == 0: |
|---|
| 14 | | <tr><td colspan="2">There are no jobs in error</td></tr> |
|---|
| | 14 | <tr><td colspan="2">There are no jobs in the deleted or error state</td></tr> |
|---|
| 15 | 15 | %else: |
|---|
| 16 | 16 | <tr class="header"> |
|---|
| r1607 |
r1619 |
|
| 27 | 27 | rowdef = '<tr class="headererror">' |
|---|
| 28 | 28 | elif state == 'deleted': |
|---|
| 29 | | rowdef = '<tr class="headererror">' |
|---|
| | 29 | rowdef = '<tr class="headerdeleted">' |
|---|
| | 30 | elif state == 'upload': |
|---|
| | 31 | rowdef = '<tr class="headerupload">' |
|---|
| 30 | 32 | elif state == 'ok': |
|---|
| 31 | 33 | rowdef = '<tr class="headerok">' |
|---|
| | 34 | else: |
|---|
| | 35 | rowdef = '<tr class="headerunknown">' |
|---|
| 32 | 36 | %> |
|---|
| 33 | 37 | ${rowdef} |
|---|
| r1607 |
r1619 |
|
| 11 | 11 | <table align="center" width="60%" class="colored"> |
|---|
| 12 | 12 | %if len( jobs ) == 0: |
|---|
| 13 | | <tr><td colspan="5">There are no jobs in error for ${day_label}, ${month_label} ${day_of_month}, ${year_label}</td></tr> |
|---|
| | 13 | <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> |
|---|
| 14 | 14 | %else: |
|---|
| 15 | 15 | %for job in jobs: |
|---|
| 16 | | <tr class="headererror"> |
|---|
| | 16 | <% |
|---|
| | 17 | state = job[0] |
|---|
| | 18 | if state == 'error': |
|---|
| | 19 | rowdef = '<tr class="headererror">' |
|---|
| | 20 | elif state == 'deleted': |
|---|
| | 21 | rowdef = '<tr class="headerdeleted">' |
|---|
| | 22 | else: |
|---|
| | 23 | rowdef = '<tr class="headerunknown">' |
|---|
| | 24 | %> |
|---|
| | 25 | ${rowdef} |
|---|
| 17 | 26 | <td>State</td> |
|---|
| 18 | 27 | <td>Job Id</td> |
|---|
| r1607 |
r1619 |
|
| 27 | 27 | rowdef = '<tr class="headererror">' |
|---|
| 28 | 28 | elif state == 'deleted': |
|---|
| 29 | | rowdef = '<tr class="headererror">' |
|---|
| | 29 | rowdef = '<tr class="headerdeleted">' |
|---|
| | 30 | elif state == 'upload': |
|---|
| | 31 | rowdef = '<tr class="headerupload">' |
|---|
| 30 | 32 | elif state == 'ok': |
|---|
| 31 | 33 | rowdef = '<tr class="headerok">' |
|---|
| | 34 | else: |
|---|
| | 35 | rowdef = '<tr class="headerunknown">' |
|---|
| 32 | 36 | %> |
|---|
| 33 | 37 | ${rowdef} |
|---|
| r1607 |
r1619 |
|
| 27 | 27 | rowdef = '<tr class="headererror">' |
|---|
| 28 | 28 | elif state == 'deleted': |
|---|
| 29 | | rowdef = '<tr class="headererror">' |
|---|
| | 29 | rowdef = '<tr class="headerdeleted">' |
|---|
| | 30 | elif state == 'upload': |
|---|
| | 31 | rowdef = '<tr class="headerupload">' |
|---|
| 30 | 32 | elif state == 'ok': |
|---|
| 31 | 33 | rowdef = '<tr class="headerok">' |
|---|
| | 34 | else: |
|---|
| | 35 | rowdef = '<tr class="headerunknown">' |
|---|
| 32 | 36 | %> |
|---|
| 33 | 37 | ${rowdef} |
|---|