- Added new <code>fbfiles</code> aggregator that computes FindBugs total number of files with violations. (MPDASHBOARD-13)
- Added new <code>fbviolations</code> aggregator that computes FindBugs total number of violations. (MPDASHBOARD-13) - Added percentage bar graphs to the report (MPDASHBOARD-3) git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116097 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a6dbb8fce7
commit
f07e53a565
@ -60,6 +60,19 @@ maven.dashboard.runreactor = true
|
||||
# aggregators.
|
||||
maven.dashboard.report.showempty = true
|
||||
|
||||
# Images used when generating the progress bar for the dashboard HTML color
|
||||
# for left bar
|
||||
maven.dashboard.report.bar.left = green
|
||||
|
||||
# HTML color for right bar
|
||||
maven.dashboard.report.bar.right = red
|
||||
|
||||
# Image to set cells with (should be transparent)
|
||||
maven.dashboard.report.bar.image = ${plugin.resources}/images/trans.gif
|
||||
maven.dashboard.report.bar.height = 10
|
||||
maven.dashboard.report.bar.border = 0
|
||||
maven.dashboard.report.bar.displayLabel = true
|
||||
|
||||
# Properties for gathering dashboard data for a single project
|
||||
# ------------------------------------------------------------
|
||||
|
||||
@ -189,3 +202,18 @@ maven.dashboard.aggregator.jcoverageloc.artifact = ${maven.build.dir}/jcoverage/
|
||||
maven.dashboard.aggregator.jcoverageloc.label = JCoverage LOC
|
||||
maven.dashboard.aggregator.jcoverageloc.goal = maven-jcoverage-plugin:report
|
||||
maven.dashboard.aggregator.jcoverageloc.description = JCoverage total lines of code
|
||||
|
||||
# Properties for the FindBugs file violations aggregator
|
||||
maven.dashboard.aggregator.fbfiles.script = ${maven.dashboard.aggregators.dir}/fbfiles.jelly
|
||||
maven.dashboard.aggregator.fbfiles.artifact = ${maven.build.dir}/findbugs-raw-report.xml
|
||||
maven.dashboard.aggregator.fbfiles.label = FindBugs Files with Violations
|
||||
maven.dashboard.aggregator.fbfiles.goal = maven-findbugs-plugin:report
|
||||
maven.dashboard.aggregator.fbfiles.description = Number of files with FindBugs violations
|
||||
|
||||
# Properties for the FindBugs violations aggregator
|
||||
maven.dashboard.aggregator.fbviolations.script = ${maven.dashboard.aggregators.dir}/fbviolations.jelly
|
||||
maven.dashboard.aggregator.fbviolations.artifact = ${maven.build.dir}/findbugs-raw-report.xml
|
||||
maven.dashboard.aggregator.fbviolations.label = FindBugs Violations
|
||||
maven.dashboard.aggregator.fbviolations.goal = maven-findbugs-plugin:report
|
||||
maven.dashboard.aggregator.fbviolations.description = Number of FindBugs violations
|
||||
|
||||
|
||||
BIN
dashboard/src/plugin-resources/images/trans.gif
Normal file
BIN
dashboard/src/plugin-resources/images/trans.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
@ -25,6 +25,7 @@
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:jsl="jelly:jsl"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns="dummy" trim="false">
|
||||
|
||||
<jsl:template match="dashboard">
|
||||
@ -78,7 +79,81 @@
|
||||
|
||||
<jsl:template match="aggregator">
|
||||
<td>
|
||||
<x:expr select="text()"/>
|
||||
<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:if>
|
||||
|
||||
<!-- if aggregator output is a percentage value, print a progress bar -->
|
||||
<j:if test="${str.trim().endsWith('%') == 'true'}">
|
||||
|
||||
<!-- convert percentage string to two complementary numbers -->
|
||||
<u:replace var="percentStr" value="${str}" oldChar="%" newChar=" " trim="true"/>
|
||||
<j:set var="percent" value="${0 + percentStr.trim()}"/>
|
||||
<j:set var="cpercent" value="${100 - percent}"/>
|
||||
|
||||
<j:whitespace trim="true">
|
||||
<table>
|
||||
<j:if test="${context.getVariable('maven.dashboard.report.bar.displayLabel') == 'true'}">
|
||||
<tr>
|
||||
<x:element name="td">
|
||||
<x:attribute name="colspan">2</x:attribute>
|
||||
<j:expr value="${percent}%"/>
|
||||
</x:element>
|
||||
</tr>
|
||||
</j:if>
|
||||
<tr>
|
||||
<j:if test="${percent != '0'}">
|
||||
<x:element name="td">
|
||||
<x:attribute name="bgcolor">
|
||||
<j:expr value="${maven.dashboard.report.bar.left}"/>
|
||||
</x:attribute>
|
||||
<x:element name="img">
|
||||
<x:attribute name="hspace">0</x:attribute>
|
||||
<x:attribute name="vspace">0</x:attribute>
|
||||
<x:attribute name="src">
|
||||
<j:expr value="${maven.dashboard.report.bar.image}"/>
|
||||
</x:attribute>
|
||||
<x:attribute name="height">
|
||||
<j:expr value="${maven.dashboard.report.bar.height}"/>
|
||||
</x:attribute>
|
||||
<x:attribute name="border">
|
||||
<j:expr value="${maven.dashboard.report.bar.border}"/>
|
||||
</x:attribute>
|
||||
<x:attribute name="width">${percent}</x:attribute>
|
||||
<x:attribute name="alt">${percent}%</x:attribute>
|
||||
</x:element>
|
||||
</x:element>
|
||||
</j:if>
|
||||
<j:if test="${cpercent != '0'}">
|
||||
<x:element name="td">
|
||||
<x:attribute name="bgcolor">
|
||||
<j:expr value="${maven.dashboard.report.bar.right}"/>
|
||||
</x:attribute>
|
||||
<x:element name="img">
|
||||
<x:attribute name="hspace">0</x:attribute>
|
||||
<x:attribute name="vspace">0</x:attribute>
|
||||
<x:attribute name="src">
|
||||
<j:expr value="${maven.dashboard.report.bar.image}"/>
|
||||
</x:attribute>
|
||||
<x:attribute name="height">
|
||||
<j:expr value="${maven.dashboard.report.bar.height}"/>
|
||||
</x:attribute>
|
||||
<x:attribute name="border">
|
||||
<j:expr value="${maven.dashboard.report.bar.border}"/>
|
||||
</x:attribute>
|
||||
<x:attribute name="width">${cpercent}</x:attribute>
|
||||
<x:attribute name="alt">${cpercent}%</x:attribute>
|
||||
</x:element>
|
||||
</x:element>
|
||||
</j:if>
|
||||
</tr>
|
||||
</table>
|
||||
</j:whitespace>
|
||||
</j:if>
|
||||
</td>
|
||||
</jsl:template>
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
name="${maven.gen.docs}/dashboard-report.xml"/>
|
||||
<x:parse var="doc" xml="${dashboardAsFile}"/>
|
||||
|
||||
<x:set var="count" select="count($doc//table//tr)"/>
|
||||
<x:set var="count" select="count($doc//body/section/table/tr)"/>
|
||||
<assert:assertEquals expected="4" value="${count.intValue().toString()}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
@ -25,6 +25,17 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.5-SNAPSHOT" date="in CVS">
|
||||
<action dev="vmassol" type="add" issue="MPDASHBOARD-13" due-to="Nascif Abousalh-Neto">
|
||||
Added new <code>fbfiles</code> aggregator that computes FindBugs total
|
||||
number of files with violations.
|
||||
</action>
|
||||
<action dev="vmassol" type="add" issue="MPDASHBOARD-13" due-to="Nascif Abousalh-Neto">
|
||||
Added new <code>fbviolations</code> aggregator that computes FindBugs
|
||||
total number of violations.
|
||||
</action>
|
||||
<action dev="vmassol" type="add" issue="MPDASHBOARD-3" due-to="Nascif Abousalh-Neto">
|
||||
Added percentage bar graphs to the report.
|
||||
</action>
|
||||
<action dev="vmassol" type="add" issue="MPDASHBOARD-12" due-to="Thomas Recloux">
|
||||
Added new <code>jcoverageloc</code> aggregator that computes JCoverage total
|
||||
lines of code.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user