Example #1
0
 def status(self, uuid):
     job = Job.find(self.__dir_jobs, uuid)
     if job == None:
         return view.render('error.html', error='Job not found!')
     status = job.status()
     if status == 'Error':
         return view.render('error.html', error='Generation failed!')
     elif status == 'Done':
         return view.render('done.html', name=job.description.name, uuid=uuid)
     return view.render(uuid=uuid, name=job.description.name, status=status)
Example #2
0
 def status(self, uuid):
     job = Job.find(self.__dir_jobs, uuid)
     if job == None:
         return view.render('error.html', error='Job not found!')
     status = job.status()
     if status == 'Error':
         return view.render('error.html', error='Generation failed!')
     elif status == 'Done':
         return view.render('done.html',
                            name=job.description.name,
                            uuid=uuid)
     return view.render(uuid=uuid, name=job.description.name, status=status)
Example #3
0
 def download(self, uuid):
     job = Job.find(self.__dir_jobs, uuid)
     if not job or job.status() != 'Done':
         return self.status(uuid)
     return cherrypy.lib.static.serve_download(job.map_file(), job.description.name + '.xcm')
Example #4
0
 def download(self, uuid):
     job = Job.find(self.__dir_jobs, uuid)
     if not job or job.status() != 'Done':
         return self.status(uuid)
     return cherrypy.lib.static.serve_download(
         job.map_file(), job.description.name + '.xcm')