Skip to contentSkip to conversation

Toaster patchset

PATCH New Alex DAMIAN 1 participant 15 messages Jan 27, 2015

lore
Share & tools
lore
#0 lore raw

cover Toaster patchset

From: Alexandru DAMIAN <[email protected]>

Hello,

This is a Toaster bug fixing patchset, clearing up issues in the Project interface.

The patches have been reviewed on the toaster mailing list. Can you please pull at your own convenience ?

Cheers,
Alex

The following changes since commit 9b5b1bd7d77e3f5886f6c557d3b750de1f6d6025:

siggen: Ensure taskdata default functions exist in base class (2015-01-23 14:39:40 +0000)

are available in the git repository at:

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

Alexandru DAMIAN (1):
toastergui: update project build listing

Alexandru Damian (1):
toasterui: do not filter images by extension

Belen Barros Pena (12):
toaster: make layouts consistent
toaster: apply common styles to right hand column of detail pages
toastergui: Generic message for the layer details empty states
toastergui: remove redundant style declaration
toastergui: consistent add / remove layer notifications
toastergui: give the add dependencies form some breathing space
toastergui: add 'show all' link to no results page
toastergui: set column width in layer details page
toastergui: hide table controls when when less than 10 entries
toastergui: consistent capitals in button
toastergui: remove recipe id links to the layer index
toastergui: alignment fix

 lib/bb/ui/buildinfohelper.py                       |   2 +-
 lib/toaster/bldcontrol/models.py                   |   9 ++
 lib/toaster/toastergui/static/css/default.css      |   5 +-
 lib/toaster/toastergui/static/js/layerdetails.js   |  14 +--
 .../toastergui/templates/baseprojectpage.html      |  12 +--
 .../toastergui/templates/buildrequestdetails.html  |  67 ++++++++++++++
 lib/toaster/toastergui/templates/layerdetails.html |  65 ++++++-------
 .../toastergui/templates/managed_builds.html       |  18 ++--
 .../toastergui/templates/managed_mrb_section.html  |  42 ++++++---
 .../toastergui/templates/package_detail_base.html  |   2 +-
 lib/toaster/toastergui/templates/project.html      |   4 +-
 .../toastergui/templates/projectbuilds.html        |  20 ++--
 lib/toaster/toastergui/templates/recipe.html       |   6 +-
 lib/toaster/toastergui/urls.py                     |   2 +
 lib/toaster/toastergui/views.py                    | 103 +++++++++++++--------
 15 files changed, 248 insertions(+), 123 deletions(-)
 create mode 100644 lib/toaster/toastergui/templates/buildrequestdetails.html
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/14 toaster: make layouts consistent

From: Belen Barros Pena <[email protected]>

The layer details page should have the same layout as all other detail pages (recipes, packages). For this to happen, the basebuilddetailpage.html and baseprojectpage.html templates should use the same layout, and so should the layerdetails.html and recipe.html templates.

This patch also capitalises the string 'All layers' in the breadcrumb of layerdetails.html as all other breadcrumb elements.

---
 lib/toaster/toastergui/templates/baseprojectpage.html | 12 ++++--------
 lib/toaster/toastergui/templates/layerdetails.html    | 17 ++++-------------
 lib/toaster/toastergui/templates/project.html         |  4 ++--
 3 files changed, 10 insertions(+), 23 deletions(-)
lib/toaster/toastergui/templates/baseprojectpage.html +4 -8
index 95a9f47..e140925 100644
@@ -4,7 +4,7 @@
 {% block pagecontent %}
 
 
- <div class="">
+ <div class="row-fluid">
 <!-- Breadcrumbs -->
     <div class="section">
         <ul class="breadcrumb" id="breadcrumb">
@@ -28,14 +28,10 @@
         </script>
     </div>
 
-    <div>
+    <!-- Begin main page container -->
+    {% block projectinfomain %}{% endblock %}
+    <!-- End main container -->
 
-        <!-- Begin main page container -->
-        {% block projectinfomain %}{% endblock %}
-        <!-- End main container -->
-
-
-    </div>
   </div>
 
 
lib/toaster/toastergui/templates/layerdetails.html +4 -13
index 5bed0f8..22e99e0 100644
@@ -3,7 +3,7 @@
 {% load humanize %}
 {% load static %}
 {% block localbreadcrumb %}
