From: Chris Jaekl Date: Mon, 9 Jan 2017 12:44:19 +0000 (+0900) Subject: adds footer to the HTML report. X-Git-Url: http://jaekl.net/gitweb/?p=cfb.git;a=commitdiff_plain;h=a62d41ddf11fd3769f6894b4385314f536360a89 adds footer to the HTML report. Links back to the web site, describing what CFB is. --- diff --git a/prod/net/jaekl/cfb/analyze/HtmlReport.java b/prod/net/jaekl/cfb/analyze/HtmlReport.java index 75e39a9..a531143 100644 --- a/prod/net/jaekl/cfb/analyze/HtmlReport.java +++ b/prod/net/jaekl/cfb/analyze/HtmlReport.java @@ -62,6 +62,7 @@ public class HtmlReport { writeBugs(pw, CfbBundle.NEW_BUGS, m_delta.getNew()); writeBugs(pw, CfbBundle.FIXED_BUGS, m_delta.getFixed()); writeBugs(pw, CfbBundle.OLD_BUGS, m_delta.getCommon()); + writeFooter(pw); } void writeBugLocations(PrintWriter pw, BugInstance bug) @@ -138,6 +139,11 @@ public class HtmlReport { } } + void writeFooter(PrintWriter pw) + { + pw.println("
Report generated by CFB
"); + } + void writeHeader(PrintWriter pw) { String title = trans(CfbBundle.CFB_REPORT); @@ -200,6 +206,8 @@ public class HtmlReport { pw.println(" body { background-color: #F0F0FF; }"); pw.println(" .CategoryName { text-align: right; }"); pw.println(" .CategoryValue { text-align: left; }"); + pw.println(" div.Footer { background-color: #0000FF; color: #FFFFFF; font-size: 0.9em; text-align: right; }"); + pw.println(" div.Footer a:link { color: #FFFFFF }"); pw.println(" .Loc { font-family: monospace; }"); pw.println(" .SectionHead td { background-color: #0000FF; color: #FFFFFF; font-size: 1.25em; font-weight: bold; }"); pw.println(" .Var { font-family: monospace; }"); diff --git a/test/net/jaekl/cfb/analyze/HtmlReportTest.java b/test/net/jaekl/cfb/analyze/HtmlReportTest.java index 0938cb7..154a291 100644 --- a/test/net/jaekl/cfb/analyze/HtmlReportTest.java +++ b/test/net/jaekl/cfb/analyze/HtmlReportTest.java @@ -149,6 +149,9 @@ public class HtmlReportTest { // The character set UTF-8 should be specified assertTrue(html.contains("")); + + // The footer should be present + assertTrue(html.contains("DIV CLASS=\"Footer\">Report generated by CFB")); } @Before