Skip to contentSkip to conversation

please pull toaster patchset

PATCH New Alex DAMIAN 1 participant 6 messages Mar 25, 2014

lore
Share & tools
lore
#0 lore raw

cover please pull toaster patchset

From: Alexandru DAMIAN <[email protected]>

This is a patchset with UI fixes for Toaster. The patches have been reviewed on the mailing list.

Can you please pull ?

Thanks,
Alex

The following changes since commit bdbcd8866104c315fc9da631407d4280433dbfde:

hob: fix set_extra_setting function (2014-03-25 13:26:47 +0000)

are available in the git repository at:

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

Belen Barros Pena (4):
toaster: Change placeholder attribute in variables table
toaster: Remove commented-out code from views.py
toaster: Fix help text typos
toaster: Small fixes in tasks UI

Dave Lerner (1):
toaster: format packages with size = -1

 .../toastergui/templates/package_detail_base.html   |  2 +-
 .../templates/package_included_dependencies.html    | 19 ++++++++++++++++---
 .../package_included_reverse_dependencies.html      |  9 ++++++++-
 lib/toaster/toastergui/templates/recipe.html        |  6 ++++--
 lib/toaster/toastergui/templates/task.html          | 18 ++++++++----------
 lib/toaster/toastergui/templates/tasks.html         |  3 ++-
 lib/toaster/toastergui/templatetags/projecttags.py  | 21 ++++++++++++++++++++-
 lib/toaster/toastergui/views.py                     | 19 +++++++------------
 8 files changed, 66 insertions(+), 31 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/5 toaster: Change placeholder attribute in variables table

From: Belen Barros Pena <[email protected]>

Set placeholder attribute for the search input field in the variables table to "Search BitBake variables" as per the design specification.

