[Toaster] [review-request] 7191 Version4 format shaid on all layers page
Lerner, Dave
dave.lerner at windriver.com
Fri Mar 6 07:27:54 PST 2015
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lerner/layers_commitfield_7191
Michael caught another bug.
Testing: showed both commit in button and non-commit as normal text.
V3 vs V4 diff
-------------
index c6aa06c..c35a299 100644
--- a/bitbake/lib/toaster/toastergui/templates/layers.html
+++ b/bitbake/lib/toaster/toastergui/templates/layers.html
@@ -54,7 +54,7 @@
<td class="branch">
{% with vcs_ref=o.get_vcs_reference %}
{% if vcs_ref|is_shaid %}
- <a class="btn" data-content="<ul class='unstyled'> <li>{{o.branch}}</li> </ul>">
+ <a class="btn" data-content="<ul class='unstyled'> <li>{{vcs_ref}}</li> </ul>">
{{vcs_ref|truncatechars:10}}
</a>
{% else %}
Dave Lerner
> -----Original Message-----
> From: Michael Wood [mailto:michael.g.wood at intel.com]
> Sent: Friday, March 06, 2015 5:29 AM
> To: BARROS PENA, BELEN; Lerner, Dave
> Cc: toaster at yoctoproject.org
> Subject: Re: [review-request] 7191 Version3 format shaid on all layers page
>
> On 05/03/15 18:13, Barros Pena, Belen wrote:
> > On 05/03/2015 16:07, "Lerner, Dave" <dave.lerner at windriver.com> wrote:
> >
> >> http://git.yoctoproject.org/cgit.cgi/poky-contrib/
> >>
> >> Version 3: Implementing the improvement from Michael, and Belen's
> >> clarification on help bubble.
>
> + <a class="btn" data-content="<ul class='unstyled'>
> <li>{{o.branch}}</li> </ul>">
>
> should be
>
> + <a class="btn" data-content="<ul class='unstyled'>
> <li>{{vcs_ref}}</li> </ul>">
>
> Thanks
>
> > The UI is working as designed.
> >
> > Thanks!
> >
> > Belén
> >
> >>
> >> Retests
> >> --------
> >> Tested with manually entered revision strings
> >> 1234567890123456789012345678901234567890 (with button)
> >> and
> >> 12 4567890123456789012345678901234567890 (without button)
> >>
> >> HTML validator
> >> --------------
> >> 3 errors with no relation to the changed code
> >>
> >>
> >> V2 vs V3 diff
> >> -------------
> >> --- a/bitbake/lib/toaster/toastergui/templates/layers.html
> >> +++ b/bitbake/lib/toaster/toastergui/templates/layers.html
> >> @@ -52,24 +52,15 @@
> >> {% endif %}
> >> </td>
> >> <td class="branch">
> >> - {% if o.branch %}
> >> - {% if o.branch|is_shaid %}
> >> + {% with vcs_ref=o.get_vcs_reference %}
> >> + {% if vcs_ref|is_shaid %}
> >> <a class="btn" data-content="<ul class='unstyled'>
> >> <li>{{o.
> >> - {{o.branch|truncatechars:10}}
> >> + {{vcs_ref|truncatechars:10}}
> >> </a>
> >> - {% else %}
> >> - {{o.branch}}
> >> - {% endif %}
> >> - {% else %}
> >> - {% if o.branch|is_shaid %}
> >> - <a class="btn" data-content="<ul class='unstyled'>
> >> <li>{{o.
> >> - {{o.up_branch.name|truncatechars:10}}
> >> - </a>
> >> - {% else %}
> >> - {{o.up_branch.name}}
> >> - {% endif %}
> >> - <i class="icon-question-sign get-help hover-help"
> >> title="Yo
> >> - {% endif %}
> >> + {% else %}
> >> + {{vcs_ref}}
> >> + {% endif %}
> >> + {% endwith %}
> >> </td>
> >> <td class="dependencies">
> >> {% with ods=o.dependencies.all%}
> >> diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
> >> b/bitbak
> >> index 61a01ca..587a6da 100644
> >> --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
> >> +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
> >> @@ -304,7 +304,7 @@ def is_shaid(text):
> >> int(text, 16)
> >> if len(text) == 40:
> >> return True
> >> - return False
> >> + return False
> >> except:
> >> return False
> >>
> >>> -----Original Message-----
> >>> From: Lerner, Dave
> >>> Sent: Wednesday, March 04, 2015 10:44 AM
> >>> To: WOOD, MICHAEL
> >>> Cc: Barros Pena, Belen (belen.barros.pena at intel.com)
> >>> Subject: RE: [review-request] 7191 Version2 format shaid on all layers
> >>> page
> >>>
> >>> Hi Michael,
> >>>
> >>> I didn't change the original template use of
> >>> o.branch/o.upt_branch.name. The original
> >>> template only provided the help icon on the up_branch clause, that is,
> >>> the not o.branch
> >>> clause. What do you use to determine the difference if you have
> >>> abstracted the two into
> >>> one field? Can you send me your suggestion?
> >>> -Dave
> >>> My patch
> >>> {% if o.branch %}
> >>> - {{o.branch}}
> >>> + {% if o.branch|is_shaid %}
> >>> + <a class="btn" data-content="<ul class='unstyled'>
> >>> <li>{{o.branch}}</li> </ul>">
> >>> + {{o.branch|truncatechars:10}}
> >>> + </a>
> >>> + {% else %}
> >>> + {{o.branch}}
> >>> + {% endif %}
> >>> {% else %}
> >>> - {{o.up_branch.name}}
> >>> + {% if o.branch|is_shaid %}
> >>> + <a class="btn" data-content="<ul class='unstyled'>
> >>> <li>{{o.branch}}</li> </ul>">
> >>> + {{o.up_branch.name|truncatechars:10}}
> >>> + </a>
> >>> + {% else %}
> >>> + {{o.up_branch.name}}
> >>> + {% endif %}
> >>> <i class="icon-question-sign get-help hover-help"
> >>> title="Your
> >>> builds will use the tip of t
> >>> {% endif %}
> >>>
> >>>> -----Original Message-----
> >>>> From: Michael Wood [mailto:michael.g.wood at intel.com]
> >>>> Sent: Wednesday, March 04, 2015 9:58 AM
> >>>> To: BARROS PENA, BELEN; Lerner, Dave; DAMIAN, ALEXANDRU
> >>>> Cc: toaster at yoctoproject.org
> >>>> Subject: Re: [review-request] 7191 Version2 format shaid on all
> >>> layers page
> >>>> Hi Dave,
> >>>>
> >>>> Only one thing, we have renamed the branch column to "reference"
> >>> because
> >>>> the database confusingly splits up the vcs reference into, branch,
> >>>> commit, upstream branch etc etc
> >>>>
> >>>> We have abstracted trying to work out which to display via the
> >>> function
> >>>> "get_vcs_reference"
> >>>>
> >>>> So if you switch
> >>>> + {% if o.branch|is_shaid %}
> >>>> to
> >>>> + {% if o.get_vcs_reference|is_shaid %}
> >>>>
> >>>> and you can then also remove the check to see if which kind of
> >>> reference
> >>>> to display
> >>>>
> >>>> + {% else %}
> >>>> + {{o.up_branch.name}}
> >>>>
> >>>> It's a bit confusing so if you'd like me just to push a patch on top
> >>>> then you can squash it into yours.
> >>>>
> >>>> Michael
> >>>>
> >>>>
> >>>> On 04/03/15 12:26, Barros Pena, Belen wrote:
> >>>>> On 03/03/2015 22:56, "Lerner, Dave" <dave.lerner at windriver.com>
> >>> wrote:
> >>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lerner/laye
> >>> r
> >>>>>> s_commitfield_7191
> >>>>>>
> >>>>>> 7191 - If field looks like a commit SHAID(hex and 40 digits),
> >>> truncate
> >>>>>> field as button label, and show full SHAID when button depressed.
> >>>>> This seems to be working for me.
> >>>>>
> >>>>> Thanks!
> >>>>>
> >>>>> Belén
> >>>>>
> >>>>>> Dave Lerner
> >>>>>>
More information about the toaster
mailing list