toaster: Toaster GUI, generic search, filter and order
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Tue, 7 Jan 2014 13:10:42 +0000 (13:10 +0000)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 10 Jan 2014 14:13:53 +0000 (14:13 +0000)
commit2ca15117e4bbda38cda07511d0ff317273f91528
treedb0342b2d339e9cb2369b2427134d221a3e8f142
parentbf7fbf5c0ee39564d813f82e194242f9d4f73c47
toaster: Toaster GUI, generic search, filter and order

This patch implements table searching, filtering and ordering, in a
generic mode reusable for all tables.

The search operates list of fields defined in the corresponding
class for each model, search_allowed_fields.

The search expression and filters are sent through GET requests
using a QuerySet-like input. The inputs are filtered and
validated before usage to prevent inadvertent or malicious use.

Filters and table headers are defined in the views for each table,
and rendered by generic code which is easily modified for various
tables.

The Build table and Configuration table are implemented using this
framework as an example of how it should be used.

    [YOCTO #4249]
    [YOCTO #4254]
    [YOCTO #4255]
    [YOCTO #4256]
    [YOCTO #4257]
    [YOCTO #4259]
    [YOCTO #4260]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
lib/toaster/orm/models.py
lib/toaster/toastergui/static/css/default.css
lib/toaster/toastergui/templates/basetable_bottom.html
lib/toaster/toastergui/templates/basetable_top.html
lib/toaster/toastergui/templates/build.html
lib/toaster/toastergui/templates/configuration.html
lib/toaster/toastergui/templates/configvars.html [new file with mode: 0644]
lib/toaster/toastergui/templates/filtersnippet.html [new file with mode: 0644]
lib/toaster/toastergui/templatetags/projecttags.py
lib/toaster/toastergui/urls.py
lib/toaster/toastergui/views.py