]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: Fix missing tooltips from layers on project configuration page
authorMichael Wood <michael.g.wood@intel.com>
Tue, 13 Oct 2015 08:58:49 +0000 (09:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Oct 2015 12:35:37 +0000 (15:35 +0300)
Re-enable the layer tooltips on the project configuration page.
This adds the required fields to the API used for the layer dependencies
to be able to show the metadata needed.

Also fixes link hrefs which were missing in the add layers confirmation
dialog (bug 8251).

[YOCTO #8295]
[YOCTO #8251]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/static/js/projectpage.js
lib/toaster/toastergui/views.py

index d36704751cb02cac3fa1b8dc85b902a82d746c08..30989a016c8fcd6eb6d1bb0fe1edeaf258c32f37 100644 (file)
@@ -146,10 +146,7 @@ function projectPageInit(ctx) {
 
       link.attr("href", layerObj.layerdetailurl);
       link.text(layerObj.name);
-      /* YOCTO #8024
-        link.tooltip({title: layerObj.giturl + " | "+ layerObj.branch.name, placement: "right"});
-        branch name not accessible sometimes it is revision instead
-      */
+      link.tooltip({title: layerObj.vcs_url + " | "+ layerObj.vcs_reference, placement: "right"});
 
       var trashItem = projectLayer.children("span");
       trashItem.click(function (e) {
index 468cce3113d697fb729bc2605e26a29608b18087..c4264a11a96f5efc53833b06024344934271384e 100755 (executable)
@@ -2768,12 +2768,16 @@ if True:
         project = Project.objects.get(pk=pid)
         layer_version = Layer_Version.objects.get(pk=layerid)
 
-        context = { 'project' : project,
-                   'layerversion' : layer_version,
-                   'layerdeps' : {"list": [{"id": dep.id, "name": dep.layer.name} \
-                                              for dep in layer_version.get_alldeps(project.id)]},
-                   'projectlayers': map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=project))
-                  }
+        context = {'project' : project,
+            'layerversion' : layer_version,
+            'layerdeps' : {"list": [{"id": dep.id,
+                "name": dep.layer.name,
+                "layerdetailurl": reverse('layerdetails', args=(pid, dep.pk)),
+                "vcs_url": dep.layer.vcs_url,
+                "vcs_reference": dep.get_vcs_reference()} \
+                for dep in layer_version.get_alldeps(project.id)]},
+            'projectlayers': map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=project))
+        }
 
         return context