commit b7f0435c8473ce97eaf8c70a43ca615827c1b4e4
Author: Mauro Talevi <[email protected]>
AuthorDate: Sat, 21 Mar 2015 13:56:04 +0000
Commit: Mauro Talevi <[email protected]>
CommitDate: Sat, 21 Mar 2015 13:56:31 +0000
Updated core exmaple custom-reports template. Updated Eclipse lifecycle
mapping.
diff --git a/examples/core/src/main/java/ftl/custom-reports.ftl
b/examples/core/src/main/java/ftl/custom-reports.ftl
index 4459b36..fae5584 100755
--- a/examples/core/src/main/java/ftl/custom-reports.ftl
+++ b/examples/core/src/main/java/ftl/custom-reports.ftl
@@ -1,16 +1,13 @@
<#ftl strip_whitespace=true>
<#macro renderStat stats name class=""><#assign value = stats.get(name)!0><#if
(value != 0)><span
class="${class}">${value}</span><#else>${value}</#if></#macro>
-<#macro renderMillis stats name class=""><#assign millis =
stats.get(name)!0><span class="${class}"><#assign time =
timeFormatter.formatMillis(millis)>${time}</span></#macro>
+<#macro renderTime millis class=""><span class="${class}"><#assign time =
timeFormatter.formatMillis(millis)>${time}</span></#macro>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
-<title>Custom Reports</title>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<style type="text/css" media="all">
-@import url( "./style/jbehave-core.css" );
-</style>
+<title>JBehave Reports</title>
+<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
</head>
<body>
@@ -22,7 +19,7 @@
<h2>Story Reports</h2>
-<table>
+<table id="mainTable">
<colgroup span="2" class="stories"></colgroup>
<colgroup span="5" class="scenarios"></colgroup>
<colgroup span="5" class="scenarios"></colgroup>
@@ -129,7 +126,8 @@
<@renderStat stats "stepsIgnorable" "ignorable"/>
</td>
<td>
-<@renderMillis stats "duration"/>
+<#assign path = report.getPath()>
+<@renderTime storyDurations.get(path)!0/>
</td>
<td>
<#assign filesByFormat = report.filesByFormat>
@@ -193,7 +191,7 @@
<@renderStat stats "stepsIgnorable" "ignorable"/>
</td>
<td>
-<@renderMillis stats "duration"/>
+<@renderTime storyDurations.get('total')!0/>
</td>
<td>
Totals
@@ -206,10 +204,24 @@ Totals
<div class="clear"></div>
<div id="footer">
<div class="left">Generated on ${date?string("dd/MM/yyyy HH:mm:ss")}</div>
-<div class="right">JBehave © 2003-2011</div>
+<div class="right">JBehave © 2003-2014</div>
<div class="clear"></div>
</div>
+<script type="text/javascript" language="javascript"
src="TableFilter/tablefilter.js"></script>
+ <script language="javascript" type="text/javascript">
+
+ var mainTable_Props = {
+ filters_row_index: 2,
+ btn_reset: true
+ };
+ var tableFilter = setFilterGrid("mainTable", mainTable_Props, 2);
+</script>
+
+<style type="text/css" media="all">
+@import url( "./style/jbehave-core.css" );
+</style>
+
</body>
</html>