[TTALE-106] Add a brief description of report
shengyuan.lu Dec 7, 2010 9:23 AMHi, TTale guys, I am new to here!
I have an idea about issue: TTALE-106 here.
Add a method 'outputDescription' which returns a default description String in org.jboss.tattletale.reporting.Report. Then each concrete Report class overrides the 'outputDescription' to define its own description.
- In each report:
Modify each concrete Report writeHtmlBodyHeader() in each concrete Report. Of course, we could leave the report alone if we don't want to add description to the report.
Example:
void writeHtmlBodyHeader(BufferedWriter bw) throws IOException{
//...
bw.write("<h1>" + NAME + "</h1>" + Dump.NEW_LINE);
//Append Description
bw.write("<h2>" + outputDescription() + "</h2>" + Dump.NEW_LINE)
//...
}
- In general report:
Modify Dump.generateIndex().
Example:
bw.write("<a href=\"" + r.getDirectory() + "/index.html\">" + r.getName() +" ("+r.outputDescription()+ ")</a> (");
How do you think about it?
Sample patch for 'Dependant report' and screenshots are attached.
-
general_report.jpg 84.6 KB
-
dependant_report.jpg 51.8 KB