[Toaster] [review-request] 5778 detail page sorts and 6061 disable image sort by size percent

Lerner, Dave dave.lerner at windriver.com
Thu Apr 3 13:03:43 PDT 2014


Hi Belen, Alex,

Below is the review request for two commits.

Thanks,
Dave Lerner
==================================================================
Bugs: 6061, 5778
Branch: lerner/bz6061-bz5778
Branch base: master (shaid f688f6b566f455eb55d6e5491c80b88c493e158b)

---------
SYNOPSIS
---------
This is a review request for two bugzilla entries and two commits
    bugzilla 6031 - break linkage size-over-total and size in image info
    bugzilla 5778 - global size format changes, detail page sorts

The first commit 6031 removes sorting the image information package
page by size-over-total, removing the non-conventional appearance of
the previous implementation.  Since sorting by the size column is the
same result as sorting by size-over-totalsize, there is no loss in
user functionality.

The second commit responds to 5778, and implements the features
described in the attachment to the bug:
   - new global changes to the format of size data, and
   - adding sorts by columns to specific detail pages.

--------
COMMITS
--------
commit e768e7d5e877615059ba211c1702fc0d93238f3c
Author: Dave Lerner <dave.lerner at windriver.com>
Date:   Thu Apr 3 14:17:08 2014 -0500

    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
    <td> size columns were made to...
        bpackage.py,
        dirinfo.py,
        package_built_dependencies.html,
        package_included_dependencies.html, and
        recipe.html
    
    More significant changes to support detail page table sorting
    are:
        - tablesort.html: New created to implement the sort icons,
            directions, and table headings, 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: bpackage and
                target, and
            - 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.

 .../lib/toaster/toastergui/static/css/default.css  |    4 +-
 .../lib/toaster/toastergui/templates/bpackage.html |    2 +-
 .../lib/toaster/toastergui/templates/dirinfo.html  |    2 +-
 .../templates/package_built_dependencies.html      |    8 +-
 .../toastergui/templates/package_built_detail.html |   14 +--
 .../templates/package_included_dependencies.html   |    8 +-
 .../templates/package_included_detail.html         |   14 +--
 .../package_included_reverse_dependencies.html     |   13 +--
 .../lib/toaster/toastergui/templates/recipe.html   |    4 +-
 .../toaster/toastergui/templates/tablesort.html    |   13 +++
 .../lib/toaster/toastergui/templates/target.html   |    4 +-
 .../toaster/toastergui/templatetags/projecttags.py |    2 +-
 bitbake/lib/toaster/toastergui/views.py            |   89 +++++++++++++++++++-
 13 files changed, 128 insertions(+), 49 deletions(-)

commit f99a444000a92a8a8cb2008c5c35fe3680dbe275
Author: Dave Lerner <dave.lerner at windriver.com>
Date:   Mon Mar 31 15:44:05 2014 -0500

    bitbake: toaster: disable 'size over total' sort
    
    [YOCTO 6061]
    
    Disable size-over-total table column sorts in the image installed
    packages view because that field is a computed field and only model
    fields are sortable in the current table toaster implementation.
    
    Signed-off-by: Dave Lerner <dave.lerner at windriver.com>

 bitbake/lib/toaster/toastergui/views.py |    2 --
 1 file changed, 2 deletions(-)

---------
TESTING
---------
Build setup: qemux86 
    bitbake core-image-minimal (unless otherwise noted)
    bitbake core-image-sato
HTML5 Validation: Done (fails on recipe.html but not a regression
with this commit)
Whitespace-EOL: Done
Verification tests:
    Size columns should be justified (SIZEJUST)
    Default sorting column, Default Size sort direction,
        columns correctly sort PLUS (SIZEJUST) 
All Packages: SIZEJUST verified on core-image-minimal
Included packages File In: SIZESORT verified on busybox
Included packages Runtime Deps: SIZEJUST on busybox
Included packages Reverse Deps: SIZESORT on busybox
Built packages Generated Files: SIZESORT on tzdata
Built packages runtime: SIZEJUST on gst-plugins-bad-y4mdec-dev(sato)
Image information Packages: SIZESORT on core-image-minimal
REcipes: SIZEJUST on oprofile




More information about the toaster mailing list