Skip to contentSkip to conversation

toaster patchset

PATCH New Alex DAMIAN 1 participant 20 messages Mar 14, 2014

lore
Share & tools
lore
#0 lore raw

cover toaster patchset

From: Alexandru DAMIAN <[email protected]>

Hello,

This is a toaster interface and data collection patchset.

Can you please pull ?

Thanks,
Alex

The following changes since commit 81413d94f40f58d790d7a7dc4259108f9c5d4fc0:

bitbake: cooker: some IMAGE_FEATURES not recognized (2014-03-14 07:25:35 -0700)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib adamian/submission-14032014
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=submission-14032014

Alexandru DAMIAN (2):
toaster: fix target file inode type information
toaster: improve recipe matching for native tasks

Belen Barros Pena (16):
toaster: Move <tbody> outside for statement
toaster: Make Order column part of the minimum table
toaster: Format package size in recipe.html
toaster: Replace hyphens with underscores in package name
toaster: Small tweaks to the no results page
toaster: Amend help text in package_built_detail.html
toaster: Fixing "Show all builds" link
toaster: Add no search results page
toaster: Give an extra space to the caret
toaster: Shorten dependency labels
toaster: Presentation fixes for task.html bitbake:toaster: Not using task_color tag for execution heading
toaster: Fix Recipe sorting in tasks table
toaster: Don't show clear search button if text input field is empty
toaster: Remove the data-toggle attribute
toaster: Sort layers in alphabetical order

Farrell Wymore (1):
toaster: added file types to the Outputs column in the build page

 lib/bb/ui/buildinfohelper.py                       | 26 ++++----
 lib/toaster/toastergui/static/css/default.css      |  4 +-
 .../toastergui/templates/basetable_top.html        |  2 +-
 lib/toaster/toastergui/templates/bpackage.html     | 13 ++++
 lib/toaster/toastergui/templates/build.html        | 18 +++---
 .../toastergui/templates/configuration.html        |  2 +-
 lib/toaster/toastergui/templates/configvars.html   | 16 ++++-
 .../templates/package_built_dependencies.html      | 70 +++++++++++-----------
 .../toastergui/templates/package_built_detail.html | 14 ++---
 .../toastergui/templates/package_detail_base.html  |  4 +-
 .../templates/package_included_dependencies.html   | 23 ++++---
 .../templates/package_included_detail.html         | 12 ++--
 .../package_included_reverse_dependencies.html     | 12 ++--
 lib/toaster/toastergui/templates/recipe.html       |  2 +-
 lib/toaster/toastergui/templates/recipes.html      | 14 +++++
 lib/toaster/toastergui/templates/task.html         | 49 ++++++++-------
 lib/toaster/toastergui/templates/tasks.html        | 15 +++++
 lib/toaster/toastergui/templatetags/projecttags.py | 27 +++++++++
 lib/toaster/toastergui/views.py                    |  6 +-
 19 files changed, 213 insertions(+), 116 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/19 toaster: fix target file inode type information

From: Alexandru DAMIAN <[email protected]>

This patches fixes the inode type saved when writing the target file list information.

---
 lib/bb/ui/buildinfohelper.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
lib/bb/ui/buildinfohelper.py +4 -4
index 8f091e8..b5e75d9 100644
@@ -235,11 +235,11 @@ class ORMWrapper(object):
             path = d[4].lstrip(".")
             parent_path = "/".join(path.split("/")[:len(path.split("/")) - 1])
             inodetype = Target_File.ITYPE_REGULAR
-            if permission.startswith('b'):
+            if d[0].startswith('b'):
                 inodetype = Target_File.ITYPE_BLOCK
-            if permission.startswith('c'):
+            if d[0].startswith('c'):
                 inodetype = Target_File.ITYPE_CHARACTER
