OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return Promise.all(requestPromises).then(function() { | 99 return Promise.all(requestPromises).then(function() { |
100 return buildInfoByBuilder; | 100 return buildInfoByBuilder; |
101 }); | 101 }); |
102 }); | 102 }); |
103 } | 103 } |
104 | 104 |
105 builders.buildersFailingNonLayoutTests = function() | 105 builders.buildersFailingNonLayoutTests = function() |
106 { | 106 { |
107 return fetchMostRecentBuildInfoByBuilder().then(function(buildInfoByBuilder)
{ | 107 return fetchMostRecentBuildInfoByBuilder().then(function(buildInfoByBuilder)
{ |
108 var failureList = {}; | 108 var failureList = {}; |
109 $.each(buildInfoByBuilder, function(builderName, buildInfo) { | 109 Object.keys(buildInfoByBuilder, function(builderName, buildInfo) { |
110 if (!buildInfo) | 110 if (!buildInfo) |
111 return; | 111 return; |
112 var failures = failingSteps(buildInfo); | 112 var failures = failingSteps(buildInfo); |
113 if (failures.length) | 113 if (failures.length) |
114 failureList[builderName] = failures.map(function(failure) { retu
rn failure.name; }); | 114 failureList[builderName] = failures.map(function(failure) { retu
rn failure.name; }); |
115 }); | 115 }); |
116 return failureList; | 116 return failureList; |
117 }); | 117 }); |
118 }; | 118 }; |
119 | 119 |
120 builders.mostRecentBuildForBuilder = function(builderName) { | 120 builders.mostRecentBuildForBuilder = function(builderName) { |
121 return net.json(config.buildConsoleURL + '/json/builders/' + builderName).th
en(function(builderStatus) { | 121 return net.json(config.buildConsoleURL + '/json/builders/' + builderName).th
en(function(builderStatus) { |
122 var cachedBuilds = builderStatus.cachedBuilds; | 122 var cachedBuilds = builderStatus.cachedBuilds; |
123 var mostRecentBuild = Math.max.apply(Math, cachedBuilds); | 123 var mostRecentBuild = Math.max.apply(Math, cachedBuilds); |
124 return mostRecentBuild; | 124 return mostRecentBuild; |
125 }); | 125 }); |
126 }; | 126 }; |
127 | 127 |
128 })(); | 128 })(); |
OLD | NEW |