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 | |
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')
6 files changed, 227 insertions, 116 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html b/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html index 00703fe4c1..3e4b0cc5a4 100644 --- a/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html +++ b/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html | |||
@@ -1,3 +1,4 @@ | |||
1 | </tbody> | ||
1 | </table> | 2 | </table> |
2 | 3 | ||
3 | <!-- Show pagination controls --> | 4 | <!-- Show pagination controls --> |
@@ -8,15 +9,15 @@ | |||
8 | 9 | ||
9 | <ul class="pagination" style="display: block-inline"> | 10 | <ul class="pagination" style="display: block-inline"> |
10 | {%if objects.has_previous %} | 11 | {%if objects.has_previous %} |
11 | <li><a href="?page={{objects.previous_page_number}}&count={{request.GET.count}}">«</a></li> | 12 | <li><a href="javascript:reload_params({'page':{{objects.previous_page_number}}})">«</a></li> |
12 | {%else%} | 13 | {%else%} |
13 | <li class="disabled"><a href="#">«</a></li> | 14 | <li class="disabled"><a href="#">«</a></li> |
14 | {%endif%} | 15 | {%endif%} |
15 | {% for i in objects.page_range %} | 16 | {% for i in objects.page_range %} |
16 | <li{%if i == objects.number %} class="active" {%endif%}><a href="?page={{i}}&count={{request.GET.count}}">{{i}}</a></li> | 17 | <li{%if i == objects.number %} class="active" {%endif%}><a href="javascript:reload_params({'page':{{i}}})">{{i}}</a></li> |
17 | {% endfor %} | 18 | {% endfor %} |
18 | {%if objects.has_next%} | 19 | {%if objects.has_next%} |
19 | <li><a href="?page={{objects.next_page_number}}&count={{request.GET.count}}">»</a></li> | 20 | <li><a href="javascript:reload_params({'page':{{objects.next_page_number}}})">»</a></li> |
20 | {%else%} | 21 | {%else%} |
21 | <li class="disabled"><a href="#">»</a></li> | 22 | <li class="disabled"><a href="#">»</a></li> |
22 | {%endif%} | 23 | {%endif%} |
@@ -58,3 +59,9 @@ | |||
58 | }); | 59 | }); |
59 | }); | 60 | }); |
60 | </script> | 61 | </script> |
62 | |||
63 | <!-- modal filter boxes --> | ||
64 | {% for tc in tablecols %}{% if tc.filter %}{% with f=tc.filter %} | ||
65 | {% include "filtersnippet.html" %} | ||
66 | {% endwith %}{% endif %} {% endfor %} | ||
67 | <!-- end modals --> | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html index b9277b4a3d..34e0cd7210 100644 --- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html +++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html | |||
@@ -21,46 +21,53 @@ | |||
21 | 21 | ||
22 | <!-- control header --> | 22 | <!-- control header --> |
23 | <div class="navbar"> | 23 | <div class="navbar"> |
24 | <div class="navbar-inner"> | 24 | <div class="navbar-inner"> |
25 | <form class="navbar-search input-append pull-left"> | 25 | <form class="navbar-search input-append pull-left" > |
26 | <input class="input-xxlarge" type="text" placeholder="Search {{objectname}}" /> | 26 | <input class="input-xxlarge" name="search" type="text" placeholder="Search {{objectname}}" value="{{request.GET.search}}"/> |
27 | <button class="btn" type="button">Search</button> | 27 | <input class="btn" type="submit" value="Search"/> |
28 | </form> | 28 | </form> |
29 | <div class="pull-right"> | 29 | <div class="pull-right"> |
30 | 30 | {% if tablecols %} | |
31 | {% if tablecols %} | 31 | <div class="btn-group"> |
32 | <div class="btn-group"> | 32 | <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns |
33 | <button class="btn dropdown-toggle" data-toggle="dropdown"> | 33 | <span class="caret"></span> |
34 | Edit columns | 34 | </button> |
35 | <span class="caret"></span> | 35 | <ul class="dropdown-menu">{% for i in tablecols %} |
36 | </button> | 36 | <li> |
37 | <ul class="dropdown-menu"> | 37 | <label class="checkbox"> |
38 | 38 | <input type="checkbox" class="chbxtoggle" {% if i.clclass %}id="{{i.clclass}}" value="ct{{i.name}}" {% if not i.hidden %}checked="checked"{%endif%} onchange="showhideTableColumn($(this).attr('id'), $(this).is(':checked'))" {%else%} checked disabled{% endif %}/> {{i.name}} | |
39 | {% for i in tablecols %} | 39 | </label> |
40 | <li> | 40 | </li>{% endfor %} |
41 | <label class="checkbox"> | 41 | </ul> |
42 | <input type="checkbox" class="chbxtoggle" id="{{i.clclass}}" value="ct{{i.name}}" {% if i.clclass %}{% if not i.hidden %}checked="checked"{%endif%} onchange="showhideTableColumn($(this).attr('id'), $(this).is(':checked'))" {%else%} disabled{% endif %}/> {{i.name}} | 42 | </div> |
43 | </label> | 43 | {% endif %} |
44 | </li> | 44 | <div style="display:inline"> |
45 | {% endfor %} | 45 | <span class="divider-vertical"></span> |
46 | </ul> | 46 | <span class="help-inline" style="padding-top:5px;">Show rows:</span> |
47 | </div> | 47 | <select style="margin-top:5px;margin-bottom:0px;" class="pagesize"> |
48 | {% endif %} | ||
49 | |||
50 | <div style="display:inline"> | ||
51 | <span class="divider-vertical"></span> | ||
52 | <span class="help-inline" style="padding-top:5px;">Show rows:</span> | ||
53 | <select style="margin-top:5px;margin-bottom:0px;" class="pagesize"> | ||
54 | {% with "2 5 10 25 50 100" as list%} | 48 | {% with "2 5 10 25 50 100" as list%} |
55 | {% for i in list.split %}<option{%if i == request.GET.count %} selected{%endif%}>{{i}}</option> | 49 | {% for i in list.split %} <option{%if i == request.GET.count %} selected{%endif%}>{{i}}</option> |
56 | {% endfor %} | 50 | {% endfor %} |
57 | {% endwith %} | 51 | {% endwith %} |
58 | </select> | 52 | </select> |
59 | </div> | 53 | </div> |
60 | </div> | 54 | </div> |
61 | </div> | 55 | </div> <!-- navbar-inner --> |
62 | </div> | 56 | </div> |
63 | 57 | ||
64 | <!-- the actual rows of the table --> | 58 | <!-- the actual rows of the table --> |
65 | <table class="table table-bordered table-hover tablesorter" id="otable"> | 59 | <table class="table table-bordered table-hover tablesorter" id="otable"> |
60 | <thead> | ||
61 | <!-- Table header row; generated from "tablecols" entry in the context dict --> | ||
62 | <tr> | ||
63 | {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}"> | ||
64 | {%if tc.qhelp%}<i class="icon-question-sign get-help" data-toggle="tooltip" title="{{tc.qhelp}}"></i>{%endif%} | ||
65 | <a href="javascript:reload_params({'orderby' : '{{tc.orderfield}}' })" style="font-weight:normal;">{{tc.name}}</a> | ||
66 | {%if tc.filter%}<div class="btn-group pull-right"> | ||
67 | <a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini{%if request.GET.filter in tc.filter.options.values%} btn-primary{%endif%}" data-toggle="modal"> <i class="icon-filter filtered"></i> </a> | ||
68 | </div>{%endif%} | ||
69 | </th>{% endfor %} | ||
70 | </tr> | ||
71 | </thead> | ||
72 | <tbody> | ||
66 | 73 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html index 43b491d558..eb7e03c951 100644 --- a/bitbake/lib/toaster/toastergui/templates/build.html +++ b/bitbake/lib/toaster/toastergui/templates/build.html | |||
@@ -7,70 +7,77 @@ | |||
7 | {% block pagecontent %} | 7 | {% block pagecontent %} |
8 | <div class="row-fluid"> | 8 | <div class="row-fluid"> |
9 | 9 | ||
10 | <div class="page-header" style="margin-top:40px;"> | 10 | {%if mru.count > 0%} |
11 | <h1> | 11 | <div class="page-header" style="margin-top:40px;"> |
12 | Recent Builds | 12 | <h1> |
13 | </h1> | 13 | Recent Builds |
14 | </div> | 14 | </h1> |
15 | {% for build in mru %} | 15 | </div> |
16 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}"> | 16 | {% for build in mru %} |
17 | <div class="row-fluid"> | 17 | <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}"> |
18 | <div class="lead span5"> | 18 | <div class="row-fluid"> |
19 | {%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%} | 19 | <div class="lead span5"> |
20 | <a href="{%url 'builddashboard' build.pk%}"> | 20 | {%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%} |
21 | <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|naturaltime}})</span> | 21 | <a href="{%url 'builddashboard' build.pk%}"> |
22 | </a> | 22 | <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|naturaltime}})</span> |
23 | </div> | 23 | </a> |
24 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} | 24 | </div> |
25 | <div class="span2 lead"> | 25 | {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} |
26 | {% if build.errors_no %} | 26 | <div class="span2 lead"> |
27 | <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a> | 27 | {% if build.errors_no %} |
28 | {% endif %} | 28 | <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a> |
29 | </div> | 29 | {% endif %} |
30 | <div class="span2 lead"> | 30 | </div> |
31 | {% if build.warnings_no %} | 31 | <div class="span2 lead"> |
32 | <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a> | 32 | {% if build.warnings_no %} |
33 | {% endif %} | 33 | <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a> |
34 | </div> | 34 | {% endif %} |
35 | <div class="lead pull-right"> | ||
36 | Build time: <a href="build-time.html">{{ build|timespent }}</a> | ||
37 | </div> | ||
38 | {%endif%}{%if build.outcome == build.IN_PROGRESS %} | ||
39 | <div class="span4"> | ||
40 | <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete"> | ||
41 | <div style="width: {{build.completeper}}%;" class="bar"></div> | ||
42 | </div> | 35 | </div> |
36 | <div class="lead pull-right"> | ||
37 | Build time: <a href="build-time.html">{{ build|timespent }}</a> | ||
38 | </div> | ||
39 | {%endif%}{%if build.outcome == build.IN_PROGRESS %} | ||
40 | <div class="span4"> | ||
41 | <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete"> | ||
42 | <div style="width: {{build.completeper}}%;" class="bar"></div> | ||
43 | </div> | ||
44 | </div> | ||
45 | <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div> | ||
46 | {%endif%} | ||
43 | </div> | 47 | </div> |
44 | <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div> | ||
45 | {%endif%} | ||
46 | </div> | 48 | </div> |
47 | </div> | ||
48 | 49 | ||
49 | {% endfor %} | 50 | {% endfor %}{%endif%} |
50 | 51 | ||
51 | 52 | <div class="page-header" style="margin-top:40px;"> | |
52 | <div class="page-header" style="margin-top:40px;"> | 53 | <h1> |
53 | <h1> | 54 | {% if request.GET.filter or request.GET.search and objects.ocount > 0 %} |
54 | All builds | 55 | {{objects.ocount}} build{{objects.ocount|pluralize}} found |
56 | {%elif objects.ocount == 0%} | ||
57 | No builds | ||
58 | {%else%} | ||
59 | All builds | ||
60 | {%endif%} | ||
55 | </h1> | 61 | </h1> |
56 | </div> | 62 | </div> |
57 | 63 | ||
58 | {% include "basetable_top.html" %} | 64 | {% if objects.ocount == 0 %} |
65 | <div class="row-fluid"> | ||
66 | <div class="alert"> | ||
67 | <form class="no-results"> | ||
68 | <div class="input-append"> | ||
69 | <input class="input-xxlarge" type="text" placeholder="{{request.GET.search}}" /> | ||
70 | <input class="btn" type="submit" value="Search"/> | ||
71 | <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button> | ||
72 | </div> | ||
73 | </form> | ||
74 | </div> | ||
75 | </div> | ||
59 | 76 | ||
60 | <tr> | ||
61 | <th class="outcome span2"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="The outcome tells you if a build completed successfully or failed"></i> <a href="#" style="font-weight:normal;">Outcome</a> <div class="btn-group pull-right"> <a href="#outcome" role="button" class="btn btn-mini" data-toggle="modal"> <i class="icon-filter"></i> </a> </div> </th> | ||
62 | <th class="target"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="This is the build target(s): one or more recipes or image recipes"></i> <a href="#" style="font-weight:normal;">Target</a> </th> | ||
63 | <th class="machine span3"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="The machine is the hardware for which you are building"></i> <a href="#" style="font-weight:normal;">Machine</a> </th> | ||
64 | <th class="started_on"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="The date and time you started the build"></i> <a href="#" style="font-weight:normal;">Started on</a> <div class="btn-group pull-right"> <a href="#started-on" role="button" class="btn btn-mini" data-toggle="modal"> <i class="icon-filter"></i> </a> </div> </th> | ||
65 | <th class="completed_on"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="The date and time the build finished"></i> <a href="#" class="sorted"> Completed on </a> <div class="btn-group pull-right"> <a href="#completed-on" role="button" class="btn btn-mini" data-toggle="modal"> <i class="icon-filter"></i> </a> </div> <i class="icon-caret-down"></i> </th> | ||
66 | <th class="failed_tasks"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="How many tasks failed during the build"></i> <a href="#" style="font-weight:normal;">Failed tasks</a> <div class="btn-group pull-right"> <a href="#failed-tasks" role="button" class="btn btn-mini" data-toggle="modal"> <i class="icon-filter"></i> </a> </div> <!--div id="filtered" class="btn-group pull-right" title="<p>Showing only builds with failed tasks</p><p><a class='btn btn-mini btn-primary' href='#'>Show all builds</a></p>"> <a class="btn btn-mini btn-primary"> <i class="icon-filter"></i> </a> </div--> </th> | ||
67 | <th class="errors"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="How many errors were encountered during the build (if any)"></i> <a href="#" style="font-weight:normal;">Errors</a> <div class="btn-group pull-right"> <a href="#errors" role="button" class="btn btn-mini" data-toggle="modal"> <i class="icon-filter"></i> </a> </div> </th> | ||
68 | <th class="warnings"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="How many warnigns were encountered during the build (if any)"></i> <a href="#" style="font-weight:normal;">Warnings</a> <div class="btn-group pull-right"> <a href="#warnings" role="button" class="btn btn-mini" data-toggle="modal"> <i class="icon-filter"></i> </a> </div> <!--div id="filtered" class="btn-group pull-right" title="<p>Showing only builds without warnings</p><p><a class='btn btn-mini btn-primary' href='#'>Show all builds</a></p>"> <a class="btn btn-mini btn-primary"> <i class="icon-filter"></i> </a> </div--> </th> | ||
69 | <th class="time"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="How long it took the build to finish"></i> <a href="#" style="font-weight:normal;">Time</a> </th> | ||
70 | <th class="log span4"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="The location in disk of the build main log file"></i> <a href="#" style="font-weight:normal;">Log</a> </th> | ||
71 | <th class="output"> <i class="icon-question-sign get-help" data-toggle="tooltip" title="The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory"></i> <a href="#" style="font-weight:normal;">Output</a> </th> | ||
72 | 77 | ||
73 | </tr> | 78 | {% else %} |
79 | {% include "basetable_top.html" %} | ||
80 | <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work --> | ||
74 | {% for build in objects %} | 81 | {% for build in objects %} |
75 | <tr class="data"> | 82 | <tr class="data"> |
76 | <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td> | 83 | <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td> |
@@ -78,11 +85,11 @@ | |||
78 | <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> | 85 | <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> |
79 | <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on}}</a></td> | 86 | <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on}}</a></td> |
80 | <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on}}</a></td> | 87 | <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on}}</a></td> |
81 | <td class="failed_tasks"></td> | 88 | <td class="failed_tasks">{% query build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count == 1 %}{{exectask.0.recipe.name}}.{{exectask.0.task_name}}{% elif exectask.count > 1%}{{exectask.count}}{%endif%}</td> |
82 | <td class="errors">{% if build.errors_no %}<a class="error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td> | 89 | <td class="errors_no">{% if build.errors_no %}<a class="errors_no" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td> |
83 | <td class="warnings">{% if build.warnings_no %}<a class="warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td> | 90 | <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td> |
84 | <td class="time"><a href="{% url "buildtime" build.id %}">{{build|timespent}}</a></td> | 91 | <td class="time"><a href="{% url "buildtime" build.id %}">{{build|timespent}}</a></td> |
85 | <td class="log">{{build.log}}</td> | 92 | <td class="log">{{build.cooker_log_path}}</td> |
86 | <td class="output">{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}<a href="{%url "builddashboard" build.id%}#images">{{build.image_fstypes}}</a>{% endif %}{% endfor %}{% endif %}</td> | 93 | <td class="output">{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}<a href="{%url "builddashboard" build.id%}#images">{{build.image_fstypes}}</a>{% endif %}{% endfor %}{% endif %}</td> |
87 | </tr> | 94 | </tr> |
88 | 95 | ||
@@ -91,5 +98,7 @@ | |||
91 | 98 | ||
92 | {% include "basetable_bottom.html" %} | 99 | {% include "basetable_bottom.html" %} |
93 | 100 | ||
94 | </div> | 101 | {% endif %} |
102 | </div><!-- end row-fluid--> | ||
103 | |||
95 | {% endblock %} | 104 | {% endblock %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/configuration.html b/bitbake/lib/toaster/toastergui/templates/configuration.html index e390a95ff5..467fbd02ad 100644 --- a/bitbake/lib/toaster/toastergui/templates/configuration.html +++ b/bitbake/lib/toaster/toastergui/templates/configuration.html | |||
@@ -4,25 +4,54 @@ | |||
4 | {% endblock %} | 4 | {% endblock %} |
5 | 5 | ||
6 | {% block buildinfomain %} | 6 | {% block buildinfomain %} |
7 | <!-- page title --> | ||
8 | <div class="row-fluid span10"> | ||
9 | <div class="page-header"> | ||
10 | <h1>Configuration</h1> | ||
11 | </div> | ||
12 | </div> | ||
7 | 13 | ||
8 | {% include "basetable_top.html" %} | 14 | <!-- configuration table --> |
15 | <div class="row-fluid pull-right span10" id="navTab"> | ||
16 | <ul class="nav nav-pills"> | ||
17 | <li class="active"><a href="#">Summary</a></li> | ||
18 | <li class=""><a href="{% url 'configvars' build.id %}">BitBake variables</a></li> | ||
19 | </ul> | ||
9 | 20 | ||
10 | <tr> | 21 | <!-- summary --> |
11 | <th>Name</th> | 22 | <div id="summary" class="tab-pane active"> |
12 | <th>Description</th> | 23 | <h3>Build configuration</h3> |
13 | <th>Definition history</th> | 24 | <dl class="dl-horizontal"> |
14 | <th>Value</th> | 25 | <dt>BitBake version</dt><dd>1.19.1</dd> |
15 | </tr> | 26 | <dt>Build system</dt><dd>x86_64-linux</dd> |
27 | <dt>Host distribution</dt><dd>Ubuntu-12.04</dd> | ||
28 | <dt>Target system</dt><dd>i586-poky-linux</dd> | ||
29 | <dt><i class="icon-question-sign get-help" data-toggle="tooltip" title="Specifies the target device for which the image is built"></i> Machine</dt><dd>atom-pc</dd> | ||
30 | <dt><i class="icon-question-sign get-help" data-toggle="tooltip" title="The short name of the distribution"></i> Distro</dt><dd>poky</dd> | ||
31 | <dt>Distro version</dt><dd>1.4+snapshot-20130718</dd> | ||
32 | <dt>Tune features</dt><dd>m32 i586</dd> | ||
33 | <dt>Target(s)</dt><dd>core-image-sato</dd> | ||
34 | </dl> | ||
35 | <h3>Layers</h3> | ||
36 | <div class="span9" style="margin-left:0px;"> | ||
37 | <table class="table table-bordered table-hover"> | ||
38 | <thead> | ||
39 | <tr> | ||
40 | <th>Layer</th> | ||
41 | <th>Layer branch</th> | ||
42 | <th>Layer commit</th> | ||
43 | <th>Layer directory</th> | ||
44 | </tr> | ||
45 | </thead> | ||
46 | <tbody>{% for lv in build.layer_version_build.all %} | ||
47 | <tr> | ||
48 | <td>{{lv.layer.name}}<a href="{{lv.layer.layer_index_url}}" target="_blank"> <i class="icon-share get-info"></i></a></td><td>{{lv.branch}}</td><td class="layer_commit"><a data-content="{{lv.commit}}" title="" href="#" class="btn" data-original-title="">{{lv.commit|slice:":8"}}...</a></td><td>{{lv.layer.local_path}}</td> | ||
49 | </tr>{% endfor %} | ||
50 | </tbody> | ||
51 | </table> | ||
52 | </div> | ||
53 | </div> | ||
16 | 54 | ||
17 | {% for variable in objects %} | ||
18 | |||
19 | <tr class="data"> | ||
20 | <td>{{variable.variable_name}}</td> | ||
21 | <td>{% if variable.description %}{{variable.description}}{% endif %}</td> | ||
22 | <td>{% for vh in variable.variablehistory_set.all %}{{vh.operation}} in {{vh.file_name}}:{{vh.line_number}}<br/>{%endfor%}</td> | ||
23 | <td>{{variable.variable_value}}</td> | ||
24 | {% endfor %} | ||
25 | |||
26 | {% include "basetable_bottom.html" %} | ||
27 | 55 | ||
56 | </div> | ||
28 | {% endblock %} | 57 | {% endblock %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html b/bitbake/lib/toaster/toastergui/templates/configvars.html new file mode 100644 index 0000000000..8ce04b883d --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/configvars.html | |||
@@ -0,0 +1,40 @@ | |||
1 | {% extends "basebuildpage.html" %} | ||
2 | {% block localbreadcrumb %} | ||
3 | <li>Configuration</li> | ||
4 | {% endblock %} | ||
5 | |||
6 | {% block buildinfomain %} | ||
7 | <!-- page title --> | ||
8 | <div class="row-fluid span10"> | ||
9 | <div class="page-header"> | ||
10 | <h1>Configuration</h1> | ||
11 | </div> | ||
12 | </div> | ||
13 | |||
14 | <!-- configuration table --> | ||
15 | <div class="row-fluid pull-right span10" id="navTab"> | ||
16 | <ul class="nav nav-pills"> | ||
17 | <li class=""><a href="{% url 'configuration' build.id %}">Summary</a></li> | ||
18 | <li class="active"><a href="#" >BitBake variables</a></li> | ||
19 | </ul> | ||
20 | |||
21 | |||
22 | <!-- variables --> | ||
23 | <div id="variables" class="tab-pane"> | ||
24 | {% include "basetable_top.html" %} | ||
25 | |||
26 | {% for variable in objects %} | ||
27 | <tr class="data"> | ||
28 | <td class="variable">{{variable.variable_name}}</td> | ||
29 | <td class="variable_value">{{variable.variable_value}}</td> | ||
30 | <td class="file">{% for vh in variable.variablehistory_set.all %}{{vh.operation}} in {{vh.file_name}}:{{vh.line_number}}<br/>{%endfor%}</td> | ||
31 | <td class="description">{% if variable.description %}{{variable.description}}{% endif %}</td> | ||
32 | </tr> | ||
33 | {% endfor %} | ||
34 | |||
35 | {% include "basetable_bottom.html" %} | ||
36 | |||
37 | </div> <!-- endvariables --> | ||
38 | |||
39 | </div> | ||
40 | {% endblock %} | ||
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> | ||