aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSujith H <sujith.h@gmail.com>2016-07-29 07:11:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-11 00:08:18 +0100
commit1b0934b45d3704de604405826de9fc1da51ceae1 (patch)
tree7566bfb7118709093433c63a2954d28bc076c4c6 /lib
parent7e73f8583a0f92d73b42410e1c960b6f2976a557 (diff)
downloadbitbake-contrib-1b0934b45d3704de604405826de9fc1da51ceae1.tar.gz
toaster: updte build tables for locally imported layers
Update the build tables section for locally imported layers. Here we do not provide informations such as branch or commit. Because those are locally imported layer(s). [YOCO #9911] Signed-off-by: Sujith H <sujith.h@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/toaster/toastergui/buildtables.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/buildtables.py b/lib/toaster/toastergui/buildtables.py
index 82a8ba537..b6485e64f 100644
--- a/lib/toaster/toastergui/buildtables.py
+++ b/lib/toaster/toastergui/buildtables.py
@@ -109,15 +109,31 @@ class BuiltPackagesTableBase(tables.PackagesTable):
hidden=True,
orderable=True)
+ layer_branch_template = '''
+ {%if not data.recipe.layer_version.layer.local_source_dir %}
+ <span class="text-muted">{{data.recipe.layer_version.branch}}</span>
+ {% else %}
+ <span class="text-muted">Not applicable</span>
+ <span class="glyphicon glyphicon-question-sign get-help" data-original-title="" title="The source code of {{data.recipe.layer_version.layer.name}} is not in a Git repository, so there is no branch associated with it"> </span>
+ {% endif %}
+ '''
+
self.add_column(title="Layer branch",
field_name="recipe__layer_version__branch",
hidden=True,
+ static_data_name="recipe__layer_version__branch",
+ static_data_template=layer_branch_template,
orderable=True)
git_rev_template = '''
+ {% if not data.recipe.layer_version.layer.local_source_dir %}
{% with vcs_ref=data.recipe.layer_version.commit %}
{% include 'snippets/gitrev_popover.html' %}
{% endwith %}
+ {% else %}
+ <span class="text-muted">Not applicable</span>
+ <span class="glyphicon glyphicon-question-sign get-help" data-original-title="" title="The source code of {{data.recipe.layer_version.layer.name}} is not in a Git repository, so there is no revision associated with it"> </span>
+ {% endif %}
'''
self.add_column(title="Layer commit",
@@ -250,10 +266,24 @@ class BuiltRecipesTable(BuildTablesMixin):
'{% if data.pathflags %}<i>({{data.pathflags}})</i>'\
'{% endif %}'
+ git_branch_template = '''
+ {% if data.layer_version.layer.local_source_dir %}
+ <span class="text-muted">Not applicable</span>
+ <span class="glyphicon glyphicon-question-sign get-help" data-original-title="" title="The source code of {{data.layer_version.layer.name}} is not in a Git repository, so there is no branch associated with it"> </span>
+ {% else %}
+ <span>{{data.layer_version.branch}}</span>
+ {% endif %}
+ '''
+
git_rev_template = '''
+ {% if data.layer_version.layer.local_source_dir %}
+ <span class="text-muted">Not applicable</span>
+ <span class="glyphicon glyphicon-question-sign get-help" data-original-title="" title="The source code of {{data.layer_version.layer.name}} is not in a Git repository, so there is no commit associated with it"> </span>
+ {% else %}
{% with vcs_ref=data.layer_version.commit %}
{% include 'snippets/gitrev_popover.html' %}
{% endwith %}
+ {% endif %}
'''
depends_on_tmpl = '''
@@ -342,6 +372,8 @@ class BuiltRecipesTable(BuildTablesMixin):
self.add_column(title="Layer branch",
field_name="layer_version__branch",
+ static_data_name="layer_version__branch",
+ static_data_template=git_branch_template,
orderable=True,
hidden=True)