-<li><a href="{% url 'layers' %}">All Layers</a></li>
+<li><a href="{% url 'layers' %}">All layers</a></li>
 <li>
   {{layerversion.layer.name}} ({{layerversion.commit|truncatechars:13}})
 </li>
@@ -63,18 +63,13 @@
 {% endif %}
 
 {% include "layers_dep_modal.html" %}
- <div class="container-fluid top-padded">
-  <div class="row-fluid">
-    <div class="span11">
+  <div class="row-fluid span11">
       <div class="page-header">
         <h1>{{layerversion.layer.name}} <small class="commit" data-toggle="tooltip" title="{{layerversion.commit}}">({{layerversion.commit|truncatechars:13}})</small></h1>
       </div>
-    </div>
   </div>
 
-    <div class="row-fluid">
-    <div class="span7">
-      <div class="tabbable">
+    <div class="row-fluid span7 tabbable">
         <div class="alert alert-info lead" id="alert-area" style="display:none">
           <button type="button" class="close" id="dismiss-alert" data-dismiss="alert">&times;</button>
           <span id="alert-msg"></span>
@@ -91,7 +86,6 @@
             <a data-toggle="tab" href="#machines" id="machines-tab">Machines ({{total_machines}})</a>
           </li>
         </ul>
-      </div>
       <div class="tab-content">
         <span class="button-place">
           {% if layer_in_project == 0 %}
@@ -435,7 +429,7 @@
                   </div>
               </div>
             </div>
-            <div class="row span4 well">
+            <div class="row-fluid span4 well">
               <h2>About {{layerversion.layer.name}}</h2>
               <dl>
 
@@ -480,7 +474,4 @@
            </dl>
          </div>
 
-          </div>
-       </div>
-   </div>
 {% endblock %}
lib/toaster/toastergui/templates/project.html +2 -2
index b8579e4..3b75d19 100644
@@ -91,7 +91,7 @@ vim: expandtab tabstop=2
   <div class="well">
     <form class="build-form" ng-submit="buildNamedTarget()">
       <div class="input-append controls">
-        <input type="text" class="huge span7" placeholder="Type the target(s) you want to build" autocomplete="off" ng-model="targetName" typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" ng-disabled="!layers.length"/>
+        <input type="text" class="huge input-xxlarge" placeholder="Type the target(s) you want to build" autocomplete="off" ng-model="targetName" typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" typeahead-template-url="suggestion_details" ng-disabled="!layers.length"/>
         <button type="submit" class="btn btn-large btn-primary" ng-disabled="!targetName.length">
         Build
         </button>
@@ -337,7 +337,7 @@ vim: expandtab tabstop=2
       <p class="link-action">
             <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a>
             <i data-original-title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair" class="icon-question-sign get-help heading-help" title=""></i>
-			</p>
+            </p>
     </div>
   </div>
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/14 toaster: apply common styles to right hand column of detail pages

From: Belen Barros Pena <[email protected]>

Layer, recipe and package details pages have a right column with additional information. This commit standardises the formatting of the content in that right column across all these pages by creating a new css class .item-info in default.css

---
 lib/toaster/toastergui/static/css/default.css             | 3 +--
 lib/toaster/toastergui/templates/layerdetails.html        | 2 +-
 lib/toaster/toastergui/templates/package_detail_base.html | 2 +-
 lib/toaster/toastergui/templates/recipe.html              | 6 +++---
 4 files changed, 6 insertions(+), 7 deletions(-)
