OLD | NEW |
1 // Copyright (C) 2013 Google Inc. All rights reserved. | 1 // Copyright (C) 2013 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 for (var i = 0; i < paramsList.length; i++) { | 64 for (var i = 0; i < paramsList.length; i++) { |
65 var thisParam = paramsList[i].split('='); | 65 var thisParam = paramsList[i].split('='); |
66 if (thisParam.length != 2) { | 66 if (thisParam.length != 2) { |
67 console.log('Invalid query parameter: ' + paramsList[i]); | 67 console.log('Invalid query parameter: ' + paramsList[i]); |
68 continue; | 68 continue; |
69 } | 69 } |
70 | 70 |
71 paramsMap[thisParam[0]] = decodeURIComponent(thisParam[1]); | 71 paramsMap[thisParam[0]] = decodeURIComponent(thisParam[1]); |
72 } | 72 } |
73 | 73 |
74 // FIXME: remove support for mapping from the master parameter to the group | 74 // FIXME: Make master a first-class parameter instead of replacing it with t
he group. |
75 // one once the waterfall starts to pass in the builder name instead. | |
76 if (paramsMap.master) { | 75 if (paramsMap.master) { |
77 var errors = new ui.Errors(); | 76 var errors = new ui.Errors(); |
78 if (paramsMap.master == 'TryServer') | 77 if (paramsMap.master == 'TryServer') |
79 errors.addError('ERROR: You got here from the trybot waterfall. The
try bots do not record data in the flakiness dashboard. Showing results for the
regular waterfall.'); | 78 errors.addError('ERROR: You got here from the trybot waterfall. The
try bots do not record data in the flakiness dashboard. Showing results for the
regular waterfall.'); |
80 else if (!builders.masters[paramsMap.master]) | 79 else if (!builders.masters[paramsMap.master] && !builders.urlNameToMaste
rName[paramsMap.master]) |
81 errors.addError('ERROR: Unknown master name: ' + paramsMap.master); | 80 errors.addError('ERROR: Unknown master name: ' + paramsMap.master); |
82 | 81 |
83 if (errors.hasErrors()) { | 82 if (errors.hasErrors()) { |
84 errors.show(); | 83 errors.show(); |
85 window.location.hash = window.location.hash.replace('master=' + para
msMap.master, ''); | 84 window.location.hash = window.location.hash.replace('master=' + para
msMap.master, ''); |
86 } else { | 85 } else { |
87 var groupIndex = paramsMap.master == 'ChromiumWebkit' ? 1 : 0; | 86 var master = builders.urlNameToMasterName[paramsMap.master] || param
sMap.master; |
88 paramsMap.group = builders.masters[paramsMap.master].groups[groupInd
ex]; | 87 var groupIndex = master == 'ChromiumWebkit' ? 1 : 0; |
| 88 paramsMap.group = builders.masters[master].groups[groupIndex]; |
89 window.location.hash = window.location.hash.replace('master=' + para
msMap.master, 'group=' + encodeURIComponent(paramsMap.group)); | 89 window.location.hash = window.location.hash.replace('master=' + para
msMap.master, 'group=' + encodeURIComponent(paramsMap.group)); |
90 delete paramsMap.master; | 90 delete paramsMap.master; |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 // FIXME: Find a better way to do this. For layout-tests, we want the defaul
t group to be | 94 // FIXME: Find a better way to do this. For layout-tests, we want the defaul
t group to be |
95 // the ToT blink group. For other test types, we want it to be the Deps grou
p. | 95 // the ToT blink group. For other test types, we want it to be the Deps grou
p. |
96 if (!paramsMap.group && (!paramsMap.testType || paramsMap.testType == 'layou
t-tests')) | 96 if (!paramsMap.group && (!paramsMap.testType || paramsMap.testType == 'layou
t-tests')) |
97 paramsMap.group = builders.groupNamesForTestType('layout-tests')[1]; | 97 paramsMap.group = builders.groupNamesForTestType('layout-tests')[1]; |
98 | 98 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 }, | 321 }, |
322 _handleLocationChange: function() | 322 _handleLocationChange: function() |
323 { | 323 { |
324 if (this.parseParameters()) | 324 if (this.parseParameters()) |
325 this._generatePage(this); | 325 this._generatePage(this); |
326 } | 326 } |
327 | 327 |
328 } | 328 } |
329 | 329 |
330 })(); | 330 })(); |
OLD | NEW |