From: Michael Wood <michael.g.wood@intel.com>
To: "Barros Pena, Belen" <belen.barros.pena@intel.com>,
"Lerner, David M (Wind River)" <dave.lerner@windriver.com>
Cc: "toaster@yoctoproject.org" <toaster@yoctoproject.org>
Subject: Re: [review-request] 7191 Version3 format shaid on all layers page
Date: Fri, 06 Mar 2015 11:28:49 +0000 [thread overview]
Message-ID: <54F98F71.7010900@intel.com> (raw)
In-Reply-To: <D11E4CDF.55C51%belen.barros.pena@intel.com>
On 05/03/15 18:13, Barros Pena, Belen wrote:
> On 05/03/2015 16:07, "Lerner, Dave" <dave.lerner@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@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@intel.com]
>>>> Sent: Wednesday, March 04, 2015 9:58 AM
>>>> To: BARROS PENA, BELEN; Lerner, Dave; DAMIAN, ALEXANDRU
>>>> Cc: toaster@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@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
>>>>>>
prev parent reply other threads:[~2015-03-06 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-05 16:07 [review-request] 7191 Version3 format shaid on all layers page Lerner, Dave
2015-03-05 18:13 ` Barros Pena, Belen
2015-03-06 11:28 ` Michael Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F98F71.7010900@intel.com \
--to=michael.g.wood@intel.com \
--cc=belen.barros.pena@intel.com \
--cc=dave.lerner@windriver.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.