source: cows_wps/trunk/cows_wps/controllers/jobs.py @ 5938

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows_wps/trunk/cows_wps/controllers/jobs.py@5938
Revision 5938, 1.1 KB checked in by astephen, 11 years ago (diff)

Added a lot of UI related stuff.

Line 
1import logging
2
3from pylons import request, response, session, tmpl_context as c
4from pylons.controllers.util import abort, redirect_to
5
6from cows_wps.renderer.ui_renderer import *
7from cows_wps.controllers import *
8from cows_wps.lib.ui.proc_config import *
9
10log = logging.getLogger(__name__)
11
12
13class JobsController(BaseController):
14
15    def cancel(self):
16        """
17        Cancel a job
18        """
19        job_id = request.params.get("job_id", None)
20        if job_id == None:
21            return "Please provide an argument job_id=<Something>"
22
23        resp = "Nothing yet..."
24        renderer = UIPageRenderer()
25        resp = renderer.render("Job cancellation page",
26                               [("Cancelling: %s" % job_id, resp)])
27        return resp
28
29    def index(self):
30        """
31        View all jobs running at the moment.
32        """
33        resp = """Lots of jobs will be listed here when plugged in..."""
34
35        renderer = UIPageRenderer()
36        resp = renderer.render("Jobs currently running",
37                               [("Job list", resp)])
38        return resp
Note: See TracBrowser for help on using the repository browser.