Make sure the tooltip for the project page shows correct vcs reference
by using the value of get_vcs_reference and align the tooltip on the
right.

[YOCTO #7155]

Signed-off-by: Michael Wood <[email protected]>
---
 bitbake/lib/toaster/toastergui/templates/project.html | 2 +-
 bitbake/lib/toaster/toastergui/views.py               | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/project.html 
b/bitbake/lib/toaster/toastergui/templates/project.html
index 54590ee..15210db 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -293,7 +293,7 @@ vim: expandtab tabstop=2
         <a href="{% url 'importlayer' %}">Import layer</a></p>
       <ul class="unstyled configuration-list">
           <li ng-repeat="l in layers track by l.id" class="animate-repeat">
-            <a href="{[l.layerdetailurl]}" class="layer-info" 
data-toggle="tooltip" tooltip="{[l.giturl]} | {[l.branch.name]}">{[l.name]}</a>
+            <a href="{[l.layerdetailurl]}" class="layer-info" 
data-toggle="tooltip" tooltip-placement="right" tooltip="{[l.giturl]} | 
{[l.vcs_reference]}">{[l.name]}</a>
             <i class="icon-trash" ng-click="layerDel(l.id)" 
tooltip="Delete"></i>
                       </li>
       </ul>
diff --git a/bitbake/lib/toaster/toastergui/views.py 
b/bitbake/lib/toaster/toastergui/views.py
index 8034cfc..d770795 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -2131,9 +2131,8 @@ if toastermain.settings.MANAGED:
                         "giturl": x.layercommit.layer.vcs_url,
                         "url": x.layercommit.layer.layer_index_url,
                         "layerdetailurl": reverse("layerdetails", 
args=(x.layercommit.pk,)),
-                # This branch name is actually the release
-                        "branch" : { "name" : x.layercommit.commit, 
"layersource" : x.layercommit.up_branch.layer_source.name if 
x.layercommit.up_branch != None else None}},
-                    prj.projectlayer_set.all().order_by("id")),
+                        "vcs_reference" : x.layercommit.get_vcs_reference() },
+                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, 
"description":x.description}, Release.objects.all()),
-- 
2.1.0

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to