Ignore:
Timestamp:
8 Feb 2017, 09:22:23 (8 years ago)
Author:
Henrik Bettermann
Message:

Sort arguments in table of ReportsContainerPage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/reports.py

    r14171 r14519  
    8989            generator = queryUtility(IReportGenerator, name=gen_name)
    9090            gen_title = translate(getattr(generator, 'title', _('Unknown')))
    91             args = ', '.join([str(x) for x in job.kwargs['kw'].values()])
    92             descr = '%s (%s)' % (gen_title, args)
     91            # Sort arguments
     92            sorted_items = sorted(
     93                job.kwargs['kw'].items(), key=lambda value:value[0])
     94            sorted_values = [i[1] for i in sorted_items]
     95            arguments = ', '.join([str(x) for x in sorted_values])
     96            descr = '%s (%s)' % (gen_title, arguments)
    9397            status = job.finished and 'ready' or 'running'
    9498            status = job.failed and 'FAILED' or status
Note: See TracChangeset for help on using the changeset viewer.