[YOCTO #5998]

---
 lib/toaster/toastergui/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/views.py +1 -1
index e523c31..a9023a3 100644
@@ -1047,7 +1047,7 @@ def configvars(request, build_id):
 
     context = {
                 'objectname': 'configvars',
-                'object_search_display':'variables',
+                'object_search_display':'BitBake variables',
                 'filter_search_display':'variables',
                 'file_filter': file_filter,
                 'build': Build.objects.filter(pk=build_id)[0],
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 2/5 toaster: Remove commented-out code from views.py

From: Belen Barros Pena <[email protected]>

This code in the All tasks view class needed to be removed.

[YOCTO #6010]

---
 lib/toaster/toastergui/views.py | 5 -----
 1 file changed, 5 deletions(-)
lib/toaster/toastergui/views.py +0 -5
index a9023a3..3e59138 100644
@@ -732,11 +732,6 @@ def tasks_common(request, build_id, variant):
 
     tasks = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1))
 
-# Per Belen - do not show the covering task
-#    for t in tasks:
-#        if t.outcome == Task.OUTCOME_COVERED:
-#            t.provider = _find_task_provider(t)
-
     # define (and modify by variants) the 'tablecols' members
     tc_order={
         'name':'Order',
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH 3/5 toaster: Fix help text typos

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Fix a couple of typos in the help text of the builds and recipes tables.

---
 lib/toaster/toastergui/views.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
lib/toaster/toastergui/views.py +5 -5
index 3e59138..92814ce 100644
@@ -317,7 +317,7 @@ def builds(request):
                             }
                 },
                 {'name': 'Warnings', 'clclass': 'warnings_no',
-                 'qhelp': "How many warnigns were encountered during the build (if any)",
+                 'qhelp': "How many warnings were encountered during the build (if any)",
                  'orderfield': _get_toggle_order(request, "warnings_no", True),
                  'ordericon':_get_toggle_order_icon(request, "warnings_no"),
                  'filter' : {'class' : 'warnings_no',
@@ -942,26 +942,26 @@ def recipes(request, build_id):
             },
             {
                 'name':'Layer',
-                'qhelp':'The name of the layer prodiving the recipe',
+                'qhelp':'The name of the layer providing the recipe',
                 'orderfield': _get_toggle_order(request, "layer_version__layer__name"),
                 'ordericon':_get_toggle_order_icon(request, "layer_version__layer__name"),
                 'clclass': 'layer_version__layer__name', 'hidden': 0,
             },
             {
                 'name':'Layer branch',
-                'qhelp':'The Git branch of the layer prodiving the recipe',
+                'qhelp':'The Git branch of the layer providing the recipe',
                 'orderfield': _get_toggle_order(request, "layer_version__branch"),
                 'ordericon':_get_toggle_order_icon(request, "layer_version__branch"),
                 'clclass': 'layer_version__branch', 'hidden': 1,
             },
             {
                 'name':'Layer commit',
-                'qhelp':'The Git commit of the layer prodiving the recipe',
+                'qhelp':'The Git commit of the layer providing the recipe',
                 'clclass': 'layer_version__layer__commit', 'hidden': 1,
             },
             {
                 'name':'Layer directory',
-                'qhelp':'Location in disk of the layer prodiving the recipe',
+                'qhelp':'Location in disk of the layer providing the recipe',
                 'orderfield': _get_toggle_order(request, "layer_version__layer__local_path"),
                 'ordericon':_get_toggle_order_icon(request, "layer_version__layer__local_path"),
                 'clclass': 'layer_version__layer__local_path', 'hidden': 1,
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH 4/5 toaster: Small fixes in tasks UI

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

This commit:

* Fixes an issue with white space when showing the log in Cached tasks (task details page)

* Formats the no results alert of the "Prebuilt task could be based on" search in the task details page

* Brings in the task outcome help text to "Prebuilt task could be based on" table in the task details page, to the tasks table in the recipe details page, and to the all tasks page

* Adds the task_color tag to the "Prebuilt task could be based on" table in the task details page, so that each task gets the required visual treatment based on execution

* Makes sure performance information for not executed tasks shows in the task details page when it exists (empty tasks often report a short time, for example)

---
 lib/toaster/toastergui/templates/recipe.html |  6 ++++--
 lib/toaster/toastergui/templates/task.html   | 18 ++++++++----------
 lib/toaster/toastergui/templates/tasks.html  |  3 ++-
 3 files changed, 14 insertions(+), 13 deletions(-)
lib/toaster/toastergui/templates/recipe.html +4 -2
index 716ddfa..e367077 100644
@@ -117,11 +117,13 @@
 
                     <td><a {{ task|task_color }} href="{% url "task" build.pk task.pk %}">{{task.get_executed_display}}</a></td>
 
-                    <td><a {{ task|task_color }} href="{% url "task" build.pk task.pk %}">{{task.get_outcome_display}}</a></td>
+                    <td>
+                        <a {{ task|task_color }} href="{% url "task" build.pk task.pk %}">{{task.get_outcome_display}} </a>
+                        <i class="icon-question-sign get-help hover-help" title="{{task.get_outcome_help}}"></i>
+                    </td>
                     <td>
                         {% ifnotequal task.sstate_result task.SSTATE_NA %}
                         <a {{ task|task_color }} href="{% url "task" build.pk task.pk %}">{{task.get_sstate_result_display}}</a>
-                        <i class="icon-question-sign get-help hover-help" title="This task did not run because its outcome was reused from a previous build"></i>
                         {% endifnotequal %}
                     </td>
 
lib/toaster/toastergui/templates/task.html +8 -10
index 7c5b743..1a7e9d4 100644
@@ -76,7 +76,7 @@
                 </thead>
                 <tbody>
                     {% for match in matching_tasks %}
-                        <tr>
+                        <tr {{ match|task_color }}>
                             <td>
                                 <a href="{%url "task" match.build.pk match.pk%}">{{match.recipe.name}}</a>
                             </td>
@@ -87,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="{{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.get_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>
@@ -98,8 +98,8 @@
             </table>
         {% else %}
             <p class="alert">
-                We have found no tasks matching this prebuilt task.<br/>
-                The task you are looking for could belong to a build for which Toaster has not data.
+                <strong> We have found no tasks matching this prebuilt task</strong><br/>
+                The task you are looking for could belong to a build for which Toaster has no data.
             </p>
         {% endif %}
     {% elif task.outcome == task.OUTCOME_COVERED %}
@@ -119,8 +119,7 @@
                 <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 %}
-		</code>
+                <code>{% for t in task.get_related_setscene %} {{t.logfile}} {% endfor %}</code>
             </dd>
         </dl>
     {%elif task.outcome == task.OUTCOME_EMPTY%}
@@ -243,10 +242,11 @@
 </dl>
 
 {# Performance section - shown only for executed tasks #}
-{%if task.task_executed %}
+{%if task.elapsed_time or task.cpu_usage or task.disk_io %}
     <h2 class="details">Performance</h2>
+{% endif %}
     <dl class="dl-horizontal">
-		{% if task.elapsed_time > 0.01 %}
+		{% if task.elapsed_time %}
         <dt>
             <i class="icon-question-sign get-help" title="How long it took the task to finish, expressed in seconds"></i>
             Time (secs)
@@ -268,8 +268,6 @@
         <dd>{{task.disk_io|format_none_and_zero}}</dd>
 		{% endif %}
     </dl>
-{%endif%}
-
 
 </div>
 {% endblock %}
lib/toaster/toastergui/templates/tasks.html +2 -1
index a2629dc..ace30de 100644
@@ -51,7 +51,8 @@
                 <a href="{%url "task" build.pk task.pk%} ">{{task.get_executed_display}}</a>
             </td>
             <td class="outcome">
-                <a href="{%url "task" build.pk task.pk%} ">{{task.get_outcome_display}}</a>
+                <a href="{%url "task" build.pk task.pk%} ">{{task.get_outcome_display}} </a>
+                <i class="icon-question-sign get-help hover-help" title="{{task.get_outcome_help}}"></i>
             </td>
             <td class="cache_attempt">
                 <a href="{%url "task" build.pk task.pk%} ">{{task.get_sstate_result_display|format_none_and_zero}}</a>
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH 5/5 toaster: format packages with size = -1

In reply to Alex DAMIAN

From: Dave Lerner <[email protected]>

Packages that have a size of -1 are virtual packages with limited information. Such packages should be suppressed from the package list page for an image. On dependency and reverse dependency lists of package, such packages should appear in muted rows, without links, and with help information.

The formatting rules are encapsulated into projecttags filters when possible to minimize tests on size==-1 in the templates.

Testing the relevant pages with an HTML5 validator found a stray end tag in package_detail_base which has been fixed in this commit.

[YOCTO #5966]

---
 .../toastergui/templates/package_detail_base.html   |  2 +-
 .../templates/package_included_dependencies.html    | 19 ++++++++++++++++---
 .../package_included_reverse_dependencies.html      |  9 ++++++++-
 lib/toaster/toastergui/templatetags/projecttags.py  | 21 ++++++++++++++++++++-
 lib/toaster/toastergui/views.py                     |  2 +-
 5 files changed, 46 insertions(+), 7 deletions(-)
lib/toaster/toastergui/templates/package_detail_base.html +1 -1
index 79f135c..6925aec 100644
@@ -97,8 +97,8 @@
                     # decision on index search algorithm
                     <a href="http://layers.openembedded.org"  target="_blank">
                     <i class="icon-share get-info"></i>
-                    {% endcomment %}
                     </a>
+                    {% endcomment %}
                 {% endif %}
             </dd>
 
lib/toaster/toastergui/templates/package_included_dependencies.html +16 -3
index 71043ec..c76774a 100644
@@ -23,12 +23,19 @@
                 </thead>
                 <tbody>
 					{% for runtime_dep in runtime_deps %}
-                        <tr>
+                        <tr {{runtime_dep.size|format_vpackage_rowclass}} >
+                            {% if runtime_dep.size != -1 %}
                             <td>
                                <a href="{% url 'package_included_detail' build.id target.id runtime_dep.depends_on_id %}">
                                     {{runtime_dep.name}}
                                 </a>
                             </td>
+                            {% else %}
+                            <td>
+                                {{runtime_dep.name|format_vpackage_namehelp}}
+                            </td>
+                            {% endif %}
+
                             <td>{{runtime_dep.version}}</td>
                             <td>{{runtime_dep.size|filtered_filesizeformat}}</td>
                         </tr>
@@ -58,12 +65,18 @@
                 <tbody>
 					{% for other_dep in other_deps %}
                         {% if other_dep.installed %}
-                            <tr>
+                            <tr {{other_dep.size|format_vpackage_rowclass}}>
+                                {% if other_dep.size != -1 %}
                                 <td>
-                                   <a href="{% url 'package_included_detail' build.id target.id other_dep.depends_on_id %}">
+                                    <a href="{% url 'package_included_detail' build.id target.id other_dep.depends_on_id %}">
                                         {{other_dep.name}}
                                     </a>
                                 </td>
+                                {% else %}
+                                    <td>
+                                        {{other_dep.name|format_vpackage_namehelp}}
+                                    </td>
+                                {% endif %}
                                 <td>{{other_dep.version}}</td>
                                 <td>{{other_dep.size|filtered_filesizeformat}}</td>
                                 <td>
lib/toaster/toastergui/templates/package_included_reverse_dependencies.html +8 -1
index 0eb39d3..8653ae0 100644
@@ -28,12 +28,19 @@
                 </thead>
                 <tbody>
 					{% for reverse_dep in reverse_deps|dictsort:"name" %}
-                        <tr>
+                        <tr {{reverse_dep.size|format_vpackage_rowclass}} >
+                        {% if reverse_dep.size != -1 %}
                             <td>
                                 <a href="{% url 'package_included_detail' build.id target.id reverse_dep.dependent_id %}">
                                     {{reverse_dep.name}}
                                 </a>
                             </td>
+                            {% else %}
+                            <td>
+                                {{reverse_dep.name|format_vpackage_namehelp}}
+                            </td>
+                            {% endif %}
+
                             <td>{{reverse_dep.version}}</td>
                             <td>{{reverse_dep.size|filtered_filesizeformat}}</td>
                         </tr>
lib/toaster/toastergui/templatetags/projecttags.py +20 -1
index 12c2468..34c3c21 100644
@@ -110,8 +110,14 @@ def format_none_and_zero(value):
 
 @register.filter
 def filtered_filesizeformat(value):
-    """Change output from fileformatsize to suppress trailing '.0' and change 'bytes' to 'B'
     """
+    If the value is -1 return an empty string. Otherwise,
+    change output from fileformatsize to suppress trailing '.0'
+    and change 'bytes' to 'B'.
+    """
+    if value == -1:
+        return ''
+
     return filesizeformat(value).replace("bytes", "B").replace(".0", "")
 
 @register.filter
@@ -228,4 +234,17 @@ def filter_sizeovertotal(package_object, total_size):
   
     return '{:.1%}'.format(float(size)/float(total_size))
 
+from django.utils.safestring import mark_safe
[email protected]
+def format_vpackage_rowclass(size):
+    if size == -1:
+        return mark_safe('class="muted"')
+    return ''
 
[email protected]
+def format_vpackage_namehelp(name):
+    r =  name + '&nbsp;'
+    r += '<i class="icon-question-sign get-help hover-help"'
+    r += ' title = "' + name + ' only has dependency information available.">'
+    r += '</i>'
+    return mark_safe(r)
lib/toaster/toastergui/views.py +1 -1
index 92814ce..d1234fe 100644
@@ -425,7 +425,7 @@ def target(request, build_id, target_id):
     (filter_string, search_term, ordering_string) = _search_tuple(request, Package)
 
     # FUTURE:  get rid of nested sub-queries replacing with ManyToMany field
-    queryset = Package.objects.filter(id__in=Target_Installed_Package.objects.filter(target_id=target_id).values('package_id'))
+    queryset = Package.objects.filter(size__gte=0, id__in=Target_Installed_Package.objects.filter(target_id=target_id).values('package_id'))
     packages_sum =  queryset.aggregate(Sum('installed_size'))
     queryset = _get_queryset(Package, queryset, filter_string, search_term, ordering_string)
     packages = _build_page_range(Paginator(queryset, request.GET.get('count', 25)),request.GET.get('page', 1))
Signature · 1 line
1.8.3.2