Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-23561] Copied matrix.jelly from Jenkins 1.509 (/lib/hu…
…dson/project/matrix.jelly).
- Loading branch information
Showing
4 changed files
with
105 additions
and
2 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
103 changes: 103 additions & 0 deletions
103
src/main/resources/hudson/plugins/matrix_configuration_parameter/taglib/matrix.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,103 @@ | ||
<!-- | ||
The MIT License | ||
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Yahoo! 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. | ||
--> | ||
|
||
<!-- | ||
Generate configuration matrix and invoke body with 'p' as the instance of T | ||
(of Layouter<T>) | ||
Used by Matrix* classes | ||
--> | ||
<?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" xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project"> | ||
<st:documentation> | ||
Generate configuration matrix and invoke body with 'p' as the instance of T | ||
(of Layouter<T>) | ||
|
||
<st:attribute name="autoRefresh"> | ||
If specified, the content of the matrix will be automatically updated via AJAX. | ||
(This happens by requesting URL "./ajaxMatrix", so the caller needs "ajaxMatrix.jelly" | ||
to serve this request.) | ||
</st:attribute> | ||
</st:documentation> | ||
|
||
<j:set var="o" value="${it.layouter}"/> | ||
<div id='matrix'> | ||
<j:choose> | ||
<!-- Optimized case when there's only one dimension to the axis (or zero dimension) --> | ||
<j:when test="${empty(o.x) and empty(o.y)}"> | ||
<h2>${%Configurations}</h2> | ||
<j:forEach var="p" items="${o.rows[0][0]}"> | ||
<d:invokeBody /> | ||
<st:nbsp /> | ||
</j:forEach> | ||
</j:when> | ||
<j:otherwise> | ||
<table id="configuration-matrix"> | ||
<!-- X-axis --> | ||
<j:forEach var="x" items="${o.x}" varStatus="loop"> | ||
<tr class="matrix-row"> | ||
<!-- space for Y-axis --> | ||
<j:if test="${!empty(o.y)}"> | ||
<td id="matrix-title" colspan="${size(o.y)}">${%Configuration Matrix}</td> | ||
</j:if> | ||
<j:forEach begin="1" end="${o.repeatX(loop.index)}"> | ||
<j:forEach var="v" items="${x.values}"> | ||
<td class="matrix-header" colspan="${o.width(loop.index)}">${v}</td> | ||
</j:forEach> | ||
</j:forEach> | ||
</tr> | ||
</j:forEach> | ||
|
||
<!-- Y-axis --> | ||
<j:forEach var="r" items="${o.rows}"> | ||
<tr> | ||
<j:forEach var="y" items="${o.y}" varStatus="loop"> | ||
<j:if test="${r.drawYHeader(loop.index)!=null}"> | ||
<td class="matrix-leftcolumn" rowspan="${o.height(loop.index)}">${r.drawYHeader(loop.index)}</td> | ||
</j:if> | ||
</j:forEach> | ||
|
||
<j:forEach var="c" items="${r}"> | ||
<td class="matrix-cell"> | ||
<j:choose> | ||
<j:forEach var="p" items="${c}"> | ||
<div> | ||
<d:invokeBody /> | ||
</div> | ||
</j:forEach> | ||
</j:choose> | ||
</td> | ||
</j:forEach> | ||
</tr> | ||
</j:forEach> | ||
</table> | ||
</j:otherwise> | ||
</j:choose> | ||
<j:if test="${ajax==null and attrs.autoRefresh and !h.isAutoRefresh(request)}"> | ||
<script defer="defer"> | ||
refreshPart('matrix',"./ajaxMatrix"); | ||
</script> | ||
</j:if> | ||
</div> | ||
</j:jelly> |
Empty file.