MPDASHBOARD-9: Added links to reports for all aggregators.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@126217 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
7ca82f58b4
commit
2787017e7e
10 files changed
+331
-20
No files matched your search
@@ -26,6 +26,7 @@
|
||||
xmlns:jsl="jelly:jsl"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:a="jelly:ant"
|
||||
xmlns="dummy" trim="false">
|
||||
|
||||
<jsl:template match="dashboard">
|
||||
@@ -70,7 +71,9 @@
|
||||
|
||||
<j:if test="${shallDisplay == 'true'}">
|
||||
<tr>
|
||||
<td><x:expr select="@name"/></td>
|
||||
<x:set var="projecturl1" select="string(@artifactId)"/>
|
||||
<j:set var="projecturl" value="${maven.multiproject.aggregateDir}${projecturl1}/index.html"/>
|
||||
<td><a href="${projecturl}"><x:expr select="@name"/></a></td>
|
||||
<jsl:applyTemplates select="aggregator"/>
|
||||
</tr>
|
||||
</j:if>
|
||||
@@ -78,13 +81,31 @@
|
||||
</jsl:template>
|
||||
|
||||
<jsl:template match="aggregator">
|
||||
<td>
|
||||
<x:set var="aggregatorName" select="string(@name)"/>
|
||||
<j:set var="aggregatorKey" value="maven.dashboard.aggregator.${aggregatorName}.report"/>
|
||||
<j:set var="aggregatorHasReport" value="false"/>
|
||||
<j:set var="aggregatorReport" value="${context.getVariable(aggregatorKey)}"/>
|
||||
<j:if test="${aggregatorReport != null}">
|
||||
<u:available file="${maven.build.dir}/docs/${maven.multiproject.aggregateDir}${projecturl1}/${aggregatorReport}">
|
||||
<j:set var="aggregatorHasReport" value="true"/>
|
||||
</u:available>
|
||||
</j:if>
|
||||
<td>
|
||||
<x:set var="str" select="string()"/>
|
||||
<!-- if aggregator output is a not percentage value, just print the value -->
|
||||
<!-- could print a different background color based on a configurable -->
|
||||
<!-- range, see MPDASHBOARD-2 in Jira issues for this plugin -->
|
||||
<j:if test="${str.trim().endsWith('%') == 'false'}">
|
||||
<x:expr select="text()"/>
|
||||
<j:choose>
|
||||
<j:when test="${aggregatorHasReport == 'true'}">
|
||||
<a href="${maven.multiproject.aggregateDir}${projecturl1}/${aggregatorReport}">
|
||||
<x:expr select="text()"/>
|
||||
</a>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<x:expr select="text()"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
|
||||
<!-- if aggregator output is a percentage value, print a progress bar -->
|
||||
@@ -101,7 +122,16 @@
|
||||
<tr>
|
||||
<x:element name="td">
|
||||
<x:attribute name="colspan">2</x:attribute>
|
||||
<j:expr value="${percent}%"/>
|
||||
<j:choose>
|
||||
<j:when test="${aggregatorHasReport == 'true'}">
|
||||
<a href="${maven.multiproject.aggregateDir}${projecturl1}/${aggregatorReport}">
|
||||
<j:expr value="${percent}%"/>
|
||||
</a>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<j:expr value="${percent}%"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</x:element>
|
||||
</tr>
|
||||
</j:if>
|
||||
|
||||
Reference in new issue
Block a user