Need help dispalying data for patchset in a new screen

29 views
Skip to first unread message

Khai Do

unread,
Aug 4, 2016, 4:54:05 PM8/4/16
to Repo and Gerrit Discussion
Hello All.  I'm working on the verify-status plugin to allow saving of test metadata/reports and viewing those reports on the Gerrit UI.  The data model allows for multiple reports per patchset.  I've decided to display a single report (the most current one) on the Gerrit change screen[1].   Now I'm trying to figure out a good way to display the history of test reports for a patchset.  There can be many reports per patchset so I don't really want to it to appear on the change screen.  I'm thinking of maybe having a link on the change screen that would take users to a separate gerrit screen to show the history of test results for that patchset.  I was wondering if anybody can give me ideas on how to do this? 

I did look at the cookbook index screen[2] as an example.  The thing I would need in the new screen (cookbook index like) is the change id and revision id so I can make the REST request for the test data.  Is there a way to somehow get the change and revision Ids from an index screen?  Or maybe pass the change/revision IDs from the change screen to the index screen?  

David Ostrovsky

unread,
Aug 5, 2016, 12:32:07 AM8/5/16
to Repo and Gerrit Discussion

On Thursday, August 4, 2016 at 10:54:05 PM UTC+2, Khai Do wrote:
Hello All.  I'm working on the verify-status plugin to allow saving of test metadata/reports and viewing those reports on the Gerrit UI.  The data model allows for multiple reports per patchset.  I've decided to display a single report (the most current one) on the Gerrit change screen[1].   Now I'm trying to figure out a good way to display the history of test reports for a patchset.  There can be many reports per patchset so I don't really want to it to appear on the change screen.

Why not? Think about old change screen and the current GWT based one.
The main difference betwen those two is presentation of patch sets.
While in the old one all patch set were presented on sindgle change screen,
there is a drop down that allows you to switch between different patch sets
on the new one.

Can't you borrow the same idea for verify result visualization? As you fetch
the verification data for the current patch set you will get exactly 1 per category
or n results for the current patch set, (what you named history). One result is
clear: only this set is shown, for n results you render in addition a drop down
on the top of the Verification result panel and allow user to switch to another
verification result in the history, and refresh the panel with older/newer results.

Advantage of this approach is that one single run of verification jobs is a rule,
and multipe runs is an exception (ptoblem with CI). I would try to optimize the
usability of this plugin for the major use case and render one panel direct on
the change screen.


Zaro

unread,
Aug 5, 2016, 1:58:49 AM8/5/16
to David Ostrovsky, Repo and Gerrit Discussion
> Can't you borrow the same idea for verify result visualization? As you fetch
> the verification data for the current patch set you will get exactly 1 per
> category
> or n results for the current patch set, (what you named history). One result
> is
> clear: only this set is shown, for n results you render in addition a drop
> down
> on the top of the Verification result panel and allow user to switch to
> another
> verification result in the history, and refresh the panel with older/newer
> results.

The actual use case people want is to be able to view all of the test
history at the same time (similar to the expanded comments view).
This would allow us to easily view the differences between tests
runs/reports. That is why i was thinking of just putting all results
all on a single page or screen.

David Ostrovsky

unread,
Aug 5, 2016, 2:10:40 AM8/5/16
to Repo and Gerrit Discussion
For me it's still a corner use case. If you think the plugin must support it,
fine. One way to achieve that would be to do what I said in my previous
comment and add "Show full history" icon right to the drop down where
CI run can be selected. Another way would be to add one specific value
to the drop down: "Show full history in dedicated screen" or some such.

This approach would also solve your problem of missing change id/patch
set number on the new screen, as you would just pass them from the
change screen.

Edwin Kempin

unread,
Aug 5, 2016, 5:04:49 AM8/5/16
to Khai Do, Repo and Gerrit Discussion
On Thu, Aug 4, 2016 at 10:54 PM, Khai Do <zaro...@gmail.com> wrote:
Hello All.  I'm working on the verify-status plugin to allow saving of test metadata/reports and viewing those reports on the Gerrit UI.  The data model allows for multiple reports per patchset.  I've decided to display a single report (the most current one) on the Gerrit change screen[1].   Now I'm trying to figure out a good way to display the history of test reports for a patchset.  There can be many reports per patchset so I don't really want to it to appear on the change screen.  I'm thinking of maybe having a link on the change screen that would take users to a separate gerrit screen to show the history of test results for that patchset.  I was wondering if anybody can give me ideas on how to do this? 

I did look at the cookbook index screen[2] as an example.  The thing I would need in the new screen (cookbook index like) is the change id and revision id so I can make the REST request for the test data.  Is there a way to somehow get the change and revision Ids from an index screen?  Or maybe pass the change/revision IDs from the change screen to the index screen?  
Assuming you add a link to the change screen, that links to a custom screen in your plugin, then you can pass the change ID and the patch set ID as part of the URL.
For this you would register your plugin screen with a regular expression. The serviceuser plugin has an example for this, see [1]. Within your plugin screen you can read the tokens from the URL [2].

[1] https://gerrit.googlesource.com/plugins/serviceuser/+/master/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/ServiceUserPlugin.java#30
 

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Khai Do

unread,
Aug 5, 2016, 3:12:39 PM8/5/16
to Repo and Gerrit Discussion, zaro...@gmail.com
Thank you David and Edwin.  This will work.  -Khai


On Friday, August 5, 2016 at 2:04:49 AM UTC-7, Edwin Kempin wrote:
On Thu, Aug 4, 2016 at 10:54 PM, Khai Do <zaro...@gmail.com> wrote:
Hello All.  I'm working on the verify-status plugin to allow saving of test metadata/reports and viewing those reports on the Gerrit UI.  The data model allows for multiple reports per patchset.  I've decided to display a single report (the most current one) on the Gerrit change screen[1].   Now I'm trying to figure out a good way to display the history of test reports for a patchset.  There can be many reports per patchset so I don't really want to it to appear on the change screen.  I'm thinking of maybe having a link on the change screen that would take users to a separate gerrit screen to show the history of test results for that patchset.  I was wondering if anybody can give me ideas on how to do this? 

I did look at the cookbook index screen[2] as an example.  The thing I would need in the new screen (cookbook index like) is the change id and revision id so I can make the REST request for the test data.  Is there a way to somehow get the change and revision Ids from an index screen?  Or maybe pass the change/revision IDs from the change screen to the index screen?  
Assuming you add a link to the change screen, that links to a custom screen in your plugin, then you can pass the change ID and the patch set ID as part of the URL.
For this you would register your plugin screen with a regular expression. The serviceuser plugin has an example for this, see [1]. Within your plugin screen you can read the tokens from the URL [2].

[1] https://gerrit.googlesource.com/plugins/serviceuser/+/master/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/ServiceUserPlugin.java#30
 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages