Changeset 7097 for cows_wps


Ignore:
Timestamp:
25/06/10 14:42:50 (9 years ago)
Author:
astephen
Message:

added admin interface - still needs a db to talk to.

Location:
cows_wps/trunk/cows_wps
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/controllers/jobs.py

    r7095 r7097  
    11import logging 
     2import re 
    23 
    34from pylons import request, response, session, tmpl_context as c 
  • cows_wps/trunk/cows_wps/renderer/ui_renderer.py

    r7095 r7097  
    5151        """ 
    5252        rjobs = '<table border="2"><tr><td>Job id</td><td>Job type</td><td>User</td><td>Submission time</td><td>Job status</td></tr>\n' 
     53 
     54        count = 0 
     55 
    5356        for  (job_id, user, status, job_type, created) in jobs: 
    5457            created = created.split(".")[0] 
    55             row = "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n" % (job_id, job_type, user, created, status) 
     58 
     59            # Set colour style for row 
     60            count += 1 
     61            row_style = ("even_row", "odd_row")[count % 2] 
     62 
     63            # HTML for row 
     64            row = '<tr class="%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n' % (row_style, job_id, job_type, user, created, status) 
    5665            rjobs += row 
    5766 
Note: See TracChangeset for help on using the changeset viewer.