summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-20 17:31:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-27 21:01:07 +0000
commit9677275d0de94108689db300ca4637a2774ab2e3 (patch)
tree59716328cca3cd8f4d361ef148132358720d76ce
parent594eeeba71b820fa2eb4019d92a509bff34fba21 (diff)
downloadpoky-9677275d0de94108689db300ca4637a2774ab2e3.tar.gz
bitbake: toaster: fix builds page CSS and functionality
This patch fixes a set of CSS and functionality problems with the build list page: * Fix Recent Builds text styles * Added proper links from Failed Tasks entries. * Always Search returns to the first page of results. * Clear search button appears only if search is active. * Search shows the number of object, proper no objects found * Various smaller fixes. (Bitbake rev: 9164948e387a726f318f723f63e8d93435d7afe6) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basetable_top.html3
-rw-r--r--bitbake/lib/toaster/toastergui/templates/build.html16
-rw-r--r--bitbake/lib/toaster/toastergui/views.py3
3 files changed, 12 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
index 7b3017affb..67a1d103db 100644
--- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html
+++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html
@@ -31,9 +31,10 @@
31 <div class="navbar-inner"> 31 <div class="navbar-inner">
32 <form class="navbar-search input-append pull-left" id="searchform"> 32 <form class="navbar-search input-append pull-left" id="searchform">
33 <div class="input-append" style="padding-right:1em"> 33 <div class="input-append" style="padding-right:1em">
34 <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search {{objectname}}" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a> 34 <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search {{objectname}}" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a>{%endif%}
35 </div> 35 </div>
36 <input type="hidden" name="orderby" value="{{request.GET.orderby}}"> 36 <input type="hidden" name="orderby" value="{{request.GET.orderby}}">
37 <input type="hidden" name="page" value="1">
37 <input class="btn" type="submit" value="Search"/> 38 <input class="btn" type="submit" value="Search"/>
38 </form> 39 </form>
39 <div class="pull-right"> 40 <div class="pull-right">
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html
index a15702463b..5914f57755 100644
--- a/bitbake/lib/toaster/toastergui/templates/build.html
+++ b/bitbake/lib/toaster/toastergui/templates/build.html
@@ -19,7 +19,7 @@
19 <div class="lead span5"> 19 <div class="lead span5">
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%} 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 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} 21 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
22 <a href="{%url 'builddashboard' build.pk%}"> 22 <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
23 {% endif %} 23 {% endif %}
24 <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> 24 <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>
25 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %} 25 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
@@ -55,9 +55,9 @@
55 55
56 <div class="page-header" style="margin-top:40px;"> 56 <div class="page-header" style="margin-top:40px;">
57 <h1> 57 <h1>
58 {% if request.GET.filter or request.GET.search and objects.ocount > 0 %} 58 {% if request.GET.filter or request.GET.search and objects.count > 0 %}
59 {{objects.ocount}} build{{objects.ocount|pluralize}} found 59 {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
60 {%elif objects.ocount == 0%} 60 {%elif objects.paginator.count == 0%}
61 No builds 61 No builds
62 {%else%} 62 {%else%}
63 All builds 63 All builds
@@ -65,12 +65,12 @@
65 </h1> 65 </h1>
66 </div> 66 </div>
67 67
68 {% if objects.ocount == 0 %} 68 {% if objects.paginator.count == 0 %}
69 <div class="row-fluid"> 69 <div class="row-fluid">
70 <div class="alert"> 70 <div class="alert">
71 <form class="no-results"> 71 <form class="no-results" id="searchform">
72 <div class="input-append"> 72 <div class="input-append">
73 <input class="input-xxlarge" type="text" placeholder="{{request.GET.search}}" /> 73 <input id="search" name="search" class="input-xxlarge" type="text" placeholder="{{request.GET.search}}" /><a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a>
74 <input class="btn" type="submit" value="Search"/> 74 <input class="btn" type="submit" value="Search"/>
75 <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button> 75 <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button>
76 </div> 76 </div>
@@ -89,7 +89,7 @@
89 <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> 89 <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
90 <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td> 90 <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
91 <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td> 91 <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
92 <td class="failed_tasks error">{% 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> 92 <td class="failed_tasks error">{% query build.task_build outcome=4 order__gt=0 as exectask%}{% if exectask.count == 1 %}<a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>{% elif exectask.count > 1%}<a href="{% url "tasks" build.id %}">{{exectask.count}}</a>{%endif%}</td>
93 <td class="errors_no">{% if build.errors_no %}<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td> 93 <td class="errors_no">{% if build.errors_no %}<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td>
94 <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td> 94 <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
95 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td> 95 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index ab8b938cdd..f3baf047ae 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -307,7 +307,8 @@ def builds(request):
307 {'name': 'Log', 307 {'name': 'Log',
308 'dclass': "span4", 308 'dclass': "span4",
309 'qhelp': "The location in disk of the build main log file", 309 'qhelp': "The location in disk of the build main log file",
310 'clclass': 'log', 'hidden': 1 310 'clclass': 'log', 'hidden': 1,
311 'orderfield': _get_toggle_order(request, "cooker_log_path"),
311 }, 312 },
312 {'name': 'Output', 'clclass': 'output', 313 {'name': 'Output', 'clclass': 'output',
313 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory", 314 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",