summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorDave Lerner <dave.lerner@windriver.com>2014-04-08 16:32:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-09 17:00:02 +0100
commitd3e5632efb1f10143c748c169f6439f39eb3cf21 (patch)
tree8e6709581e91d2d8f46856656560d18ea78063fd /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parentdc7d3d29108d63eb5ecf276769f0099a5bc3ab86 (diff)
downloadpoky-d3e5632efb1f10143c748c169f6439f39eb3cf21.tar.gz
bitbake: toaster: sort on size in detail pages
[YOCTO 5778] Implements the features described in the attachment to bugzilla 5778 - new global changes to the format of size data, and - adding sorts by selected columns to specific detail pages. Although new pagination and row search capabilities are shown on the screen shots for the 5778 attachment, those features are specified in a different bugzilla entry 5777 and are not implemented in this commit. Also, the 5778 spec includes table sorting for the recipe package detail page, but sorting for that page was not implemented in this commit due to complications with sorting then returning to a page that is only one URL fragment in a template. The scope of file changes are described below. Changes to support new 'size' field column formats... default.css - added sizecol class style (right justified) projecttags.py - changed filtered_filesizeformat to allow ".0" suffixes Changes that add class 'sizecol, span2(as spec'd) ' to <th> and/or <td> size columns were made to... dirinfo.py, package_built_dependencies.html, package_included_dependencies.html, recipe.html, bpackage.html, and target.html More significant changes to support detail page table sorting are: - tablesort.html: New created to implement the sort icons, directions, and table headings, and suppress sort handling if 'disable_sort' in context, without search or pagination elements ingrained in basetable_top. Confining the changes to this small file reduces the impact (testing and risk) on the larger set of files that arleady include basetable_top/bottom files. - view.py: Modified the following view functions with - trivial changes for size formatting to the views: target, - changes to package_built_detail, package_included_detail, package_included_reverse_dependencies to handle the sorting implementation as well as moving headings and size formatting for size columns from templates to the views. - Implementation of the detail sorting using above in: package_built_detail.html, package_included_detail.html, and package_included_reverse_dependencies.html to include the tablesort heading setup, format the size column, and iterate over the new sorted objects, suppressing sorts if table row count less than 2. (Bitbake rev: d16126e9abfffde66ab70865a81997322847d44e) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index e8634574c0..be75b214ac 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -118,7 +118,7 @@ def filtered_filesizeformat(value):
118 if value == -1: 118 if value == -1:
119 return '' 119 return ''
120 120
121 return filesizeformat(value).replace("bytes", "B").replace(".0", "") 121 return filesizeformat(value).replace("bytes", "B")
122 122
123@register.filter 123@register.filter
124def filtered_packagespec(value): 124def filtered_packagespec(value):