diff --git a/Core/src/org/sleuthkit/autopsy/timeline/snapshot/SnapShotReportWriter.java b/Core/src/org/sleuthkit/autopsy/timeline/snapshot/SnapShotReportWriter.java index 917d2a0881..4f4580bcd6 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/snapshot/SnapShotReportWriter.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/snapshot/SnapShotReportWriter.java @@ -135,7 +135,8 @@ public class SnapShotReportWriter { private Path writeIndexHTML() throws IOException { //make a map of context objects to resolve template paramaters against HashMap indexContext = new HashMap<>(); - indexContext.put("currentCase", currentCase); //NON-NLS + indexContext.put("reportBranding", reportBranding); //NON-NLS + indexContext.put("reportName", reportName); //NON-NLS Path reportIndexFile = reportFolderPath.resolve("index.html"); //NON-NLS fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/index_template.html", "Index", indexContext, reportIndexFile); //NON-NLS @@ -206,9 +207,15 @@ public class SnapShotReportWriter { Files.copy(navStream, reportFolderPath.resolve("nav.html")); //NON-NLS } //copy favicon - try (InputStream faviconStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/favicon.ico")) { //NON-NLS - Files.copy(faviconStream, reportFolderPath.resolve("favicon.ico")); //NON-NLS + if (StringUtils.isBlank(agencyLogoPath)) { + // use default Autopsy icon if custom icon is not set + try (InputStream faviconStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/favicon.ico")) { //NON-NLS + Files.copy(faviconStream, reportFolderPath.resolve("favicon.ico")); //NON-NLS + } + } else { + Files.copy(Files.newInputStream(Paths.get(agencyLogoPath)), reportFolderPath.resolve("favicon.ico")); //NON-NLS } + //copy report summary icon try (InputStream summaryStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/summary.png")) { //NON-NLS Files.copy(summaryStream, reportFolderPath.resolve("summary.png")); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/timeline/snapshot/index_template.html b/Core/src/org/sleuthkit/autopsy/timeline/snapshot/index_template.html index 11a0620ca4..91a9e37698 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/snapshot/index_template.html +++ b/Core/src/org/sleuthkit/autopsy/timeline/snapshot/index_template.html @@ -1,6 +1,6 @@ - Autopsy Report for {{curentCase.getName}} + {{reportBranding.getReportTitle}} for {{reportName}} diff --git a/Core/src/org/sleuthkit/autopsy/timeline/snapshot/summary_template.html b/Core/src/org/sleuthkit/autopsy/timeline/snapshot/summary_template.html index 963c6d2096..dda4a3bc1f 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/snapshot/summary_template.html +++ b/Core/src/org/sleuthkit/autopsy/timeline/snapshot/summary_template.html @@ -13,7 +13,7 @@
{{#reportBranding.getAgencyLogoPath}}
- +
{{/reportBranding.getAgencyLogoPath}}