Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 674025

Summary: [RFE] Always show task specified by anchor
Product: [Retired] Beaker Reporter: Šimon Lukašík <slukasik>
Component: web UIAssignee: Amit Saha <asaha>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 0.6CC: bpeck, dcallagh, ebaak, mcsontos, mishin, rmancy
Target Milestone: 0.10.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: UX
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-22 06:44:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 545868    

Description Šimon Lukašík 2011-01-31 11:30:13 UTC
Description of problem:
On Beaker webui we can determinate particular test run by url like:

    http://fqdn/recipes/$recipe_id/task$task_id

For instance:

    https://beaker.engineering.redhat.com/recipes/100990#task1112067

Unfortunately such #task anchor is working only when tasks drop-down
list is expanded. In case it's not expanded you won't be navigated to
specified task.

User is forced to click on "Show All results" button and then reload
a page.

Is it possible to show requested task, no matter of expanded/not expanded?

Comment 1 Dan Callaghan 2011-01-31 20:59:35 UTC
I imagine we could add some onload js which looks for a #task1234 anchor and expands the results if one is present.

Comment 2 Amit Saha 2012-10-25 06:30:17 UTC
A cookie (unique to the Recipe) is being set when "Show All Results" is clicked. And hence, all subsequent visits to this page goes to the particular task referred to the by the #taskid. However, once the "Hide Results" is clicked, the cookie is forgotten and hence the next reference to the #taskid doesn't show the specific task.

I am going to think, how we can work around this.

Comment 3 Dan Callaghan 2012-10-25 06:38:57 UTC
If an anchor is present (check window.location.hash) can we just ignore the cookie, and always display the relevant results?

I guess the problem is we won't know which recipe's results has the task ID we want...

Comment 4 Amit Saha 2012-10-26 01:32:30 UTC
Yeah, so if an anchor is present, we simply display the results, even if the cookie is not present. 

Your second problem is not a problem, because from what it seems like the result is already on the client side -- its a matter of hiding/displaying it, which the cookie controls -- with its values ('all','fail') if present, else its absence.

I gerrit: http://gerrit.beaker-project.org/#/c/1443/

Comment 5 Raymond Mancy 2012-10-29 00:25:15 UTC
Amit, (In reply to comment #4)
> Yeah, so if an anchor is present, we simply display the results, even if the
> cookie is not present. 
> 
> Your second problem is not a problem, because from what it seems like the
> result is already on the client side -- its a matter of hiding/displaying
> it, which the cookie controls -- with its values ('all','fail') if present,
> else its absence.
> 

Is that right? IIRC this _was_ the default behaviour but we had to change it due to slow loading times of result pages due to task results having to be loaded (regardless of whether the user wanted to view them). I thought we had changed it to load only on clicking 'Show X results'.

> I gerrit: http://gerrit.beaker-project.org/#/c/1443/

Comment 6 Amit Saha 2012-10-30 02:14:11 UTC
(In reply to comment #5)
> Amit, (In reply to comment #4)
> > Yeah, so if an anchor is present, we simply display the results, even if the
> > cookie is not present. 
> > 
> > Your second problem is not a problem, because from what it seems like the
> > result is already on the client side -- its a matter of hiding/displaying
> > it, which the cookie controls -- with its values ('all','fail') if present,
> > else its absence.
> > 
> 
> Is that right? IIRC this _was_ the default behaviour but we had to change it
> due to slow loading times of result pages due to task results having to be
> loaded (regardless of whether the user wanted to view them). I thought we
> had changed it to load only on clicking 'Show X results'.

You are right. The results are loaded by issuing a remoteRequest() on the specific recipe.

Comment 7 Amit Saha 2012-10-31 08:21:08 UTC
In Gerrit: http://gerrit.beaker-project.org/1443

Comment 10 Raymond Mancy 2012-11-22 06:44:37 UTC
This has now been released