diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-01-07 13:10:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-10 15:20:26 +0000 |
commit | 1b636173ca88e5ccca1992f9a12367a1189fa674 (patch) | |
tree | 0220e98e7b7a4027fb8c146bab9b3f81306fc9fe /bitbake/lib/toaster/toastergui/templates/filtersnippet.html | |
parent | 5482409a370552809de75150350defef04ac7144 (diff) | |
download | poky-1b636173ca88e5ccca1992f9a12367a1189fa674.tar.gz |
bitbake: 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]
(Bitbake rev: 2ca15117e4bbda38cda07511d0ff317273f91528)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/filtersnippet.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/filtersnippet.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html new file mode 100644 index 0000000000..26ff67563e --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html | |||
@@ -0,0 +1,19 @@ | |||
1 | |||
2 | <!-- '{{f.class}}' filter --> | ||
3 | <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> | ||
4 | <input type="hidden" name="search" value="{{request.GET.search}}"/> | ||
5 | <div class="modal-header"> | ||
6 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | ||
7 | <h3>Filter builds by {{tc.name}}</h3> | ||
8 | </div> | ||
9 | <div class="modal-body"> | ||
10 | <label>{{f.label}}</label> | ||
11 | <select name="filter"> | ||
12 | <option value="">No Filter</option>{% for key, value in f.options.items %} | ||
13 | <option {%if request.GET.filter == value %}selected="" {%endif%}value="{{value}}">{{key}}</option>{% endfor %} | ||
14 | </select> | ||
15 | </div> | ||
16 | <div class="modal-footer"> | ||
17 | <button type="submit" class="btn btn-primary disabled">Apply</button> | ||
18 | </div> | ||
19 | </form> | ||