lib/toaster/toastergui/static/css/default.css +1 -2
index a3fa0dd..5eeeea4 100644
@@ -38,7 +38,7 @@ dd code, .alert code { white-space: pre-wrap; word-break: break-all; word-wrap:
 dd ul { list-style-type: none; margin: 0px; }
 dt, dd  {line-height: 25px; }
 dd li { line-height: 25px; }
-dd p { line-height: 20px; }
+.item-info dd { line-height: 20px; margin-bottom: 10px; }
 
 /* Style the filter modal dialogs */
 .modal { width: 800px; margin-left: -400px; }
@@ -200,7 +200,6 @@ dl textarea { resize: vertical; }
 .lead .help-block { font-size: 14px; line-height: 20px; font-weight: normal; }
 .button-place  .btn { margin: 0 0 20px 0; }
 .tooltip-inner { max-width: 250px; }
-dd > span { line-height: 20px; }
 .new-build { padding: 20px; }
 .new-build li { line-height: 30px; }
 .new-build h6 { margin: 10px 0 0 0; color: #5a5a5a; }
lib/toaster/toastergui/templates/layerdetails.html +1 -1
index 22e99e0..9286df6 100644
@@ -431,7 +431,7 @@
             </div>
             <div class="row-fluid span4 well">
               <h2>About {{layerversion.layer.name}}</h2>
-              <dl>
+              <dl class="item-info">
 
                 <dt>
                   Summary
lib/toaster/toastergui/templates/package_detail_base.html +1 -1
index dfeba55..ad75454 100644
@@ -54,7 +54,7 @@
         <h2>Package information</h2>
 
         <!-- info presented as definition list -->
-        <dl>
+        <dl class="item-info">
             <dt>
                 Size
                 <i class="icon-question-sign get-help" title="The size of the package"></i>
lib/toaster/toastergui/templates/recipe.html +3 -3
index b20c65e..d91768d 100644
@@ -250,14 +250,14 @@
 
 <div class="row span4 well">
     <h2>About {{object.name}}</h2>
-    <dl>
+    <dl class="item-info">
         {% if object.summary %}
             <dt>Summary</dt>
-            <dd><p>{{object.summary}}</p></dd>
+            <dd>{{object.summary}}</dd>
         {% endif %}
         {% if object.description %}
             <dt>Description</dt>
-            <dd><p>{{object.description}}</dd>
+            <dd>{{object.description}}</dd>
         {% endif %}
         {% if object.homepage %}
             <dt>Homepage</dt>
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/14 toastergui: Generic message for the layer details empty states

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In the layer details page, change the message you see when the number of targets or machines provided by a layer is 0, either because that's what's reported by a layer index instance, or because Toaster does not have any information about the layer.

The new message is more generic, in order to fit layers from all layer sources.

---
 lib/toaster/toastergui/templates/layerdetails.html | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
lib/toaster/toastergui/templates/layerdetails.html +2 -6
index 9286df6..207197bce 100644
@@ -184,9 +184,7 @@
                 <div name="targets" id="targets" class="tab-pane">
                   {% if total_targets == 0 %}
                   <div class="alert alert-info">
-                    <strong>There is no target data for {{layerversion.layer.name}} ... yet</strong> <br />
-                    Toaster learns about layers as they are built. Once you have used {{layerversion.layer.name}} in a build, Toaster will show you
-                    here the targets it provides.
+                    There is no target information for the <strong> {{layerversion.layer.name}} </strong> layer.
                   </div>
                   {% else %}
 
@@ -313,9 +311,7 @@
                 <div name="machines" id="machines" class="tab-pane">
                   {% if total_machines == 0 %}
                   <div class="alert alert-info">
-                    <strong>There is no machine data for {{layerversion.layer.name}} ... yet</strong> <br />
-                    Toaster learns about layers as they are built. Once you have used {{layerversion.layer.name}} in a build, Toaster will show you
-                    here the machines it provides.
+                    There is no machine information for the <strong>{{layerversion.layer.name}}</strong> layer.
                   </div>
                   {% else %}
 
Signature · 1 line
1.9.1
#4 lore raw

PATCH 4/14 toastergui: remove redundant style declaration

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

The bottom margin for dd tags nested inside forms is set twice. Delete one of them.

---
 lib/toaster/toastergui/static/css/default.css | 1 -
 1 file changed, 1 deletion(-)
lib/toaster/toastergui/static/css/default.css +0 -1
index 5eeeea4..cb27342 100644
@@ -184,7 +184,6 @@ a code:hover { color: #005580; }
 .control-group { margin-bottom: 0px; }
 #project-details form { margin: 0px; }
 dd form { margin: 10px 0 0 0; }
-dd form { margin-bottom: 0px; }
 dl textarea { resize: vertical; }
 .navbar-fixed-top {  z-index: 1; }
 .popover { z-index: 2; }
Signature · 1 line
1.9.1
#5 lore raw

PATCH 5/14 toastergui: consistent add / remove layer notifications

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In my struggle to ensure consistency in the format and content of the notifications we show when you add and remove layers to a project, I've:

* added the project name to the notifications
in the layer details page

* removed the 'Go to project configuration' link
from the notifications in the layer details page

This changes align the notifications we show in the layer details page with the ones we show in the 'all' pages.

---
 lib/toaster/toastergui/static/js/layerdetails.js   | 10 ++++++----
 lib/toaster/toastergui/templates/layerdetails.html |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
lib/toaster/toastergui/static/js/layerdetails.js +6 -4
index 41cbf4b..2addecd 100644
@@ -211,7 +211,7 @@ function layerDetailsPageInit (ctx) {
       addRmLayerBtn.prepend("<span class=\"icon-trash\"></span>");
 
       if (depsList) {
-        alertMsg.append("You have added <strong>"+(depsList.length+1)+"</strong> layers: <span id=\"layer-affected-name\"></span> and its dependencies ");
+        alertMsg.append("You have added <strong>"+(depsList.length+1)+"</strong> layers to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span> and its dependencies ");
 
         /* Build the layer deps list */
         depsList.map(function(layer, i){
@@ -227,7 +227,7 @@ function layerDetailsPageInit (ctx) {
           alertMsg.append(link);
         });
       } else {
-        alertMsg.append("You have added <strong>1</strong> layer: <span id=\"layer-affected-name\"></span>");
+        alertMsg.append("You have added <strong>1</strong> layer to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span>");
       }
     } else {
       /* disable and switch all the button states */
@@ -252,10 +252,12 @@ function layerDetailsPageInit (ctx) {
           break;
       }
 
-      alertMsg.append("You have deleted <strong>1</strong> layer: <span id=\"layer-affected-name\"></span>");
+      alertMsg.append("You have deleted <strong>1</strong> layer from <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span>");
     }
 
-    alertMsg.children("#layer-affected-name").text(ctx.layerVersion.name);
+    alertMsg.children("#layer-affected-name").html("<strong>" + ctx.layerVersion.name + "</strong>");
+    alertMsg.children("#project-affected-name").text(ctx.projectName);
+    alertMsg.children("#project-affected-name").attr("href", ctx.projectPageUrl);
     $("#alert-area").show();
   }
 
lib/toaster/toastergui/templates/layerdetails.html +1 -1
index 207197bce..a89ffb0 100644
@@ -23,6 +23,7 @@
       xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
       xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
       projectId : {{project.id}},
+      projectName : "{{project.name}}",
       numTargets : {{total_targets}},
       numMachines: {{machines|length}},
       layerVersion : {
@@ -73,7 +74,6 @@
         <div class="alert alert-info lead" id="alert-area" style="display:none">
           <button type="button" class="close" id="dismiss-alert" data-dismiss="alert">&times;</button>
           <span id="alert-msg"></span>
-          <p style="margin-top:10px;"><a href="{% url 'project' project.id %}">Go to project configuration</a></p>
         </div>
         <ul class="nav nav-pills">
           <li class="active">
Signature · 1 line
1.9.1
#6 lore raw

PATCH 6/14 toastergui: give the add dependencies form some breathing space

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

In the editable version of the layer details page, the form to add dependencies needs some distance from the dependency list.

---
 lib/toaster/toastergui/static/css/default.css | 1 +
 1 file changed, 1 insertion(+)
lib/toaster/toastergui/static/css/default.css +1 -0
index cb27342..1095254 100644
@@ -206,6 +206,7 @@ dl textarea { resize: vertical; }
 .new-build form { margin: 5px 0 0; }
 .new-build .input-append { margin-bottom: 0; }
 #build-selected { margin-top: 15px; }
+div.add-deps { margin-top: 15px; }
 
 
 .animate-repeat {
Signature · 1 line
1.9.1
#7 lore raw

PATCH 7/14 toastergui: add 'show all' link to no results page

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

When you search for targets or machines in the layer details page and your search returns no results, you should see a 'show all' link that you can click to clear the search and display all table entries.

[YOCTO #7218]

---
 lib/toaster/toastergui/static/js/layerdetails.js   |  4 ++--
 lib/toaster/toastergui/templates/layerdetails.html | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
lib/toaster/toastergui/static/js/layerdetails.js +2 -2
index 2addecd..2793225 100644
@@ -381,12 +381,12 @@ function layerDetailsPageInit (ctx) {
   });
 
   /* Clear the current search selection and reload the results */
-  $("#target-search-clear").click(function(){
+  $(".target-search-clear").click(function(){
     $("#target-search").val("");
     $(this).parents("form").submit();
   });
 
-  $("#machine-search-clear").click(function(){
+  $(".machine-search-clear").click(function(){
     $("#machine-search").val("");
     $(this).parents("form").submit();
   });
lib/toaster/toastergui/templates/layerdetails.html +8 -2
index a89ffb0..f8f2d7a 100644
@@ -205,11 +205,14 @@
 
                       <input type="text" id="target-search" name="targets_search" placeholder="Search targets" class="input-xlarge" value="{{request.GET.targets_search}}">
                         {% if request.GET.targets_search %}
-                        <a class="add-on btn" id="target-search-clear">
+                        <a class="add-on btn target-search-clear">
                           <i class="icon-remove"></i>
                         </a>
                         {% endif %}
                         <button type="submit" class="btn">Search</button>
+                        {% if targets.paginator.count == 0 %}
+                            <button type="submit" class="btn btn-link target-search-clear">Show all targets</a>
+                        {% endif %}
                       </form>
                     {% endif %}
 
@@ -332,11 +335,14 @@
 
                       <input type="text" id="machine-search" name="machines_search" placeholder="Search machines" class="input-xlarge" value="{{request.GET.machines_search}}">
                         {% if request.GET.machines_search %}
-                        <a class="add-on btn" id="machine-search-clear">
+                        <a class="add-on btn machine-search-clear">
                           <i class="icon-remove"></i>
                         </a>
                         {% endif %}
                         <button type="submit" class="btn">Search</button>
+                        {% if machines.paginator.count == 0 %}
+                            <button type="submit" class="btn btn-link machine-search-clear">Show all machines</a>
+                        {% endif %}
                       </form>
                     {% endif %}
 
Signature · 1 line
1.9.1
#8 lore raw

PATCH 8/14 toastergui: set column width in layer details page

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Set the width of the action columns to span2 to stop the buttons from wrapping as much as possible.

---
 lib/toaster/toastergui/templates/layerdetails.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/toaster/toastergui/templates/layerdetails.html +2 -2
index f8f2d7a..6c5e785 100644
@@ -254,7 +254,7 @@
                           Target version
                         </th>
                         <th class="span4">Description</th>
-                        <th>Build target</th>
+                        <th class="span2">Build target</th>
                       </tr>
                     </thead>
                     <tbody>
@@ -380,7 +380,7 @@
                           {% endif %}
                         </th>
                         <th>Description</th>
-                        <th>Select machine</th>
+                        <th class="span2">Select machine</th>
                       </tr>
                     </thead>
                     <tbody>
Signature · 1 line
1.9.1
#9 lore raw

PATCH 9/14 toastergui: hide table controls when when less than 10 entries

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

The 'show rows' and pagination controls in the layer details page should only show when there are more than 10 entries in a table.

[YOCTO #7217]

---
 lib/toaster/toastergui/templates/layerdetails.html | 10 ++++++++++
 1 file changed, 10 insertions(+)
lib/toaster/toastergui/templates/layerdetails.html +10 -0
index 6c5e785..1daf9b9 100644
@@ -223,6 +223,7 @@
                      </div>
                     {% else %}
 
+                    {% if total_targets > 10 %}
                     <div class="pull-right">
                       <span class="help-inline" style="padding-top:5px;">Show rows:</span>
                       <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
@@ -237,6 +238,7 @@
                       {% endwith %}
                     </select>
                   </div>
+                  {% endif %}
                 </div>
 
                 <table class="table table-bordered table-hover">
@@ -274,6 +276,7 @@
                     </tbody>
                   </table>
 
+                  {% if total_targets > 10 %}
                   <!-- Show pagination controls -->
                   <div class="pagination">
                     <ul>
@@ -308,6 +311,7 @@
                   </div>
                   {% endif %}
                   {% endif %}
+                  {% endif %}
                 </div>
 
 
@@ -351,8 +355,10 @@
                      </div>
                      <!-- end row-fluid -->
                      </div>
+
                     {% else %}
 
+                    {% if total_machines > 10 %}
                     <div class="pull-right">
                       <span class="help-inline" style="padding-top:5px;">Show rows:</span>
                       <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
@@ -367,6 +373,8 @@
                       {% endwith %}
                     </select>
                   </div>
+                  {% endif %}
+
                 </div>
 
                 <table class="table table-bordered table-hover">
@@ -394,6 +402,7 @@
                     </tbody>
                   </table>
 
+                  {% if total_machines > 10 %}
                   <!-- Show pagination controls -->
                   <div class="pagination">
                     <ul>
@@ -428,6 +437,7 @@
                   </div>
                   {% endif %}
                   {% endif %}
+                  {% endif %}
                   </div>
               </div>
             </div>
Signature · 1 line
1.9.1
#10 lore raw

PATCH 10/14 toastergui: consistent capitals in button

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Capitalise correctly the 'Build target' button label in the layer details page: it should match the table heading.

---
 lib/toaster/toastergui/templates/layerdetails.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/layerdetails.html +1 -1
index 1daf9b9..2b57561 100644
@@ -270,7 +270,7 @@
                         </td>
                         <td>{{target.version}}</td>
                         <td>{{target.summary}}</td>
-                        <td><button class="btn btn-block build-target-btn" data-target-name="{{target.name}}" {% if layer_in_project == 0 %}disabled="disabled"{% endif %} >Build Target</button></td>
+                        <td><button class="btn btn-block build-target-btn" data-target-name="{{target.name}}" {% if layer_in_project == 0 %}disabled="disabled"{% endif %} >Build target</button></td>
                       </tr>
                       {% endfor %}
                     </tbody>
Signature · 1 line
1.9.1
#11 lore raw

PATCH 11/14 toastergui: remove recipe id links to the layer index

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Toaster cannot use the recipe id to link to the layer index, because recipe ids can change. We need to search by the recipe name instead.

This patch removes the recipe id link from the layer details page and replaces it with a search by the recipe name.

It also makes sure links to the layer index open in a new tab/window.

[YOCTO #7194]
[YOCTO #7193]

---
 lib/toaster/toastergui/templates/layerdetails.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/toaster/toastergui/templates/layerdetails.html +1 -1
index 2b57561..84a21d7 100644
@@ -265,7 +265,7 @@
                         <td>
                           {{target.name}}
                           {% if target.up_id %}
-                          <a href="http://layers.openembedded.org/layerindex/recipe/{{target.up_id}}/" class="icon-share get-info"></a>
+                          <a href="{{target.get_layersource_view_url}}" class="icon-share get-info" target="_blank"></a>
                           {% endif %}
                         </td>
                         <td>{{target.version}}</td>
Signature · 1 line
1.9.1
#12 lore raw

PATCH 12/14 toastergui: alignment fix

In reply to Alex DAMIAN

From: Belen Barros Pena <[email protected]>

Align horizontally the pagination and show rows
controls at the bottom of the layer details page.

---
 lib/toaster/toastergui/templates/layerdetails.html | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
lib/toaster/toastergui/templates/layerdetails.html +4 -4
index 84a21d7..4ffd071 100644
@@ -295,8 +295,8 @@
                       {%endif%}
                     </ul>
                     <div class="pull-right">
-                      <span class="help-inline" style="padding-top:5px;">Show rows:</span>
-                      <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
+                      <span class="help-inline" style="padding-bottom:10px;">Show rows:</span>
+                      <select class="pagesize">
                         {% with "10 25 50 100 150" as list%}
                         {% for i in list.split %}
                         {% if request.session.limit == i %}
@@ -421,8 +421,8 @@
                       {%endif%}
                     </ul>
                     <div class="pull-right">
-                      <span class="help-inline" style="padding-top:5px;">Show rows:</span>
-                      <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
+                      <span class="help-inline" style="padding-bottom:10px;">Show rows:</span>
+                      <select class="pagesize">
                         {% with "10 25 50 100 150" as list%}
                         {% for i in list.split %}
                         {% if request.session.limit == i %}
Signature · 1 line
1.9.1
#13 lore raw

PATCH 13/14 toasterui: do not filter images by extension

In reply to Alex DAMIAN

From: Alexandru Damian <[email protected]>

ToasterUI filters build artifacts by extension in order to determine if a build artifact is an image or not.

Using IMAGE_FSTYPES for this purpose is not correct as the varible value holding image extensions is just a coincidence.

So we just look if the filename contains the "rootfs" magic string, which is a pretty good approximation.

[YOCTO #7213]

---
 lib/bb/ui/buildinfohelper.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/ui/buildinfohelper.py +1 -1
index be0de6b..4e2d4a7 100644
@@ -770,7 +770,7 @@ class BuildInfoHelper(object):
             if t.is_image == True:
                 output_files = list(evdata.viewkeys())
                 for output in output_files:
-                    if t.target in output and output.split('.rootfs.')[1] in image_fstypes:
+                    if t.target in output and 'rootfs' in output and not output.endswith(".manifest"):
                         self.orm_wrapper.save_target_image_file_information(t, output, evdata[output])
 
     def update_artifact_image_file(self, event):
Signature · 1 line
1.9.1
#14 lore raw

PATCH 14/14 toastergui: update project build listing

In reply to Alex DAMIAN

From: Alexandru DAMIAN <[email protected]>

We update the build listings in the project mode to enable proper display and selection of build requests that do not have an actual build object because the bitbake process did not start.

We add a page to display error details for build requests that did not start a build.

Fixing errors and misspelling in build sections.

Sorting by "timespent" is disabled for build-listing pages.

[YOCTO #7165]
[YOCTO #7156]
[YOCTO #7196]
[YOCTO #7188]

---
 lib/toaster/bldcontrol/models.py                   |   9 ++
 .../toastergui/templates/buildrequestdetails.html  |  67 ++++++++++++++
 .../toastergui/templates/managed_builds.html       |  18 ++--
 .../toastergui/templates/managed_mrb_section.html  |  42 ++++++---
 .../toastergui/templates/projectbuilds.html        |  20 ++--
 lib/toaster/toastergui/urls.py                     |   2 +
 lib/toaster/toastergui/views.py                    | 103 +++++++++++++--------
 7 files changed, 193 insertions(+), 68 deletions(-)
 create mode 100644 lib/toaster/toastergui/templates/buildrequestdetails.html
lib/toaster/bldcontrol/models.py +9 -0
index 2386d23..dc4afca 100644
@@ -113,6 +113,15 @@ class BuildRequest(models.Model):
     created     = models.DateTimeField(auto_now_add = True)
     updated     = models.DateTimeField(auto_now = True)
 
+    def get_duration(self):
+        return (self.updated - self.created).total_seconds()
+
+    def get_sorted_target_list(self):
+        tgts = self.brtarget_set.order_by( 'target' );
+        return( tgts );
+
+    def get_machine(self):
+        return self.brvariable_set.get(name="MACHINE").value
 
 # These tables specify the settings for running an actual build.
 # They MUST be kept in sync with the tables in orm.models.Project*
lib/toaster/toastergui/templates/buildrequestdetails.html new file +67 -0

67 lines not on this page · raw message

lib/toaster/toastergui/templates/managed_builds.html +9 -9
index 5944dc4..183be76 100644
@@ -35,10 +35,10 @@
     </div>
 
 
-  {% else %}
+  {% else %} {# We have builds to display #}
   {% include "basetable_top_buildprojects.html" %}
         <!-- 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 -->
-        {% for br in objects %}{% if br.build %}  {% with build=br.build %} {# if we have a build, just display it #}
+        {% for buildrequest in objects %}{% if buildrequest.build %}  {% with build=buildrequest.build %} {# if we have a build, just display it #}
         <tr class="data">
             <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>
             <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
@@ -61,7 +61,7 @@
             <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>
-                    {% if MANAGED and build.project %}
+                    {% if MANAGED and build.project and build.buildartifact_set.count %}
                         <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
                             <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
                         </a>
@@ -96,21 +96,21 @@
         <tr class="data">
             <td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
             <td class="target">
-                <span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+                <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}"><span data-toggle="tooltip" {%if buildrequest.brtarget_set.all.count > 1%}title="Targets: {%for target in buildrequest.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{buildrequest.brtarget_set.all.0.target}} {%if buildrequest.brtarget_set.all.count > 1%}(+ {{buildrequest.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
             </td>
             <td class="machine">
-                {{br.machine}}
+                <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.machine}}</a>
             </td>
             <td class="started_on">
-                {{br.created|date:"d/m/y H:i"}}
+                <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.created|date:"d/m/y H:i"}}</a>
             </td>
             <td class="completed_on">
-                {{br.updated|date:"d/m/y H:i"}}
+                <a href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}">{{buildrequest.updated|date:"d/m/y H:i"}}</a>
             </td>
             <td class="failed_tasks error">
-                {{br.brerror_set.all.0.errmsg|whitespace_slice:":32"}}
             </td>
             <td class="errors_no">
+                <a class="errors_no error" href="{% url "buildrequestdetails" buildrequest.project.id buildrequest.id %}#errors">{{buildrequest.brerror_set.all.count}} error{{buildrequest.brerror_set.all.count|pluralize}}</a>
             </td>
             <td class="warnings_no">
             </td>
@@ -120,7 +120,7 @@
             <td class="output"> {# we have no output here #}
             </td>
             <td class="project">
-                <a href="{% url 'project' br.project.id %}">{{br.project.name}}</a>
+                <a href="{% url 'project' buildrequest.project.id %}">{{buildrequest.project.name}}</a>
             </td>
         </tr>
           {%endif%}
lib/toaster/toastergui/templates/managed_mrb_section.html +30 -12

61 lines not on this page · raw message

lib/toaster/toastergui/templates/projectbuilds.html +10 -10
index 8f9172c..2a8bd58 100644
@@ -13,11 +13,11 @@
                      No builds found
 
  {% else %}
-	{% if  request.GET.filter or request.GET.search  %}
-			{{objects.paginator.count}} builds found
-	{% else %}
+    {% if  request.GET.filter or request.GET.search  %}
+            {{objects.paginator.count}} builds found
+    {% else %}
                         Project builds <small>({{objects.paginator.count}})</small>
-	{% endif %}
+    {% endif %}
  {% endif %}
                         <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
                     </h1>
@@ -89,23 +89,23 @@
 
 
         <tr class="data">
-            <td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
+            <td class="outcome">{% if br.state == br.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
             <td class="target">
-                <span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span>
+                <a href="{% url "buildrequestdetails" br.project.id br.id %}"><span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
             </td>
             <td class="machine">
-                {{br.machine}}
+                <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.machine}}</a>
             </td>
             <td class="started_on">
-                {{br.created|date:"d/m/y H:i"}}
+                <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.created|date:"d/m/y H:i"}}</a>
             </td>
             <td class="completed_on">
-                {{br.updated|date:"d/m/y H:i"}}
+                <a href="{% url "buildrequestdetails" br.project.id br.id %}">{{br.updated|date:"d/m/y H:i"}}</a>
             </td>
             <td class="failed_tasks error">
-                {{br.brerror_set.all.0.errmsg|whitespace_slice:":32"}}
             </td>
             <td class="errors_no">
+        <a class="errors_no error" href="{% url "buildrequestdetails" br.project.id br.id %}#errors">{{br.brerror_set.all.count}} error{{br.brerror_set.all.count|pluralize}}</a>
             </td>
             <td class="warnings_no">
             </td>
lib/toaster/toastergui/urls.py +2 -0
index 8c3b5a8..1c83090 100644
@@ -97,6 +97,8 @@ urlpatterns = patterns('toastergui.views',
         url(r'^xhr_importlayer/$', 'xhr_importlayer', name='xhr_importlayer'),
         url(r'^xhr_updatelayer/$', 'xhr_updatelayer', name='xhr_updatelayer'),
 
+        # dashboard for failed build requests
+        url(r'^project/(?P<pid>\d+)/buildrequest/(?P<brid>\d+)$', 'buildrequestdetails', name='buildrequestdetails'),
 
         # default redirection
         url(r'^$', RedirectView.as_view( url= 'landing')),
lib/toaster/toastergui/views.py +66 -37

232 lines not on this page · raw message

Signature · 1 line
1.9.1