Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: Tools/TestResultServer/static-dashboards/builders.js

Issue 337433003: Switch buildershandler over to using the json mirror. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (C) 2012 Google Inc. All rights reserved. 1 // Copyright (C) 2012 Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 16 matching lines...) Expand all
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 function LOAD_BUILDBOT_DATA(builderData) 29 function LOAD_BUILDBOT_DATA(builderData)
30 { 30 {
31 builders.masters = {}; 31 builders.masters = {};
32 var groups = {}; 32 var groups = {};
33 var testTypes = {}; 33 var testTypes = {};
34 var testTypesThatDoNotUpload = {}; 34 var testTypesThatDoNotUpload = {};
35 builders.noUploadTestTypes = builderData['no_upload_test_types'] 35 builders.noUploadTestTypes = builderData['no_upload_test_types']
36 builderData['masters'].forEach(function(master) { 36 builderData['masters'].forEach(function(master) {
37 builders.masters[master.name] = new builders.BuilderMaster(master.name, master.url, master.tests, master.groups); 37 builders.masters[master.name] = new builders.BuilderMaster(master);
38 38
39 master.groups.forEach(function(group) { groups[group] = true; }); 39 master.groups.forEach(function(group) { groups[group] = true; });
40 40
41 Object.keys(master.tests).forEach(function(testType) { 41 Object.keys(master.tests).forEach(function(testType) {
42 if (builders.testTypeUploadsToFlakinessDashboardServer(testType)) 42 if (builders.testTypeUploadsToFlakinessDashboardServer(testType))
43 testTypes[testType] = true; 43 testTypes[testType] = true;
44 else 44 else
45 testTypesThatDoNotUpload[testType] = true; 45 testTypesThatDoNotUpload[testType] = true;
46 }); 46 });
47 }); 47 });
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 currentBuilderGroup = builderGroup; 146 currentBuilderGroup = builderGroup;
147 return currentBuilderGroup; 147 return currentBuilderGroup;
148 } 148 }
149 149
150 builders.getAllGroupNames = function() 150 builders.getAllGroupNames = function()
151 { 151 {
152 return builders.groups; 152 return builders.groups;
153 } 153 }
154 154
155 builders.BuilderMaster = function(name, basePath, tests, groups) 155 builders.BuilderMaster = function(master_data)
156 { 156 {
157 this.name = name; 157 this.name = master_data.name;
158 this.basePath = basePath; 158 this.basePath = 'http://build.chromium.org/p/' + master_data.url_name;
159 this.tests = tests; 159 this.tests = master_data.tests;
160 this.groups = groups; 160 this.groups = master_data.groups;
161 } 161 }
162 162
163 builders.BuilderMaster.prototype = { 163 builders.BuilderMaster.prototype = {
164 logPath: function(builder, buildNumber) 164 logPath: function(builder, buildNumber)
165 { 165 {
166 return this.builderPath(builder) + '/builds/' + buildNumber; 166 return this.builderPath(builder) + '/builds/' + buildNumber;
167 }, 167 },
168 builderPath: function(builder) 168 builderPath: function(builder)
169 { 169 {
170 return this.basePath + '/builders/' + builder; 170 return this.basePath + '/builders/' + builder;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if (prev.indexOf(curr) == -1) { 220 if (prev.indexOf(curr) == -1) {
221 prev.push(curr); 221 prev.push(curr);
222 } 222 }
223 return prev; 223 return prev;
224 }, []); 224 }, []);
225 225
226 return groupNames; 226 return groupNames;
227 } 227 }
228 228
229 })(); 229 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698