-            if permission.startswith('p'):
+            if d[0].startswith('p'):
                 inodetype = Target_File.ITYPE_FIFO
 
             tf_obj = Target_File.objects.create(
@@ -286,7 +286,7 @@ class ORMWrapper(object):
                         target = target_obj,
                         path = path,
                         size = size,
-                        inodetype = Target_File.ITYPE_REGULAR,
+                        inodetype = Target_File.ITYPE_SYMLINK,
                         permission = permission,
                         owner = user,
                         group = group,
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 2/19 toaster: improve recipe matching for native tasks

From: Alexandru DAMIAN <[email protected]>

This patch improves the recipe matching algorithm for for matching recipes for native tasks.

---
 lib/bb/ui/buildinfohelper.py | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
lib/bb/ui/buildinfohelper.py +12 -6
index b5e75d9..15bc069 100644
@@ -33,6 +33,9 @@ from toaster.orm.models import Task_Dependency, Package_Dependency
 from toaster.orm.models import Recipe_Dependency
 from bb.msg import BBLogFormatter as format
 
+class NotExisting(Exception):
+    pass
+
 class ORMWrapper(object):
     """ This class creates the dictionaries needed to store information in the database
         following the format defined by the Django models. It is also used to save this
@@ -111,7 +114,8 @@ class ORMWrapper(object):
 
         if must_exist and created:
             task_information['debug'] = "build id %d, recipe id %d" % (task_information['build'].pk, task_information['recipe'].pk)
-            raise Exception("Task object created when expected to exist", task_information)
+            task_object.delete()
+            raise NotExisting("Task object created when expected to exist", task_information)
 
         for v in vars(task_object):
             if v in task_information.keys():
@@ -142,12 +146,14 @@ class ORMWrapper(object):
         assert 'layer_version' in recipe_information
         assert 'file_path' in recipe_information
 
+
         recipe_object, created = Recipe.objects.get_or_create(
                                          layer_version=recipe_information['layer_version'],
                                          file_path=recipe_information['file_path'])
 
         if must_exist and created:
-            raise Exception("Recipe object created when expected to exist", recipe_information)
+            recipe_object.delete()
+            raise NotExisting("Recipe object created when expected to exist", recipe_information)
 
         for v in vars(recipe_object):
             if v in recipe_information.keys():
@@ -639,7 +645,7 @@ class BuildInfoHelper(object):
         identifier = event.taskfile + ":" + event.taskname
 
         recipe_information = self._get_recipe_information_from_taskfile(event.taskfile)
-        recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
+        recipe = self.orm_wrapper.get_update_recipe_object(recipe_information, True)
 
         task_information = self._get_task_information(event, recipe)
         task_information['outcome'] = Task.OUTCOME_NA
@@ -679,9 +685,9 @@ class BuildInfoHelper(object):
             recipe_information = self._get_recipe_information_from_taskfile(taskfile)
             try:
                 recipe = self.orm_wrapper.get_update_recipe_object(recipe_information, True)
-            except Exception:
-                # we cannot find the recipe information for the task, we move on to the next task
-                continue
+            except NotExisting:
+                recipe = Recipe.objects.get(layer_version = recipe_information['layer_version'],
+                            file_path__endswith = recipe_information['file_path'])
 
             task_information = {}
             task_information['build'] = self.internal_state['build']
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH 3/19 toaster: Move <tbody> outside for statement

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In the package details pages, the <tbody> tags where inside the for statements, which caused multiple <tbody> tags to be generated inside a single table.

To make sure only one <tbody> tag exists per table, moving the <tbody> tag outside the for statement.

---
 .../templates/package_built_dependencies.html      | 70 +++++++++++-----------
 .../toastergui/templates/package_built_detail.html | 10 ++--
 .../templates/package_included_dependencies.html   | 19 +++---
 .../templates/package_included_detail.html         |  8 +--
 .../package_included_reverse_dependencies.html     |  8 +--
 5 files changed, 56 insertions(+), 59 deletions(-)
lib/toaster/toastergui/templates/package_built_dependencies.html +34 -36
index c67f60e..4932f74 100644
@@ -35,8 +35,8 @@
                             <th>Size</th>
                         </tr>
                     </thead>
-                    {% for runtime_dep in runtime_deps %}
-                        <tbody>
+                    <tbody>
+						{% for runtime_dep in runtime_deps %}
                             {% ifequal runtime_dep.version '' %}
                                 <tr class="muted">
                                     <td>{{runtime_dep.name}}</td>
@@ -55,8 +55,8 @@
                                     <td>{{runtime_dep.size|filtered_filesizeformat}}</td>
                                 </tr>
                             {% endifequal %}
-                        </tbody>
-                    {% endfor %}
+						{% endfor %}
+                    </tbody>    
                 </table>
             {% endifequal %}
             {% ifnotequal other_deps|length 0 %}
@@ -67,43 +67,41 @@
                             <th>Package</th>
                             <th>Version</th>
                             <th>Size</th>
-
                             <th>
                                 <i class="icon-question-sign get-help" title="There are 5 relationship types: recommends, suggests, provides, replaces and conflicts"></i>
                                 Relationship type
                             </th>
                         </tr>
-                    </thead>
-
-                    {% for other_dep in other_deps %}
-                        <tbody>
-                        {% ifequal other_dep.version '' %}
-                            <tr class="muted">
-                                <td>{{other_dep.name}}</td>
-                                <td>{{other_dep.version}}</td>
-                                <td></td>
-                                <td>
-                                    {{other_dep.dep_type_display}}
-                                    <i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
-                                </td>
-                            </tr>
-                        {% else %}
-                            <tr>
-                                <td>
-                                    <a href="{% url 'package_built_detail' build.id other_dep.depends_on_id %}">
-                                        {{other_dep.name}}
-                                    </a>
-                                </td>
-                                <td>{{other_dep.version}}</td>
-                                <td>{{other_dep.size|filtered_filesizeformat}}</td>
-                                <td>
-                                    {{other_dep.dep_type_display}}
-                                    <i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
-                                </td>
-                            </tr>
-                        </tbody>
-                        {% endifequal %}
-                    {% endfor %}
+                    </thead>       
+                    <tbody>
+						{% for other_dep in other_deps %}
+                        	{% ifequal other_dep.version '' %}
+                            	<tr class="muted">
+                                	<td>{{other_dep.name}}</td>
+                                	<td>{{other_dep.version}}</td>
+                                	<td></td>
+                                	<td>
+                                    	{{other_dep.dep_type_display}}
+                                    	<i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
+                                	</td>
+                            	</tr>
+                        	{% else %}
+                            	<tr>
+                                	<td>
+                                    	<a href="{% url 'package_built_detail' build.id other_dep.depends_on_id %}">
+                                        	{{other_dep.name}}
+                                    	</a>
+                                	</td>
+                                	<td>{{other_dep.version}}</td>
+                                	<td>{{other_dep.size|filtered_filesizeformat}}</td>
+                                	<td>
+                                    	{{other_dep.dep_type_display}}
+                                    	<i class="icon-question-sign get-help hover-help" title="{{other_dep.dep_type_help}}" ></i>
+                                	</td>
+                            	</tr>
+                        	{% endifequal %}
+                    	{% endfor %}
+                    </tbody>
                 </table>
                 {% endifnotequal %}
             </div> <!-- tab-pane -->
lib/toaster/toastergui/templates/package_built_detail.html +5 -5
index fe856a3..b50ef53 100644
@@ -29,15 +29,15 @@
                             <th>File</th>
                             <th>Size</th>
                         </tr>
-                    </thead>
-                    {% for file in package.buildfilelist_package.all|dictsort:"path" %}
-                        <tbody>
+                    </thead>                   
+                    <tbody>
+						{% for file in package.buildfilelist_package.all|dictsort:"path" %}
                             <tr>
                                 <td>{{file.path}}</td>
                                 <td>{{file.size|filtered_filesizeformat}}</td>
                             </tr>
-                        </tbody>
-                    {% endfor %}
+						{% endfor %}
+                    </tbody>
                 </table>
 
             {% else %}
lib/toaster/toastergui/templates/package_included_dependencies.html +9 -10
index c8c2ddd..00d42e7 100644
@@ -21,8 +21,8 @@
                         <th>Size</th>
                     </tr>
                 </thead>
-                {% for runtime_dep in runtime_deps %}
-                    <tbody>
+                <tbody>
+					{% for runtime_dep in runtime_deps %}
                         <tr>
                             <td>
                                <a href="{% url 'package_included_detail' build.id target.id runtime_dep.depends_on_id %}">
@@ -32,8 +32,8 @@
                             <td>{{runtime_dep.version}}</td>
                             <td>{{runtime_dep.size|filtered_filesizeformat}}</td>
                         </tr>
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                 </tbody>                
             </table>
         {% else %}
             <div class="alert alert-info">
@@ -54,10 +54,9 @@
                             Relationship type
                         </th>
                     </tr>
-                </thead>
-
-                {% for other_dep in other_deps %}
-                    <tbody>
+                </thead>               
+                <tbody>
+					{% for other_dep in other_deps %}
                         {% if other_dep.installed %}
                             <tr>
                                 <td>
@@ -83,8 +82,8 @@
                                 </td>
                             </tr>
                         {% endif %}
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                </tbody>               
             </table>
         {% endifnotequal %}
         </div> <!-- end tab-pane -->
lib/toaster/toastergui/templates/package_included_detail.html +4 -4
index 018de3e..af56b21 100644
@@ -20,8 +20,8 @@
                         <th>Size</th>
                     </tr>
                 </thead>
-                {% for file in package.buildfilelist_package.all|dictsort:"path" %}
-                    <tbody>
+                <tbody>
+					{% for file in package.buildfilelist_package.all|dictsort:"path" %}
                         <tr>
                             <td>
                                 <a href="{% url 'image_information_dir' build.id target.id file.id %}">
@@ -30,8 +30,8 @@
                              </td>
                             <td>{{file.size|filtered_filesizeformat}}</td>
                         </tr>
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                </tbody>
             </table>
 
             {% else %}
lib/toaster/toastergui/templates/package_included_reverse_dependencies.html +4 -4
index 9cfc7fe..8ae0af3 100644
@@ -26,8 +26,8 @@
                         <th>Size</th>
                     </tr>
                 </thead>
-                {% for reverse_dep in reverse_deps|dictsort:"name" %}
-                    <tbody>
+                <tbody>
+					{% for reverse_dep in reverse_deps|dictsort:"name" %}
                         <tr>
                             <td>
                                 <a href="{% url 'package_included_detail' build.id target.id reverse_dep.dependent_id %}">
@@ -37,8 +37,8 @@
                             <td>{{reverse_dep.version}}</td>
                             <td>{{reverse_dep.size|filtered_filesizeformat}}</td>
                         </tr>
-                    </tbody>
-                {% endfor %}
+					{% endfor %}
+                </tbody>
             </table>
         {% endifequal %}
         </div> <!-- end tab-pane -->
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH 4/19 toaster: Make Order column part of the minimum table

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

The Order column in the tasks table should be always shown and be part of the minimum table (i.e. its checkbox should be disabled in the Edit columns menu). Changing views.py to make sure this is the case.

---
 lib/toaster/toastergui/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/views.py +1 -1
index 7f61ade..bf7f2c8 100644
@@ -514,7 +514,7 @@ def tasks_common(request, build_id, variant):
         'clclass': 'order', 'hidden' : 1,
         'orderfield':_get_toggle_order(request, "order"),
         'ordericon':_get_toggle_order_icon(request, "order")}
-    if 'tasks' == variant: tc_order['hidden']='0';
+    if 'tasks' == variant: tc_order['hidden']='0'; del tc_order['clclass']
     tc_recipe={
         'name':'Recipe',
         'qhelp':'The name of the recipe to which each task applies',
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH 5/19 toaster: Format package size in recipe.html

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Package sizes in the recipe details page (recipe.html) were displaying in bytes. Apply the filtered_filesizeformat project tag to show the package size in a more human readable format.

---
 lib/toaster/toastergui/templates/recipe.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/recipe.html +1 -1
index 29c9728..716ddfa 100644
@@ -159,7 +159,7 @@
                     <tr>
                         <td><a href="{% url "package_built_detail" build.pk package.pk %}">{{package.name}}</a></td>
                         <td><a href="{% url "package_built_detail" build.pk package.pk %}">{{package.version}}_{{package.revision}}</a></td>
-                        <td><a href="{% url "package_built_detail" build.pk package.pk %}">{{package.size}}</a></td>
+                        <td><a href="{% url "package_built_detail" build.pk package.pk %}">{{package.size|filtered_filesizeformat}}</a></td>
                     </tr>
 
                     {% endfor %}
Signature · 1 line
1.8.3.2
#6 lore raw

PATCH 6/19 toaster: Replace hyphens with underscores in package name

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Package details pages were using hyphens to separate package name from package version. Changing them to underscores.

---
 lib/toaster/toastergui/templates/package_detail_base.html             | 4 ++--
 lib/toaster/toastergui/templates/package_included_dependencies.html   | 4 ++--
 lib/toaster/toastergui/templates/package_included_detail.html         | 4 ++--
 .../toastergui/templates/package_included_reverse_dependencies.html   | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
lib/toaster/toastergui/templates/package_detail_base.html +2 -2
index a7aaab6..79f135c 100644
@@ -2,7 +2,7 @@
 {% load projecttags %}
 
 {% block localbreadcrumb %}
-{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
+{% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
     {% if target %}
         <li><a href="{% url "target" build.id target.id %}">{{target.target}}</a></li>
     {% else %}
@@ -13,7 +13,7 @@
 {% endblock localbreadcrumb %}
 
 {% block pagedetailinfomain %}
-{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
+{% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
 
     <div class="row span11">
         <div class="page-header">
lib/toaster/toastergui/templates/package_included_dependencies.html +2 -2
index 00d42e7..71043ec 100644
@@ -2,13 +2,13 @@
 {% load projecttags %}
 
 {% block title %}
-    {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
+    {% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
         <h1>{{fullPackageSpec}} <small>({{target.target}})</small></h1>
     {% endwith %}
 {% endblock title %}
 
 {% block tabcontent %}
-    {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %}
+    {% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %}
     {% include "package_included_tabs.html" with active_tab="dependencies" %}
     <div class="tab-content">
        <div class="tab-pane active" id="dependencies">
lib/toaster/toastergui/templates/package_included_detail.html +2 -2
index af56b21..df25885 100644
@@ -2,13 +2,13 @@
 {% load projecttags %}
 
 {% block title %}
-{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
+{% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec %}
         <h1>{{fullPackageSpec}} <small>({{target.target}})</small></h1>
 {% endwith %}
 {% endblock title %}
 
 {% block tabcontent %}
-{% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %}
+{% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %}
     {% include "package_included_tabs.html" with active_tab="detail" %}
     <div class="tab-content">
         <div class="tab-pane active" id="files">
lib/toaster/toastergui/templates/package_included_reverse_dependencies.html +2 -2
index 8ae0af3..d0edeb5 100644
@@ -2,13 +2,13 @@
 {% load projecttags %}
 
 {% block title %}
-    {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec  %}
+    {% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec  %}
         <h1>{{fullPackageSpec}} <small>({{target.target}})</small></h1>
     {% endwith %}
 {% endblock title %}
 
 {% block tabcontent %}
-    {% with fullPackageSpec=package.name|add:"-"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %}
+    {% with fullPackageSpec=package.name|add:"_"|add:package.version|add:"-"|add:package.revision|filtered_packagespec packageFileCount=package.buildfilelist_package.count %}
     {% include "package_included_tabs.html" with active_tab="reverse" %}
     <div class="tab-content">
         <div class="tab-pane active" id="brought-in-by">
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH 7/19 toaster: Small tweaks to the no results page

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Correctly align the Search button to the text input field, add .btn class to the clear search button, replace the placeholder attribute with the value attribute so that you can edit your search query, remove the clear search button from the tab index so that you don't clear the search by mistake and edit the margins of the .no-results class.

Conflicts:
bitbake/lib/toaster/toastergui/templates/build.html

---
 lib/toaster/toastergui/static/css/default.css |  2 +-
 lib/toaster/toastergui/templates/build.html   | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)
lib/toaster/toastergui/static/css/default.css +1 -1
index 76d6cb9..2b47aff 100644
@@ -102,7 +102,7 @@ select { width: auto; }
 .progress { margin-bottom: 0px; }
 .lead .badge { font-size: 18px; font-weight: normal; border-radius: 15px; padding: 9px; }
 .well > .lead, .alert .lead { margin-bottom: 0px; }
-.no-results { margin: 10px 0 0; }
+.no-results { margin: 10px 0; }
 .task-name { margin-left: 7px; }
 
 
lib/toaster/toastergui/templates/build.html +5 -7
index 85de98a..f0ef4d4 100644
@@ -68,13 +68,11 @@
  {% if objects.paginator.count == 0 %}
   <div class="row-fluid">
       <div class="alert">
-      <form class="no-results" id="searchform">
-          <div class="input-append">
-              <input id="search" name="search" class="input-xxlarge" type="text" placeholder="{{request.GET.search}}" />{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on"><i class="icon-remove"></i></a>{% endif %}
-              <input class="btn" type="submit" value="Search"/>
-              <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button>
-          </div>
-      </form>
+        <form class="no-results input-append" id="searchform">
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
+            <button class="btn" type="submit" value="Search">Search</button>
+            <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button>
+        </form>
       </div>
   </div>
 
Signature · 1 line
1.8.3.2
#8 lore raw

PATCH 8/19 toaster: Amend help text in package_built_detail.html

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Matching the help text in the tabs to the design specification.

---
 lib/toaster/toastergui/templates/package_built_detail.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/toaster/toastergui/templates/package_built_detail.html +2 -2
index b50ef53..d8f0b75 100644
@@ -8,11 +8,11 @@
             {# Not included case #}
             <ul class="nav nav-pills">
                 <li class="active"> <a href="#">
-                    <i class="icon-question-sign get-help" data-toggle="tooltip" title="Shows the files produced by this package."></i>
+                    <i class="icon-question-sign get-help" data-toggle="tooltip" title="Files that would be added to a root file system if you were to include {{package.name}} in an image"></i>
                     Generated files ({{packageFileCount}})
                 </a></li>
                 <li class=""><a href="{% url 'package_built_dependencies' build.id package.id %}">
-                    <i class="icon-question-sign get-help" data-toggle="tooltip" title="Shows the runtime packages required by this package."></i>
+                    <i class="icon-question-sign get-help" data-toggle="tooltip" title="Projected runtime dependencies if you were to include {{package.name}} in an image"></i>
                     Runtime dependencies ({{dependency_count}})
                 </a></li>
             </ul>
Signature · 1 line
1.8.3.2
#9 lore raw

PATCH 9/19 toaster: Fixing "Show all builds" link

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Replacing the placeholder attribute with the value attribute in the no search results page broke the "Show all builds" link. This change applies the inline javacript used for the clear search button for the "Show all builds" link, which fixes the problem.

---
 lib/toaster/toastergui/templates/build.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/build.html +1 -1
index f0ef4d4..3c9256c 100644
@@ -71,7 +71,7 @@
         <form class="no-results input-append" id="searchform">
             <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
             <button class="btn" type="submit" value="Search">Search</button>
-            <button class="btn btn-link" onclick="javascript:reload_params({'search':'', 'filter':''})">Show all builds</button>
+            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
         </form>
       </div>
   </div>
Signature · 1 line
1.8.3.2
#10 lore raw

PATCH 10/19 toaster: Add no search results page

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Adding the no search results page to the built packages (bpackage.html), variables (configvars.html), recipes (recipes.html) and tasks (tasks.html) tables.

The change copies the code from the build.html template into the other 4 templates. There is probably a smarter way of doing this, though.

---
 lib/toaster/toastergui/templates/bpackage.html   | 13 +++++++++++++
 lib/toaster/toastergui/templates/configvars.html | 14 ++++++++++++++
 lib/toaster/toastergui/templates/recipes.html    | 14 ++++++++++++++
 lib/toaster/toastergui/templates/tasks.html      | 15 +++++++++++++++
 4 files changed, 56 insertions(+)
lib/toaster/toastergui/templates/bpackage.html +13 -0
index 1eb1f8e..54f4bb4 100644
@@ -20,6 +20,18 @@
  </h1>
 </div>
 
+{% if objects.paginator.count == 0 %}
+  <div class="row-fluid">
+      <div class="alert">
+        <form class="no-results input-append" id="searchform">
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <button class="btn" type="submit" value="Search">Search</button>
+            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button>
+        </form>
+      </div>
+  </div>
+  
+{% else %}
 {% include "basetable_top.html" %}
 
     {% for package in objects %}
@@ -69,5 +81,6 @@
     {% endfor %}
 
 {% include "basetable_bottom.html" %}
+{% endif %}
 </div>
 {% endblock %}
lib/toaster/toastergui/templates/configvars.html +14 -0
index ecd5a0f..5c552c9 100644
@@ -30,6 +30,19 @@
 
   <!-- variables -->
   <div id="variables" class="tab-pane">
+  
+  {% if objects.paginator.count == 0 %}
+  <div class="row-fluid">
+      <div class="alert">
+        <form class="no-results input-append" id="searchform">
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <button class="btn" type="submit" value="Search">Search</button>
+            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
+        </form>
+      </div>
+  </div>
+  
+  {% else %}
   {% include "basetable_top.html" %}
 
   {% for variable in objects %}
@@ -52,6 +65,7 @@
 {% endfor %}
 
 {% include "basetable_bottom.html" %}
+{% endif %}
 </div> <!-- endvariables -->
 
 <!-- file list popups -->
lib/toaster/toastergui/templates/recipes.html +14 -0
index 724bcf5..da5ac99 100755
@@ -19,6 +19,19 @@
   {%endif%}
  </h1>
 </div>
+
+{% if objects.paginator.count == 0 %}
+  <div class="row-fluid">
+      <div class="alert">
+        <form class="no-results input-append" id="searchform">
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <button class="btn" type="submit" value="Search">Search</button>
+            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all recipes</button>
+        </form>
+      </div>
+  </div>
+
+{% else %}
 {% include "basetable_top.html" %}
 
     {% for recipe in objects %}
@@ -80,5 +93,6 @@
     {% endfor %}
 
 {% include "basetable_bottom.html" %}
+{% endif %}
 </div>
 {% endblock %}
lib/toaster/toastergui/templates/tasks.html +15 -0
index ce75b75..f484867 100644
@@ -17,6 +17,20 @@
   {%endif%}
  </h1>
 </div>
+
+{% if objects.paginator.count == 0 %}
+  <div class="row-fluid">
+      <div class="alert">
+        <form class="no-results input-append" id="searchform">
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <button class="btn" type="submit" value="Search">Search</button>
+            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all tasks</button>
+        </form>
+      </div>
+  </div>
+
+
+{% else %}
 {% include "basetable_top.html" %}
 
     {% for task in objects %}
@@ -58,5 +72,6 @@
     {% endfor %}
 
 {% include "basetable_bottom.html" %}
+{% endif %}
 </div>
 {% endblock %}
Signature · 1 line
1.8.3.2
#11 lore raw

PATCH 11/19 toaster: Give an extra space to the caret

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In the "Collapse variable value" button in configvars.html, the caret was too close to the button label. Giving it a bit of extra space.

---
 lib/toaster/toastergui/templates/configvars.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/configvars.html +1 -1
index 5c552c9..ae77be8 100644
@@ -92,7 +92,7 @@
                         <a class="btn btn-mini full-show">...</a>
                     </span>
                 </p>
-                <a class="btn btn-mini full-hide">Collapse variable value<i class="icon-caret-up"></i>
+                <a class="btn btn-mini full-hide">Collapse variable value <i class="icon-caret-up"></i>
                 </a>
               {% endif %}
             {% else %}
Signature · 1 line
1.8.3.2
#12 lore raw

PATCH 12/19 toaster: Shorten dependency labels

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Changing "Task depends on" to "Dependencies" and "Task reverse dependencies" to "Reverse dependencies". This matches the labeling to recipe and package information, with the additional advantage of making the labels shorter.

---
 lib/toaster/toastergui/templates/task.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/toaster/toastergui/templates/task.html +2 -2
index 5d79d44..403bb03 100644
@@ -214,7 +214,7 @@
 -->
     <dt>
         <i class="icon-question-sign get-help" title="Task dependency chain (other tasks)"></i>
-        Task depends on
+        Dependencies
     </dt>
     <dd>
         <ul>
@@ -227,7 +227,7 @@
     </dd>
     <dt>
         <i class="icon-question-sign get-help" title="Which other tasks depend on this task"></i>
-        Task reverse dependencies
+        Reverse dependencies
     </dt>
     <dd>
         <ul>
Signature · 1 line
1.8.3.2
#13 lore raw

PATCH 13/19 toaster: Presentation fixes for task.html

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Tidying up the presentation in the task.html template. The changes include:

* Correct the markup for the help tooltips
* Fix the help content for the outcome heading
* Make sure <dt> tags do not show for empty log file, time, cpu and disk I/O values
* Eliminate an extra <dl> for tasks with sstate attempts
* Add <strong> tag to the sstate restored alert
* Replace the .alert-info class with the .muted class for the no dependencies messages
* Make sure the Executed heading does not inherit the .red class for failed tasks
* Format time and cpu values to make sure they only show 2 decimal digits

---
 lib/toaster/toastergui/static/css/default.css      |  2 +-
 lib/toaster/toastergui/templates/task.html         | 36 +++++++++++++---------
 lib/toaster/toastergui/templatetags/projecttags.py |  6 ++--
 3 files changed, 26 insertions(+), 18 deletions(-)
lib/toaster/toastergui/static/css/default.css +1 -1
index 2b47aff..7db156a 100644
@@ -30,7 +30,7 @@ dd code, .alert code { white-space: pre-wrap; word-break: break-all; word-wrap:
 .tooltip code { background-color: transparent; color: #FFFFFF; font-weight: normal; border: none; font-size: 1em; }
 
 /* Style for definition lists */
-dd ul { list-style-type: none; margin-left: 0px; }
+dd ul { list-style-type: none; margin: 0px; }
 dt, dd  {line-height: 25px; }
 dd li { line-height: 25px; }
 dd p { line-height: 20px; }
lib/toaster/toastergui/templates/task.html +22 -14
index 403bb03..af994fd 100644
@@ -23,12 +23,14 @@
 {%if task.task_executed %}
     {# executed tasks outcome #}
     <dl class="dl-horizontal">
+	{% if task.logfile %}
         <dt>
-            <i class="icon-question-sign get-help" title="" data-original-title="The location in disk of the task log file"></i> Log file
+            <i class="icon-question-sign get-help" title="The location in disk of the task log file"></i> Log file
         </dt>
         <dd>
             <code>{{task.logfile}}</code>
         </dd>
+	{% endif %}
         {# show stack trace for failed task #}
         {% if task.outcome == task.OUTCOME_FAILED and log_head %}
             <h3>Python stack trace</h3>
@@ -47,7 +49,7 @@
             <a class="btn" href="javascript:reload_params({'show_matches' : 'true' })">Match to tasks in previous builds <i class="icon-question-sign get-help" style="margin-top:20px;" data-toggle="tooltip" title="This will show you a list of tasks from previous builds with the same inputs signature as this prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i></a>
         {% elif matching_tasks %}
             <h3 class="details">Prebuilt task could be based on
-                <i class="icon-question-sign get-help heading-help" title="" data-toggle="tooltip" data-original-title="This table shows a list of tasks from previous builds with the same inputs signature as the prebuilt task. Any of them could be the task that generated the output the prebuilt task is reusing"></i>
+                <i class="icon-question-sign get-help heading-help" title="This table shows a list of tasks from previous builds with the same inputs signature as the prebuilt task. Any of them could be the task that generated the output the prebuilt task is reusing"></i>
             </h3>
             <table class="table table-bordered table-hover">
                 <thead>
@@ -85,7 +87,7 @@
                                 <a href="{%url "task" match.build.pk match.pk%}">{{match.get_executed_display}}</a>
                             </td>
                             <td>
-                                <a href="{%url "task" match.build.pk match.pk%}">{{match.get_outcome_display}}</a><i class="icon-question-sign get-help hover-help" title="" style="visibility: hidden;" data-original-title="{{match.outcome_help}}"></i>
+                                <a href="{%url "task" match.build.pk match.pk%}">{{match.get_outcome_display}}</a><i class="icon-question-sign get-help hover-help" title="{{match.outcome_help}}"></i>
                             </td>
                             <td>
                                 <a href="{%url "task" match.build.pk match.pk%}">{{match.build.completed_on|date:"d/m/y H:i"}}</a>
@@ -103,7 +105,7 @@
     {% elif task.outcome == task.OUTCOME_COVERED %}
         <dl class="dl-horizontal">
             <dt>
-                <i class="icon-question-sign get-help" title="" data-toggle="tooltip" data-original-title="The task providing the outcome of this task"></i>Task covered by
+                <i class="icon-question-sign get-help" title="The task providing the outcome of this task"></i> Task covered by
             </dt>
             <dd>
                 <ul>
@@ -114,7 +116,7 @@
     {%elif task.outcome == task.OUTCOME_CACHED%}
         <dl class="dl-horizontal">
             <dt>
-                <i class="icon-question-sign get-help" title="" data-original-title="The location in disk of the task log file"></i> Log file
+                <i class="icon-question-sign get-help" title="The location in disk of the task log file"></i> Log file
             </dt>
             <dd>
                 <code>{% for t in task.get_related_setscene %} {{t.logfile}}<br/>{% endfor %}
@@ -132,10 +134,10 @@
 <h2 {{task|task_color}}>
     {% if task.task_executed %}
         Executed
-        <i class="icon-question-sign get-help heading-help" title="" data-original-title="Executed tasks are those that need to run in order to generate the task output"></i>
+        <i class="icon-question-sign get-help heading-help" title="Executed tasks are those that need to run in order to generate the task output"></i>
      {% else %}
         Not Executed
-        <i class="icon-question-sign get-help heading-help" title="" data-original-title="Not executed tasks don't need to run because their outcome is provided by another task"></i>
+        <i class="icon-question-sign get-help heading-help" title="Not executed tasks don't need to run because their outcome is provided by another task"></i>
      {% endif %}
 </h2>
 <dl class="dl-horizontal">
@@ -146,12 +148,12 @@
     <dd>
         {{task.sstate_checksum}}
     </dd>
-</dl>
     {% if task.sstate_result != task.SSTATE_NA %}
+		</dl>
         <div class="alert alert-info">Attempting to restore output from sstate cache
             <i class="icon-question-sign get-help get-help-blue" title="The build system is searching for the task output in your <code>sstate-cache</code> directory and mirrors. If it finds it, it will use it instead of building it from scratch by running the real task. This makes the build faster"></i>
         </div>
-        <dl class="dl-horizontal">
+		<dl class="dl-horizontal">
             <dt>
                 <i class="icon-question-sign get-help" title="The name of the file searched for in your <code>sstate-cache</code> directory and mirrors"></i>
                 File searched for
@@ -189,7 +191,7 @@
         </div>
     {% elif task.sstate_result == task.SSTATE_RESTORED %}
         <div class="alert alert-info">
-            Output successfully restored from sstate cache.
+            Output <strong>successfully restored</strong> from sstate cache.
         </div>
     {% endif %}
     <dl class="dl-horizontal">
@@ -221,7 +223,7 @@
             {% for dep in deps %}
                 <li><a href="{%url 'task' dep.build.pk dep.pk%}" class="task-info" title="{{dep.get_executed_display}} | {{dep.get_outcome_display}}">{{dep.recipe.name}}_{{dep.recipe.version}} <span class="task-name">{{dep.task_name}}</span></a></li>
             {% empty %}
-                <li><p class="alert-info">This task has no dependencies</p></li>
+                <li class="muted">This task has no dependencies</li>
             {% endfor %}
         </ul>
     </dd>
@@ -234,7 +236,7 @@
             {% for dep in rdeps %}
                 <li><a href="{%url 'task' dep.build.pk dep.pk%}" class="task-info" title="{{dep.get_executed_display}} | {{dep.get_outcome_display}}">{{dep.recipe.name}}_{{dep.recipe.version}} <span class="task-name">{{dep.task_name}}</span></a></li>
             {% empty %}
-                <li><p class="alert-info">This task has no reverse dependencies</p></li>
+                <li class="muted">This task has no reverse dependencies</li>
             {% endfor %}
         </ul>
 </dl>
@@ -243,21 +245,27 @@
 {%if task.task_executed %}
     <h2 class="details">Performance</h2>
     <dl class="dl-horizontal">
+		{% if task.elapsed_time > 0.01 %}
         <dt>
             <i class="icon-question-sign get-help" title="How long it took the task to finish, expressed in seconds"></i>
             Time (secs)
         </dt>
-        <dd>{{task.elapsed_time|format_none_and_zero}}</dd>
+        <dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
+		{% endif %}	
+		{% if task.cpu_usage > 0 %}	
         <dt>
             <i class="icon-question-sign get-help" title="Task CPU utilisation, expressed as a percentage"></i>
             CPU usage
         </dt>
-        <dd>{{task.cpu_usage|format_none_and_zero}}</dd>
+        <dd>{{task.cpu_usage|format_none_and_zero|floatformat:2}}%</dd>
+		{% endif %}
+		{% if task.disk_io > 0 %}
         <dt>
             <i class="icon-question-sign get-help" title="Number of miliseconds the task spent doing disk input and output"></i>
             Disk I/O (ms)
         </dt>
         <dd>{{task.disk_io|format_none_and_zero}}</dd>
+		{% endif %}
     </dl>
 {%endif%}
 
lib/toaster/toastergui/templatetags/projecttags.py +3 -3
index 857680b..2d339d6 100644
@@ -70,16 +70,16 @@ def sortcols(tablecols):
     return sorted(tablecols, key = lambda t: t['name'])
 
 @register.filter
-def task_color(task_object, show_green=False):
+def task_color(task_object, show_colour=False):
     """ Return css class depending on Task execution status and execution outcome.
         By default, green is not returned for executed and successful tasks;
         show_green argument should be True to get green color.
     """
     if not task_object.task_executed:
         return 'class=muted'
-    elif task_object.outcome == task_object.OUTCOME_FAILED:
+    elif task_object.outcome == task_object.OUTCOME_FAILED and show_colour:
         return 'class=error'
-    elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_green:
+    elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_colour:
         return 'class=green'
     else:
         return ''
Signature · 1 line
1.8.3.2
#14 lore raw

PATCH 14/19 bitbake:toaster: Not using task_color tag for execution heading

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

The modifications to the task_color tag in commit 23a7c338d387ac2ba13a7a1114a4abc75228c960 broke the styling of failed tasks in the tasks.html template. Undo the changes to the task_color tag and use an if statement instead to set the .muted class when the execution heading says "Not executed".

---
 lib/toaster/toastergui/templates/task.html         | 9 +++++----
 lib/toaster/toastergui/templatetags/projecttags.py | 6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)
lib/toaster/toastergui/templates/task.html +5 -4
index af994fd..7c5b743 100644
@@ -131,15 +131,16 @@
 {% endif %}
 
 {# Execution section #}
-<h2 {{task|task_color}}>
     {% if task.task_executed %}
+	<h2>
         Executed
         <i class="icon-question-sign get-help heading-help" title="Executed tasks are those that need to run in order to generate the task output"></i>
-     {% else %}
+    {% else %}
+	<h2 class="muted">
         Not Executed
         <i class="icon-question-sign get-help heading-help" title="Not executed tasks don't need to run because their outcome is provided by another task"></i>
-     {% endif %}
-</h2>
+    {% endif %}
+	</h2>
 <dl class="dl-horizontal">
     <dt>
         <i class="icon-question-sign get-help" title="To make builds more efficient, the build system detects changes in the 'inputs' to a given task by creating a 'task signature'. If the signature changes, the build system assumes the inputs have changed and the task needs to be rerun"></i>
lib/toaster/toastergui/templatetags/projecttags.py +3 -3
index 2d339d6..857680b 100644
@@ -70,16 +70,16 @@ def sortcols(tablecols):
     return sorted(tablecols, key = lambda t: t['name'])
 
 @register.filter
-def task_color(task_object, show_colour=False):
+def task_color(task_object, show_green=False):
     """ Return css class depending on Task execution status and execution outcome.
         By default, green is not returned for executed and successful tasks;
         show_green argument should be True to get green color.
     """
     if not task_object.task_executed:
         return 'class=muted'
-    elif task_object.outcome == task_object.OUTCOME_FAILED and show_colour:
+    elif task_object.outcome == task_object.OUTCOME_FAILED:
         return 'class=error'
-    elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_colour:
+    elif task_object.outcome == task_object.OUTCOME_SUCCESS and show_green:
         return 'class=green'
     else:
         return ''
Signature · 1 line
1.8.3.2
#15 lore raw

PATCH 15/19 toaster: Fix Recipe sorting in tasks table

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In the tasks table and the other tables derived from it (Time, CPU usage and Disk I/O) sorting by Recipe was not working correctly. This change fixes the problem by specifying use of the recipe name to sort.

---
 lib/toaster/toastergui/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/toaster/toastergui/views.py +2 -2
index bf7f2c8..ddeb992 100644
@@ -518,8 +518,8 @@ def tasks_common(request, build_id, variant):
     tc_recipe={
         'name':'Recipe',
         'qhelp':'The name of the recipe to which each task applies',
-        'orderfield': _get_toggle_order(request, "recipe"),
-        'ordericon':_get_toggle_order_icon(request, "recipe"),
+        'orderfield': _get_toggle_order(request, "recipe__name"),
+        'ordericon':_get_toggle_order_icon(request, "recipe__name"),
     }
     tc_recipe_version={
         'name':'Recipe version',
Signature · 1 line
1.8.3.2
#16 lore raw

PATCH 16/19 toaster: Don't show clear search button if text input field is empty

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

The clear search button should only show when the search text input field is populated. If it is empty (as it happens when a filter returns no results) the clear search button should not display.

---
 lib/toaster/toastergui/templates/bpackage.html   | 2 +-
 lib/toaster/toastergui/templates/configvars.html | 2 +-
 lib/toaster/toastergui/templates/recipes.html    | 2 +-
 lib/toaster/toastergui/templates/tasks.html      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
lib/toaster/toastergui/templates/bpackage.html +1 -1
index 54f4bb4..7da8ce7 100644
@@ -24,7 +24,7 @@
   <div class="row-fluid">
       <div class="alert">
         <form class="no-results input-append" id="searchform">
-            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
             <button class="btn" type="submit" value="Search">Search</button>
             <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button>
         </form>
lib/toaster/toastergui/templates/configvars.html +1 -1
index ae77be8..d705253 100644
@@ -35,7 +35,7 @@
   <div class="row-fluid">
       <div class="alert">
         <form class="no-results input-append" id="searchform">
-            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
             <button class="btn" type="submit" value="Search">Search</button>
             <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
         </form>
lib/toaster/toastergui/templates/recipes.html +1 -1
index da5ac99..860d30d 100755
@@ -24,7 +24,7 @@
   <div class="row-fluid">
       <div class="alert">
         <form class="no-results input-append" id="searchform">
-            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
             <button class="btn" type="submit" value="Search">Search</button>
             <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all recipes</button>
         </form>
lib/toaster/toastergui/templates/tasks.html +1 -1
index f484867..d881811 100644
@@ -22,7 +22,7 @@
   <div class="row-fluid">
       <div class="alert">
         <form class="no-results input-append" id="searchform">
-            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
+            <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
             <button class="btn" type="submit" value="Search">Search</button>
             <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all tasks</button>
         </form>
Signature · 1 line
1.8.3.2
#17 lore raw

PATCH 17/19 toaster: Remove the data-toggle attribute

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Help icons with the .get-help class do not need the data-toggle attribute. That attribute initialises the Bootstrap tooltips, but they are already initialised in main.js for any element with the .get-help class.

---
 lib/toaster/toastergui/templates/basetable_top.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/basetable_top.html +1 -1
index e2549f7..9df3647 100644
@@ -75,7 +75,7 @@
         <!-- Table header row; generated from "tablecols" entry in the context dict -->
         <tr>
             {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
-                {%if tc.qhelp%}<i class="icon-question-sign get-help" data-toggle="tooltip" title="{{tc.qhelp}}"></i>{%endif%}
+                {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
                 {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })" >{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
                 {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}
                 {%if tc.filter%}<div class="btn-group pull-right">
Signature · 1 line
1.8.3.2
#18 lore raw

PATCH 18/19 toaster: Sort layers in alphabetical order

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In the Summary tab of the Configuration page, make sure that the table of layers is sorted by layer name in ascending alphabetical order.

---
 lib/toaster/toastergui/templates/configuration.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/configuration.html +1 -1
index ddfa5af..674f896 100644
@@ -49,7 +49,7 @@
           <th>Layer directory</th>
         </tr>
       </thead>
-      <tbody>{% for lv in build.layer_version_build.all %}
+      <tbody>{% for lv in build.layer_version_build.all|dictsort:"layer.name" %}
         <tr>
             <td>{{lv.layer.name}}</td>
             <td>{{lv.branch}}</td>
Signature · 1 line
1.8.3.2
#19 lore raw

PATCH 19/19 toaster: added file types to the Outputs column in the build page

In reply to Alex DAMIAN

From: Farrell Wymore <[email protected]>

The file types are displayed in the Outputs column in the build page. The file types are derived from the target image filenames.

[YOCTO #5947]

---
 lib/toaster/toastergui/templates/build.html        |  6 ++++-
 lib/toaster/toastergui/templatetags/projecttags.py | 27 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
lib/toaster/toastergui/templates/build.html +5 -1
index 3c9256c..f1fa70d 100644
@@ -92,7 +92,11 @@
             <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>
             <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
             <td class="log">{{build.cooker_log_path}}</td>
-            <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">TODO: compute image output fstypes</a>{% endif %}{% endfor %}{% endif %}</td>
+            <td class="output">
+              {% if build.outcome == 0 %}
+              {{build|get_image_extensions}}
+              {% endif %}
+            </td>
         </tr>
 
         {% endfor %}
lib/toaster/toastergui/templatetags/projecttags.py +27 -0
index 857680b..60d5dd0 100644
@@ -24,6 +24,8 @@ import re
 from django import template
 from django.utils import timezone
 from django.template.defaultfilters import filesizeformat
+from orm.models import Target_Installed_Package, Target_Image_File
+from orm.models import Build, Target, Task, Layer, Layer_Version
 
 register = template.Library()
 
@@ -188,3 +190,28 @@ def string_slice(strvar,slicevar):
     else:
         return strvar[int(first):int(last)]
 
[email protected]
+def get_image_extensions( build ):
+    """
+    This is a simple filter that returns a list (string)
+    of extensions of the build-targets-image files. Note
+    that each build can have multiple targets and each
+    target can yield more than one image file
+    """
+    targets = Target.objects.filter( build_id = build.id );
+    comma = "";
+    extensions = "";
+    for t in targets:
+        if ( not t.is_image ):
+            continue;
+        tif = Target_Image_File.objects.filter( target_id = t.id );
+        for i in tif:
+            try:
+                ndx = i.file_name.index( "." );
+            except ValueError:
+                ndx = 0;
+            s = i.file_name[ ndx + 1 : ];
+            extensions += comma + s;
+            comma = ", ";
+    return( extensions );
+
Signature · 1 line
1.8.3.2