Skip to contentSkip to conversation

toaster: Fix missing tooltips from layers on project configuration page

PATCH In review Michael Wood 3 participants 5 messages Oct 6, 2015 – Oct 13, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toaster: Fix missing tooltips from layers on project configuration page

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.

[YOCTO #8295]

---
 bitbake/lib/toaster/toastergui/static/js/projectpage.js |  5 +----
 bitbake/lib/toaster/toastergui/views.py                 | 16 ++++++++++------
 2 files changed, 11 insertions(+), 10 deletions(-)
bitbake/lib/toaster/toastergui/static/js/projectpage.js +1 -4
index 95cef18..8d68ce1 100644
@@ -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) {
bitbake/lib/toaster/toastergui/views.py +10 -6
index e07f0e2..2a9423b 100755
@@ -2761,12 +2761,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
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 5 lines · On 06/10/2015 18:51, "[email protected] on behalf of Michael…

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.

[YOCTO #8295]

This works for me: tooltips are back :)

Thanks!

Belén

Quoted 68 lines

---
bitbake/lib/toaster/toastergui/static/js/projectpage.js | 5 +----
bitbake/lib/toaster/toastergui/views.py | 16
++++++++++------

2 files changed, 11 insertions(+), 10 deletions(-)
bitbake/lib/toaster/toastergui/static/js/projectpage.js +1 -4
index 95cef18..8d68ce1 100644
@@ -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) {
bitbake/lib/toaster/toastergui/views.py +5 -6
index e07f0e2..2a9423b 100755
@@ -2761,12 +2761,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)),

bitbake/lib/toaster/toastergui/views.py +4 -0
+                "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

Signature · 7 lines
2.1.4

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

Could someone review/merge this. I think it also fixes [YOCTO #3251 <https://bugzilla.yoctoproject.org/show_bug.cgi?id=8251>]

Michael

Quoted 83 lines · Belen
Quoted 5 lines · On 06/10/2015 18:51, "[email protected] on behalf of Michael…

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.

[YOCTO #8295]

This works for me: tooltips are back :)

Thanks!

Belén

Quoted 67 lines

---
bitbake/lib/toaster/toastergui/static/js/projectpage.js | 5 +----
bitbake/lib/toaster/toastergui/views.py | 16
++++++++++------

2 files changed, 11 insertions(+), 10 deletions(-)
bitbake/lib/toaster/toastergui/static/js/projectpage.js +1 -4
index 95cef18..8d68ce1 100644
@@ -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) {
bitbake/lib/toaster/toastergui/views.py +5 -6
index e07f0e2..2a9423b 100755
@@ -2761,12 +2761,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)),

bitbake/lib/toaster/toastergui/views.py +4 -0
+                "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

Signature · 7 lines
2.1.4

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
#3 lore raw
Quoted 2 lines · Michael Wood

Could someone review/merge this. I think it also fixes [YOCTO #3251 <
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8251>]

I'll look at this.

Elliot

Quoted 99 lines

Michael

Quoted 79 lines · Belen

On 06/10/2015 18:51, "[email protected] on behalf of Michael Wood" <[email protected] on behalf of [email protected]> wrote:

Re-enable the layer tooltips on the project configuration page.

Quoted 5 lines

This adds the required fields to the API used for the layer dependencies to be able to show the metadata needed.

[YOCTO #8295]

This works for me: tooltips are back :)

Thanks!

Belén

Quoted 61 lines

---
bitbake/lib/toaster/toastergui/static/js/projectpage.js | 5 +----
bitbake/lib/toaster/toastergui/views.py | 16
++++++++++------

2 files changed, 11 insertions(+), 10 deletions(-)
bitbake/lib/toaster/toastergui/static/js/projectpage.js +1 -4
index 95cef18..8d68ce1 100644
@@ -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) {
bitbake/lib/toaster/toastergui/views.py +5 -6
index e07f0e2..2a9423b 100755
@@ -2761,12 +2761,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)),

bitbake/lib/toaster/toastergui/views.py +4 -0
+                "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

--
2.1.4

Quoted 7 lines
Quoted 6 lines

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

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

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
#4 lore raw
Quoted 7 lines · Elliot
Quoted 2 lines · Michael Wood

Could someone review/merge this. I think it also fixes [YOCTO #3251 <
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8251>]

I reviewed this, and confirmed it fixes 8251.

I have sent it upstream and added to toaster-next.

Elliot

Quoted 113 lines

I'll look at this.

Elliot

Quoted 93 lines

Michael

Quoted 79 lines · Belen

On 06/10/2015 18:51, "[email protected] on behalf of Michael Wood" <[email protected] on behalf of [email protected]> wrote:

Re-enable the layer tooltips on the project configuration page.

Quoted 5 lines

This adds the required fields to the API used for the layer dependencies to be able to show the metadata needed.

[YOCTO #8295]

This works for me: tooltips are back :)

Thanks!

Belén

Quoted 61 lines

---
bitbake/lib/toaster/toastergui/static/js/projectpage.js | 5 +----
bitbake/lib/toaster/toastergui/views.py | 16
++++++++++------

2 files changed, 11 insertions(+), 10 deletions(-)
bitbake/lib/toaster/toastergui/static/js/projectpage.js +1 -4
index 95cef18..8d68ce1 100644
@@ -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) {
bitbake/lib/toaster/toastergui/views.py +5 -6
index e07f0e2..2a9423b 100755
@@ -2761,12 +2761,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)),

bitbake/lib/toaster/toastergui/views.py +4 -0
+                "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

--
2.1.4

Quoted 7 lines
Quoted 6 lines

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

Quoted 6 lines

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

--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre