Changeset 5968


Ignore:
Timestamp:
04/11/09 12:09:52 (10 years ago)
Author:
astephen
Message:

More

Location:
cows_wps/trunk/cows_wps/controllers
Files:
2 edited

Legend:

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

    r5938 r5968  
    88from cows_wps.lib.ui.proc_config import * 
    99 
     10from cows_wps.model.managers import requestManager 
     11from cows_wps.process_handler.context.process_status import STATUS 
     12 
    1013log = logging.getLogger(__name__) 
    11  
    1214 
    1315class JobsController(BaseController): 
     
    2729        return resp 
    2830 
     31 
    2932    def index(self): 
    3033        """ 
    31         View all jobs running at the moment. 
     34        Reads jobs list and shows. 
    3235        """ 
    33         resp = """Lots of jobs will be listed here when plugged in...""" 
     36        requestManager.updateRunningRequests() 
    3437 
     38        resp = '<table border="2"><tr><td>Job id</td><td>type</td><td>user</td><td>status</td></tr>\n' 
     39        for r in requestManager.getAllRequest(): 
     40            status = r.job.status 
     41            type = r.job.type 
     42            job_id = r.job.job_id 
     43            user = r.user_id 
     44            row = "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n" % (job_id, type, user, status) 
     45            resp += row 
     46 
     47        resp += "</table>"  
    3548        renderer = UIPageRenderer() 
    36         resp = renderer.render("Jobs currently running", 
    37                                [("Job list", resp)]) 
     49        resp = renderer.render("Job list page", 
     50                               [("All jobs", resp)]) 
    3851        return resp 
  • cows_wps/trunk/cows_wps/controllers/submit.py

    r5958 r5968  
    2020        for (key, value) in request.params.items(): 
    2121            args[str(key)] = str(value)  
     22 
     23        if not args.has_key("proc_id"): 
     24            return "Must provide 'proc_id' arg at the very minimum." 
    2225 
    2326        proc_id = args["proc_id"] 
Note: See TracChangeset for help on using the changeset viewer.