Changeset 9672 for main/waeup.kofa/trunk/src/waeup/kofa/browser/reports.py
- Timestamp:
- 17 Nov 2012, 22:43:58 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/reports.py
r9667 r9672 48 48 self.context.delete_report_entry(entry) 49 49 self.flash('Report discarded: %s' % job_id) 50 self.entries = self.context.get_report_jobs_description() 50 self.entries = self._generate_entries(user_id=None) 51 #self.entries = self.context.get_report_jobs_description() 51 52 if job_id and DOWNLOAD: 52 53 self.redirect(self._report_url(job_id)) 53 54 return 54 55 return 56 57 def _generate_entries(self, user_id=None): 58 entries = [] 59 for entry in self.context.get_running_report_jobs(user_id=user_id): 60 job_id, gen_name, user = entry 61 job = getUtility(IJobManager).get(job_id) 62 descr = '%r, %r' % (job.args, job.kwargs) 63 new_entry = (job_id, descr, job.status, job.finished, job.finished and not job.failed, not job.finished, job.begin_after, user) 64 entries.append(new_entry) 65 return entries 55 66 56 67
Note: See TracChangeset for help on using the changeset viewer.