[bitbake-devel] [PATCH 13/14] toaster: release name consistency

Alex DAMIAN alexandru.damian at intel.com
Thu Nov 27 17:08:04 UTC 2014


From: Belen Barros Pena <belen.barros.pena at linux.intel.com>

Small changes to the project, new project and all layers
pages to ensure consitency in release naming across the
interface.

The changes are:

* In the new project page, change the label 'release version' to
'release'

* In the new project page, sort the releases in the dropdown menu
in ascending alphabetical order

* In the new project page, remove the release name that was
showing between brackets after the release description in the
dropdown menu

* In the project page, make sure the release information
shows the release description field instead of the release name,
to keep consistency with the new project page

* In the all layers page, provide some help text for the branch 'HEAD'

Signed-off-by: Belen Barros Pena <belen.barros.pena at linux.intel.com>
---
 lib/toaster/toastergui/templates/layers.html     | 9 ++++++++-
 lib/toaster/toastergui/templates/newproject.html | 4 ++--
 lib/toaster/toastergui/templates/project.html    | 4 ++--
 lib/toaster/toastergui/views.py                  | 4 ++--
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/lib/toaster/toastergui/templates/layers.html b/lib/toaster/toastergui/templates/layers.html
index 4e92332..ced54c2 100644
--- a/lib/toaster/toastergui/templates/layers.html
+++ b/lib/toaster/toastergui/templates/layers.html
@@ -52,7 +52,14 @@
             <a target="_blank" href="{{ o.get_vcs_dirpath_link_url }}"><i class="icon-share get-info"></i></a>
                 {% endif %}
         </td>
-            <td class="branch">{% if o.branch %}{{o.branch}}{% else %}{{o.up_branch.name}}{% endif %}</td>
+            <td class="branch">
+                {% if o.branch %}
+                    {{o.branch}}
+                {% else %}
+                    {{o.up_branch.name}}
+                    <i class="icon-question-sign get-help hover-help" title="Your builds will use the tip of the branch you have cloned or downloaded to your computer, so nothing will be fetched"></i>
+                {% endif %}
+            </td>
             <td class="dependencies">
         {% with ods=o.dependencies.all%}
             {% if ods.count %}
diff --git a/lib/toaster/toastergui/templates/newproject.html b/lib/toaster/toastergui/templates/newproject.html
index 5a5e1e6..512a8fa 100644
--- a/lib/toaster/toastergui/templates/newproject.html
+++ b/lib/toaster/toastergui/templates/newproject.html
@@ -18,12 +18,12 @@
               <input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
        {% if releases.count > 1 %}
               <label class="project-form">
-                Release version
+                Release
                 <i class="icon-question-sign get-help" title="The version of the build system you want to use"></i>
               </label>
               <select name="projectversion" id="projectversion">
   {% for release in releases %}
-    <option value="{{release.id}}"{%if projectversion == release.id %} selected{%endif%}>{{release.description}} ({{release.name}})</option>
+    <option value="{{release.id}}"{%if projectversion == release.id %} selected{%endif%}>{{release.description}}</option>
   {% endfor %}
               </select>
   {% for release in releases %}
diff --git a/lib/toaster/toastergui/templates/project.html b/lib/toaster/toastergui/templates/project.html
index 0b2821c..fdfc3af 100644
--- a/lib/toaster/toastergui/templates/project.html
+++ b/lib/toaster/toastergui/templates/project.html
@@ -350,13 +350,13 @@ vim: expandtab tabstop=2
       <i class="icon-question-sign get-help heading-help" title="The version of the build system you want to use"></i>
     </h3>
     <p class="lead" id="change-project-version-opposite">
-      <span id="project-version">{[project.release.name]}</span>
+      <span id="project-version">{[project.release.desc]}</span>
       <i id="change-version" class="icon-pencil" ng-click="toggle('#change-project-version')" ></i>
     </p>
     <div class="div-inline" id="change-project-version" style="display:none;">
       <form ng-submit="test('#change-project-version')" class="input-append">
         <select id="select-version" ng-model="projectVersion">
-          <option ng-repeat="r in releases" value="{[r.id]}" ng-selected="r.id == project.release.id">{[r.name]}</option>
+          <option ng-repeat="r in releases" value="{[r.id]}" ng-selected="r.id == project.release.id">{[r.description]}</option>
         </select>
         <input type="submit" class="btn" style="margin-left:5px;" value="Save" ng-disabled="project.release.id == projectVersion"/>
         <input type="reset"  class="btn btn-link" value="Cancel" ng-click="toggle('#change-project-version')" ng-disabled="project.release.id == projectVersion"/>
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 49a7769..8301f6c 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1893,7 +1893,7 @@ if toastermain.settings.MANAGED:
         context = {
             'email': request.user.email if request.user.is_authenticated() else '',
             'username': request.user.username if request.user.is_authenticated() else '',
-            'releases': Release.objects.order_by("id"),
+            'releases': Release.objects.order_by("description"),
         }
 
         try:
@@ -2016,7 +2016,7 @@ if toastermain.settings.MANAGED:
                     prj.projectlayer_set.all().order_by("id")),
             "targets" : map(lambda x: {"target" : x.target, "task" : x.task, "pk": x.pk}, prj.projecttarget_set.all()),
             "freqtargets": freqtargets,
-            "releases": map(lambda x: {"id": x.pk, "name": x.name}, Release.objects.all()),
+            "releases": map(lambda x: {"id": x.pk, "name": x.name, "description":x.description}, Release.objects.all()),
         }
         try:
             context["machine"] = {"name": prj.projectvariable_set.get(name="MACHINE").value}
-- 
1.9.1




More information about the bitbake-devel mailing list