correlations tab not hidden for missing correlations

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: rhelmer, Unassigned)

Tracking

Details

(Reporter)

Description

5 years ago
stephend noticed that correlations tabs are showing up for /report/list pages whether or not we actually have correlation reports, which shouldn't be happening (the tab should be hidden):

https://crash-stats.mozilla.com/report/list?product=Firefox&range_value=7&range_unit=days&date=2013-10-31&signature=mozilla%3A%3Adom%3A%3AWindowBinding%3A%3Aget_content&version=Firefox%3A28.0a1

Trying to load correlations throws an error to the JS console:

TypeError: data is null
It can't be hidden since the tabs (i.e. the HTML framework) is loaded before we issue the ajax request to get the contents of the tab. 

We can either hide the tab once the AJAX comes or do something with the content like $('#correlations .main').text('No correlations found for this signature')
(Reporter)

Comment 2

5 years ago
(In reply to Peter Bengtsson [:peterbe] from comment #1)
> It can't be hidden since the tabs (i.e. the HTML framework) is loaded before
> we issue the ajax request to get the contents of the tab. 


Oh, did that change recently? I think it used to be the case that this tab was hidden if there were no correlation reports available. 


> We can either hide the tab once the AJAX comes or do something with the
> content like $('#correlations .main').text('No correlations found for this
> signature')


Why not check it from the server-side before we generate the HTML? Checking for just the presence of the report (without parsing it) should be fairly quick.

Comment 3

5 years ago
I'm all for not hiding the tab but on the page showing if the absence of correlations is because we didn't find any for this signature within a set of existing correlations for this version or if we didn't find any for this version at all.
(In reply to Robert Helmer [:rhelmer] from comment #2)
> (In reply to Peter Bengtsson [:peterbe] from comment #1)
> > It can't be hidden since the tabs (i.e. the HTML framework) is loaded before
> > we issue the ajax request to get the contents of the tab. 
> 
> 
> Oh, did that change recently? I think it used to be the case that this tab
> was hidden if there were no correlation reports available. 
> 
Yes. I re-wrote report list to be entirely plain HTML skeleton without any data and then all data is AJAX'ed in on document onload. 

> 
> > We can either hide the tab once the AJAX comes or do something with the
> > content like $('#correlations .main').text('No correlations found for this
> > signature')
> 
> 
> Why not check it from the server-side before we generate the HTML? Checking
> for just the presence of the report (without parsing it) should be fairly
> quick.

Because that requires pulling down the whole ReportList API which is slow and expensive. Like, really slow. 

This new way means that you get something up on the screen quickly when you click a signature and all the contents of the tabs are loaded in the background async.
I think it works as expected now that it's done in AJAX (with caching).
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 years ago
Product: Socorro → Socorro Graveyard
You need to log in before you can comment on or make changes to this bug.