Index: Tools/TestResultServer/static-dashboards/load_failures.js |
diff --git a/Tools/TestResultServer/static-dashboards/load_failures.js b/Tools/TestResultServer/static-dashboards/load_failures.js |
index f2c4ebc27ecdeb2b9b6d37187c0cfd9775914f85..afe22a1fcf2b8ec6693509ddee64f63ecfb1f40d 100644 |
--- a/Tools/TestResultServer/static-dashboards/load_failures.js |
+++ b/Tools/TestResultServer/static-dashboards/load_failures.js |
@@ -90,9 +90,6 @@ loadfailures._html = function(failureData) |
{ |
var html = ''; |
Object.keys(failureData).forEach(function(group) { |
- html += '<h1>' + group + '</h1>' + |
- '<table><tr><th>Test type</th><th>>1 week stale</th><th>>1 day stale, <1 week stale</th></tr>'; |
- |
var failingBuildersByTestType = failureData[group].failingBuilders; |
var staleBuildersByTestType = failureData[group].staleBuilders; |
var testTypesWithNoSuccessfullLoads = failureData[group].testTypesWithNoSuccessfullLoads; |
@@ -102,6 +99,13 @@ loadfailures._html = function(failureData) |
var uniqueTestTypes = testTypes.sort().filter(function(value, index, array) { |
return array.indexOf(value) === index; |
}); |
+ |
+ if (!uniqueTestTypes.length) |
+ return; |
+ |
+ html += '<h1>' + group + '</h1>' + |
+ '<table><tr><th>Test type</th><th>>1 week stale</th><th>>1 day stale, <1 week stale</th></tr>'; |
+ |
uniqueTestTypes.forEach(function(testType) { |
var failures = failingBuildersByTestType[testType] || []; |
var failureHtml = ''; |