diff options
| -rw-r--r-- | bitbake/lib/toaster/toastergui/buildtables.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/buildtables.py b/bitbake/lib/toaster/toastergui/buildtables.py index 82a8ba5378..b6485e64fd 100644 --- a/bitbake/lib/toaster/toastergui/buildtables.py +++ b/bitbake/lib/toaster/toastergui/buildtables.py | |||
| @@ -109,15 +109,31 @@ class BuiltPackagesTableBase(tables.PackagesTable): | |||
| 109 | hidden=True, | 109 | hidden=True, |
| 110 | orderable=True) | 110 | orderable=True) |
| 111 | 111 | ||
| 112 | layer_branch_template = ''' | ||
| 113 | {%if not data.recipe.layer_version.layer.local_source_dir %} | ||
| 114 | <span class="text-muted">{{data.recipe.layer_version.branch}}</span> | ||
| 115 | {% else %} | ||
| 116 | <span class="text-muted">Not applicable</span> | ||
| 117 | <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> | ||
| 118 | {% endif %} | ||
| 119 | ''' | ||
| 120 | |||
| 112 | self.add_column(title="Layer branch", | 121 | self.add_column(title="Layer branch", |
| 113 | field_name="recipe__layer_version__branch", | 122 | field_name="recipe__layer_version__branch", |
| 114 | hidden=True, | 123 | hidden=True, |
| 124 | static_data_name="recipe__layer_version__branch", | ||
| 125 | static_data_template=layer_branch_template, | ||
| 115 | orderable=True) | 126 | orderable=True) |
| 116 | 127 | ||
| 117 | git_rev_template = ''' | 128 | git_rev_template = ''' |
| 129 | {% if not data.recipe.layer_version.layer.local_source_dir %} | ||
| 118 | {% with vcs_ref=data.recipe.layer_version.commit %} | 130 | {% with vcs_ref=data.recipe.layer_version.commit %} |
| 119 | {% include 'snippets/gitrev_popover.html' %} | 131 | {% include 'snippets/gitrev_popover.html' %} |
| 120 | {% endwith %} | 132 | {% endwith %} |
| 133 | {% else %} | ||
| 134 | <span class="text-muted">Not applicable</span> | ||
| 135 | <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> | ||
| 136 | {% endif %} | ||
| 121 | ''' | 137 | ''' |
| 122 | 138 | ||
| 123 | self.add_column(title="Layer commit", | 139 | self.add_column(title="Layer commit", |
| @@ -250,10 +266,24 @@ class BuiltRecipesTable(BuildTablesMixin): | |||
| 250 | '{% if data.pathflags %}<i>({{data.pathflags}})</i>'\ | 266 | '{% if data.pathflags %}<i>({{data.pathflags}})</i>'\ |
| 251 | '{% endif %}' | 267 | '{% endif %}' |
| 252 | 268 | ||
| 269 | git_branch_template = ''' | ||
| 270 | {% if data.layer_version.layer.local_source_dir %} | ||
| 271 | <span class="text-muted">Not applicable</span> | ||
| 272 | <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> | ||
| 273 | {% else %} | ||
| 274 | <span>{{data.layer_version.branch}}</span> | ||
| 275 | {% endif %} | ||
| 276 | ''' | ||
| 277 | |||
| 253 | git_rev_template = ''' | 278 | git_rev_template = ''' |
| 279 | {% if data.layer_version.layer.local_source_dir %} | ||
| 280 | <span class="text-muted">Not applicable</span> | ||
| 281 | <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> | ||
| 282 | {% else %} | ||
| 254 | {% with vcs_ref=data.layer_version.commit %} | 283 | {% with vcs_ref=data.layer_version.commit %} |
| 255 | {% include 'snippets/gitrev_popover.html' %} | 284 | {% include 'snippets/gitrev_popover.html' %} |
| 256 | {% endwith %} | 285 | {% endwith %} |
| 286 | {% endif %} | ||
| 257 | ''' | 287 | ''' |
| 258 | 288 | ||
| 259 | depends_on_tmpl = ''' | 289 | depends_on_tmpl = ''' |
| @@ -342,6 +372,8 @@ class BuiltRecipesTable(BuildTablesMixin): | |||
| 342 | 372 | ||
| 343 | self.add_column(title="Layer branch", | 373 | self.add_column(title="Layer branch", |
| 344 | field_name="layer_version__branch", | 374 | field_name="layer_version__branch", |
| 375 | static_data_name="layer_version__branch", | ||
| 376 | static_data_template=git_branch_template, | ||
| 345 | orderable=True, | 377 | orderable=True, |
| 346 | hidden=True) | 378 | hidden=True) |
| 347 | 379 | ||
