Changeset 7105 for cows_wps


Ignore:
Timestamp:
27/06/10 22:50:37 (9 years ago)
Author:
astephen
Message:

starting to add in cancellation of jobs.

Location:
cows_wps/trunk
Files:
3 edited

Legend:

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

    r5619 r7105  
    8686     
    8787     
    88     def cancel(self,userId,jobId): 
    89         #!FIXME: Cancel needs fixing 
     88    def cancel(self, userId, jobId): 
    9089        log.debug("Cancelling request=%s from user=%s" % (jobId, userId)) 
    9190        flag,msg = requestManager.cancelRequest(jobId) 
  • cows_wps/trunk/cows_wps/renderer/ui_renderer.py

    r7104 r7105  
    7676    def _renderJobsTable(self, jobs): 
    7777        "Renders and returns (as string) table of HTML jobs." 
    78         html = '<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' 
     78        html = """ 
     79<table border="2"> 
     80        <tr> 
     81                <td>Job id</td> 
     82                <td>Job type</td> 
     83                <td>User</td> 
     84                <td>Submission time</td> 
     85                <td>Job status</td> 
     86                <td>Action</td> 
     87        </tr>\n""" 
     88 
    7989        count = 0 
    8090 
     
    8696            row_style = ("even_row", "odd_row")[count % 2] 
    8797 
     98            # Set action 
     99            action = '<a href="/jobviewer?status_url=balhlsdfjsdkfjs">View job info/outputs</a>' 
     100            if status in ("STARTED", "ACCEPTED"): 
     101                action += '<br/><a href="/job/cancel/user_id/job_id">Cancel this job - need to put a JS confirmation in here</a>'  
     102 
    88103            # HTML for row 
    89             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) 
     104            row = '<tr class="%s"><td>%s</td><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, action) 
    90105            html += row 
    91106 
  • cows_wps/trunk/process_modules/extract_uk_station_data.py

    r7084 r7105  
    161161            # Estimate size of outputs by estimating the number of stations 
    162162            if len(a["Counties"]) > 0: 
    163                 nEstimatedStations = len(a["Counties"]) * 15 
     163                nEstimatedStations = len(a["Counties"]) * 20  
    164164            elif a["BBox"]: 
    165165                (w, s, e, n) = a["BBox"] 
    166166                lonExtent = abs(e - w) 
    167167                latExtent = n - s 
    168                 nEstimatedStations = int(lonExtent * latExtent * 50) 
     168                nEstimatedStations = int(lonExtent * latExtent * 100) 
    169169            else: 
    170170                nEstimatedStations = len(stationList) 
Note: See TracChangeset for help on using the changeset viewer.