[all] Dynamic Zuul results table in Gerrit 3
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
Hi,
On Thu, Dec 3, 2020 at 2:57 PM Radosław Piliszek radoslaw.piliszek@gmail.com wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
Thanks, Works for me in firefox with Greasemonkey. The only difference I noticed wrt previous gerrit one is that the current one displays both already available zuul results(from previous run) and the current running one, which is fine.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
Thanks and Regards Yatin Karel
On Thu, Dec 3, 2020 at 10:44 AM Yatin Karel ykarel@redhat.com wrote:
Hi,
On Thu, Dec 3, 2020 at 2:57 PM Radosław Piliszek radoslaw.piliszek@gmail.com wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
Thanks, Works for me in firefox with Greasemonkey. The only difference I noticed wrt previous gerrit one is that the current one displays both already available zuul results(from previous run) and the current running one, which is fine.
Yay, thanks for confirming.
Yes, I obviously forgot all the little changes I made but this is one of them. I somehow like it better like this. The styling is not perfect now to differentiate between the two tables but it can be figured out based on the contents.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
Thanks and Regards Yatin Karel
-yoctozepto
On Thu, Dec 3, 2020 at 11:03 AM Radosław Piliszek radoslaw.piliszek@gmail.com wrote:
... I obviously forgot all the little changes I made ...
Just remembered one so writing down for posterity. One of the enhancements is that it supports multiple tenants, i.e. it works for non-openstack/ namespaces, e.g. x/, opendev/ or zuul/ too.
-yoctozepto
On Thu, Dec 3, 2020 at 4:22 AM Radosław Piliszek radoslaw.piliszek@gmail.com wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I just set it up and it's awesome.
Perhaps this could somehow make it's way into a Gerrit plugin so it can be available for all users.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
On Thu, Dec 03, 2020 at 10:22 Radosław Piliszek wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
Hello
It seems like this script is injecting build details directly using the innerHTML attribute without filtering html entities, please see the `Security considerations` section of
https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML
-Tristan
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
On Thu, Dec 3, 2020 at 2:38 PM Tristan Cacqueray tdecacqu@redhat.com wrote:
On Thu, Dec 03, 2020 at 10:22 Radosław Piliszek wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
Hello
It seems like this script is injecting build details directly using the innerHTML attribute without filtering html entities, please see the `Security considerations` section of
https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML
Yes, it is a generally valid remark but I consider both Gerrit and Zuul (both of OpenDev) to have the exact same level of trust so did not modify the approach. But yes, for anyone trying to learn best practices from this snippet - please do not, it is far from them. :-) In general this approach is very wasteful as it causes rebuilding (or rather rejoining) and reparsing of html, instead of DOM manipulations. For such a simple table it does not hurt but please do not do it at home.
-yoctozepto
Sorry to respond to such an old thread, but figured the context might help.
Sometime in the past couple of months, the Zuul status script (thanks Radoslaw!) that's run in the tamper/greasemonkey browser extension stopped working. Not sure if anyone else noticed and/or has a workaround for it, I'm just not good enough with javascript to fix it myself :(
Thanks,
-Brian
On 12/3/20 04:22, Radosław Piliszek wrote:
Hello Fellow OpenStack and OpenDev Folks!
TL;DR click on [3] and enjoy.
I am starting this thread to not hijack the discussion happening on [1].
First of all, I would like to thank gibi (Balazs Gibizer) for hacking a way to get the place to render the table in the first place (pun intended).
I have been a long-time-now user of [2]. I have improved and customised it for myself but never really got to share back the changes I made. The new Gerrit obviously broke the whole script so it was of no use to share at that particular state. However, inspired by gibi's work, I decided to finally sit down and fix it to work with Gerrit 3 and here it comes: [3]. Works well on Chrome with Tampermonkey. Not tested others.
I hope you will enjoy this little helper (I do).
I know the script looks super fugly but it generally boils down to a mix of styles of 3 people and Gerrit having funky UI rendering.
Finally, I'd also like to thank hrw (Marcin Juszkiewicz) for linking me to the original Michel's script in 2019.
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/019051.... [2] https://opendev.org/x/coats/src/commit/444c95738677593dcfed0cfd9667d4c4f0d59... [3] https://gist.github.com/yoctozepto/7ea1271c299d143388b7c1b1802ee75e
Kind regards, -yoctozepto
participants (5)
-
Brian Haley
-
Mohammed Naser
-
Radosław Piliszek
-
Tristan Cacqueray
-
Yatin Karel