From 59c8f80d7c9d20c9b41e79c5a2d2fb6cbe50c187 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 29 Aug 2018 14:13:20 -0400 Subject: [PATCH 1/4] 4112 intial column status still has placeholder for notable item --- .../CaseDBCommonAttributeInstanceNode.java | 2 +- .../communications/RelationshipNode.java | 2 +- .../contentviewers/MessageContentViewer.java | 1 + .../corecomponents/DataResultViewerTable.java | 102 +++++++++++++++--- .../datamodel/AbstractAbstractFileNode.java | 52 +++++++++ .../datamodel/AbstractFsContentNode.java | 3 +- .../datamodel/BlackboardArtifactNode.java | 54 ++++++++++ .../autopsy/datamodel/LayoutFileNode.java | 1 + .../autopsy/datamodel/LocalDirectoryNode.java | 1 + .../autopsy/datamodel/LocalFileNode.java | 2 +- .../datamodel/VirtualDirectoryNode.java | 1 + .../autopsy/images/roman-numeral-3-red.png | Bin 0 -> 215 bytes 12 files changed, 205 insertions(+), 16 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/images/roman-numeral-3-red.png diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java index 53d46a1898..32e28a7b04 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java @@ -81,8 +81,8 @@ public class CaseDBCommonAttributeInstanceNode extends FileNode { final String NO_DESCR = Bundle.CommonFilesSearchResultsViewerTable_noDescText(); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR, this.getContent().getName())); + this.addStatusProperty(sheetSet, tags); this.addCommentProperty(sheetSet, tags); - sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, this.getContent().getParentPath())); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsCsvList(this.getContent()))); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSource())); diff --git a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java index bd864938c0..43cdf71928 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java @@ -67,8 +67,8 @@ final class RelationshipNode extends BlackboardArtifactNode { } sheetSet.put(new NodeProperty<>("Type", "Type", "Type", getDisplayName())); + addStatusProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); - final BlackboardArtifact artifact = getArtifact(); BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(getArtifact().getArtifactTypeID()); if (null != fromID) { diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java index d2754a6ddd..1c81b55448 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java @@ -728,6 +728,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont AbstractFile file = getContent(); sheetSet.put(new NodeProperty<>("Name", "Name", "Name", file.getName())); + addStatusProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); sheetSet.put(new NodeProperty<>("Size", "Size", "Size", file.getSize())); sheetSet.put(new NodeProperty<>("Mime Type", "Mime Type", "Mime Type", StringUtils.defaultString(file.getMIMEType()))); diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index 0e588f172d..af34d023e0 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -87,6 +87,9 @@ public class DataResultViewerTable extends AbstractDataResultViewer { private static final long serialVersionUID = 1L; private static final Logger LOGGER = Logger.getLogger(DataResultViewerTable.class.getName()); private static final ImageIcon COMMENT_ICON = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/notepad16.png", false)); + private static final ImageIcon STATUS_ICON_1 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/blue-tag-icon-16.png", false)); + private static final ImageIcon STATUS_ICON_2 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/interesting_item.png", false)); + private static final ImageIcon STATUS_ICON_3 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-3-red.png", false)); @NbBundle.Messages("DataResultViewerTable.firstColLbl=Name") static private final String FIRST_COLUMN_LABEL = Bundle.DataResultViewerTable_firstColLbl(); static private final Color TAGGED_ROW_COLOR = new Color(255, 255, 195); @@ -656,35 +659,42 @@ public class DataResultViewerTable extends AbstractDataResultViewer { */ private class IconRendererTableListener implements TableColumnModelListener { - @NbBundle.Messages({"DataResultViewerTable.commentRender.name=C"}) + @NbBundle.Messages({"DataResultViewerTable.commentRender.name=C", + "DataResultViewerTable.statusRender.name=S"}) @Override public void columnAdded(TableColumnModelEvent e) { - if (e.getSource() instanceof ETableColumnModel) { - TableColumn column = ((TableColumnModel) e.getSource()).getColumn(e.getToIndex()); - //if the current column is a comment column set the cell renderer to be the HasCommentCellRenderer - if (column.getHeaderValue().toString().equals(Bundle.DataResultViewerTable_commentRender_name())) { - column.setCellRenderer(new HasCommentCellRenderer()); - } + if (e.getSource() instanceof ETableColumnModel) { + TableColumn column = ((TableColumnModel) e.getSource()).getColumn(e.getToIndex()); + //if the current column is a comment column set the cell renderer to be the HasCommentCellRenderer + if (column.getHeaderValue().toString().equals(Bundle.DataResultViewerTable_commentRender_name())) { + column.setCellRenderer(new HasCommentCellRenderer()); + } else if (column.getHeaderValue().toString().equals(Bundle.DataResultViewerTable_statusRender_name())) { + column.setCellRenderer(new CrStatusCellRenderer()); } + } } @Override - public void columnRemoved(TableColumnModelEvent e) { + public void columnRemoved(TableColumnModelEvent e + ) { //Don't do anything when column removed } @Override - public void columnMoved(TableColumnModelEvent e) { + public void columnMoved(TableColumnModelEvent e + ) { //Don't do anything when column moved } @Override - public void columnMarginChanged(ChangeEvent e) { + public void columnMarginChanged(ChangeEvent e + ) { //Don't do anything when column margin changed } @Override - public void columnSelectionChanged(ListSelectionEvent e) { + public void columnSelectionChanged(ListSelectionEvent e + ) { //Don't do anything when column selection changed } @@ -927,18 +937,86 @@ public class DataResultViewerTable extends AbstractDataResultViewer { } + /* + * A renderer which based on the contents of the cell will display an icon + * to indicate the status of information in the central repository. + */ + private final class CrStatusCellRenderer extends ColorTagCustomRenderer { + + private static final long serialVersionUID = 1L; + + @Override + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { + Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); + setBackground(component.getBackground()); //inherit highlighting + setHorizontalAlignment(CENTER); + Object switchValue = null; + if ((value instanceof NodeProperty)) { + //The Outline view has properties in the cell, the value contained in the property is what we want + try { + switchValue = ((Node.Property) value).getValue(); + setToolTipText(((Node.Property)value).getShortDescription()); + } catch (IllegalAccessException | InvocationTargetException ex) { + //Unable to get the value from the NodeProperty no Icon will be displayed + } + + } else { + //JTables contain the value we want directly in the cell + switchValue = value; + } + setText(""); + if ((switchValue instanceof CrStatus)) { + + switch ((CrStatus) switchValue) { + case STATUS_1: + setIcon(STATUS_ICON_1); + + break; + case STATUS_2: + setIcon(STATUS_ICON_2); +// setToolTipText("This icon doens't mean anything yet,it is just second"); + break; + case STATUS_3: + setIcon(STATUS_ICON_3); +// setToolTipText("This icon doens't mean anything yet,it is just third"); + break; + case NO_STATUS: + default: + setIcon(null); +// setToolTipText("Nothing of interest was detected for this item"); + } + } else { + setIcon(null); + } + return this; + } + + } + /** * Enum to denote the presence of a comment associated with the content or * artifacts generated from it. */ public enum HasCommentStatus { NO_COMMENT, - TAG_NO_COMMENT, + TAG_NO_COMMENT, CR_COMMENT, TAG_COMMENT, CR_AND_TAG_COMMENTS } + /** + * Enum to denote the presence of a comment associated with the content or + * artifacts generated from it. + */ + public enum CrStatus { + NO_STATUS, + STATUS_1, + STATUS_2, + STATUS_3, + + } + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java index 2aa8e70af2..c44f9790e8 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java @@ -30,6 +30,7 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.openide.nodes.Children; import org.openide.nodes.Sheet; +import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.util.WeakListeners; import org.sleuthkit.autopsy.casemodule.Case; @@ -37,9 +38,13 @@ import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.events.CommentChangedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; +import org.sleuthkit.autopsy.casemodule.services.TagsManager; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance; import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil; +import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.CrStatus; import org.sleuthkit.autopsy.coreutils.Logger; import static org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode.AbstractFilePropertyType.*; import static org.sleuthkit.autopsy.datamodel.Bundle.*; @@ -47,9 +52,11 @@ import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.HasCommentStat import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.ModuleContentEvent; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ContentTag; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.TskData; /** * An abstract node that encapsulates AbstractFile data @@ -313,6 +320,51 @@ public abstract class AbstractAbstractFileNode extends A status)); } + /** + * Used by subclasses of AbstractAbstractFileNode to add the status property + * to their sheets. + * + * @param sheetSet the modifiable Sheet.Set returned by + * Sheet.get(Sheet.PROPERTIES) + * @param tags the list of tags associated with the file + */ + @NbBundle.Messages({"AbstractAbstractFileNode.createSheet.status.name=S", + "AbstractAbstractFileNode.createSheet.status.displayName=S", + "AbstractAbstractFileNode.createSheet.notableFile.description=File recognized as notable.", + "AbstractAbstractFileNode.createSheet.interestingResult.description=File has interesting result associated with it.", + "AbstractAbstractFileNode.createSheet.taggedFile.description=File has been tagged.", + "AbstractAbstractFileNode.createSheet.notableTaggedFile.description=File tagged with notable tag."}) + protected void addStatusProperty(Sheet.Set sheetSet, List tags) { + CrStatus status = CrStatus.NO_STATUS; + String description = NO_DESCR; + if (content.getKnown() == TskData.FileKnown.BAD) { + status = CrStatus.STATUS_3; + description = Bundle.AbstractAbstractFileNode_createSheet_notableFile_description(); + } + try { + if (status == CrStatus.NO_STATUS && (!content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()).isEmpty() + || !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT).isEmpty())) { + status = CrStatus.STATUS_2; + description = Bundle.AbstractAbstractFileNode_createSheet_interestingResult_description(); + } + } catch (TskCoreException ex) { + logger.log(Level.WARNING, "Error getting artifacts for file: " + content.getName(), ex); + } + if (tags.size() > 0 && status == CrStatus.NO_STATUS) { + status = CrStatus.STATUS_1; + description = Bundle.AbstractAbstractFileNode_createSheet_taggedFile_description(); + for (ContentTag tag : tags) { + if (tag.getName().getKnownStatus() == TskData.FileKnown.BAD) { + status = CrStatus.STATUS_3; + description = Bundle.AbstractAbstractFileNode_createSheet_notableTaggedFile_description(); + break; + } + } + } + sheetSet.put( + new NodeProperty<>(Bundle.AbstractAbstractFileNode_createSheet_status_name(), Bundle.AbstractAbstractFileNode_createSheet_status_displayName(), description, status)); + } + /** * Used by subclasses of AbstractAbstractFileNode to add the tags property * to their sheets. diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java index 1ef7ec091a..b43aeb0a10 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java @@ -81,9 +81,10 @@ public abstract class AbstractFsContentNode extends Abst AbstractFilePropertyType.NAME.toString(), NO_DESCR, getName())); + //add the cr status property before the propertyMap to ensure it is early in column order + addStatusProperty(sheetSet, tags); //add the comment property before the propertyMap to ensure it is early in column order addCommentProperty(sheetSet, tags); - for (AbstractFilePropertyType propType : AbstractFilePropertyType.values()) { final String propString = propType.toString(); sheetSet.put(new NodeProperty<>(propString, propString, NO_DESCR, map.get(propString))); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 66e727e570..cb078431c9 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -49,9 +49,13 @@ import org.sleuthkit.autopsy.casemodule.events.BlackBoardArtifactTagDeletedEvent import org.sleuthkit.autopsy.casemodule.events.CommentChangedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagAddedEvent; import org.sleuthkit.autopsy.casemodule.events.ContentTagDeletedEvent; +import org.sleuthkit.autopsy.casemodule.services.TagsManager; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance; import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil; +import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.CrStatus; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import static org.sleuthkit.autopsy.datamodel.DisplayableItemNode.findLinked; @@ -66,6 +70,7 @@ import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Tag; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.TskData; /** * Node wrapping a blackboard artifact object. This is generated from several @@ -345,6 +350,7 @@ public class BlackboardArtifactNode extends AbstractContentNode tags) { + CrStatus status = CrStatus.NO_STATUS; + String description = ""; + if (status != CrStatus.STATUS_3 && associated instanceof AbstractFile) { + if (((AbstractFile) associated).getKnown() == TskData.FileKnown.BAD) { + status = CrStatus.STATUS_3; + description = Bundle.BlackboardArtifactNode_createSheet_notableFile_description(); + } + } + try { + //WJS-TODO two seperate queries or one for all artifacts then filter down? probably one for all then filter + if (status == CrStatus.NO_STATUS && (!content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()).isEmpty() + || !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT).isEmpty())) { + status = CrStatus.STATUS_2; + description = Bundle.BlackboardArtifactNode_createSheet_interestingResult_description(); + } + } catch (TskCoreException ex) { + logger.log(Level.WARNING, "Error getting artifacts for artifact: " + content.getName(), ex); + } + if (tags.size() > 0 && status == CrStatus.NO_STATUS) { + status = CrStatus.STATUS_1; + description = Bundle.BlackboardArtifactNode_createSheet_taggedItem_description(); + for (Tag tag : tags) { + if (tag.getName().getKnownStatus() == TskData.FileKnown.BAD) { + status = CrStatus.STATUS_3; + description = Bundle.BlackboardArtifactNode_createSheet_notableTaggedItem_description(); + break; + } + } + } + sheetSet.put( + new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_status_name(), Bundle.BlackboardArtifactNode_createSheet_status_displayName(), description, status)); + } + private void updateSheet() { this.setSheet(createSheet()); } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java index c070d6087f..cddacd8a44 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java @@ -89,6 +89,7 @@ public class LayoutFileNode extends AbstractAbstractFileNode { NbBundle.getMessage(this.getClass(), "LayoutFileNode.createSheet.name.displayName"), NbBundle.getMessage(this.getClass(), "LayoutFileNode.createSheet.name.desc"), getName())); + addStatusProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); final String NO_DESCR = NbBundle.getMessage(this.getClass(), "LayoutFileNode.createSheet.noDescr.text"); for (Map.Entry entry : map.entrySet()) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java index cad26038c2..294fd728fa 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java @@ -62,6 +62,7 @@ public class LocalDirectoryNode extends SpecialDirectoryNode { Bundle.LocalDirectoryNode_createSheet_name_displayName(), Bundle.LocalDirectoryNode_createSheet_name_desc(), getName())); + addStatusProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); // At present, a LocalDirectory will never be a datasource - the top level of a logical // file set is a VirtualDirectory diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java index 6f6062d7c6..27e1a32e32 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java @@ -81,8 +81,8 @@ public class LocalFileNode extends AbstractAbstractFileNode { NbBundle.getMessage(this.getClass(), "LocalFileNode.createSheet.name.displayName"), NbBundle.getMessage(this.getClass(), "LocalFileNode.createSheet.name.desc"), getName())); + addStatusProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); - final String NO_DESCR = NbBundle.getMessage(this.getClass(), "LocalFileNode.createSheet.noDescr.text"); for (Map.Entry entry : map.entrySet()) { sheetSet.put(new NodeProperty<>(entry.getKey(), entry.getKey(), NO_DESCR, entry.getValue())); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java index 85350ea143..c0bef6021b 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java @@ -89,6 +89,7 @@ public class VirtualDirectoryNode extends SpecialDirectoryNode { NbBundle.getMessage(this.getClass(), "VirtualDirectoryNode.createSheet.name.desc"), getName())); if (!this.content.isDataSource()) { + addStatusProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); Map map = new LinkedHashMap<>(); fillPropertyMap(map, getContent()); diff --git a/Core/src/org/sleuthkit/autopsy/images/roman-numeral-3-red.png b/Core/src/org/sleuthkit/autopsy/images/roman-numeral-3-red.png new file mode 100644 index 0000000000000000000000000000000000000000..cfa3c1dda15c45e7db1dc52d955eeece71e87363 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPdhpYgHcu;wTC{Rc?GbEzKIX^cyHLnE7WngeFN=+bP0l+XkKivvE{ literal 0 HcmV?d00001 From f519c4c2b8433a359997229025659a5524c78eaa Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 29 Aug 2018 14:21:41 -0400 Subject: [PATCH 2/4] 4112 remove unnecessary query from interesting item check --- .../sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java | 3 +-- .../sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java index c44f9790e8..0f77ce08e4 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java @@ -342,8 +342,7 @@ public abstract class AbstractAbstractFileNode extends A description = Bundle.AbstractAbstractFileNode_createSheet_notableFile_description(); } try { - if (status == CrStatus.NO_STATUS && (!content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()).isEmpty() - || !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT).isEmpty())) { + if (status == CrStatus.NO_STATUS && !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT).isEmpty()) { status = CrStatus.STATUS_2; description = Bundle.AbstractAbstractFileNode_createSheet_interestingResult_description(); } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index cb078431c9..7bbe4485c3 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -619,9 +619,7 @@ public class BlackboardArtifactNode extends AbstractContentNode Date: Wed, 29 Aug 2018 17:00:04 -0400 Subject: [PATCH 3/4] 4112 group tagged items and items with interesting artifacts together --- .../corecomponents/DataResultViewerTable.java | 10 ++++------ .../datamodel/AbstractAbstractFileNode.java | 2 +- .../autopsy/datamodel/BlackboardArtifactNode.java | 2 +- .../autopsy/images/roman-numeral-1-green.png | Bin 0 -> 216 bytes .../autopsy/images/roman-numeral-2-yellow.png | Bin 0 -> 215 bytes 5 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/images/roman-numeral-1-green.png create mode 100644 Core/src/org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index af34d023e0..409fc400b8 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -26,6 +26,7 @@ import java.awt.Graphics; import java.awt.dnd.DnDConstants; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.beans.FeatureDescriptor; import java.beans.PropertyVetoException; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; @@ -87,8 +88,8 @@ public class DataResultViewerTable extends AbstractDataResultViewer { private static final long serialVersionUID = 1L; private static final Logger LOGGER = Logger.getLogger(DataResultViewerTable.class.getName()); private static final ImageIcon COMMENT_ICON = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/notepad16.png", false)); - private static final ImageIcon STATUS_ICON_1 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/blue-tag-icon-16.png", false)); - private static final ImageIcon STATUS_ICON_2 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/interesting_item.png", false)); + private static final ImageIcon STATUS_ICON_1 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-1-green.png", false)); + private static final ImageIcon STATUS_ICON_2 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png", false)); private static final ImageIcon STATUS_ICON_3 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-3-red.png", false)); @NbBundle.Messages("DataResultViewerTable.firstColLbl=Name") static private final String FIRST_COLUMN_LABEL = Bundle.DataResultViewerTable_firstColLbl(); @@ -955,7 +956,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer { //The Outline view has properties in the cell, the value contained in the property is what we want try { switchValue = ((Node.Property) value).getValue(); - setToolTipText(((Node.Property)value).getShortDescription()); + setToolTipText(((FeatureDescriptor)value).getShortDescription()); } catch (IllegalAccessException | InvocationTargetException ex) { //Unable to get the value from the NodeProperty no Icon will be displayed } @@ -974,16 +975,13 @@ public class DataResultViewerTable extends AbstractDataResultViewer { break; case STATUS_2: setIcon(STATUS_ICON_2); -// setToolTipText("This icon doens't mean anything yet,it is just second"); break; case STATUS_3: setIcon(STATUS_ICON_3); -// setToolTipText("This icon doens't mean anything yet,it is just third"); break; case NO_STATUS: default: setIcon(null); -// setToolTipText("Nothing of interest was detected for this item"); } } else { setIcon(null); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java index 0f77ce08e4..ced9c67a9d 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java @@ -350,7 +350,7 @@ public abstract class AbstractAbstractFileNode extends A logger.log(Level.WARNING, "Error getting artifacts for file: " + content.getName(), ex); } if (tags.size() > 0 && status == CrStatus.NO_STATUS) { - status = CrStatus.STATUS_1; + status = CrStatus.STATUS_2; description = Bundle.AbstractAbstractFileNode_createSheet_taggedFile_description(); for (ContentTag tag : tags) { if (tag.getName().getKnownStatus() == TskData.FileKnown.BAD) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 7bbe4485c3..c7ca15ba7a 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -627,7 +627,7 @@ public class BlackboardArtifactNode extends AbstractContentNode 0 && status == CrStatus.NO_STATUS) { - status = CrStatus.STATUS_1; + status = CrStatus.STATUS_2; description = Bundle.BlackboardArtifactNode_createSheet_taggedItem_description(); for (Tag tag : tags) { if (tag.getName().getKnownStatus() == TskData.FileKnown.BAD) { diff --git a/Core/src/org/sleuthkit/autopsy/images/roman-numeral-1-green.png b/Core/src/org/sleuthkit/autopsy/images/roman-numeral-1-green.png new file mode 100644 index 0000000000000000000000000000000000000000..7bdbf2c4411caaacbf935036d5e1ea77b373bb79 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPdhb+H=l#X(Y98gF$GbEzKIX^cyHLnE7WngeFN=+#DgsGboFyt=akR{0GX6M Ae*gdg literal 0 HcmV?d00001 diff --git a/Core/src/org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png b/Core/src/org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..f56fad69456cc3c8673a9bc47a3fc9633b2521ea GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPdhb+GlAItey4}n6mnIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^P~6(n#WBR77|LvJo8(5v6>{P82R_!-dDxUd4Yl6+W zj)U&ZK0G2#fy{2a5;ANCNl)B_jD?k#-jrncEhIGi_5HMaAoD$4{an^LB{Ts5u8} Date: Thu, 30 Aug 2018 13:03:58 -0400 Subject: [PATCH 4/4] 4112 change status column to score column change icons to be circles --- .../CaseDBCommonAttributeInstanceNode.java | 2 +- .../communications/RelationshipNode.java | 2 +- .../contentviewers/MessageContentViewer.java | 2 +- .../corecomponents/DataResultViewerTable.java | 51 ++++++++---------- .../datamodel/AbstractAbstractFileNode.java | 27 +++++----- .../datamodel/AbstractFsContentNode.java | 2 +- .../datamodel/BlackboardArtifactNode.java | 31 ++++++----- .../autopsy/datamodel/LayoutFileNode.java | 2 +- .../autopsy/datamodel/LocalDirectoryNode.java | 2 +- .../autopsy/datamodel/LocalFileNode.java | 2 +- .../datamodel/VirtualDirectoryNode.java | 2 +- .../autopsy/images/red-circle-exclamation.png | Bin 0 -> 314 bytes .../autopsy/images/roman-numeral-1-green.png | Bin 216 -> 0 bytes .../autopsy/images/roman-numeral-2-yellow.png | Bin 215 -> 0 bytes .../autopsy/images/roman-numeral-3-red.png | Bin 215 -> 0 bytes .../autopsy/images/yellow-circle-yield.png | Bin 0 -> 578 bytes 16 files changed, 58 insertions(+), 67 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/images/red-circle-exclamation.png delete mode 100644 Core/src/org/sleuthkit/autopsy/images/roman-numeral-1-green.png delete mode 100644 Core/src/org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png delete mode 100644 Core/src/org/sleuthkit/autopsy/images/roman-numeral-3-red.png create mode 100644 Core/src/org/sleuthkit/autopsy/images/yellow-circle-yield.png diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java index 32e28a7b04..bcabe81484 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CaseDBCommonAttributeInstanceNode.java @@ -81,7 +81,7 @@ public class CaseDBCommonAttributeInstanceNode extends FileNode { final String NO_DESCR = Bundle.CommonFilesSearchResultsViewerTable_noDescText(); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR, this.getContent().getName())); - this.addStatusProperty(sheetSet, tags); + this.addScoreProperty(sheetSet, tags); this.addCommentProperty(sheetSet, tags); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, this.getContent().getParentPath())); sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsCsvList(this.getContent()))); diff --git a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java index 43cdf71928..538ca0948b 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/RelationshipNode.java @@ -67,7 +67,7 @@ final class RelationshipNode extends BlackboardArtifactNode { } sheetSet.put(new NodeProperty<>("Type", "Type", "Type", getDisplayName())); - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); final BlackboardArtifact artifact = getArtifact(); BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(getArtifact().getArtifactTypeID()); diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java index 1c81b55448..81297b6305 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java @@ -728,7 +728,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont AbstractFile file = getContent(); sheetSet.put(new NodeProperty<>("Name", "Name", "Name", file.getName())); - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); sheetSet.put(new NodeProperty<>("Size", "Size", "Size", file.getSize())); sheetSet.put(new NodeProperty<>("Mime Type", "Mime Type", "Mime Type", StringUtils.defaultString(file.getMIMEType()))); diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index 409fc400b8..d6dfff02ca 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -88,9 +88,8 @@ public class DataResultViewerTable extends AbstractDataResultViewer { private static final long serialVersionUID = 1L; private static final Logger LOGGER = Logger.getLogger(DataResultViewerTable.class.getName()); private static final ImageIcon COMMENT_ICON = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/notepad16.png", false)); - private static final ImageIcon STATUS_ICON_1 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-1-green.png", false)); - private static final ImageIcon STATUS_ICON_2 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png", false)); - private static final ImageIcon STATUS_ICON_3 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/roman-numeral-3-red.png", false)); + private static final ImageIcon SCORE_ICON_1 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/yellow-circle-yield.png", false)); + private static final ImageIcon SCORE_ICON_2 = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/red-circle-exclamation.png", false)); @NbBundle.Messages("DataResultViewerTable.firstColLbl=Name") static private final String FIRST_COLUMN_LABEL = Bundle.DataResultViewerTable_firstColLbl(); static private final Color TAGGED_ROW_COLOR = new Color(255, 255, 195); @@ -661,16 +660,17 @@ public class DataResultViewerTable extends AbstractDataResultViewer { private class IconRendererTableListener implements TableColumnModelListener { @NbBundle.Messages({"DataResultViewerTable.commentRender.name=C", - "DataResultViewerTable.statusRender.name=S"}) + "DataResultViewerTable.scoreRender.name=S"}) @Override public void columnAdded(TableColumnModelEvent e) { if (e.getSource() instanceof ETableColumnModel) { - TableColumn column = ((TableColumnModel) e.getSource()).getColumn(e.getToIndex()); - //if the current column is a comment column set the cell renderer to be the HasCommentCellRenderer + TableColumn column = ((TableColumnModel) e.getSource()).getColumn(e.getToIndex()); if (column.getHeaderValue().toString().equals(Bundle.DataResultViewerTable_commentRender_name())) { + //if the current column is a comment column set the cell renderer to be the HasCommentCellRenderer column.setCellRenderer(new HasCommentCellRenderer()); - } else if (column.getHeaderValue().toString().equals(Bundle.DataResultViewerTable_statusRender_name())) { - column.setCellRenderer(new CrStatusCellRenderer()); + } else if (column.getHeaderValue().toString().equals(Bundle.DataResultViewerTable_scoreRender_name())) { + //if the current column is a score column set the cell renderer to be the ScoreCellRenderer + column.setCellRenderer(new ScoreCellRenderer()); } } } @@ -940,9 +940,9 @@ public class DataResultViewerTable extends AbstractDataResultViewer { /* * A renderer which based on the contents of the cell will display an icon - * to indicate the status of information in the central repository. + * to indicate the score associated with the item. */ - private final class CrStatusCellRenderer extends ColorTagCustomRenderer { + private final class ScoreCellRenderer extends ColorTagCustomRenderer { private static final long serialVersionUID = 1L; @@ -966,20 +966,16 @@ public class DataResultViewerTable extends AbstractDataResultViewer { switchValue = value; } setText(""); - if ((switchValue instanceof CrStatus)) { + if ((switchValue instanceof Score)) { - switch ((CrStatus) switchValue) { - case STATUS_1: - setIcon(STATUS_ICON_1); - + switch ((Score) switchValue) { + case SCORE_1: + setIcon(SCORE_ICON_1); break; - case STATUS_2: - setIcon(STATUS_ICON_2); + case SCORE_2: + setIcon(SCORE_ICON_2); break; - case STATUS_3: - setIcon(STATUS_ICON_3); - break; - case NO_STATUS: + case NO_SCORE: default: setIcon(null); } @@ -1004,15 +1000,12 @@ public class DataResultViewerTable extends AbstractDataResultViewer { } /** - * Enum to denote the presence of a comment associated with the content or - * artifacts generated from it. + * Enum to denote the score given to an item to draw the users attention */ - public enum CrStatus { - NO_STATUS, - STATUS_1, - STATUS_2, - STATUS_3, - + public enum Score { + NO_SCORE, + SCORE_1, + SCORE_2 } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java index ced9c67a9d..be242c8698 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractAbstractFileNode.java @@ -44,7 +44,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil; -import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.CrStatus; +import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.Score; import org.sleuthkit.autopsy.coreutils.Logger; import static org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode.AbstractFilePropertyType.*; import static org.sleuthkit.autopsy.datamodel.Bundle.*; @@ -321,47 +321,46 @@ public abstract class AbstractAbstractFileNode extends A } /** - * Used by subclasses of AbstractAbstractFileNode to add the status property + * Used by subclasses of AbstractAbstractFileNode to add the Score property * to their sheets. * * @param sheetSet the modifiable Sheet.Set returned by * Sheet.get(Sheet.PROPERTIES) * @param tags the list of tags associated with the file */ - @NbBundle.Messages({"AbstractAbstractFileNode.createSheet.status.name=S", - "AbstractAbstractFileNode.createSheet.status.displayName=S", + @NbBundle.Messages({"AbstractAbstractFileNode.createSheet.score.name=S", + "AbstractAbstractFileNode.createSheet.score.displayName=S", "AbstractAbstractFileNode.createSheet.notableFile.description=File recognized as notable.", "AbstractAbstractFileNode.createSheet.interestingResult.description=File has interesting result associated with it.", "AbstractAbstractFileNode.createSheet.taggedFile.description=File has been tagged.", "AbstractAbstractFileNode.createSheet.notableTaggedFile.description=File tagged with notable tag."}) - protected void addStatusProperty(Sheet.Set sheetSet, List tags) { - CrStatus status = CrStatus.NO_STATUS; + protected void addScoreProperty(Sheet.Set sheetSet, List tags) { + Score score = Score.NO_SCORE; String description = NO_DESCR; if (content.getKnown() == TskData.FileKnown.BAD) { - status = CrStatus.STATUS_3; + score = Score.SCORE_2; description = Bundle.AbstractAbstractFileNode_createSheet_notableFile_description(); } try { - if (status == CrStatus.NO_STATUS && !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT).isEmpty()) { - status = CrStatus.STATUS_2; + if (score == Score.NO_SCORE && !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT).isEmpty()) { + score = Score.SCORE_1; description = Bundle.AbstractAbstractFileNode_createSheet_interestingResult_description(); } } catch (TskCoreException ex) { logger.log(Level.WARNING, "Error getting artifacts for file: " + content.getName(), ex); } - if (tags.size() > 0 && status == CrStatus.NO_STATUS) { - status = CrStatus.STATUS_2; + if (tags.size() > 0 && (score == Score.NO_SCORE || score == Score.SCORE_1)) { + score = Score.SCORE_1; description = Bundle.AbstractAbstractFileNode_createSheet_taggedFile_description(); for (ContentTag tag : tags) { if (tag.getName().getKnownStatus() == TskData.FileKnown.BAD) { - status = CrStatus.STATUS_3; + score = Score.SCORE_2; description = Bundle.AbstractAbstractFileNode_createSheet_notableTaggedFile_description(); break; } } } - sheetSet.put( - new NodeProperty<>(Bundle.AbstractAbstractFileNode_createSheet_status_name(), Bundle.AbstractAbstractFileNode_createSheet_status_displayName(), description, status)); + sheetSet.put(new NodeProperty<>(Bundle.AbstractAbstractFileNode_createSheet_score_name(), Bundle.AbstractAbstractFileNode_createSheet_score_displayName(), description, score)); } /** diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java index b43aeb0a10..d28eb4a67e 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java @@ -82,7 +82,7 @@ public abstract class AbstractFsContentNode extends Abst NO_DESCR, getName())); //add the cr status property before the propertyMap to ensure it is early in column order - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); //add the comment property before the propertyMap to ensure it is early in column order addCommentProperty(sheetSet, tags); for (AbstractFilePropertyType propType : AbstractFilePropertyType.values()) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index c7ca15ba7a..763d453892 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -55,7 +55,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamArtifactUtil; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil; -import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.CrStatus; +import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable.Score; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import static org.sleuthkit.autopsy.datamodel.DisplayableItemNode.findLinked; @@ -350,7 +350,7 @@ public class BlackboardArtifactNode extends AbstractContentNode tags) { - CrStatus status = CrStatus.NO_STATUS; + protected void addScoreProperty(Sheet.Set sheetSet, List tags) { + Score score = Score.NO_SCORE; String description = ""; - if (status != CrStatus.STATUS_3 && associated instanceof AbstractFile) { + if (associated instanceof AbstractFile) { if (((AbstractFile) associated).getKnown() == TskData.FileKnown.BAD) { - status = CrStatus.STATUS_3; + score = Score.SCORE_2; description = Bundle.BlackboardArtifactNode_createSheet_notableFile_description(); } } try { - if (status == CrStatus.NO_STATUS && !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT).isEmpty()) { - status = CrStatus.STATUS_2; + if (score == Score.NO_SCORE && !content.getArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT).isEmpty()) { + score = Score.SCORE_1; description = Bundle.BlackboardArtifactNode_createSheet_interestingResult_description(); } } catch (TskCoreException ex) { logger.log(Level.WARNING, "Error getting artifacts for artifact: " + content.getName(), ex); } - if (tags.size() > 0 && status == CrStatus.NO_STATUS) { - status = CrStatus.STATUS_2; + if (tags.size() > 0 && (score == Score.NO_SCORE || score == Score.SCORE_1)) { + score = Score.SCORE_1; description = Bundle.BlackboardArtifactNode_createSheet_taggedItem_description(); for (Tag tag : tags) { if (tag.getName().getKnownStatus() == TskData.FileKnown.BAD) { - status = CrStatus.STATUS_3; + score = Score.SCORE_2; description = Bundle.BlackboardArtifactNode_createSheet_notableTaggedItem_description(); break; } } } - sheetSet.put( - new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_status_name(), Bundle.BlackboardArtifactNode_createSheet_status_displayName(), description, status)); + sheetSet.put(new NodeProperty<>(Bundle.BlackboardArtifactNode_createSheet_score_name(), Bundle.BlackboardArtifactNode_createSheet_score_displayName(), description, score)); } private void updateSheet() { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java index cddacd8a44..806442cb5c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LayoutFileNode.java @@ -89,7 +89,7 @@ public class LayoutFileNode extends AbstractAbstractFileNode { NbBundle.getMessage(this.getClass(), "LayoutFileNode.createSheet.name.displayName"), NbBundle.getMessage(this.getClass(), "LayoutFileNode.createSheet.name.desc"), getName())); - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); final String NO_DESCR = NbBundle.getMessage(this.getClass(), "LayoutFileNode.createSheet.noDescr.text"); for (Map.Entry entry : map.entrySet()) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java index 294fd728fa..a6f1312fa5 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LocalDirectoryNode.java @@ -62,7 +62,7 @@ public class LocalDirectoryNode extends SpecialDirectoryNode { Bundle.LocalDirectoryNode_createSheet_name_displayName(), Bundle.LocalDirectoryNode_createSheet_name_desc(), getName())); - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); // At present, a LocalDirectory will never be a datasource - the top level of a logical // file set is a VirtualDirectory diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java index 27e1a32e32..b3a30a86f3 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/LocalFileNode.java @@ -81,7 +81,7 @@ public class LocalFileNode extends AbstractAbstractFileNode { NbBundle.getMessage(this.getClass(), "LocalFileNode.createSheet.name.displayName"), NbBundle.getMessage(this.getClass(), "LocalFileNode.createSheet.name.desc"), getName())); - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); final String NO_DESCR = NbBundle.getMessage(this.getClass(), "LocalFileNode.createSheet.noDescr.text"); for (Map.Entry entry : map.entrySet()) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java index c0bef6021b..dae57a50e2 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java @@ -89,7 +89,7 @@ public class VirtualDirectoryNode extends SpecialDirectoryNode { NbBundle.getMessage(this.getClass(), "VirtualDirectoryNode.createSheet.name.desc"), getName())); if (!this.content.isDataSource()) { - addStatusProperty(sheetSet, tags); + addScoreProperty(sheetSet, tags); addCommentProperty(sheetSet, tags); Map map = new LinkedHashMap<>(); fillPropertyMap(map, getContent()); diff --git a/Core/src/org/sleuthkit/autopsy/images/red-circle-exclamation.png b/Core/src/org/sleuthkit/autopsy/images/red-circle-exclamation.png new file mode 100644 index 0000000000000000000000000000000000000000..26b61e6f06d83460bace05bc854ee83abe56d101 GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4&HECyrsn$JLrv%n*= zn1O*?7=#%aX3dcR3bL1Y`ns||;*jH4HTIs^+W{1k%?ybsan8@pP0cF-av2z$i&7Iy zQd1PlGfOfQ+&z5*QuI>Uf#UN#T^vI!POqKp%h#&F(_$Z?t^SC`mf8KGjqQS6^5Vyy z{A^aUQJ*-Z{9TIP^`D#Rq4}3> z>7JgCvdJz{1^MQM`A#DgsGboFyt=akR{0GX6M Ae*gdg diff --git a/Core/src/org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png b/Core/src/org/sleuthkit/autopsy/images/roman-numeral-2-yellow.png deleted file mode 100644 index f56fad69456cc3c8673a9bc47a3fc9633b2521ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPdhb+GlAItey4}n6mnIRD+&iT2ysd*(pE(3#eQEFmI zYKlU6W=V#EyQgnJie4%^P~6(n#WBR77|LvJo8(5v6>{P82R_!-dDxUd4Yl6+W zj)U&ZK0G2#fy{2a5;ANCNl)B_jD?k#-jrncEhIGi_5HMaAoD$4{an^LB{Ts5u8}bP0l+XkKivvE{ diff --git a/Core/src/org/sleuthkit/autopsy/images/yellow-circle-yield.png b/Core/src/org/sleuthkit/autopsy/images/yellow-circle-yield.png new file mode 100644 index 0000000000000000000000000000000000000000..85c873f33f372b833023f6c72974629b86b3d092 GIT binary patch literal 578 zcmV-I0=@l-P)WFU8GbZ8()Nlj2>E@cM*00E{+L_t(I%dL|;O9N35 zg}+=A@dY9TgaknYA_ioGwj$X002>#ANQxjNSO{WatSl@AEqq|D7V$wE3-M72{s1xB zh|$G>5d?{#8<50}Hk)O$uA<;n_nx_D?#!7P2j5sR85{w8`c)B9V%P4S!-lvHgaDVt zRRH2>YD{z0X&b{w~ON0pc}wxO54*vaf*`3 z{mAxtYdK!)0ayUWoH`x?h{`_Z*RNQb4&bUNm#3h8FtvD2R4(aC2pDtfYP$gBUN7;3 zG`IIE;i2ZT0Gs=FG&NQu_j*f^tC$Rq2ve&N!oh6B&+5(%*_XUQ&c5VX-ML{l;zx+G z%zVOHV^@0v-2pc%+bIKE*-p_NaMRV^@I?~=C{}PL+{WHXhU@ez*XdXGPBP4d+w3$| z9C{b>*1=icN^y4eY-BY#+G-^igp{Z(l@PajqjC#MCWrEnBQo4#_j}x!12i>8MO~kH zkZP)&%#Hhvv)LZAZ#34w$NqPeg_O8NQzc+SUmR?fX#-7_N@Uw@{OdY@0