Made tagged results data work for all reports.

This commit is contained in:
Oliver Spohngellert 2016-03-24 15:15:23 -04:00
parent eeb2010dc8
commit 72a96d6002
2 changed files with 12 additions and 9 deletions

View File

@ -655,6 +655,18 @@ class ReportGenerator {
} }
ArrayList<String> rowData = new ArrayList<>(Arrays.asList(tag.getName().getDisplayName(), fileName, tag.getComment())); ArrayList<String> rowData = new ArrayList<>(Arrays.asList(tag.getName().getDisplayName(), fileName, tag.getComment()));
Content content = tag.getContent();
if (content instanceof AbstractFile) {
AbstractFile file = (AbstractFile) content;
// Add metadata about the file to HTML output
rowData.add(file.getMtimeAsDate());
rowData.add(file.getCtimeAsDate());
rowData.add(file.getAtimeAsDate());
rowData.add(file.getCrtimeAsDate());
rowData.add(Long.toString(file.getSize()));
rowData.add(file.getMd5Hash());
}
for (TableReportModule module : tableModules) { for (TableReportModule module : tableModules) {
// @@@ This casting is a tricky little workaround to allow the HTML report module to slip in a content hyperlink. // @@@ This casting is a tricky little workaround to allow the HTML report module to slip in a content hyperlink.
if (module instanceof ReportHTML) { if (module instanceof ReportHTML) {

View File

@ -560,15 +560,6 @@ class ReportHTML implements TableReportModule {
return; return;
} }
AbstractFile file = (AbstractFile) content; AbstractFile file = (AbstractFile) content;
// Add metadata about the file to HTML output
row.add(file.getMtimeAsDate());
row.add(file.getCtimeAsDate());
row.add(file.getAtimeAsDate());
row.add(file.getCrtimeAsDate());
row.add(Long.toString(file.getSize()));
row.add(file.getMd5Hash());
// Add the hyperlink to the row. A column header for it was created in startTable(). // Add the hyperlink to the row. A column header for it was created in startTable().
StringBuilder localFileLink = new StringBuilder(); StringBuilder localFileLink = new StringBuilder();
// Don't make a local copy of the file if it is a directory or unallocated space. // Don't make a local copy of the file if it is a directory or unallocated space.