[openstack-dev] [Neutron][FYI] Bookmarklet for neutron gerrit review

Carl Baldwin carl at ecbaldwin.net
Fri May 9 18:32:38 UTC 2014


Fantastic!  Works for me.

Thanks,
Carl

On Fri, May 9, 2014 at 3:33 AM, marios at redhat.com <mandreou at redhat.com> wrote:
> On 08/05/14 21:29, Henry Gessau wrote:
>> Have any of you javascript gurus respun this for the new gerrit version?
>> Or can this now be done on the backend somehow?
>
> haha, have been thinking this since the gerrit upgrade a couple days
> ago. It was very useful for reviews... I am NOT a javascript guru but
> since it's Friday I gave myself 15 minutes to play with it - this works
> for me:
>
>
> javascript:(function(){
>     list = document.querySelectorAll('table.commentPanelHeader');
>     for(i in list) {
>         title = list[i];
>         if(! title.innerHTML) { continue; }
>         text = title.nextSibling;
>         if (text.innerHTML.search('Build failed') > 0) {
>             title.style.color='red'
>         } else if(title.innerHTML.search('Jenkins|CI|Ryu|Testing|Mine')
>>= 0) {
>             title.style.color='#666666'
>         } else {
>             title.style.color='blue'
>         }
>     }
> })()
>
>
> marios
>
>>
>> On Tue, Mar 04, at 4:00 pm, Carl Baldwin  wrote:
>>
>>> Nachi,
>>>
>>> Great!  I'd been meaning to do something like this.  I took yours and
>>> tweaked it a bit to highlight failed Jenkins builds in red and grey
>>> other Jenkins messages.  Human reviews are left in blue.
>>>
>>> javascript:(function(){
>>>     list = document.querySelectorAll('td.GJEA35ODGC');
>>>     for(i in list) {
>>>         title = list[i];
>>>         if(! title.innerHTML) { continue; }
>>>         text = title.nextSibling;
>>>         if (text.innerHTML.search('Build failed') > 0) {
>>>             title.style.color='red'
>>>         } else if(title.innerHTML.search('Jenkins|CI|Ryu|Testing|Mine') >= 0) {
>>>             title.style.color='#666666'
>>>         } else {
>>>             title.style.color='blue'
>>>         }
>>>     }
>>> })()
>>>
>>> Carl
>>>
>>> On Wed, Feb 26, 2014 at 12:31 PM, Nachi Ueno <nachi at ntti3.com> wrote:
>>>> Hi folks
>>>>
>>>> I wrote an bookmarklet for neutron gerrit review.
>>>> This bookmarklet make the comment title for 3rd party ci as gray.
>>>>
>>>> javascript:(function(){list =
>>>> document.querySelectorAll('td.GJEA35ODGC'); for(i in
>>>> list){if(!list[i].innerHTML){continue;};if(list[i].innerHTML &&
>>>> list[i].innerHTML.search('CI|Ryu|Testing|Mine') >
>>>> 0){list[i].style.color='#666666'}else{list[i].style.color='red'}};})()
>>>>
>>>> enjoy :)
>>>> Nachi
>>>>
>>>> _______________________________________________
>>>> OpenStack-dev mailing list
>>>> OpenStack-dev at lists.openstack.org
>>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list