]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: update recipe details page
authorSujith H <sujith.h@gmail.com>
Fri, 29 Jul 2016 10:42:30 +0000 (10:42 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Aug 2016 23:08:18 +0000 (00:08 +0100)
Update Layer branch and Layer commit
in recipe details page. For local layer
imported from toaster these fields are
not applicable.

[YOCO #9911]

Signed-off-by: Sujith H <sujith.h@gmail.com>
lib/toaster/toastergui/templates/recipe.html

index 97e7b99842d0068aca665afb65e05702273cb7ae..bf2cd7169ac1737b5c5ad532a4444f94ab45df7e 100644 (file)
                     Recipe file
                 </dt>
                 <dd><code>{{object.file_path}} {% if object.pathflags %}<i>({{object.pathflags}})</i>{% endif %}</code></dd>
-                {% if layer_version.branch %}
                 <dt>
                     <span class="glyphicon glyphicon-question-sign get-help"
                         title="The Git branch of the layer providing the
                     recipe"></span>
                     Layer branch
                 </dt>
+                {% if layer_version.layer.local_source_dir %}
+                <dd>
+                 <span class="text-muted">Not applicable</span>
+                 <span class="glyphicon glyphicon-question-sign get-help" title="The source
+                  code of {{layer_version.layer.name}} is not in a git repository
+                  so there is no branch associated with it"></span>
+                </dd>
+                {% else %}
                 <dd>{{layer_version.branch}}</dd>
-                {% endif %}
+               {% endif %}
                 <dt>
                     <span class="glyphicon glyphicon-question-sign get-help" title="The Git
                         commit of the layer providing the recipe"></span>
                     Layer commit
                 </dt>
+                {% if layer_version.layer.local_source_dir %}
+               <dd>
+                 <span class="text-muted">Not applicable</span>
+                 <span class="glyphicon glyphicon-question-sign get-help" title="The source
+                  code of {{layer_version.layer.name}} is not in a git repository
+                  so there is no commit associated with it"></span>
+               </dd>
+                {% else %}
                 <dd class="iscommit">{{layer_version.commit}}</dd>
+               {% endif %}
                 {% if object.provides_set.all %}
                 <dt>
                     <span class="glyphicon glyphicon-question-sign get-help"