Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged pull request #966
- Loading branch information
Showing
6 changed files
with
206 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
core/src/main/resources/lib/hudson/aggregated-failed-tests.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 20013 Red Hat, Inc. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
|
||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<st:documentation> | ||
Display links to failed test from all child reports. | ||
@since TODO | ||
<st:attribute name="it" type="AggregatedTestResultAction"> | ||
Aggregated action. | ||
</st:attribute> | ||
</st:documentation> | ||
|
||
<j:if test="${it.failCount!=0}"> | ||
<br/> | ||
<h2>Failed Tests</h2> | ||
|
||
<j:forEach var="report" items="${it.childReports}"> | ||
<j:if test="${report.result.failCount!=0}"> | ||
|
||
<h3> | ||
<a name="${report.child.project.name}"/> | ||
<a href="../${report.child.project.shortUrl}testReport" class="model-link inside">${report.child.project.name}</a> | ||
</h3> | ||
|
||
<table class="pane sortable bigtable"> | ||
<tr> | ||
<td class="pane-header">Test Name</td> | ||
<td class="pane-header" style="width:4em">Duration</td> | ||
<td class="pane-header" style="width:4em">Age</td> | ||
</tr> | ||
<j:forEach var="f" items="${report.result.failedTests}" varStatus="i"> | ||
<tr> | ||
<td class="pane"><t:failed-test result="${f}" url="../${report.child.project.shortUrl}testReport/${f.getRelativePathFrom(report.result)}"/></td> | ||
<td class="pane" style="text-align:right;">${f.duration}</td> | ||
<td class="pane" style="text-align:right;">${f.age}</td> | ||
</tr> | ||
</j:forEach> | ||
</table> | ||
</j:if> | ||
</j:forEach> | ||
</j:if> | ||
</j:jelly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 20013 Red Hat, Inc. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
|
||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<st:documentation> | ||
Display link to the failed test. | ||
@since TODO | ||
<st:attribute name="url" type="String"> | ||
Path to the failed test. | ||
</st:attribute> | ||
<st:attribute name="result" type="TestObject"> | ||
Failed test object | ||
</st:attribute> | ||
</st:documentation> | ||
<st:once> | ||
<script type="text/javascript"> | ||
<!-- TODO make sure load doesn't happen every time --> | ||
function showFailureSummary(id,query) { | ||
var element = document.getElementById(id) | ||
element.style.display = ""; | ||
document.getElementById(id + "-showlink").style.display = "none"; | ||
document.getElementById(id + "-hidelink").style.display = ""; | ||
|
||
if (typeof query !== 'undefined') { | ||
var rqo = new XMLHttpRequest(); | ||
rqo.open('GET', query, true); | ||
rqo.onreadystatechange = function() { element.innerHTML = rqo.responseText; } | ||
rqo.send(null); | ||
} | ||
} | ||
|
||
function hideFailureSummary(id) { | ||
document.getElementById(id).style.display = "none"; | ||
document.getElementById(id + "-showlink").style.display = ""; | ||
document.getElementById(id + "-hidelink").style.display = "none"; | ||
} | ||
</script> | ||
<style type="text/css"> | ||
.failure-summary { | ||
margin-left: 2em; | ||
} | ||
|
||
.failure-summary h4 { | ||
margin: 0.5em 0 0.5em 0; | ||
} | ||
|
||
.failure-summary h4 a { | ||
text-decoration: none; | ||
color: inherit; | ||
} | ||
|
||
.failure-summary h4 a img { | ||
width: 8px; | ||
height: 8px; | ||
} | ||
|
||
.failure-summary pre { | ||
margin-left: 2em; | ||
} | ||
</style> | ||
</st:once> | ||
<j:set var="id" value="${h.jsStringEscape(url)}"/> | ||
<j:set var="open" value="javascript:showFailureSummary('test-${id}','${url}/summary')"/> | ||
<j:set var="close" value="javascript:hideFailureSummary('test-${id}')"/> | ||
<a id="test-${id}-showlink" href="${open}" title="${%Show details}"> | ||
<img src="${imagesURL}/16x16/document_add.png"/> | ||
</a> | ||
<a id="test-${id}-hidelink" href="${close}" title="${%Hide details}" style="display:none"> | ||
<img src="${imagesURL}/16x16/document_delete.png"/> | ||
</a> | ||
<st:nbsp/> | ||
<a href="${url}" class="model-link inside"><st:out value="${result.fullDisplayName}"/></a> | ||
<j:forEach var="badge" items="${result.testActions}"> | ||
<st:include it="${badge}" page="badge.jelly" optional="true"/> | ||
</j:forEach> | ||
<div id="test-${id}" class="failure-summary" style="display: none;"> | ||
${%Loading...} | ||
</div> | ||
</j:jelly> |