source: cows_wps/trunk/cows_wps/controllers/ui.py @ 7118

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows_wps/trunk/cows_wps/controllers/ui.py@7118
Revision 7118, 3.0 KB checked in by astephen, 10 years ago (diff)

more fixes for admin interface

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 UiController(BaseController):
14
15    def index(self):
16        return self.home()
17
18    def _renderPage(self, title, items):
19        """
20        Everything routes through here.
21        """
22        renderer = UIPageRenderer()
23        resp = renderer.render(title, items)
24        return resp
25
26    def home(self):
27        """
28        Show home page.
29        """
30        items = [("Welcome to the CEDA WPS",
31                 """<b>The CEDA Web Processing Service (WPS)</b> provides a set of useful functions (<i>processes</i>) under a simple Web Service.<br /><br />
32
33                The WPS User Interface (UI) is a web front-end that allows the user to run processes ranging from a simple "instant" plot request to an offline model simulation (run on an offline server node).<br /><br />
34
35                The <a href="technical">Technical page</a> describes the structure of the service and the technologies that have been used to build it."""),
36                 ("What can it do?",
37                  """The <a href="/view">View page</a> provides details of the available processes, including the required inputs and outputs produced in each case."""),
38                 ("How do I run a process?",
39                  """To run a process, click on the <a href="/submit/choose">Submit</a> option above and select the process you wish to run by clicking on the <i>Configure Job</i> link. This will present you with the configuration page for the process you wish to submit a job to. Complete the page and click the <i>Submit</i> button. For <i>instant</i> processes the job will run immediately and your outputs will be accessible from the <a href="/jobs">Jobs page</a>. Larger processes will be run <i>asynchronously</i> and you will be informed how long the job will take to run before being asked to confirm you wish to submit.<br /><br />
40
41                <b>Please note that some processes are restricted to registered users only</b>."""),
42                ("Viewing jobs and outputs",
43                 """Click on the <a href="/jobs">Jobs page</a> to view any previous jobs and/or the status of any current jobs."""),
44                ("Cancelling a job",
45                 """On the <a href="/jobs">Jobs page</a> you can view any jobs that are currently running. Click on the <i>Cancel job</i> link beside a job to instruct the WPS to terminate that job. The job will disappear from y our jobs list once cancelled.""")]
46 
47        return self._renderPage("Welcome to the CEDA-WPS", items)
48     
49    def technical(self):
50        items = [("How does COWS WPS work?", "Quite well, we hope..."),
51                 ("What can it do?", "Processing and useful stuff, TBC...")]
52
53        return self._renderPage("Technical Overview of the CEDA-WPS", items)
Note: See TracBrowser for help on using the repository browser.