From 60c6659df1c8b816f21155a80ebd10f855bd9532 Mon Sep 17 00:00:00 2001 From: Devin148 Date: Mon, 3 Dec 2012 13:11:39 -0500 Subject: [PATCH] Account for user keyword searches in HTML report --- .../sleuthkit/autopsy/report/ReportHTML.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index cc977d8ecf..f5a0b3ddc4 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -22,7 +22,6 @@ */ package org.sleuthkit.autopsy.report; -import java.awt.Desktop; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; @@ -46,9 +45,7 @@ import java.util.TreeMap; import java.util.TreeSet; import java.util.logging.Level; import org.openide.filesystems.FileUtil; -import org.openide.util.Exceptions; import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.coreutils.EscapeUtil; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.*; @@ -330,7 +327,7 @@ public class ReportHTML implements ReportModule { index.append("\n"); index.append("\n"); index.append("\n"); - index.append("Your browser is not compatible with out frame setup.<br />\n"); + index.append("<noframes>Your browser is not compatible with our frame setup.<br />\n"); index.append("Please see <a href=\"nav.html\">the navigation page</a> for artifact links,<br />\n"); index.append("and <a href=\"summary.html\">the summary page</a> for a case summary.\n"); index.append("\n"); @@ -925,7 +922,11 @@ public class ReportHTML implements ReportModule { while(lists.next()) { if (ReportFilter.cancel == true) { break; } String list = lists.getString("list"); - keywordLists.append("
  • ").append(list).append("
  • \n"); + if(list.isEmpty()) { + keywordLists.append("
  • User Searches
  • \n"); + } else { + keywordLists.append("
  • ").append(list).append("
  • \n"); + } } keywordLists.append(""); out.write(keywordLists.toString()); @@ -957,15 +958,15 @@ public class ReportHTML implements ReportModule { } StringBuilder table = new StringBuilder(); - if(!list.equals(currentList)) { - if(!currentList.equals("")) { - table.append(""); + if((!list.equals(currentList) && !list.isEmpty()) || (list.isEmpty() && !currentList.equals("User Searches"))) { + if(!currentList.isEmpty()) { + table.append(""); } - currentList = list; + currentList = list.isEmpty() ? "User Searches" : list; currentKeyword = ""; // reset the current keyword because it's a new list table.append("

    \n"); table.append("

    ").append(currentList).append("

    \n"); - table.append("
    "); + table.append("
    "); } if (!keyword.equals(currentKeyword)) { if(!currentKeyword.equals("")) {