Title: [1468] trunk/core/jbehave-core/src/main/resources/ftl: Color-coded rendering of stats in the reports index page.
Revision
1468
Author
mauro
Date
2009-12-24 10:03:41 -0600 (Thu, 24 Dec 2009)

Log Message

Color-coded rendering of stats in the reports index page.

Modified Paths


Diff

Modified: trunk/core/jbehave-core/src/main/resources/ftl/jbehave-reports-index.ftl (1467 => 1468)

--- trunk/core/jbehave-core/src/main/resources/ftl/jbehave-reports-index.ftl	2009-12-23 22:28:27 UTC (rev 1467)
+++ trunk/core/jbehave-core/src/main/resources/ftl/jbehave-reports-index.ftl	2009-12-24 16:03:41 UTC (rev 1468)
@@ -1,5 +1,5 @@
 <#ftl strip_whitespace=true>
-<#macro stat name stats><#assign value = stats.get(name)!"N/A">${value}</#macro>
+<#macro renderStat stats name description class=""><#assign value = stats.get(name)!"N/A"><#if (value != "0")><span class="${class}">${description} ${value}</span><#else>${description} ${value}</#if></#macro>
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -30,8 +30,8 @@
 <td>
 <#assign stats = report.asProperties("stats")>
 <#if (stats.size() > 0)>
-Scenarios: <@stat "scenarios" stats/> (Failed: <@stat "scenariosFailed" stats/>)<br/>
-Steps: <@stat "steps" stats/> (Success: <@stat "stepsSuccessful" stats/>; Pending: <@stat "stepsPending" stats/>; Not Performed: <@stat "stepsNotPerformed" stats/>; Failed: <@stat "stepsFailed" stats/>)<br/>
+<@renderStat stats "scenarios" "Scenarios:" "successful"/> (<@renderStat stats "scenariosFailed" "Failed:" "failed" />)<br/>
+<@renderStat stats "steps" "Steps:" /> (<@renderStat stats "stepsSuccessful" "Successful:" "successful"/>; <@renderStat stats "stepsPending" "Pending:" "pending"/>; <@renderStat stats "stepsNotPerformed" "Not Performed:" "notPerformed" />; <@renderStat stats "stepsFailed" "Failed:" "failed"/>)<br/>
 <#else>
 N/A
 </#if>

Modified: trunk/core/jbehave-core/src/main/resources/style/jbehave-reports.css (1467 => 1468)

--- trunk/core/jbehave-core/src/main/resources/style/jbehave-reports.css	2009-12-23 22:28:27 UTC (rev 1467)
+++ trunk/core/jbehave-core/src/main/resources/style/jbehave-reports.css	2009-12-24 16:03:41 UTC (rev 1468)
@@ -144,11 +144,11 @@
 }
 
 .pending {
-  color: #ffaa00;
+  color: olive;
 }
 
 .notPerformed {
-  color: #ffaa00;
+  color: brown;
 }
 
 .failed {


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to