Merge lp:~pfalcon/linaro-android-frontend/lava-requests-fixes2 into lp:linaro-android-frontend

Proposed by Paul Sokolovsky
Status: Merged
Approved by: James Tunnicliffe
Approved revision: 245
Merged at revision: 245
Proposed branch: lp:~pfalcon/linaro-android-frontend/lava-requests-fixes2
Merge into: lp:linaro-android-frontend
Diff against target: 51 lines (+0/-31)
1 file modified
static/buildDetails.js (+0/-31)
To merge this branch: bzr merge lp:~pfalcon/linaro-android-frontend/lava-requests-fixes2
Reviewer Review Type Date Requested Status
James Tunnicliffe Pending
Review via email: mp+88532@code.launchpad.net

Description of the change

This fixes case of clicking 2 builds w/o reloading the page - 2nd and other builds would still show stuck "Loading..." due to static var assignment.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'static/buildDetails.js'
2--- static/buildDetails.js 2012-01-13 16:18:29 +0000
3+++ static/buildDetails.js 2012-01-13 17:07:28 +0000
4@@ -95,17 +95,6 @@
5 }
6
7 function receivedLavaJobInfo (e, response) {
8- if (typeof receivedLavaJobInfo.got_info != "undefined")
9- {
10- // Don't pass through a second job info. Assumption is that they are the same
11- // so it doesn't matter if we find several and they are just duplicates. This
12- // happened around 12-2011 when we started to migrate build outputs to
13- // snapshots.linaro.org.
14- return;
15- }
16-
17- receivedLavaJobInfo.got_info = true;
18-
19 var job_info = Y.JSON.parse(response.responseText);
20 if (typeof job_info.lava_url == "undefined") {
21 Y.one("#testresults").setContent("This build did not undergo LAVA testing.");
22@@ -168,29 +157,9 @@
23 },
24 testresults: function (results) {
25
26- /* The build result can exist in one of two locations depending
27- on how old the test result is. We create both URLs and fire
28- off fetches to both locations. The one that works will be
29- used to display the results.
30- */
31- var old_style_url = results.buildUrl + '/artifact/build/out/lava-job-info';
32-
33- /* Check URL. If it points to snapshot.linaro.org, proxy it through
34- the master, which doesn't get stopped to ask to accept a license. */
35- if (old_style_url.match(/https:\/\/snapshots.linaro.org\//))
36- {
37- old_style_url = '/api/get-lava-job-info?url=' + old_style_url
38- }
39-
40 var new_style_url = '/api/get-lava-job-info?url=http://snapshots.linaro.org/android/'
41 + rawBuildName + '/' + results.number.toString() + '/lava-job-info';
42
43- // Try both locations. File should exist only in one location...
44-/* Y.io(
45- old_style_url,
46- {
47- on: { success: receivedLavaJobInfo }
48- });*/
49 Y.io(
50 new_style_url,
51 {

Subscribers

People subscribed via source and target branches