All of lore.kernel.org
 help / color / mirror / Atom feed
* [review-request][PATCH] bitbake: toaster: Project page fix project layers tooltip
@ 2015-03-13 16:55 Michael Wood
  2015-03-16 10:22 ` Barros Pena, Belen
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Wood @ 2015-03-13 16:55 UTC (permalink / raw)
  To: toaster

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 <michael.g.wood@intel.com>
---
 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [review-request][PATCH] bitbake: toaster: Project page fix project layers tooltip
  2015-03-13 16:55 [review-request][PATCH] bitbake: toaster: Project page fix project layers tooltip Michael Wood
@ 2015-03-16 10:22 ` Barros Pena, Belen
  2015-03-16 12:28   ` [review-request][PATCH v2] " Michael Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Barros Pena, Belen @ 2015-03-16 10:22 UTC (permalink / raw)
  To: toaster@yoctoproject.org

On 13/03/2015 16:55, "Michael Wood" <michael.g.wood@intel.com> wrote:

>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]

The tooltips look good, but the revision does not appear in them
immediately when you add a layer: only after a page refresh.

Thanks!

Belén

>
>Signed-off-by: Michael Wood <michael.g.wood@intel.com>
>---
> 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
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [review-request][PATCH v2] bitbake: toaster: Project page fix project layers tooltip
  2015-03-16 10:22 ` Barros Pena, Belen
@ 2015-03-16 12:28   ` Michael Wood
  2015-03-19 11:08     ` Michael Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Wood @ 2015-03-16 12:28 UTC (permalink / raw)
  To: toaster

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 <michael.g.wood@intel.com>
---
 bitbake/lib/toaster/toastergui/templates/project.html | 2 +-
 bitbake/lib/toaster/toastergui/views.py               | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index 54590ee..f677743 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_ref]}">{[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..5453c83 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_ref" : 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()),
@@ -2254,7 +2253,7 @@ if toastermain.settings.MANAGED:
             # return all project settings
             return HttpResponse(jsonfilter( {
                 "error": "ok",
-                "layers" :  map(lambda x: {"id": x.layercommit.pk, "orderid" : x.pk, "name" : x.layercommit.layer.name, "giturl" : x.layercommit.layer.vcs_url, "url": x.layercommit.layer.layer_index_url, "layerdetailurl": reverse("layerdetails", args=(x.layercommit.layer.pk,)), "branch" : { "name" : x.layercommit.up_branch.name, "layersource" : x.layercommit.up_branch.layer_source.name}}, prj.projectlayer_set.all().select_related("layer").order_by("id")),
+                "layers" :  map(lambda x: {"id": x.layercommit.pk, "orderid" : x.pk, "name" : x.layercommit.layer.name, "giturl" : x.layercommit.layer.vcs_url, "url": x.layercommit.layer.layer_index_url, "layerdetailurl": reverse("layerdetails", args=(x.layercommit.layer.pk,)), "vcs_ref": x.layercommit.get_vcs_reference(), "branch" : { "name" : x.layercommit.up_branch.name, "layersource" : x.layercommit.up_branch.layer_source.name}}, prj.projectlayer_set.all().select_related("layer").order_by("id")),
                 "builds" : _project_recent_build_list(prj),
                 "variables": map(lambda x: (x.name, x.value), prj.projectvariable_set.all()),
                 "machine": {"name": prj.projectvariable_set.get(name="MACHINE").value},
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [review-request][PATCH v2] bitbake: toaster: Project page fix project layers tooltip
  2015-03-16 12:28   ` [review-request][PATCH v2] " Michael Wood
@ 2015-03-19 11:08     ` Michael Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Wood @ 2015-03-19 11:08 UTC (permalink / raw)
  To: toaster@yoctoproject.org

Dropping this patch as it conflicts with work now merged for #7381 will 
submit a new reduced patch.

On 16/03/15 12:28, Michael Wood wrote:
> 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 <michael.g.wood@intel.com>
> ---
>   bitbake/lib/toaster/toastergui/templates/project.html | 2 +-
>   bitbake/lib/toaster/toastergui/views.py               | 7 +++----
>   2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
> index 54590ee..f677743 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_ref]}">{[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..5453c83 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_ref" : 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()),
> @@ -2254,7 +2253,7 @@ if toastermain.settings.MANAGED:
>               # return all project settings
>               return HttpResponse(jsonfilter( {
>                   "error": "ok",
> -                "layers" :  map(lambda x: {"id": x.layercommit.pk, "orderid" : x.pk, "name" : x.layercommit.layer.name, "giturl" : x.layercommit.layer.vcs_url, "url": x.layercommit.layer.layer_index_url, "layerdetailurl": reverse("layerdetails", args=(x.layercommit.layer.pk,)), "branch" : { "name" : x.layercommit.up_branch.name, "layersource" : x.layercommit.up_branch.layer_source.name}}, prj.projectlayer_set.all().select_related("layer").order_by("id")),
> +                "layers" :  map(lambda x: {"id": x.layercommit.pk, "orderid" : x.pk, "name" : x.layercommit.layer.name, "giturl" : x.layercommit.layer.vcs_url, "url": x.layercommit.layer.layer_index_url, "layerdetailurl": reverse("layerdetails", args=(x.layercommit.layer.pk,)), "vcs_ref": x.layercommit.get_vcs_reference(), "branch" : { "name" : x.layercommit.up_branch.name, "layersource" : x.layercommit.up_branch.layer_source.name}}, prj.projectlayer_set.all().select_related("layer").order_by("id")),
>                   "builds" : _project_recent_build_list(prj),
>                   "variables": map(lambda x: (x.name, x.value), prj.projectvariable_set.all()),
>                   "machine": {"name": prj.projectvariable_set.get(name="MACHINE").value},



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-19 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 16:55 [review-request][PATCH] bitbake: toaster: Project page fix project layers tooltip Michael Wood
2015-03-16 10:22 ` Barros Pena, Belen
2015-03-16 12:28   ` [review-request][PATCH v2] " Michael Wood
2015-03-19 11:08     ` Michael Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.