From c83738d48d3078b35ad3f18e47dbcf7faa5bec6a Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 7 Sep 2017 16:43:36 -0400 Subject: [PATCH 01/35] 2834 added label to manage tags panel for where to create tags --- .../optionspanel/Bundle.properties | 2 +- .../optionspanel/ManageTagsDialog.form | 32 ++++++++++++------- .../optionspanel/ManageTagsDialog.java | 28 ++++++++++------ 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties index ed1de3ea5b..e82371d1d2 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties @@ -73,4 +73,4 @@ ManageCorrelationPropertiesDialog.okButton.text=OK GlobalSettingsPanel.bnManageProperties.text=Manage Correlation Properties ImportHashDatabaseDialog.lbInstructions.text=Choose an .idx file to import into the central repository. ImportHashDatabaseDialog.lbFilePath.text=File Path: -ImportHashDatabaseDialog.tfFilePath.text= +ImportHashDatabaseDialog.tfFilePath.text= \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form index 07be8010cd..d5761d74cb 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form @@ -36,12 +36,13 @@ - - - - + + + + + - + @@ -51,16 +52,18 @@ - - - - - + + + + + + + - + @@ -107,5 +110,12 @@ + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index a5c0b87b1b..47e21de6ba 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -49,7 +49,8 @@ final class ManageTagsDialog extends javax.swing.JDialog { * and add it to the set of hash databases used to classify files as * unknown, known, or known bad. */ - @Messages({"ManageTagDialog.title=Manage Tags"}) + @Messages({"ManageTagDialog.title=Manage Tags", + "ManageTagDialog.tagInfo.text=Additional tags can be created in the Tags options panel."}) ManageTagsDialog() { super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.ManageTagDialog_title(), @@ -115,6 +116,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { jScrollPane1 = new javax.swing.JScrollPane(); tblTagNames = new javax.swing.JTable(); lbWarnings = new javax.swing.JLabel(); + tagInfo = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); @@ -157,6 +159,8 @@ final class ManageTagsDialog extends javax.swing.JDialog { }); jScrollPane1.setViewportView(tblTagNames); + org.openide.awt.Mnemonics.setLocalizedText(tagInfo, org.openide.util.NbBundle.getMessage(ManageTagsDialog.class, "ManageTagDialog.tagInfo.text")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -169,11 +173,12 @@ final class ManageTagsDialog extends javax.swing.JDialog { .addComponent(okButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE) - .addComponent(lbWarnings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(0, 0, Short.MAX_VALUE))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(tagInfo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE) + .addComponent(lbWarnings, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(2, 2, 2))) .addContainerGap()) ); @@ -183,14 +188,16 @@ final class ManageTagsDialog extends javax.swing.JDialog { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(lbWarnings, javax.swing.GroupLayout.DEFAULT_SIZE, 16, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(tagInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(lbWarnings, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(okButton) .addComponent(cancelButton)) - .addContainerGap()) + .addGap(16, 16, 16)) ); pack(); @@ -237,6 +244,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { private javax.swing.JScrollPane jScrollPane1; private javax.swing.JLabel lbWarnings; private javax.swing.JButton okButton; + private javax.swing.JLabel tagInfo; private javax.swing.JTable tblTagNames; // End of variables declaration//GEN-END:variables } From 419dc9e1dab8bda768baa794be573f1a3859480f Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 12 Sep 2017 12:26:46 -0400 Subject: [PATCH 02/35] 2834 Changes to Manage Tags dialog to include tips for 2834 and 2835 on tag use --- .../optionspanel/Bundle.properties | 2 +- .../optionspanel/ManageTagsDialog.form | 43 +++++++++++------ .../optionspanel/ManageTagsDialog.java | 48 ++++++++++++++----- 3 files changed, 65 insertions(+), 28 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties index e82371d1d2..ed1de3ea5b 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties @@ -73,4 +73,4 @@ ManageCorrelationPropertiesDialog.okButton.text=OK GlobalSettingsPanel.bnManageProperties.text=Manage Correlation Properties ImportHashDatabaseDialog.lbInstructions.text=Choose an .idx file to import into the central repository. ImportHashDatabaseDialog.lbFilePath.text=File Path: -ImportHashDatabaseDialog.tfFilePath.text= \ No newline at end of file +ImportHashDatabaseDialog.tfFilePath.text= diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form index d5761d74cb..02bffafd59 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form @@ -31,15 +31,15 @@ - + - - + + @@ -53,9 +53,9 @@ - + - + @@ -63,7 +63,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -110,12 +110,27 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index 47e21de6ba..af286974e8 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -50,13 +50,26 @@ final class ManageTagsDialog extends javax.swing.JDialog { * unknown, known, or known bad. */ @Messages({"ManageTagDialog.title=Manage Tags", - "ManageTagDialog.tagInfo.text=Additional tags can be created in the Tags options panel."}) + "ManageTagDialog.tagInfo.text1=-Additional tags can be created in the tags options panel.", + "ManageTagDialog.tagInfo.text2=-Checking 'Implies Known Bad' for a tag name will give you the option of marking everyting with that tag in the current case as bad in the central repository.", + "ManageTagDialog.tagInfo.text3=-Un-checking 'Implies Known Bad' for a tag name will not have an effect on the central repository.", + "ManageTagDialog.tagInfo.text4=-Tagging an item with a tag which has 'Implies Known Bad' selected will flag the item as bad in the central repository.", + "ManageTagDialog.tagInfo.text5=-Untagging an item will remove the bad status for that item from the central repository if there are no other known bad tags on that item."}) ManageTagsDialog() { super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.ManageTagDialog_title(), true); // NON-NLS initComponents(); customizeComponents(); + helpTextArea.setText(Bundle.ManageTagDialog_tagInfo_text1()); + helpTextArea.append("\n"); + helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text2()); + helpTextArea.append("\n"); + helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text3()); + helpTextArea.append("\n"); + helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text4()); + helpTextArea.append("\n"); + helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text5()); display(); } @@ -113,10 +126,11 @@ final class ManageTagsDialog extends javax.swing.JDialog { buttonGroup1 = new javax.swing.ButtonGroup(); okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); - jScrollPane1 = new javax.swing.JScrollPane(); + tagScrollArea = new javax.swing.JScrollPane(); tblTagNames = new javax.swing.JTable(); lbWarnings = new javax.swing.JLabel(); - tagInfo = new javax.swing.JLabel(); + helpScrollPane = new javax.swing.JScrollPane(); + helpTextArea = new javax.swing.JTextArea(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); @@ -157,9 +171,16 @@ final class ManageTagsDialog extends javax.swing.JDialog { return canEdit [columnIndex]; } }); - jScrollPane1.setViewportView(tblTagNames); + tagScrollArea.setViewportView(tblTagNames); - org.openide.awt.Mnemonics.setLocalizedText(tagInfo, org.openide.util.NbBundle.getMessage(ManageTagsDialog.class, "ManageTagDialog.tagInfo.text")); // NOI18N + helpTextArea.setEditable(false); + helpTextArea.setBackground(new java.awt.Color(240, 240, 240)); + helpTextArea.setColumns(20); + helpTextArea.setLineWrap(true); + helpTextArea.setRows(5); + helpTextArea.setWrapStyleWord(true); + helpTextArea.setFocusable(false); + helpScrollPane.setViewportView(helpTextArea); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); @@ -169,14 +190,14 @@ final class ManageTagsDialog extends javax.swing.JDialog { .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(0, 223, Short.MAX_VALUE) + .addGap(0, 0, Short.MAX_VALUE) .addComponent(okButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(tagInfo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE) + .addComponent(helpScrollPane, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(tagScrollArea, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE) .addComponent(lbWarnings, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(2, 2, 2))) .addContainerGap()) @@ -188,16 +209,16 @@ final class ManageTagsDialog extends javax.swing.JDialog { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) + .addComponent(helpScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tagInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lbWarnings, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(okButton) .addComponent(cancelButton)) - .addGap(16, 16, 16)) + .addContainerGap()) ); pack(); @@ -241,10 +262,11 @@ final class ManageTagsDialog extends javax.swing.JDialog { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.ButtonGroup buttonGroup1; private javax.swing.JButton cancelButton; - private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JScrollPane helpScrollPane; + private javax.swing.JTextArea helpTextArea; private javax.swing.JLabel lbWarnings; private javax.swing.JButton okButton; - private javax.swing.JLabel tagInfo; + private javax.swing.JScrollPane tagScrollArea; private javax.swing.JTable tblTagNames; // End of variables declaration//GEN-END:variables } From c465011b124541a0b0f0dd5178d630bfe32457df Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 12 Sep 2017 12:29:51 -0400 Subject: [PATCH 03/35] 2834 make setting of text for tag help area its own method --- .../centralrepository/optionspanel/ManageTagsDialog.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index af286974e8..0d4bcef875 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -61,6 +61,11 @@ final class ManageTagsDialog extends javax.swing.JDialog { true); // NON-NLS initComponents(); customizeComponents(); + setupHelpTextArea(); + display(); + } + + private void setupHelpTextArea() { helpTextArea.setText(Bundle.ManageTagDialog_tagInfo_text1()); helpTextArea.append("\n"); helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text2()); @@ -70,7 +75,6 @@ final class ManageTagsDialog extends javax.swing.JDialog { helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text4()); helpTextArea.append("\n"); helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text5()); - display(); } @Messages({"ManageTagsDialog.init.failedConnection.msg=Cannot connect to Central Repository.", From cd845adf15248665903e50cc48bf03ef2c34396a Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 12 Sep 2017 13:02:26 -0400 Subject: [PATCH 04/35] 2834 adjust default size of tag help box on manage tags panel --- .../centralrepository/optionspanel/ManageTagsDialog.form | 4 ++-- .../centralrepository/optionspanel/ManageTagsDialog.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form index 02bffafd59..8a93bd383a 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form @@ -53,9 +53,9 @@ - + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index 0d4bcef875..d29ce4f677 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -213,9 +213,9 @@ final class ManageTagsDialog extends javax.swing.JDialog { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(helpScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE) + .addComponent(helpScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE) + .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lbWarnings, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) From 4f488e29ca4653ecdcb7a3ddef449f11b851f3dc Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 13 Sep 2017 18:17:28 -0400 Subject: [PATCH 05/35] 2834 make changes to Central Repo and Manage Tags GUI layout --- .../optionspanel/GlobalSettingsPanel.form | 302 ++++++++++++++---- .../optionspanel/GlobalSettingsPanel.java | 223 +++++++++---- .../optionspanel/ManageTagsDialog.form | 23 +- .../optionspanel/ManageTagsDialog.java | 28 +- 4 files changed, 421 insertions(+), 155 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index 2e87f1d5a4..e07efced14 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -19,32 +19,46 @@ - + - - - - - + + + + + + + + + + + + + + + - + + - - - + + + + + + + - - - + + @@ -66,26 +80,26 @@ - + - + + + + + - - - - - - - + + + + + - - @@ -107,9 +121,9 @@ - + - + @@ -154,53 +168,81 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - @@ -217,16 +259,42 @@ - + - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -244,16 +312,108 @@ + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 7e231d7cd2..650acf4d58 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -41,7 +41,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private static final long serialVersionUID = 1L; private static final Logger LOGGER = Logger.getLogger(GlobalSettingsPanel.class.getName()); - + private final IngestJobEventPropertyChangeListener ingestJobEventListener; /** @@ -56,7 +56,14 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } @Messages({"GlobalSettingsPanel.title=Central Repository Settings", - "GlobalSettingsPanel.cbUseCentralRepo.text=Use a Central Repository"}) + "GlobalSettingsPanel.cbUseCentralRepo.text=Use a Central Repository", + "GlobalSettingsPanel.pnTagManagement.border.title=Tags", + "GlobalSettingsPanel.pnCorrelationProperties.border.title=Correlation Properties", + "GlobalSettingsPanel.lbCentralRepository.text=The Central Repository allows you to correlate files and forensic artifacts between cases.", + "GlobalSettingsPanel.manageTagsTextArea.text=Configure which tag names are associated with notable or known bad items. " + + "When these tags are used, the file or artifact will be recorded in the central repository. " + + "If that file or artifact is seen again in future cases, it will be flagged.", + "GlobalSettingsPanel.correlationPropertiesTextArea.text=Choose which file and artifact properties to store in the central central repository for later correlation."}) private void customizeComponents() { setName(Bundle.GlobalSettingsPanel_title()); @@ -86,12 +93,18 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i lbDbPlatformValue = new javax.swing.JLabel(); lbDbNameValue = new javax.swing.JLabel(); lbDbLocationValue = new javax.swing.JLabel(); - pnDatabaseContentButtons = new javax.swing.JPanel(); - bnImportDatabase = new javax.swing.JButton(); - bnManageTags = new javax.swing.JButton(); - bnManageTypes = new javax.swing.JButton(); - tbOops = new javax.swing.JTextField(); cbUseCentralRepo = new javax.swing.JCheckBox(); + bnImportDatabase = new javax.swing.JButton(); + pnTagManagement = new javax.swing.JPanel(); + bnManageTags = new javax.swing.JButton(); + manageTagsScrollPane = new javax.swing.JScrollPane(); + manageTagsTextArea = new javax.swing.JTextArea(); + tbOops = new javax.swing.JTextField(); + pnCorrelationProperties = new javax.swing.JPanel(); + bnManageTypes = new javax.swing.JButton(); + correlationPropertiesScrollPane = new javax.swing.JScrollPane(); + correlationPropertiesTextArea = new javax.swing.JTextArea(); + lbCentralRepository = new javax.swing.JLabel(); setName(""); // NOI18N @@ -117,19 +130,19 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() .addContainerGap() .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() + .addComponent(bnDbConfigure) + .addContainerGap()) .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbDbPlatformTypeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.PREFERRED_SIZE, 711, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 711, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 711, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addComponent(bnDbConfigure)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) ); pnDatabaseConfigurationLayout.setVerticalGroup( pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -146,11 +159,18 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(bnDbConfigure) - .addContainerGap()) + .addGap(8, 8, 8)) ); + org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N + cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cbUseCentralRepoActionPerformed(evt); + } + }); + bnImportDatabase.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/centralrepository/images/import16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(bnImportDatabase, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnImportDatabase.label")); // NOI18N bnImportDatabase.setActionCommand(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnImportDatabase.actionCommand")); // NOI18N @@ -160,6 +180,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } }); + pnTagManagement.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.pnTagManagement.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N + pnTagManagement.setPreferredSize(new java.awt.Dimension(674, 97)); + org.openide.awt.Mnemonics.setLocalizedText(bnManageTags, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnManageTags.text")); // NOI18N bnManageTags.setToolTipText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnManageTags.toolTipText")); // NOI18N bnManageTags.setActionCommand(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnManageTags.actionCommand")); // NOI18N @@ -169,6 +192,57 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } }); + manageTagsScrollPane.setBorder(null); + + manageTagsTextArea.setEditable(false); + manageTagsTextArea.setBackground(new java.awt.Color(240, 240, 240)); + manageTagsTextArea.setColumns(20); + manageTagsTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + manageTagsTextArea.setLineWrap(true); + manageTagsTextArea.setRows(2); + manageTagsTextArea.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.manageTagsTextArea.text")); // NOI18N + manageTagsTextArea.setToolTipText(""); + manageTagsTextArea.setWrapStyleWord(true); + manageTagsTextArea.setBorder(null); + manageTagsScrollPane.setViewportView(manageTagsTextArea); + + javax.swing.GroupLayout pnTagManagementLayout = new javax.swing.GroupLayout(pnTagManagement); + pnTagManagement.setLayout(pnTagManagementLayout); + pnTagManagementLayout.setHorizontalGroup( + pnTagManagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnTagManagementLayout.createSequentialGroup() + .addContainerGap() + .addGroup(pnTagManagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnTagManagementLayout.createSequentialGroup() + .addComponent(bnManageTags) + .addGap(0, 555, Short.MAX_VALUE)) + .addGroup(pnTagManagementLayout.createSequentialGroup() + .addComponent(manageTagsScrollPane) + .addContainerGap()))) + ); + pnTagManagementLayout.setVerticalGroup( + pnTagManagementLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnTagManagementLayout.createSequentialGroup() + .addGap(7, 7, 7) + .addComponent(manageTagsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnManageTags, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(8, 8, 8)) + ); + + tbOops.setEditable(false); + tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, 12)); + tbOops.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.tbOops.text")); // NOI18N + tbOops.setBorder(null); + tbOops.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + tbOopsActionPerformed(evt); + } + }); + + pnCorrelationProperties.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.pnCorrelationProperties.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N + pnCorrelationProperties.setPreferredSize(new java.awt.Dimension(674, 93)); + org.openide.awt.Mnemonics.setLocalizedText(bnManageTypes, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnManageProperties.text")); // NOI18N bnManageTypes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -176,41 +250,44 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } }); - javax.swing.GroupLayout pnDatabaseContentButtonsLayout = new javax.swing.GroupLayout(pnDatabaseContentButtons); - pnDatabaseContentButtons.setLayout(pnDatabaseContentButtonsLayout); - pnDatabaseContentButtonsLayout.setHorizontalGroup( - pnDatabaseContentButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseContentButtonsLayout.createSequentialGroup() + correlationPropertiesScrollPane.setBorder(null); + + correlationPropertiesTextArea.setEditable(false); + correlationPropertiesTextArea.setBackground(new java.awt.Color(240, 240, 240)); + correlationPropertiesTextArea.setColumns(20); + correlationPropertiesTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + correlationPropertiesTextArea.setLineWrap(true); + correlationPropertiesTextArea.setRows(2); + correlationPropertiesTextArea.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.correlationPropertiesTextArea.text")); // NOI18N + correlationPropertiesTextArea.setToolTipText(""); + correlationPropertiesTextArea.setWrapStyleWord(true); + correlationPropertiesTextArea.setBorder(null); + correlationPropertiesScrollPane.setViewportView(correlationPropertiesTextArea); + + javax.swing.GroupLayout pnCorrelationPropertiesLayout = new javax.swing.GroupLayout(pnCorrelationProperties); + pnCorrelationProperties.setLayout(pnCorrelationPropertiesLayout); + pnCorrelationPropertiesLayout.setHorizontalGroup( + pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnCorrelationPropertiesLayout.createSequentialGroup() .addContainerGap() - .addComponent(bnImportDatabase) + .addGroup(pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 642, Short.MAX_VALUE) + .addGroup(pnCorrelationPropertiesLayout.createSequentialGroup() + .addComponent(bnManageTypes) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()) + ); + pnCorrelationPropertiesLayout.setVerticalGroup( + pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnCorrelationPropertiesLayout.createSequentialGroup() + .addGap(7, 7, 7) + .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnManageTags) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(bnManageTypes) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - pnDatabaseContentButtonsLayout.setVerticalGroup( - pnDatabaseContentButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseContentButtonsLayout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(pnDatabaseContentButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnImportDatabase) - .addComponent(bnManageTags, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(bnManageTypes, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(34, 34, 34)) + .addGap(8, 8, 8)) ); - tbOops.setEditable(false); - tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, 12)); - tbOops.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.tbOops.text")); // NOI18N - tbOops.setBorder(null); - - org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.cbUseCentralRepo.text")); // NOI18N - cbUseCentralRepo.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - cbUseCentralRepoActionPerformed(evt); - } - }); + org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.lbCentralRepository.text")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); @@ -219,26 +296,39 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pnDatabaseContentButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(tbOops, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE))) - .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lbCentralRepository, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pnCorrelationProperties, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pnTagManagement, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnImportDatabase, javax.swing.GroupLayout.Alignment.LEADING)) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(lbCentralRepository) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cbUseCentralRepo) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0) + .addComponent(pnTagManagement, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0) + .addComponent(pnCorrelationProperties, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0) .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pnDatabaseContentButtons, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) + .addGap(0, 0, 0) + .addComponent(bnImportDatabase)) ); + + pnTagManagement.getAccessibleContext().setAccessibleName(""); }// //GEN-END:initComponents private void bnImportDatabaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnImportDatabaseActionPerformed @@ -276,6 +366,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); }//GEN-LAST:event_cbUseCentralRepoActionPerformed + private void tbOopsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbOopsActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_tbOopsActionPerformed + @Override @Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."}) public void load() { @@ -398,7 +492,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void enableDatabaseConfigureButton(Boolean enable) { boolean ingestRunning = IngestManager.getInstance().isIngestRunning(); pnDatabaseConfiguration.setEnabled(enable && !ingestRunning); - pnDatabaseContentButtons.setEnabled(enable && !ingestRunning); bnDbConfigure.setEnabled(enable && !ingestRunning); lbDbLocationLabel.setEnabled(enable && !ingestRunning); lbDbLocationValue.setEnabled(enable && !ingestRunning); @@ -418,10 +511,14 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i * @return True */ private boolean enableButtonSubComponents(Boolean enable) { - boolean ingestRunning = IngestManager.getInstance().isIngestRunning(); + boolean ingestRunning = IngestManager.getInstance().isIngestRunning(); + pnCorrelationProperties.setEnabled(enable && !ingestRunning); + pnTagManagement.setEnabled(enable && !ingestRunning); bnManageTypes.setEnabled(enable && !ingestRunning); bnImportDatabase.setEnabled(enable && !ingestRunning); bnManageTags.setEnabled(enable && !ingestRunning); + manageTagsTextArea.setEnabled(enable && !ingestRunning); + correlationPropertiesTextArea.setEnabled(enable && !ingestRunning); return true; } @@ -431,14 +528,20 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private javax.swing.JButton bnManageTags; private javax.swing.JButton bnManageTypes; private javax.swing.JCheckBox cbUseCentralRepo; + private javax.swing.JScrollPane correlationPropertiesScrollPane; + private javax.swing.JTextArea correlationPropertiesTextArea; + private javax.swing.JLabel lbCentralRepository; private javax.swing.JLabel lbDbLocationLabel; private javax.swing.JLabel lbDbLocationValue; private javax.swing.JLabel lbDbNameLabel; private javax.swing.JLabel lbDbNameValue; private javax.swing.JLabel lbDbPlatformTypeLabel; private javax.swing.JLabel lbDbPlatformValue; + private javax.swing.JScrollPane manageTagsScrollPane; + private javax.swing.JTextArea manageTagsTextArea; + private javax.swing.JPanel pnCorrelationProperties; private javax.swing.JPanel pnDatabaseConfiguration; - private javax.swing.JPanel pnDatabaseContentButtons; + private javax.swing.JPanel pnTagManagement; private javax.swing.JTextField tbOops; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form index 8a93bd383a..ef232ae281 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form @@ -52,11 +52,11 @@ - - - - - + + + + + @@ -111,6 +111,11 @@ + + + + + @@ -124,9 +129,15 @@ + + + - + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index d29ce4f677..ea8876108b 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -50,11 +50,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { * unknown, known, or known bad. */ @Messages({"ManageTagDialog.title=Manage Tags", - "ManageTagDialog.tagInfo.text1=-Additional tags can be created in the tags options panel.", - "ManageTagDialog.tagInfo.text2=-Checking 'Implies Known Bad' for a tag name will give you the option of marking everyting with that tag in the current case as bad in the central repository.", - "ManageTagDialog.tagInfo.text3=-Un-checking 'Implies Known Bad' for a tag name will not have an effect on the central repository.", - "ManageTagDialog.tagInfo.text4=-Tagging an item with a tag which has 'Implies Known Bad' selected will flag the item as bad in the central repository.", - "ManageTagDialog.tagInfo.text5=-Untagging an item will remove the bad status for that item from the central repository if there are no other known bad tags on that item."}) + "ManageTagDialog.tagInfo.text=Select the tags to store in the Central Repository. Additional tags can be created in the tags options panel."}) ManageTagsDialog() { super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.ManageTagDialog_title(), @@ -66,15 +62,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { } private void setupHelpTextArea() { - helpTextArea.setText(Bundle.ManageTagDialog_tagInfo_text1()); - helpTextArea.append("\n"); - helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text2()); - helpTextArea.append("\n"); - helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text3()); - helpTextArea.append("\n"); - helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text4()); - helpTextArea.append("\n"); - helpTextArea.append(Bundle.ManageTagDialog_tagInfo_text5()); + helpTextArea.setText(Bundle.ManageTagDialog_tagInfo_text()); } @Messages({"ManageTagsDialog.init.failedConnection.msg=Cannot connect to Central Repository.", @@ -177,12 +165,16 @@ final class ManageTagsDialog extends javax.swing.JDialog { }); tagScrollArea.setViewportView(tblTagNames); + helpScrollPane.setBorder(null); + helpTextArea.setEditable(false); helpTextArea.setBackground(new java.awt.Color(240, 240, 240)); helpTextArea.setColumns(20); + helpTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N helpTextArea.setLineWrap(true); - helpTextArea.setRows(5); + helpTextArea.setRows(2); helpTextArea.setWrapStyleWord(true); + helpTextArea.setBorder(null); helpTextArea.setFocusable(false); helpScrollPane.setViewportView(helpTextArea); @@ -213,9 +205,9 @@ final class ManageTagsDialog extends javax.swing.JDialog { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(helpScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE) + .addComponent(helpScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0) + .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lbWarnings, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) From 5e69d06a80dbc1e1d2e3b918ec1ce270e1ea3786 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 15 Sep 2017 14:45:28 -0400 Subject: [PATCH 06/35] Resolved window size issue and performed general cleanup. --- .../autoingest/AutoIngestDashboard.java | 1 - .../AutoIngestDashboardTopComponent.java | 6 +-- .../autoingest/AutoIngestJobNodeData.java | 54 +++++++++++++++---- .../experimental/autoingest/Bundle.properties | 33 +----------- .../autoingest/dashboardWsmode.xml | 2 +- 5 files changed, 46 insertions(+), 50 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 6782140e7e..2b44db0e3c 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -542,7 +542,6 @@ public final class AutoIngestDashboard extends JPanel implements Observer { */ private enum JobsTableModelColumns { - // DLG: Go through the bundle.properties file and delete any unused key-value pairs. CASE(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.Case")), DATA_SOURCE(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.ImageFolder")), HOST_NAME(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.HostName")), diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java index 24369b9da2..19a99031f8 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java @@ -50,10 +50,6 @@ public final class AutoIngestDashboardTopComponent extends TopComponent { @Messages({ "AutoIngestDashboardTopComponent.exceptionMessage.failedToCreateDashboard=Failed to create Auto Ingest Dashboard.",}) public static void openTopComponent() { - /* - * DLG: Please make the top component initial size big enough to show - * the whole dashboard. - */ final AutoIngestDashboardTopComponent tc = (AutoIngestDashboardTopComponent) WindowManager.getDefault().findTopComponent(PREFERRED_ID); if (tc != null) { topComponentInitialized = true; @@ -67,7 +63,7 @@ public final class AutoIngestDashboardTopComponent extends TopComponent { try { dashboard = AutoIngestDashboard.createDashboard(); tc.add(dashboard); - dashboard.setSize(992, 744); + dashboard.setSize(dashboard.getPreferredSize()); if (tc.isOpened() == false) { tc.open(); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java index df2e321af2..c0321d7c92 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java @@ -32,8 +32,22 @@ import javax.lang.model.type.TypeKind; final class AutoIngestJobNodeData { private static final int CURRENT_VERSION = 1; - private static final int MAX_POSSIBLE_NODE_DATA_SIZE = 131629; private static final int DEFAULT_PRIORITY = 0; + + /* + * This number is the sum of each piece of data, based on it's type. For the + * types boolean, int, and long, values 1, 4, and 8 will be added + * respectively. For String objects, the length of the string, plus either a + * byte or short respesenting the length of the string, will be added. + * + * This field is used to set the size of the buffer during the byte array + * creation in the 'toArray()' method. Since the final size of the array + * isn't immediately known at the time of creation, this number is used to + * create an array as large as could possibly be needed to store all the + * data. This avoids the need to continuously enlarge the buffer. Once the + * buffer has all the necessary data, it will be resized as appropriate. + */ + private static final int MAX_POSSIBLE_NODE_DATA_SIZE = 131629; /* * Version 0 fields. @@ -48,16 +62,16 @@ final class AutoIngestJobNodeData { * Version 1 fields. */ private int version; - private String manifestFilePath; + private String manifestFilePath; // 'short' length used in byte array private long manifestFileDate; - private String caseName; - private String deviceId; - private String dataSourcePath; - private String caseDirectoryPath; - private String processingHostName; + private String caseName; // 'byte' length used in byte array + private String deviceId; // 'byte' length used in byte array + private String dataSourcePath; // 'short' length used in byte array + private String caseDirectoryPath; // 'short' length used in byte array + private String processingHostName; // 'short' length used in byte array private byte processingStage; private long processingStageStartDate; - private String processingStageDetailsDescription; + private String processingStageDetailsDescription; // 'byte' length used in byte array private long processingStageDetailsStartDate; /** @@ -151,7 +165,7 @@ final class AutoIngestJobNodeData { this.processingStage = buffer.get(); this.processingStageStartDate = buffer.getLong(); this.processingStageDetailsDescription = getStringFromBuffer(buffer, TypeKind.BYTE); - this.processingStageDetailsStartDate = buffer.getLong();; + this.processingStageDetailsStartDate = buffer.getLong(); this.processingHostName = getStringFromBuffer(buffer, TypeKind.SHORT); } @@ -517,7 +531,16 @@ final class AutoIngestJobNodeData { return array; } - // DGL: Document what is going on here and how the max buffer sie constant is calculated. + /** + * This method retrieves a string from a given buffer. Depending on the type + * specified, either a 'byte' or a 'short' will first be read out of the + * buffer which gives the length of the string so it can be properly parsed. + * + * @param buffer The buffer from which the string will be read. + * @param lengthType The size of the length data. + * + * @return The string read from the buffer. + */ private String getStringFromBuffer(ByteBuffer buffer, TypeKind lengthType) { int length = 0; String output = ""; @@ -540,7 +563,16 @@ final class AutoIngestJobNodeData { return output; } - // DGL: Document what is going on here and how the max buffer sie constant is calculated. + /** + * This method puts a given string into a given buffer. Depending on the + * type specified, either a 'byte' or a 'short' will be inserted prior to + * the string which gives the length of the string so it can be properly + * parsed. + * + * @param stringValue The string to write to the buffer. + * @param buffer The buffer to which the string will be written. + * @param lengthType The size of the length data. + */ private void putStringIntoBuffer(String stringValue, ByteBuffer buffer, TypeKind lengthType) { switch (lengthType) { case BYTE: diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index a22410a70e..d580b40367 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -11,45 +11,15 @@ AutoIngestDashboard.JobsTableModel.ColumnHeader.CompletedTime=Job Completed AutoIngestDashboard.JobsTableModel.ColumnHeader.Stage=Stage AutoIngestDashboard.JobsTableModel.ColumnHeader.Status=Status AutoIngestDashboard.JobsTableModel.ColumnHeader.ManifestFilePath= Manifest File Path -AutoIngestDashboard.bnResume.text=Resume -AutoIngestDashboard.bnPause.confirmHeader=Are you sure you want to pause? -AutoIngestDashboard.bnPause.warningText=Pause will occur after the current job completes processing. This could take a long time. Continue? -AutoIngestDashboard.bnPause.toolTipTextResume=Resume processing of Pending Jobs -AutoIngestDashboard.bnPause.pausing=Pausing after current job completes... -AutoIngestDashboard.Cancelling=Cancelling... AutoIngestDashboard.pendingTable.toolTipText=The Pending table displays the order upcoming Jobs will be processed with the top of the list first AutoIngestDashboard.runningTable.toolTipText=The Running table displays the currently running Job and information about it AutoIngestDashboard.completedTable.toolTipText=The Completed table shows all Jobs that have been processed already AutoIngestDashboard.JobsTableModel.ColumnHeader.StageTime=Time in Stage -AutoIngestDashboard.JobsTableModel.ColumnHeader.CaseFolder=Case Folder -AutoIngestDashboard.JobsTableModel.ColumnHeader.LocalJob= Local Job? -AutoIngestDashboard.DeletionFailed=Deletion failed for job -AutoIngestDashboard.ShowLogFailed.Title=Unable to display case log -AutoIngestDashboard.ShowLogFailed.Message=Case log file does not exist -AutoIngestDashboard.bnPrioritizeCase.toolTipText=Move all images associated with a case to top of Pending queue. -AutoIngestDashboard.ExitConsequences=This will cancel any currently running job on this host. Exiting while a job is running potentially leaves the case in an inconsistent or corrupted state. -AutoIngestDashboard.ExitingStatus=Exiting... -AutoIngestDashboard.OK=OK -AutoIngestDashboard.Cancel=Cancel -AutoIngestDashboard.AutoIngestStartupFailed.Message=Failed to start automated ingest.\nPlease see auto ingest system log for details. -AutoIngestDashboard.AutoIngestStartupFailed.Title=Automated Ingest Error -AutoIngestDashboard.AutoIngestStartupError=Failed to start automated ingest. Verify Multi-user Settings. -AutoIngestDashboard.AutoIngestStartupWarning.Title=Automated Ingest Warning -AutoIngestDashboard.AutoIngestStartupWarning.Message=Failed to establish remote communications with other automated ingest nodes.\nAuto ingest dashboard will only be able to display local ingest job events.\nPlease verify Multi-User settings (Options->Multi-User). See application log for details. -AutoIngestDashboard.UpdatingSharedConfig=Updating shared configuration -AutoIngestDashboard.SharedConfigurationDisabled=Shared configuration disabled -AutoIngestDashboard.EnableConfigurationSettings=Enable shared configuration from the options panel before uploading -AutoIngestDashboard.ErrorUploadingConfiguration=Error uploading configuration -AutoIngestDashboard.UploadSuccessTitle=Success -AutoIngestDashboard.UploadSuccess=Shared configuration successfully uploaded -AutoIngestDashboard.UploadFailedTitle=Failed -AutoIngestDashboard.ConfigLocked=The shared configuration directory is locked because upload from another node is in progress. \nIf this is an error, you can unlock the directory and then retry the upload. -AutoIngestDashboard.ConfigLockedTitle=Configuration directory locked +AutoIngestDashboard.JobsTableModel.ColumnHeader.CaseFolder=Case AutoIngestDashboard.tbServicesStatusMessage.Message=Case databases {0}, keyword search {1}, coordination {2}, messaging {3} AutoIngestDashboard.tbServicesStatusMessage.Message.Up=up AutoIngestDashboard.tbServicesStatusMessage.Message.Down=down AutoIngestDashboard.tbServicesStatusMessage.Message.Unknown=unknown -AutoIngestDashboard.PauseDueToSystemError=Paused due to system error, please consult the auto ingest system log ConfirmationDialog.DoNotDelete=Do not delete ConfirmationDialog.Delete=Permanently delete ConfirmationDialog.DeleteAreYouSure=The entire case will be removed. Are you sure you want to delete case @@ -260,7 +230,6 @@ FileExporterSettingsPanel.BrowseReportTooltip_1=Browse for the Reports Folder FileExporterSettingsPanel.NewRuleTooltip_1=Clear the rule editor to begin a new rule FileExporterSettingsPanel.DeleteTooltip_1=Delete the selected rule FileExporterSettingsPanel.SaveTooltip_1=Save the current rule -AutoIngestDashboard.bnPrioritizeFolder.label= AutoIngestCasePanel.rbDays.text=Days AutoIngestCasePanel.rbWeeks.text=Weeks AutoIngestCasePanel.rbMonths.text=Months diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/dashboardWsmode.xml b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/dashboardWsmode.xml index 49305ab59f..3f681aa72f 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/dashboardWsmode.xml +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/dashboardWsmode.xml @@ -3,7 +3,7 @@ - + From 4fbe9b26a9f5c1cb79a447d757d7ae20c5197e4d Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 15 Sep 2017 15:47:49 -0400 Subject: [PATCH 07/35] Modifications to pass in job for prioritization. --- .../autoingest/AutoIngestDashboard.java | 17 +++---- .../autoingest/AutoIngestMonitor.java | 47 +++++++++---------- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 2b44db0e3c..ec0948c4b1 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -475,7 +475,8 @@ public final class AutoIngestDashboard extends JPanel implements Observer { job.getErrorsOccurred(), // STATUS ((Date.from(Instant.now()).getTime()) - (status.getStartDate().getTime())), // ACTIVITY_TIME job.getCaseDirectoryPath(), // CASE_DIRECTORY_PATH - job.getManifest().getFilePath() // MANIFEST_FILE_PATH + job.getManifest().getFilePath(), // MANIFEST_FILE_PATH + job //DLG: Put job object in the table }); } @@ -552,8 +553,8 @@ public final class AutoIngestDashboard extends JPanel implements Observer { STAGE_TIME(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.StageTime")), STATUS(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.Status")), CASE_DIRECTORY_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.CaseFolder")), - MANIFEST_FILE_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.ManifestFilePath")); //DLG:, - //DLG: JOB(""); + MANIFEST_FILE_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.ManifestFilePath")), + JOB(""); // DLG: private final String header; @@ -585,8 +586,8 @@ public final class AutoIngestDashboard extends JPanel implements Observer { STATUS.getColumnHeader(), STAGE_TIME.getColumnHeader(), CASE_DIRECTORY_PATH.getColumnHeader(), - MANIFEST_FILE_PATH.getColumnHeader() //DLG: , - //DLG: JOB.getColumnHeader() + MANIFEST_FILE_PATH.getColumnHeader(), + JOB.getColumnHeader() }; }; @@ -834,13 +835,13 @@ public final class AutoIngestDashboard extends JPanel implements Observer { private void prioritizeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prioritizeButtonActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - Path manifestFilePath = (Path) (pendingTableModel.getValueAt(pendingTable.getSelectedRow(), JobsTableModelColumns.MANIFEST_FILE_PATH.ordinal())); + AutoIngestJob job = (AutoIngestJob) (pendingTableModel.getValueAt(pendingTable.getSelectedRow(), JobsTableModelColumns.JOB.ordinal())); JobsSnapshot jobsSnapshot; try { - jobsSnapshot = autoIngestMonitor.prioritizeJob(manifestFilePath); + jobsSnapshot = autoIngestMonitor.prioritizeJob(job); refreshTables(jobsSnapshot); } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { - String errorMessage = String.format(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.PrioritizeError"), manifestFilePath); + String errorMessage = String.format(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.PrioritizeError"), job.getManifest().getFilePath()); logger.log(Level.SEVERE, errorMessage, ex); MessageNotifyUtil.Message.error(errorMessage); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 2000bba6f0..59cdbaf820 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -275,22 +275,20 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang /** * Bumps the priority of an auto ingest job. * - * @param manifestPath The manifest file path for the job to be prioritized. + * @param job The job to be prioritized. */ - JobsSnapshot prioritizeJob(Path manifestFilePath) throws AutoIngestMonitorException { + // DLG: New method!! + JobsSnapshot prioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { int highestPriority = 0; - AutoIngestJob prioritizedJob = null; + synchronized (jobsLock) { /* * Get the highest known priority and make sure the job is still in * the pending jobs queue. */ - for (AutoIngestJob job : jobsSnapshot.getPendingJobs()) { - if (job.getPriority() > highestPriority) { - highestPriority = job.getPriority(); - } - if (job.getManifest().getFilePath().equals(manifestFilePath)) { - prioritizedJob = job; + for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { + if (pendingJob.getPriority() > highestPriority) { + highestPriority = pendingJob.getPriority(); } } @@ -298,29 +296,26 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang * If the job was still in the pending jobs queue, bump its * priority. */ - if (null != prioritizedJob) { - ++highestPriority; - String manifestNodePath = prioritizedJob.getManifest().getFilePath().toString(); - try { - AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); - nodeData.setPriority(highestPriority); - coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); - } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { - throw new AutoIngestMonitorException("Error bumping priority for job " + prioritizedJob.toString(), ex); - } - prioritizedJob.setPriority(highestPriority); + ++highestPriority; + String manifestNodePath = job.getManifest().getFilePath().toString(); + try { + AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); + nodeData.setPriority(highestPriority); + coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); + } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { + throw new AutoIngestMonitorException("Error bumping priority for job " + job.toString(), ex); } + job.setPriority(highestPriority); /* * Publish a prioritization event. */ - if (null != prioritizedJob) { - final String caseName = prioritizedJob.getManifest().getCaseName(); - new Thread(() -> { - eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); - }).start(); - } + final String caseName = job.getManifest().getCaseName(); + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + jobsSnapshot.addOrReplacePendingJob(job); //DLG: Is this needed? return jobsSnapshot; } } From 855903f4ee6d2cb29ec83f11986c586b34f2cb77 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 15:53:49 -0400 Subject: [PATCH 08/35] 3036 made descriptions in CR more consistent, Known bad became notable for CR --- .../DataContentViewerOtherCases.java | 16 ++++++++-------- .../eventlisteners/IngestEventsListener.java | 7 ++++--- .../ingestmodule/IngestModule.java | 9 +++++---- .../optionspanel/ManageTagsDialog.form | 4 ++-- .../optionspanel/ManageTagsDialog.java | 13 ++++++++----- 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index 4c804cf703..705a9d6b13 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -66,8 +66,8 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; * View correlation results from other cases */ @ServiceProvider(service = DataContentViewer.class, position = 8) -@Messages({"DataContentViewerOtherCases.title=Other Data Sources", - "DataContentViewerOtherCases.toolTip=Displays instances of the selected file/artifact from other data sources.",}) +@Messages({"DataContentViewerOtherCases.title=Other Occurrences", + "DataContentViewerOtherCases.toolTip=Displays instances of the selected file/artifact from other occurrences.",}) public class DataContentViewerOtherCases extends javax.swing.JPanel implements DataContentViewer { private final static Logger LOGGER = Logger.getLogger(DataContentViewerOtherCases.class.getName()); @@ -370,7 +370,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D * * @param node The node to view * - * @return A collection of Central Repository artifacts to display + * @return A collection of central repository artifacts to display */ private Collection getArtifactsFromCorrelatableAttributes(Node node) { Collection ret = new ArrayList<>(); @@ -450,7 +450,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D /** * Query the db for artifact instances from other cases correlated to the - * given Central Repository artifact. + * given central repository artifact. * * @param eamArtifact The artifact to correlate against * @@ -474,12 +474,12 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D } /** - * Get the Global File Instances matching the given eamArtifact and convert - * them to Central Repository Artifact Instancess. + * Get the global file instances matching the given eamArtifact and convert + * them to central repository artifact instancess. * * @param eamArtifact Artifact to use for ArtifactTypeEnum matching * - * @return List of Central Repository Artifact Instances, empty list if none + * @return List of central repository artifact instances, empty list if none * found */ public Collection getReferenceInstancesAsArtifactInstances(EamArtifact eamArtifact) { @@ -530,7 +530,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D * * @param node The node being viewed. */ - @Messages({"DataContentViewerOtherCases.table.isempty=There are no associated artifacts or files from other cases to display.", + @Messages({"DataContentViewerOtherCases.table.isempty=There are no associated artifacts or files from other occurrences to display.", "DataContentViewerOtherCases.table.noArtifacts=Correlation cannot be performed on the selected file; likely missing MD5 hash."}) private void populateTable(Node node) { String dataSourceName = getDataSourceNameFromNode(node); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java index cdf4d3d360..c7aa222fd6 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java @@ -190,7 +190,8 @@ public class IngestEventsListener { } } - @NbBundle.Messages({"IngestEventsListener.prevcases.text=Previous Cases", + @NbBundle.Messages({"IngestEventsListener.prevTaggedSet.text=Previously Tagged As Notable (Central Repository)", + "IngestEventsListener.prevCaseComment.text=Previous Case: ", "IngestEventsListener.ingestmodule.name=Correlation Engine"}) private void postCorrelatedBadArtifactToBlackboard(BlackboardArtifact bbArtifact, List caseDisplayNames) { @@ -200,9 +201,9 @@ public class IngestEventsListener { String MODULE_NAME = Bundle.IngestEventsListener_ingestmodule_name(); BlackboardArtifact tifArtifact = af.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT); BlackboardAttribute att = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, MODULE_NAME, - Bundle.IngestEventsListener_prevcases_text()); + Bundle.IngestEventsListener_prevTaggedSet_text()); BlackboardAttribute att2 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT, MODULE_NAME, - "Previous Case: " + caseDisplayNames.stream().distinct().collect(Collectors.joining(",", "", ""))); + Bundle.IngestEventsListener_prevCaseComment_text() + caseDisplayNames.stream().distinct().collect(Collectors.joining(",", "", ""))); tifArtifact.addAttribute(att); tifArtifact.addAttribute(att2); tifArtifact.addAttribute(new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT, MODULE_NAME, bbArtifact.getArtifactID())); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java index 1c0a66d646..731337696a 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java @@ -54,7 +54,8 @@ import org.sleuthkit.datamodel.TskDataException; * Ingest module for inserting entries into the Central Repository database on * ingest of a data source */ -@Messages({"IngestModule.prevcases.text=Previous Cases"}) +@Messages({"IngestModule.prevTaggedSet.text=Previously Tagged As Notable (Central Repository)", + "IngestModule.prevCaseComment.text=Previous Case: "}) class IngestModule implements FileIngestModule { private final static Logger LOGGER = Logger.getLogger(IngestModule.class.getName()); @@ -289,9 +290,9 @@ class IngestModule implements FileIngestModule { String MODULE_NAME = IngestModuleFactory.getModuleName(); BlackboardArtifact tifArtifact = abstractFile.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT); BlackboardAttribute att = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, MODULE_NAME, - Bundle.IngestModule_prevcases_text()); + Bundle.IngestModule_prevTaggedSet_text()); BlackboardAttribute att2 = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_COMMENT, MODULE_NAME, - "Previous Case: " + caseDisplayNames.stream().distinct().collect(Collectors.joining(",", "", ""))); + Bundle.IngestModule_prevCaseComment_text() + caseDisplayNames.stream().distinct().collect(Collectors.joining(",", "", ""))); tifArtifact.addAttribute(att); tifArtifact.addAttribute(att2); @@ -319,7 +320,7 @@ class IngestModule implements FileIngestModule { String MODULE_NAME = IngestModuleFactory.getModuleName(); BlackboardArtifact tifArtifact = abstractFile.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT); BlackboardAttribute att = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME, MODULE_NAME, - Bundle.IngestModule_prevcases_text()); + Bundle.IngestModule_prevCaseComment_text()); tifArtifact.addAttribute(att); try { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form index 07be8010cd..b73ca41673 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form @@ -97,8 +97,8 @@ - - + +
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index a5c0b87b1b..37f2c72005 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -59,15 +59,17 @@ final class ManageTagsDialog extends javax.swing.JDialog { display(); } - @Messages({"ManageTagsDialog.init.failedConnection.msg=Cannot connect to Central Repository.", - "ManageTagsDialog.init.failedGettingTags.msg=Unable to retrieve list of tags."}) + @Messages({"ManageTagsDialog.init.failedConnection.msg=Cannot connect to central cepository.", + "ManageTagsDialog.init.failedGettingTags.msg=Unable to retrieve list of tags.", + "ManageTagsDialog.tagColumn.header.text=Tags", + "ManageTagsDialog.notableColumn.header.text=Notable"}) private void customizeComponents() { lbWarnings.setText(""); EamDb dbManager; try { dbManager = EamDb.getInstance(); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database."); + LOGGER.log(Level.SEVERE, "Failed to connect to central repository database."); lbWarnings.setText(Bundle.ManageTagsDialog_init_failedConnection_msg()); return; } @@ -88,6 +90,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { Collections.sort(tagNames); DefaultTableModel model = (DefaultTableModel) tblTagNames.getModel(); + model.setColumnIdentifiers(new String[] {Bundle.ManageTagsDialog_tagColumn_header_text(), Bundle.ManageTagsDialog_notableColumn_header_text()}); for (String tagName : tagNames) { boolean enabled = badTags.contains(tagName); model.addRow(new Object[]{tagName, enabled}); @@ -137,7 +140,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { }, new String [] { - "Tag", "Implies Known Bad" + "", "" } ) { Class[] types = new Class [] { @@ -224,7 +227,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { dbManager.setBadTags(badTags); dbManager.saveSettings(); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database."); // NON-NLS + LOGGER.log(Level.SEVERE, "Failed to connect to central repository database."); // NON-NLS lbWarnings.setText(Bundle.ManageTagsDialog_init_failedConnection_msg()); return false; } From 9d417f68d386a36718cc4bc743a38ff0d7d7453b Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 16:33:00 -0400 Subject: [PATCH 09/35] 3036 removed guess about cause of issue from message --- .../contentviewer/DataContentViewerOtherCases.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index 705a9d6b13..8ab241fa3b 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -531,7 +531,7 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D * @param node The node being viewed. */ @Messages({"DataContentViewerOtherCases.table.isempty=There are no associated artifacts or files from other occurrences to display.", - "DataContentViewerOtherCases.table.noArtifacts=Correlation cannot be performed on the selected file; likely missing MD5 hash."}) + "DataContentViewerOtherCases.table.noArtifacts=Correlation cannot be performed on the selected file."}) private void populateTable(Node node) { String dataSourceName = getDataSourceNameFromNode(node); String deviceId = getDeviceIdFromNode(node); From 34c2d2453f467bcffcb8365eaa73b46d43c5fdaf Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 16:38:58 -0400 Subject: [PATCH 10/35] 2834 central repository capitalization made more consistant --- .../actions/EamCaseEditDetailsDialog.java | 6 +++--- .../DataContentViewerOtherCasesTableModel.java | 4 ++-- .../autopsy/centralrepository/datamodel/EamArtifact.java | 6 +++--- .../experimental/configuration/SharedConfiguration.java | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java index 6bbdeac316..c00f0583d8 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/actions/EamCaseEditDetailsDialog.java @@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization; import org.sleuthkit.autopsy.centralrepository.optionspanel.AddNewOrganizationDialog; /** - * Handle editing details of cases within the Central Repository + * Handle editing details of cases within the central repository */ public class EamCaseEditDetailsDialog extends JDialog { @@ -531,14 +531,14 @@ public class EamCaseEditDetailsDialog extends JDialog { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); if (!EamDb.isEnabled()) { - LOGGER.log(Level.SEVERE, "Central Repository database not enabled"); // NON-NLS + LOGGER.log(Level.SEVERE, "Central repository database not enabled"); // NON-NLS return; } try { dbManager.updateCase(eamCase); } catch (IllegalArgumentException | EamDbException ex) { - LOGGER.log(Level.SEVERE, "Error connecting to Central Repository database", ex); // NON-NLS + LOGGER.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS } finally { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java index 266211493b..ba2358d75c 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java @@ -175,9 +175,9 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel { } /** - * Add one local Central Repository Artifact to the table. + * Add one local central repository artifact to the table. * - * @param eamArtifact Central Repository Artifact to add to the + * @param eamArtifact central repository artifact to add to the * table */ public void addEamArtifact(EamArtifact eamArtifact) { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java index 3c2db37e39..7c7a7b0afb 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifact.java @@ -170,7 +170,7 @@ public class EamArtifact implements Serializable { * * @param id Unique ID for this Correlation Type * @param displayName Name of this type displayed in the UI. - * @param dbTableName Central Repository db table where data of this type is stored. + * @param dbTableName Central repository db table where data of this type is stored. * Must start with a lowercase letter and only contain * lowercase letters, numbers, and '_' characters. * @param supported Is this Type currently supported @@ -190,10 +190,10 @@ public class EamArtifact implements Serializable { /** * Constructior for custom types where we do not know the Type ID until * the row has been entered into the correlation_types table - * in the Central Repository. + * in the central repository. * * @param displayName Name of this type displayed in the UI. - * @param dbTableName Central Repository db table where data of this type is stored + * @param dbTableName Central repository db table where data of this type is stored * Must start with a lowercase letter and only contain * lowercase letters, numbers, and '_' characters. * @param supported Is this Type currently supported diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java index e7b633a133..ccb2e49e54 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java @@ -778,26 +778,26 @@ public class SharedConfiguration { } /** - * Upload Central Repository settings. + * Upload central repository settings. * * @param remoteFolder Shared settings folder * * @throws SharedConfigurationException */ private void uploadCentralRepositorySettings(File remoteFolder) throws SharedConfigurationException { - publishTask("Uploading Central Repository configuration"); + publishTask("Uploading central repository configuration"); copyToRemoteFolder(CENTRAL_REPOSITORY_PROPERTIES_FILE, moduleDirPath, remoteFolder, true); } /** - * Download Central Repository settings. + * Download central repository settings. * * @param remoteFolder Shared settings folder * * @throws SharedConfigurationException */ private void downloadCentralRepositorySettings(File remoteFolder) throws SharedConfigurationException { - publishTask("Downloading Central Repository configuration"); + publishTask("Downloading central repository configuration"); copyToLocalFolder(CENTRAL_REPOSITORY_PROPERTIES_FILE, moduleDirPath, remoteFolder, true); } From d2246550283bdef82440d37d13b204dc1e6d0087 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 16:51:00 -0400 Subject: [PATCH 11/35] 2834 more minor tweaks of UI text for central repository --- .../optionspanel/GlobalSettingsPanel.form | 4 ++-- .../optionspanel/GlobalSettingsPanel.java | 4 ++-- .../optionspanel/ManageTagsDialog.java | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index e07efced14..c9c19a90ff 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -198,7 +198,7 @@ - + @@ -320,7 +320,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 650acf4d58..b5d7169eca 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -56,10 +56,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } @Messages({"GlobalSettingsPanel.title=Central Repository Settings", - "GlobalSettingsPanel.cbUseCentralRepo.text=Use a Central Repository", + "GlobalSettingsPanel.cbUseCentralRepo.text=Use a central repository", "GlobalSettingsPanel.pnTagManagement.border.title=Tags", "GlobalSettingsPanel.pnCorrelationProperties.border.title=Correlation Properties", - "GlobalSettingsPanel.lbCentralRepository.text=The Central Repository allows you to correlate files and forensic artifacts between cases.", + "GlobalSettingsPanel.lbCentralRepository.text=A central repository allows you to correlate files and forensic artifacts between cases.", "GlobalSettingsPanel.manageTagsTextArea.text=Configure which tag names are associated with notable or known bad items. " + "When these tags are used, the file or artifact will be recorded in the central repository. " + "If that file or artifact is seen again in future cases, it will be flagged.", diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index 4417be32a6..79206e29df 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -61,7 +61,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { * unknown, known, or known bad. */ @Messages({"ManageTagDialog.title=Manage Tags", - "ManageTagDialog.tagInfo.text=Select the tags to store in the Central Repository. Additional tags can be created in the tags options panel."}) + "ManageTagDialog.tagInfo.text=Select the tags that cause files and results to be recorded in the central repository. Additional tags can be created in the tags options panel."}) ManageTagsDialog() { super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.ManageTagDialog_title(), @@ -76,7 +76,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { helpTextArea.setText(Bundle.ManageTagDialog_tagInfo_text()); } - @Messages({"ManageTagsDialog.init.failedConnection.msg=Cannot connect to Central Repository.", + @Messages({"ManageTagsDialog.init.failedConnection.msg=Cannot connect to central repository.", "ManageTagsDialog.init.failedGettingTags.msg=Unable to retrieve list of tags."}) private void customizeComponents() { lbWarnings.setText(""); @@ -84,7 +84,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { try { dbManager = EamDb.getInstance(); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database."); + LOGGER.log(Level.SEVERE, "Failed to connect to central repository database."); lbWarnings.setText(Bundle.ManageTagsDialog_init_failedConnection_msg()); return; } @@ -261,7 +261,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { dbManager.setBadTags(badTags); dbManager.saveSettings(); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database."); // NON-NLS + LOGGER.log(Level.SEVERE, "Failed to connect to central repository database."); // NON-NLS lbWarnings.setText(Bundle.ManageTagsDialog_init_failedConnection_msg()); return false; } @@ -273,9 +273,9 @@ final class ManageTagsDialog extends javax.swing.JDialog { * any existing tagged items (in the current case only) in the central repo. */ public class CheckBoxModelListener implements TableModelListener { - @Messages({"ManageTagsDialog.updateCurrentCase.msg=Mark as known bad any files/artifacts in the current case that have this tag?", + @Messages({"ManageTagsDialog.updateCurrentCase.msg=Mark as known bad any files/results in the current case that have this tag?", "ManageTagsDialog.updateCurrentCase.title=Update current case?", - "ManageTagsDialog.updateCurrentCase.error=Error updating existing Central Repository entries"}) + "ManageTagsDialog.updateCurrentCase.error=Error updating existing central repository entries"}) javax.swing.JDialog dialog; public CheckBoxModelListener(javax.swing.JDialog dialog){ From 4855105db2ee7c341b1c3ad713f5b98b8bddd836 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 16:54:58 -0400 Subject: [PATCH 12/35] 2834 fix central repository being lower case in additional spots --- .../centralrepository/ingestmodule/IngestModule.java | 10 +++++----- .../optionspanel/EamDbSettingsDialog.java | 6 +++--- .../optionspanel/ImportHashDatabaseDialog.java | 2 +- .../ManageCorrelationPropertiesDialog.java | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java index 1c0a66d646..356d73df94 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java @@ -187,7 +187,7 @@ class IngestModule implements FileIngestModule { // see ArtifactManagerTimeTester for details @Messages({ "IngestModule.notfyBubble.title=Central Repository Not Initialized", - "IngestModule.errorMessage.isNotEnabled=Central Repository settings are not initialized, cannot run Correlation Engine ingest module." + "IngestModule.errorMessage.isNotEnabled=Central repository settings are not initialized, cannot run Correlation Engine ingest module." }) @Override public void startUp(IngestJobContext context) throws IngestModuleException { @@ -210,8 +210,8 @@ class IngestModule implements FileIngestModule { // Don't allow sqlite central repo databases to be used for multi user cases if((Case.getCurrentCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) && (EamDbPlatformEnum.getSelectedPlatform() == EamDbPlatformEnum.SQLITE)){ - LOGGER.log(Level.SEVERE, "Cannot run correlation engine on a multi-user case with a SQLite Central Repository."); - throw new IngestModuleException("Cannot run on a multi-user case with a SQLite Central Repository."); // NON-NLS + LOGGER.log(Level.SEVERE, "Cannot run correlation engine on a multi-user case with a SQLite central repository."); + throw new IngestModuleException("Cannot run on a multi-user case with a SQLite central repository."); // NON-NLS } jobId = context.getJobId(); eamCase = new EamCase(Case.getCurrentCase().getName(), Case.getCurrentCase().getDisplayName()); @@ -230,8 +230,8 @@ class IngestModule implements FileIngestModule { try { dbManager = EamDb.getInstance(); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Error connecting to Central Repository database.", ex); // NON-NLS - throw new IngestModuleException("Error connecting to Central Repository database.", ex); // NON-NLS + LOGGER.log(Level.SEVERE, "Error connecting to central repository database.", ex); // NON-NLS + throw new IngestModuleException("Error connecting to central repository database.", ex); // NON-NLS } try { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 8fb0bfe236..6a0280e992 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -419,7 +419,7 @@ public class EamDbSettingsDialog extends JDialog { Bundle.EamDbSettingsDialog_okButton_createPostgresDbError_message(), Bundle.EamDbSettingsDialog_okButton_createDbError_title(), JOptionPane.WARNING_MESSAGE); - LOGGER.severe("Unable to initialize database schema or insert contents into Central Repository."); + LOGGER.severe("Unable to initialize database schema or insert contents into central repository."); return; } break; @@ -440,7 +440,7 @@ public class EamDbSettingsDialog extends JDialog { Bundle.EamDbSettingsDialog_okButton_createSQLiteDbError_message(), Bundle.EamDbSettingsDialog_okButton_createDbError_title(), JOptionPane.WARNING_MESSAGE); - LOGGER.severe("Unable to initialize database schema or insert contents into Central Repository."); + LOGGER.severe("Unable to initialize database schema or insert contents into central repository."); return; } break; @@ -459,7 +459,7 @@ public class EamDbSettingsDialog extends JDialog { @Messages({"EamDbSettingsDialog.okButton.errorTitle.text=Restart Required.", "EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform.", - "EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to Central Repository database.", + "EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to central repository database.", "EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Database", "EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Database exists but is not the right format. Manually delete it or choose a different path (if applicable).", "EamDbSettingsDialog.okButton.createDbDialog.title=Database Does Not Exist", diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java index 2eccb89ec9..ad2a9bd54b 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ImportHashDatabaseDialog.java @@ -587,7 +587,7 @@ final class ImportHashDatabaseDialog extends javax.swing.JDialog { this.progress = ProgressHandle.createHandle(Bundle.ImportHashDatabaseDialog_ImportHashDatabaseWorker_displayName()); if (!EamDb.isEnabled()) { - throw new EamDbException("Central Repository database is not enabled."); // NON-NLS + throw new EamDbException("Central repository database is not enabled."); // NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java index 727083c205..0d45c51d2f 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java @@ -249,7 +249,7 @@ final class ManageCorrelationPropertiesDialog extends javax.swing.JDialog { try { dbManager = EamDb.getInstance(); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database.", ex); + LOGGER.log(Level.SEVERE, "Failed to connect to central repository database.", ex); lbWarningMsg.setText(Bundle.ManageCorrelationPropertiesDialog_okbutton_failure()); return; } From 1cac6f4566748f0049c1eed023546bd947475f48 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 16:57:13 -0400 Subject: [PATCH 13/35] 2834 change uses of artifact in messages to user to result --- .../optionspanel/GlobalSettingsPanel.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index b5d7169eca..ad065f156d 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -59,11 +59,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i "GlobalSettingsPanel.cbUseCentralRepo.text=Use a central repository", "GlobalSettingsPanel.pnTagManagement.border.title=Tags", "GlobalSettingsPanel.pnCorrelationProperties.border.title=Correlation Properties", - "GlobalSettingsPanel.lbCentralRepository.text=A central repository allows you to correlate files and forensic artifacts between cases.", + "GlobalSettingsPanel.lbCentralRepository.text=A central repository allows you to correlate files and results between cases.", "GlobalSettingsPanel.manageTagsTextArea.text=Configure which tag names are associated with notable or known bad items. " - + "When these tags are used, the file or artifact will be recorded in the central repository. " - + "If that file or artifact is seen again in future cases, it will be flagged.", - "GlobalSettingsPanel.correlationPropertiesTextArea.text=Choose which file and artifact properties to store in the central central repository for later correlation."}) + + "When these tags are used, the file or result will be recorded in the central repository. " + + "If that file or result is seen again in future cases, it will be flagged.", + "GlobalSettingsPanel.correlationPropertiesTextArea.text=Choose which file and result properties to store in the central central repository for later correlation."}) private void customizeComponents() { setName(Bundle.GlobalSettingsPanel_title()); From 62d6d27076efa1219e375298fa80a44e32d2215f Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 17:06:25 -0400 Subject: [PATCH 14/35] 2834 make scrollbar invisible by default with longer description in manage tags --- .../optionspanel/ManageTagsDialog.form | 12 ++++++------ .../optionspanel/ManageTagsDialog.java | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form index ef232ae281..d894f64fe6 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.form @@ -52,11 +52,11 @@ - - - - - + + + + + @@ -133,7 +133,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index 79206e29df..1196b61750 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -185,7 +185,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { helpTextArea.setColumns(20); helpTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N helpTextArea.setLineWrap(true); - helpTextArea.setRows(2); + helpTextArea.setRows(3); helpTextArea.setWrapStyleWord(true); helpTextArea.setBorder(null); helpTextArea.setFocusable(false); @@ -218,9 +218,9 @@ final class ManageTagsDialog extends javax.swing.JDialog { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addComponent(helpScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(helpScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) - .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE) + .addComponent(tagScrollArea, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lbWarnings, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) From 07493125a90a7dd6fdbcc4ac11372320cb28b929 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 15 Sep 2017 17:17:55 -0400 Subject: [PATCH 15/35] 2834 minor capital letter changes for consistancy --- .../autopsy/centralrepository/optionspanel/Bundle.properties | 2 +- .../centralrepository/optionspanel/EamDbSettingsDialog.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties index 5e0831e130..e15accaff1 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties @@ -8,7 +8,7 @@ EamPostgresSettingsDialog.bnCancel.text=Cancel EamPostgresSettingsDialog.lbPort.text=Port : EamPostgresSettingsDialog.lbHostName.text=Host Name / IP : EamPostgresSettingsDialog.bnTestConnection.text=Test Connection -EamPostgresSettingsDialog.lbDatabaseName.text=Database name : +EamPostgresSettingsDialog.lbDatabaseName.text=Database Name : EamSqliteSettingsDialog.bnCancel.text=Cancel EamSqliteSettingsDialog.lbTestDatabase.text= EamSqliteSettingsDialog.bnTestDatabase.text=Test Connection diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 6a0280e992..cf4d09b614 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -59,7 +59,7 @@ public class EamDbSettingsDialog extends JDialog { */ @Messages({"EamDbSettingsDialog.title.text=Central Repository Database Configuration", "EamDbSettingsDialog.lbSingleUserSqLite.text=SQLite should only be used by one examiner at a time.", - "EamDbSettingsDialog.lbDatabaseType.text=Database type :", + "EamDbSettingsDialog.lbDatabaseType.text=Database Type :", "EamDbSettingsDialog.fcDatabasePath.title=Select location for central_repository.db"}) public EamDbSettingsDialog() { @@ -94,7 +94,7 @@ public class EamDbSettingsDialog extends JDialog { @Override public String getDescription() { - return "Directories and Central Repository databases"; + return "Directories and central repository databases"; } }); cbDatabaseType.setSelectedItem(selectedPlatform); From b73564f400a77061a6e44b3c8568259c90f4b6b8 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Fri, 15 Sep 2017 18:00:11 -0400 Subject: [PATCH 16/35] Update ManageTagsDialog.java --- .../centralrepository/optionspanel/ManageTagsDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java index 1196b61750..43cc72beb4 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageTagsDialog.java @@ -61,7 +61,7 @@ final class ManageTagsDialog extends javax.swing.JDialog { * unknown, known, or known bad. */ @Messages({"ManageTagDialog.title=Manage Tags", - "ManageTagDialog.tagInfo.text=Select the tags that cause files and results to be recorded in the central repository. Additional tags can be created in the tags options panel."}) + "ManageTagDialog.tagInfo.text=Select the tags that cause files and results to be recorded in the central repository. Additional tags can be created in the Tags options panel."}) ManageTagsDialog() { super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.ManageTagDialog_title(), From 3eed4fb75919d2ba067fa9047a6da52f070103e7 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 18 Sep 2017 00:52:17 -0400 Subject: [PATCH 17/35] NPE bug fix. --- .../autoingest/AutoIngestDashboard.java | 15 ++++----------- .../autoingest/AutoIngestJobNodeData.java | 6 +++--- .../autoingest/AutoIngestMonitor.java | 2 -- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index ec0948c4b1..eeacc3d8ac 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -213,6 +213,7 @@ public final class AutoIngestDashboard extends JPanel implements Observer { pendingTable.removeColumn(pendingTable.getColumn(JobsTableModelColumns.CASE_DIRECTORY_PATH.getColumnHeader())); pendingTable.removeColumn(pendingTable.getColumn(JobsTableModelColumns.STATUS.getColumnHeader())); pendingTable.removeColumn(pendingTable.getColumn(JobsTableModelColumns.MANIFEST_FILE_PATH.getColumnHeader())); + pendingTable.removeColumn(pendingTable.getColumn(JobsTableModelColumns.JOB.getColumnHeader())); /* * Set up a column to display the cases associated with the jobs. @@ -275,6 +276,7 @@ public final class AutoIngestDashboard extends JPanel implements Observer { runningTable.removeColumn(runningTable.getColumn(JobsTableModelColumns.STATUS.getColumnHeader())); runningTable.removeColumn(runningTable.getColumn(JobsTableModelColumns.CASE_DIRECTORY_PATH.getColumnHeader())); runningTable.removeColumn(runningTable.getColumn(JobsTableModelColumns.MANIFEST_FILE_PATH.getColumnHeader())); + runningTable.removeColumn(runningTable.getColumn(JobsTableModelColumns.JOB.getColumnHeader())); /* * Set up a column to display the cases associated with the jobs. @@ -348,6 +350,7 @@ public final class AutoIngestDashboard extends JPanel implements Observer { completedTable.removeColumn(completedTable.getColumn(JobsTableModelColumns.HOST_NAME.getColumnHeader())); completedTable.removeColumn(completedTable.getColumn(JobsTableModelColumns.CASE_DIRECTORY_PATH.getColumnHeader())); completedTable.removeColumn(completedTable.getColumn(JobsTableModelColumns.MANIFEST_FILE_PATH.getColumnHeader())); + completedTable.removeColumn(completedTable.getColumn(JobsTableModelColumns.JOB.getColumnHeader())); /* * Set up a column to display the cases associated with the jobs. @@ -477,7 +480,6 @@ public final class AutoIngestDashboard extends JPanel implements Observer { job.getCaseDirectoryPath(), // CASE_DIRECTORY_PATH job.getManifest().getFilePath(), // MANIFEST_FILE_PATH job - //DLG: Put job object in the table }); } setSelectedEntry(table, tableModel, currentRow); @@ -554,7 +556,7 @@ public final class AutoIngestDashboard extends JPanel implements Observer { STATUS(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.Status")), CASE_DIRECTORY_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.CaseFolder")), MANIFEST_FILE_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.ManifestFilePath")), - JOB(""); // DLG: + JOB(""); private final String header; @@ -566,15 +568,6 @@ public final class AutoIngestDashboard extends JPanel implements Observer { return header; } - /* - * DLG: We need to add the AutoIngestJob object for the row to the - * table. As a model you can look in AutoIngestControlPanel to see how a - * boolean is stored in a hidden IS_LOCAL_JOB column and do something - * similar for the job. Once youy hjave done that, you can change the - * button event handler for the Prioritize button to make it pass the - * AutoIngestJob to the AutoIngestMonitor instead of the manifest file - * path. - */ private static final String[] headers = { CASE.getColumnHeader(), DATA_SOURCE.getColumnHeader(), diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java index c0321d7c92..0edf81fdae 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java @@ -332,14 +332,14 @@ final class AutoIngestJobNodeData { /** * Gets the path to the case directory of the case associated with the job. * - * @return The case directory path or null if the case directory has not - * been created yet. + * @return The case directory path or an empty string path if the case + * directory has not been created yet. */ synchronized Path getCaseDirectoryPath() { if (!caseDirectoryPath.isEmpty()) { return Paths.get(caseDirectoryPath); } else { - return null; + return Paths.get(""); } } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 59cdbaf820..38f27753df 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -277,7 +277,6 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang * * @param job The job to be prioritized. */ - // DLG: New method!! JobsSnapshot prioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { int highestPriority = 0; @@ -315,7 +314,6 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); - jobsSnapshot.addOrReplacePendingJob(job); //DLG: Is this needed? return jobsSnapshot; } } From 6af17b39fc184f1c8e78d279d484a31892bee3b0 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 18 Sep 2017 14:01:37 -0400 Subject: [PATCH 18/35] Fix AutoIngestDashboard JOB col header, stale data issue --- .../autoingest/AutoIngestDashboard.java | 32 +++++++++-- .../autoingest/AutoIngestMonitor.java | 55 ++++++++++--------- .../experimental/autoingest/Bundle.properties | 1 + 3 files changed, 57 insertions(+), 31 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index eeacc3d8ac..f90ee50778 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.experimental.autoingest; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.awt.Cursor; import java.awt.EventQueue; import java.nio.file.Path; @@ -31,6 +32,7 @@ import java.util.logging.Level; import javax.swing.DefaultListSelectionModel; import java.awt.Color; import java.beans.PropertyChangeEvent; +import java.util.concurrent.ExecutorService; import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.SwingWorker; @@ -44,6 +46,8 @@ import org.sleuthkit.autopsy.core.ServicesMonitor; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestMonitor.JobsSnapshot; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; /** * A dashboard for monitoring an automated ingest cluster. @@ -72,11 +76,13 @@ public final class AutoIngestDashboard extends JPanel implements Observer { private static final int COMPLETED_TIME_COL_MIN_WIDTH = 30; private static final int COMPLETED_TIME_COL_MAX_WIDTH = 2000; private static final int COMPLETED_TIME_COL_PREFERRED_WIDTH = 280; + private static final String UPDATE_TASKS_THREAD_NAME = "AID-update-tasks-%d"; private static final Logger logger = Logger.getLogger(AutoIngestDashboard.class.getName()); private final DefaultTableModel pendingTableModel; private final DefaultTableModel runningTableModel; private final DefaultTableModel completedTableModel; private AutoIngestMonitor autoIngestMonitor; + private ExecutorService updateExecutor; /** * Creates a dashboard for monitoring an automated ingest cluster. @@ -422,12 +428,13 @@ public final class AutoIngestDashboard extends JPanel implements Observer { autoIngestMonitor = new AutoIngestMonitor(); autoIngestMonitor.addObserver(this); autoIngestMonitor.startUp(); + updateExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat(UPDATE_TASKS_THREAD_NAME).build()); + updateExecutor.submit(new UpdateJobsSnapshotTask()); } @Override - public void update(Observable observable, Object argument) { - JobsSnapshot jobsSnapshot = (JobsSnapshot) argument; - EventQueue.invokeLater(new RefreshComponentsTask(jobsSnapshot)); + public void update(Observable observable, Object arg) { + updateExecutor.submit(new UpdateJobsSnapshotTask()); } /** @@ -556,7 +563,7 @@ public final class AutoIngestDashboard extends JPanel implements Observer { STATUS(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.Status")), CASE_DIRECTORY_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.CaseFolder")), MANIFEST_FILE_PATH(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.ManifestFilePath")), - JOB(""); + JOB(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.JobsTableModel.ColumnHeader.Job")); private final String header; @@ -584,6 +591,23 @@ public final class AutoIngestDashboard extends JPanel implements Observer { }; }; + /** + * A task that gets the latest auto ingest jobs snapshot from the autop + * ingest monitor and queues a components refresh task for execution in the + * EDT. + */ + private class UpdateJobsSnapshotTask implements Runnable { + + /** + * @inheritDoc + */ + @Override + public void run() { + JobsSnapshot jobsSnapshot = AutoIngestDashboard.this.autoIngestMonitor.getJobsSnapshot(); + EventQueue.invokeLater(new RefreshComponentsTask(jobsSnapshot)); + } + } + /** * A task that refreshes the UI components on this panel to reflect a * snapshot of the pending, running and completed auto ingest jobs lists of diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 38f27753df..c7a21b82c9 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -19,13 +19,10 @@ package org.sleuthkit.autopsy.experimental.autoingest; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import java.awt.Cursor; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Observable; @@ -34,7 +31,6 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import javax.annotation.concurrent.GuardedBy; -import org.openide.util.Exceptions; import org.sleuthkit.autopsy.coordinationservice.CoordinationService; import org.sleuthkit.autopsy.coordinationservice.CoordinationService.CoordinationServiceException; import org.sleuthkit.autopsy.coreutils.Logger; @@ -148,7 +144,7 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang jobsSnapshot.removePendingJob(event.getJob()); jobsSnapshot.addOrReplaceRunningJob(event.getJob()); setChanged(); - notifyObservers(jobsSnapshot); + notifyObservers(null); } } @@ -162,7 +158,7 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang // DLG: TEST! Replace job in running list with job from event jobsSnapshot.addOrReplaceRunningJob(event.getJob()); setChanged(); - notifyObservers(jobsSnapshot); + notifyObservers(null); } } @@ -178,7 +174,7 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang jobsSnapshot.removeRunningJob(event.getJob()); jobsSnapshot.addOrReplaceCompletedJob(event.getJob()); setChanged(); - notifyObservers(jobsSnapshot); + notifyObservers(null); } } @@ -279,7 +275,7 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ JobsSnapshot prioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { int highestPriority = 0; - + AutoIngestJob prioritizedJob = null; synchronized (jobsLock) { /* * Get the highest known priority and make sure the job is still in @@ -289,31 +285,36 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang if (pendingJob.getPriority() > highestPriority) { highestPriority = pendingJob.getPriority(); } + if (pendingJob.equals(job)) { + prioritizedJob = job; + } } /* * If the job was still in the pending jobs queue, bump its * priority. */ - ++highestPriority; - String manifestNodePath = job.getManifest().getFilePath().toString(); - try { - AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); - nodeData.setPriority(highestPriority); - coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); - } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { - throw new AutoIngestMonitorException("Error bumping priority for job " + job.toString(), ex); + if (null != prioritizedJob) { + ++highestPriority; + String manifestNodePath = job.getManifest().getFilePath().toString(); + try { + AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); + nodeData.setPriority(highestPriority); + coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); + } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { + throw new AutoIngestMonitorException("Error bumping priority for job " + job.toString(), ex); + } + prioritizedJob.setPriority(highestPriority); + + /* + * Publish a prioritization event. + */ + final String caseName = job.getManifest().getCaseName(); + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } - job.setPriority(highestPriority); - - /* - * Publish a prioritization event. - */ - final String caseName = job.getManifest().getCaseName(); - new Thread(() -> { - eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); - }).start(); - return jobsSnapshot; } } @@ -337,7 +338,7 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang synchronized (jobsLock) { jobsSnapshot = newJobsSnapshot; setChanged(); - notifyObservers(jobsSnapshot); + notifyObservers(null); } } } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index d580b40367..1633373467 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -16,6 +16,7 @@ AutoIngestDashboard.runningTable.toolTipText=The Running table displays the curr AutoIngestDashboard.completedTable.toolTipText=The Completed table shows all Jobs that have been processed already AutoIngestDashboard.JobsTableModel.ColumnHeader.StageTime=Time in Stage AutoIngestDashboard.JobsTableModel.ColumnHeader.CaseFolder=Case +AutoIngestDashboard.JobsTableModel.ColumnHeader.Job=Job AutoIngestDashboard.tbServicesStatusMessage.Message=Case databases {0}, keyword search {1}, coordination {2}, messaging {3} AutoIngestDashboard.tbServicesStatusMessage.Message.Up=up AutoIngestDashboard.tbServicesStatusMessage.Message.Down=down From f0741a88d18c97600d39c1a9706c1662710b2fc5 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 18 Sep 2017 15:47:57 -0400 Subject: [PATCH 19/35] Fix default version number for AutoIngestJobNodeData --- .../autopsy/experimental/autoingest/AutoIngestJobNodeData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java index 0edf81fdae..42f05d2774 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java @@ -121,7 +121,7 @@ final class AutoIngestJobNodeData { this.numberOfCrashes = 0; this.completedDate = 0L; this.errorsOccurred = false; - this.version = CURRENT_VERSION; + this.version = 0; this.manifestFilePath = ""; this.manifestFileDate = 0L; this.caseName = ""; From b02b27b417abafe27297276bc4dd09e25a3c4129 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 18 Sep 2017 16:45:41 -0400 Subject: [PATCH 20/35] Fix Date object encapsulation in Manifest.java --- .../sleuthkit/autopsy/experimental/autoingest/Manifest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java index e3c4cb6bb1..5a42a01e80 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Manifest.java @@ -42,7 +42,7 @@ public final class Manifest implements Serializable { this.dateFileCreated = dateFileCreated; this.caseName = caseName; this.deviceId = deviceId; - if (dataSourcePath != null) { + if (null != dataSourcePath) { this.dataSourcePath = dataSourcePath.toString(); } else { this.dataSourcePath = ""; @@ -55,7 +55,7 @@ public final class Manifest implements Serializable { } public Date getDateFileCreated() { - return this.dateFileCreated; + return new Date(this.dateFileCreated.getTime()); } public String getCaseName() { From bb15b26e56b444e6a226aa499c3f1f0567d8b711 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 08:49:26 -0400 Subject: [PATCH 21/35] Remove instruction for CentralRepository NBM from build.xml --- build.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/build.xml b/build.xml index 685f285fda..deda12f21e 100755 --- a/build.xml +++ b/build.xml @@ -265,7 +265,6 @@ - From 66d3b358ea1a1f16efe05487f20917e99329a0fe Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 11:00:54 -0400 Subject: [PATCH 22/35] Change logged message level in ImageGallery Toolbar.java --- .../sleuthkit/autopsy/imagegallery/gui/Toolbar.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java index 72f9622729..2dc85cbfd9 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java @@ -136,7 +136,15 @@ public class Toolbar extends ToolBar { tagGroupMenuButton.setText(followUpGroupAction.getText()); tagGroupMenuButton.setGraphic(followUpGroupAction.getGraphic()); } catch (TskCoreException ex) { - LOGGER.log(Level.SEVERE, "Could create follow up tag menu item", ex); //NON-NLS + /* + * The problem appears to be a timing issue where a case is closed + * before this initialization is completed, which It appears to be + * harmless, so we are temporarily changing this log message to a + * WARNING. + * + * TODO (JIRA-3010): SEVERE error logged by image Gallery UI + */ + LOGGER.log(Level.WARNING, "Could not create Follow Up tag menu item", ex); //NON-NLS } tagGroupMenuButton.showingProperty().addListener(showing -> { if (tagGroupMenuButton.isShowing()) { From 28201834f20a213d9553b964d3a1e63401d7e4d1 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Tue, 19 Sep 2017 12:40:43 -0400 Subject: [PATCH 23/35] Resolved row duplication issue for Running table. --- .../autopsy/experimental/autoingest/AutoIngestJob.java | 2 +- .../autopsy/experimental/autoingest/AutoIngestMonitor.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java index d4986c82c7..3a926326c7 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java @@ -351,7 +351,7 @@ public final class AutoIngestJob implements Comparable, Serializa @Override public int hashCode() { - int hash = 71 * (Objects.hashCode(this.caseDirectoryPath)); + int hash = 71 * (Objects.hashCode(this.getManifest().getFilePath())); return hash; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index c7a21b82c9..14e5ec9543 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -139,8 +139,6 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ private void handleJobStartedEvent(AutoIngestJobStartedEvent event) { synchronized (jobsLock) { - // DLG: TEST! Remove job from pending queue, if present - // DLG: TEST! Add job to running jobs list jobsSnapshot.removePendingJob(event.getJob()); jobsSnapshot.addOrReplaceRunningJob(event.getJob()); setChanged(); @@ -155,7 +153,6 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ private void handleJobStatusEvent(AutoIngestJobStatusEvent event) { synchronized (jobsLock) { - // DLG: TEST! Replace job in running list with job from event jobsSnapshot.addOrReplaceRunningJob(event.getJob()); setChanged(); notifyObservers(null); @@ -169,8 +166,6 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ private void handleJobCompletedEvent(AutoIngestJobCompletedEvent event) { synchronized (jobsLock) { - // DLG: TEST! Remove job from event from running list, if present - // DLG: TEST! Add job to completed list jobsSnapshot.removeRunningJob(event.getJob()); jobsSnapshot.addOrReplaceCompletedJob(event.getJob()); setChanged(); From 2c199956c9f235fd973264f47b40404a20920645 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 12:43:47 -0400 Subject: [PATCH 24/35] Fix AutoIngestJob bugs, docs --- .../autoingest/AutoIngestControlPanel.java | 10 +- .../autoingest/AutoIngestDashboard.java | 2 +- .../autoingest/AutoIngestJob.java | 224 ++++++++++++++---- .../autoingest/AutoIngestJobNodeData.java | 2 +- .../autoingest/AutoIngestManager.java | 36 +-- 5 files changed, 198 insertions(+), 76 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index 8f80022834..aa9201efc7 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -1143,7 +1143,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } tableModel.setRowCount(0); for (AutoIngestJob job : jobs) { - AutoIngestJob.StageDetails status = job.getStageDetails(); + AutoIngestJob.StageDetails status = job.getProcessingStageDetails(); tableModel.addRow(new Object[]{ job.getManifest().getCaseName(), // CASE job.getManifest().getDataSourcePath().getFileName(), // DATA_SOURCE @@ -1152,7 +1152,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { job.getProcessingStageStartDate(), // STARTED_TIME job.getCompletedDate(), // COMPLETED_TIME status.getDescription(), // ACTIVITY -job.getErrorsOccurred(), // STATUS + job.getErrorsOccurred(), // STATUS ((Date.from(Instant.now()).getTime()) - (status.getStartDate().getTime())), // ACTIVITY_TIME job.getCaseDirectoryPath(), // CASE_DIRECTORY_PATH job.getProcessingHostName().equals(LOCAL_HOST_NAME), // IS_LOCAL_JOB @@ -1701,7 +1701,7 @@ job.getErrorsOccurred(), // STATUS * * @param evt The button click event. */ - @Messages({"AutoIngestControlPanel.casePrioritization.errorMessage=An error occurred when prioritizing the case. Some or all jobs may not have been prioritized."}) + @Messages({"AutoIngestControlPanel.casePrioritization.errorMessage=An error occurred when prioritizing the case. Some or all jobs may not have been prioritized."}) private void bnPrioritizeCaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnPrioritizeCaseActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1759,8 +1759,8 @@ job.getErrorsOccurred(), // STATUS options[0]); } }//GEN-LAST:event_bnShowCaseLogActionPerformed - - @Messages({"AutoIngestControlPanel.jobPrioritization.errorMessage=An error occurred when prioritizing the job."}) + + @Messages({"AutoIngestControlPanel.jobPrioritization.errorMessage=An error occurred when prioritizing the job."}) private void bnPrioritizeJobActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnPrioritizeJobActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index f90ee50778..4bcfa58d80 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -474,7 +474,7 @@ public final class AutoIngestDashboard extends JPanel implements Observer { // data to populate the table. continue; } - AutoIngestJob.StageDetails status = job.getStageDetails(); + AutoIngestJob.StageDetails status = job.getProcessingStageDetails(); tableModel.addRow(new Object[]{ job.getManifest().getCaseName(), // CASE job.getManifest().getDataSourcePath().getFileName(), job.getProcessingHostName(), // HOST_NAME diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java index d4986c82c7..c8c9f92cbb 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java @@ -34,8 +34,8 @@ import org.sleuthkit.autopsy.coreutils.NetworkUtils; import org.sleuthkit.autopsy.ingest.IngestJob; /** - * An automated ingest job for a manifest. The manifest specifies a co-located - * data source and a case to which the data source is to be added. + * An automated ingest job, which is an ingest job performed by the automated + * ingest service. */ @ThreadSafe public final class AutoIngestJob implements Comparable, Serializable { @@ -44,7 +44,10 @@ public final class AutoIngestJob implements Comparable, Serializa private static final int CURRENT_VERSION = 1; private static final int DEFAULT_PRIORITY = 0; private static final String LOCAL_HOST_NAME = NetworkUtils.getLocalHostName(); - private final int version; + + /* + * Version 0 fields. + */ private final Manifest manifest; private final String nodeName; @GuardedBy("this") @@ -56,8 +59,6 @@ public final class AutoIngestJob implements Comparable, Serializa @GuardedBy("this") private Date stageStartDate; @GuardedBy("this") - private StageDetails stageDetails; - @GuardedBy("this") transient private DataSourceProcessor dataSourceProcessor; @GuardedBy("this") transient private IngestJob ingestJob; @@ -69,96 +70,116 @@ public final class AutoIngestJob implements Comparable, Serializa private Date completedDate; @GuardedBy("this") private boolean errorsOccurred; + + /* + * Version 1 fields. + */ + private final int version; @GuardedBy("this") private ProcessingStatus processingStatus; @GuardedBy("this") private int numberOfCrashes; + @GuardedBy("this") + private StageDetails stageDetails; /** - * Constructs a new automated ingest job for a manifest. All job state not - * specified in the manifest is set to the default state for a new job. + * Constructs a new automated ingest job. All job state not specified in the + * job manifest is set to the default state for a new job. * - * @param manifest The manifest. + * @param manifest The manifest for an automated ingest job. */ AutoIngestJob(Manifest manifest) { - this.version = CURRENT_VERSION; + /* + * Version 0 fields. + */ this.manifest = manifest; this.nodeName = AutoIngestJob.LOCAL_HOST_NAME; this.caseDirectoryPath = ""; this.priority = DEFAULT_PRIORITY; this.stage = Stage.PENDING; this.stageStartDate = manifest.getDateFileCreated(); - this.stageDetails = this.getStageDetails(); this.dataSourceProcessor = null; this.ingestJob = null; this.cancelled = false; this.completed = false; this.completedDate = new Date(0); this.errorsOccurred = false; + + /* + * Version 1 fields. + */ + this.version = CURRENT_VERSION; this.processingStatus = ProcessingStatus.PENDING; this.numberOfCrashes = 0; + this.stageDetails = this.getProcessingStageDetails(); } /** - * Constructs an automated ingest job for a manifest. The manifest specifies - * a co-located data source and a case to which the data source is to be - * added. + * Constructs an automated ingest job using the coordination service node + * data for the job. * - * Note: Manifest objects will be phased out and no longer be part of the - * AutoIngestJob class. - * - * @param nodeData The node data. + * @param nodeData The coordination service node data for an automated + * ingest job. */ AutoIngestJob(AutoIngestJobNodeData nodeData) { - this.version = nodeData.getVersion(); + /* + * Version 0 fields. + */ this.manifest = new Manifest(nodeData.getManifestFilePath(), nodeData.getManifestFileDate(), nodeData.getCaseName(), nodeData.getDeviceId(), nodeData.getDataSourcePath(), Collections.emptyMap()); this.nodeName = nodeData.getProcessingHostName(); this.caseDirectoryPath = nodeData.getCaseDirectoryPath().toString(); this.priority = nodeData.getPriority(); this.stage = nodeData.getProcessingStage(); this.stageStartDate = nodeData.getProcessingStageStartDate(); - this.stageDetails = this.getStageDetails(); - this.dataSourceProcessor = null; - this.ingestJob = null; - this.cancelled = false; - this.completed = false; + this.dataSourceProcessor = null; // Transient data not in node data. + this.ingestJob = null; // Transient data not in node data. + this.cancelled = false; // Transient data not in node data. + this.completed = false; // Transient data not in node data. this.completedDate = nodeData.getCompletedDate(); this.errorsOccurred = nodeData.getErrorsOccurred(); + + /* + * Version 1 fields. + */ + this.version = CURRENT_VERSION; this.processingStatus = nodeData.getProcessingStatus(); this.numberOfCrashes = nodeData.getNumberOfCrashes(); + this.stageDetails = this.getProcessingStageDetails(); } /** - * Gets the auto ingest job manifest. + * Gets the job manifest. * - * @return The manifest. + * @return The job manifest. */ Manifest getManifest() { return this.manifest; } /** - * Sets the path to the case directory of the case associated with this job. + * Sets the path to the case directory for the job. * - * @param caseDirectoryPath The path to the case directory. + * @param caseDirectoryPath The path to the case directory. Can be the empty + * path if the case directory has not been created + * yet. */ synchronized void setCaseDirectoryPath(Path caseDirectoryPath) { - this.caseDirectoryPath = caseDirectoryPath.toString(); + if (null != caseDirectoryPath) { + this.caseDirectoryPath = caseDirectoryPath.toString(); + } else { + this.caseDirectoryPath = ""; + } } /** - * Gets the path to the case directory of the case associated with this job, - * may be null. + * Gets the path to the case directory for job, may be the empty path if the + * case directory has not been created yet. * - * @return The case directory path or null if the case directory has not - * been created yet. + * @return The case directory path. Will be the empty path if the case + * directory has not been created yet. */ synchronized Path getCaseDirectoryPath() { - if (!caseDirectoryPath.isEmpty()) { - return Paths.get(caseDirectoryPath); - } else { - return null; - } + return Paths.get(caseDirectoryPath); } /** @@ -181,7 +202,13 @@ public final class AutoIngestJob implements Comparable, Serializa return this.priority; } - synchronized void setStage(Stage newStage) { + /** + * Sets the processing stage of the job. The start date/time for the stage + * is set when the stage is set. + * + * @param newStage The processing stage. + */ + synchronized void setProcessingStage(Stage newStage) { if (Stage.CANCELLING == this.stage && Stage.COMPLETED != newStage) { return; } @@ -189,15 +216,35 @@ public final class AutoIngestJob implements Comparable, Serializa this.stageStartDate = Date.from(Instant.now()); } + /** + * Gets the processing stage of the job. + * + * @return The processing stage. + */ synchronized Stage getProcessingStage() { return this.stage; } + /** + * Gets the date/time the current processing stage of the job started. + * + * @return The current processing stage start date/time. + */ synchronized Date getProcessingStageStartDate() { return new Date(this.stageStartDate.getTime()); } - synchronized StageDetails getStageDetails() { + /** + * Gets any available details associated with the current processing stage + * of the job, e.g., the currently running data source level ingest module, + * an ingest module in the process of being cancelled, etc. If no additional + * details are available, the stage details will be the same as the + * processing stage. + * + * @return A stage details object consisting of a descrition and associated + * date/time. + */ + synchronized StageDetails getProcessingStageDetails() { String description; Date startDate; if (Stage.CANCELLING != this.stage && null != this.ingestJob) { @@ -235,24 +282,43 @@ public final class AutoIngestJob implements Comparable, Serializa return this.stageDetails; } - synchronized void setStageDetails(StageDetails stageDetails) { - this.stageDetails = stageDetails; - } - + /** + * Sets the data source processor for the job. Used for job cancellation. + * + * @param dataSourceProcessor A data source processor for the job. + */ synchronized void setDataSourceProcessor(DataSourceProcessor dataSourceProcessor) { this.dataSourceProcessor = dataSourceProcessor; } + /** + * Sets the ingest job for the auto ingest job. Used for obtaining + * processing stage details, cancelling the currently running data source + * ingest module, and cancelling the job. + * + * @param ingestJob The ingest job for the auto ingest job. + */ synchronized void setIngestJob(IngestJob ingestJob) { this.ingestJob = ingestJob; } + /** + * Gets the ingest job for the auto ingest job. + * + * @return The ingest job, may be null. + * + * TODO (JIRA-3059): Provide an AutoIngestJob ingest module cancellation API + * instead. + */ synchronized IngestJob getIngestJob() { return this.ingestJob; } + /** + * Cancels the job. + */ synchronized void cancel() { - setStage(Stage.CANCELLING); + setProcessingStage(Stage.CANCELLING); cancelled = true; errorsOccurred = true; if (null != dataSourceProcessor) { @@ -263,15 +329,33 @@ public final class AutoIngestJob implements Comparable, Serializa } } + /** + * Indicates whether or not the job has been cancelled. This is transient + * state used by the auto ingest manager that is not saved as coordination + * service node data for the job. + * + * @return True or false. + */ synchronized boolean isCanceled() { return cancelled; } + /** + * Marks the job as completed. This is transient state used by the auto + * ingest manager that is not saved as coordination service node data for + * the job. + */ synchronized void setCompleted() { - setStage(Stage.COMPLETED); + setProcessingStage(Stage.COMPLETED); completed = true; } + /** + * Indicates whether or not the job has been completed. This is transient + * state that is not saved as coordination service node data for the job. + * + * @return True or false. + */ synchronized boolean isCompleted() { return completed; } @@ -314,26 +398,56 @@ public final class AutoIngestJob implements Comparable, Serializa return this.errorsOccurred; } + /** + * Gets the processing host for this job. + * + * @return The processing host. + */ synchronized String getProcessingHostName() { return nodeName; } + /** + * Gets the version number of this object. + * + * @return The version number. + */ int getVersion() { return this.version; } + /** + * Gets the processing status of the job. + * + * @return The processing status. + */ synchronized ProcessingStatus getProcessingStatus() { return this.processingStatus; } + /** + * Sets the processing status of the job. + * + * @param processingStatus The processing status. + */ synchronized void setProcessingStatus(ProcessingStatus processingStatus) { this.processingStatus = processingStatus; } + /** + * Gets the number of time this job has "crashed" during processing. + * + * @return The number of crashes. + */ synchronized int getNumberOfCrashes() { return this.numberOfCrashes; } + /** + * Sets the number of time this job has "crashed" during processing. + * + * @param numberOfCrashes The number of crashes. + */ synchronized void setNumberOfCrashes(int numberOfCrashes) { this.numberOfCrashes = numberOfCrashes; } @@ -361,8 +475,8 @@ public final class AutoIngestJob implements Comparable, Serializa } /** - * Custom comparator that allows us to sort List on reverse - * chronological date modified (descending) + * Comparator that supports doing a descending sort of jobs based on job + * completion date. */ static class ReverseCompletedDateComparator implements Comparator { @@ -374,7 +488,8 @@ public final class AutoIngestJob implements Comparable, Serializa } /** - * Comparator that sorts auto ingest jobs by priority in descending order. + * Comparator that supports doing a descending sort of jobs based on job + * priority. */ public static class PriorityComparator implements Comparator { @@ -386,9 +501,8 @@ public final class AutoIngestJob implements Comparable, Serializa } /** - * Custom comparator that allows us to sort List on case name - * alphabetically except for jobs for the current host, which are placed at - * the top of the list. + * Comparator that supports doing an alphabetical sort of jobs based on case + * name. */ static class CaseNameAndProcessingHostComparator implements Comparator { @@ -406,7 +520,7 @@ public final class AutoIngestJob implements Comparable, Serializa } /** - * Processing status for the auto ingest job for the manifest. + * Processing statuses for an auto ingest job. */ enum ProcessingStatus { PENDING, @@ -415,6 +529,9 @@ public final class AutoIngestJob implements Comparable, Serializa DELETED } + /** + * Processing stages for an auto ingest job. + */ enum Stage { PENDING("Pending"), @@ -443,6 +560,9 @@ public final class AutoIngestJob implements Comparable, Serializa } + /** + * Processing stage details for an auto ingest job. + */ @Immutable static final class StageDetails implements Serializable { diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java index 42f05d2774..3544e9ef49 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobNodeData.java @@ -98,7 +98,7 @@ final class AutoIngestJobNodeData { setProcessingHostName(job.getProcessingHostName()); setProcessingStage(job.getProcessingStage()); setProcessingStageStartDate(job.getProcessingStageStartDate()); - setProcessingStageDetails(job.getStageDetails()); + setProcessingStageDetails(job.getProcessingStageDetails()); } /** diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index c0944e9aaa..75cdc3386f 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -647,10 +647,10 @@ public final class AutoIngestManager extends Observable implements PropertyChang } /* - * Add the job to the pending jobs queue and update the coordinatino + * Add the job to the pending jobs queue and update the coordination * service node data for the job. */ - if (null != completedJob && null != completedJob.getCaseDirectoryPath()) { + if (null != completedJob && !completedJob.getCaseDirectoryPath().toString().isEmpty()) { try { completedJob.setErrorsOccurred(false); completedJob.setCompletedDate(new Date(0)); @@ -849,7 +849,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang if (null != ingestJob) { IngestJob.DataSourceIngestModuleHandle moduleHandle = ingestJob.getSnapshot().runningDataSourceIngestModule(); if (null != moduleHandle) { - currentJob.setStage(AutoIngestJob.Stage.CANCELLING_MODULE); + currentJob.setProcessingStage(AutoIngestJob.Stage.CANCELLING_MODULE); moduleHandle.cancel(); SYS_LOGGER.log(Level.INFO, "Cancelling {0} module for manifest {1}", new Object[]{moduleHandle.displayName(), currentJob.getManifest().getFilePath()}); } @@ -1117,7 +1117,9 @@ public final class AutoIngestManager extends Observable implements PropertyChang AutoIngestJob job = new AutoIngestJob(manifest); job.setPriority(nodeData.getPriority()); Path caseDirectory = PathUtils.findCaseDirectory(rootOutputDirectory, manifest.getCaseName()); - job.setCaseDirectoryPath(caseDirectory); + if (null != caseDirectory) { + job.setCaseDirectoryPath(caseDirectory); + } newPendingJobsList.add(job); /* @@ -1295,7 +1297,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang AutoIngestJob job = new AutoIngestJob(manifest); job.setCaseDirectoryPath(caseDirectoryPath); job.setProcessingStatus(AutoIngestJob.ProcessingStatus.COMPLETED); - job.setStage(AutoIngestJob.Stage.COMPLETED); + job.setProcessingStage(AutoIngestJob.Stage.COMPLETED); job.setCompletedDate(nodeData.getCompletedDate()); job.setErrorsOccurred(true); newCompletedJobsList.add(new AutoIngestJob(nodeData)); @@ -1867,7 +1869,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang currentJob.setProcessingStatus(AutoIngestJob.ProcessingStatus.PROCESSING); updateCoordinationServiceNode(currentJob); SYS_LOGGER.log(Level.INFO, "Started processing of {0}", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.STARTING); + currentJob.setProcessingStage(AutoIngestJob.Stage.STARTING); setChanged(); notifyObservers(Event.JOB_STARTED); eventPublisher.publishRemotely(new AutoIngestJobStartedEvent(currentJob)); @@ -1986,7 +1988,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang if (AutoIngestUserPreferences.getSharedConfigEnabled()) { Path manifestPath = currentJob.getManifest().getFilePath(); SYS_LOGGER.log(Level.INFO, "Downloading shared configuration for {0}", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.UPDATING_SHARED_CONFIG); + currentJob.setProcessingStage(AutoIngestJob.Stage.UPDATING_SHARED_CONFIG); new SharedConfiguration().downloadConfiguration(); } } @@ -2004,7 +2006,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang private void verifyRequiredSevicesAreRunning() throws ServicesMonitorException, DatabaseServerDownException, KeywordSearchServerDownException { Path manifestPath = currentJob.getManifest().getFilePath(); SYS_LOGGER.log(Level.INFO, "Checking services availability for {0}", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.CHECKING_SERVICES); + currentJob.setProcessingStage(AutoIngestJob.Stage.CHECKING_SERVICES); if (!isServiceUp(ServicesMonitor.Service.REMOTE_CASE_DATABASE.toString())) { throw new DatabaseServerDownException("Case database server is down"); } @@ -2051,7 +2053,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang Manifest manifest = currentJob.getManifest(); String caseName = manifest.getCaseName(); SYS_LOGGER.log(Level.INFO, "Opening case {0} for {1}", new Object[]{caseName, manifest.getFilePath()}); - currentJob.setStage(AutoIngestJob.Stage.OPENING_CASE); + currentJob.setProcessingStage(AutoIngestJob.Stage.OPENING_CASE); /* * Acquire and hold a case name lock so that only one node at as * time can scan the output directory at a time. This prevents @@ -2164,7 +2166,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang DataSource dataSource = identifyDataSource(caseForJob); if (null == dataSource) { - currentJob.setStage(AutoIngestJob.Stage.COMPLETED); + currentJob.setProcessingStage(AutoIngestJob.Stage.COMPLETED); return; } @@ -2174,7 +2176,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang runDataSourceProcessor(caseForJob, dataSource); if (dataSource.getContent().isEmpty()) { - currentJob.setStage(AutoIngestJob.Stage.COMPLETED); + currentJob.setProcessingStage(AutoIngestJob.Stage.COMPLETED); return; } @@ -2219,7 +2221,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang Manifest manifest = currentJob.getManifest(); Path manifestPath = manifest.getFilePath(); SYS_LOGGER.log(Level.INFO, "Identifying data source for {0} ", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.IDENTIFYING_DATA_SOURCE); + currentJob.setProcessingStage(AutoIngestJob.Stage.IDENTIFYING_DATA_SOURCE); Path caseDirectoryPath = currentJob.getCaseDirectoryPath(); AutoIngestJobLogger jobLogger = new AutoIngestJobLogger(manifestPath, manifest.getDataSourceFileName(), caseDirectoryPath); Path dataSourcePath = manifest.getDataSourcePath(); @@ -2255,7 +2257,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang Manifest manifest = currentJob.getManifest(); Path manifestPath = manifest.getFilePath(); SYS_LOGGER.log(Level.INFO, "Adding data source for {0} ", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.ADDING_DATA_SOURCE); + currentJob.setProcessingStage(AutoIngestJob.Stage.ADDING_DATA_SOURCE); UUID taskId = UUID.randomUUID(); DataSourceProcessorCallback callBack = new AddDataSourceCallback(caseForJob, dataSource, taskId); DataSourceProcessorProgressMonitor progressMonitor = new DoNothingDSPProgressMonitor(); @@ -2420,7 +2422,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang Manifest manifest = currentJob.getManifest(); Path manifestPath = manifest.getFilePath(); SYS_LOGGER.log(Level.INFO, "Starting ingest modules analysis for {0} ", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.ANALYZING_DATA_SOURCE); + currentJob.setProcessingStage(AutoIngestJob.Stage.ANALYZING_DATA_SOURCE); Path caseDirectoryPath = currentJob.getCaseDirectoryPath(); AutoIngestJobLogger jobLogger = new AutoIngestJobLogger(manifestPath, manifest.getDataSourceFileName(), caseDirectoryPath); IngestJobEventListener ingestJobEventListener = new IngestJobEventListener(); @@ -2456,7 +2458,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang } jobLogger.logAnalysisCompleted(); } else { - currentJob.setStage(AutoIngestJob.Stage.CANCELLING); + currentJob.setProcessingStage(AutoIngestJob.Stage.CANCELLING); currentJob.setErrorsOccurred(true); AutoIngestAlertFile.create(caseDirectoryPath); // Do this first, it is more important than the case log jobLogger.logAnalysisCancelled(); @@ -2519,7 +2521,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang Manifest manifest = currentJob.getManifest(); Path manifestPath = manifest.getFilePath(); SYS_LOGGER.log(Level.INFO, "Exporting files for {0}", manifestPath); - currentJob.setStage(AutoIngestJob.Stage.EXPORTING_FILES); + currentJob.setProcessingStage(AutoIngestJob.Stage.EXPORTING_FILES); Path caseDirectoryPath = currentJob.getCaseDirectoryPath(); AutoIngestJobLogger jobLogger = new AutoIngestJobLogger(manifestPath, manifest.getDataSourceFileName(), caseDirectoryPath); try { @@ -2770,7 +2772,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang try { synchronized (jobsLock) { if (currentJob != null) { - currentJob.getStageDetails(); + currentJob.getProcessingStageDetails(); setChanged(); notifyObservers(Event.JOB_STATUS_UPDATED); eventPublisher.publishRemotely(new AutoIngestJobStatusEvent(currentJob)); From 66578702858c7150e22fba7456415334caa665d0 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 12:53:41 -0400 Subject: [PATCH 25/35] Improve docs for AutoIngestJob --- .../autoingest/AutoIngestJob.java | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java index 3f93db5892..9e682b86f4 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java @@ -452,26 +452,49 @@ public final class AutoIngestJob implements Comparable, Serializa this.numberOfCrashes = numberOfCrashes; } + /** + * Indicates whether some other job is "equal to" this job. Two jobs are + * equal if they have the same manifest file path. + * + * @param otherJob The job to which this job is to be compared. + * + * @return True or false. + */ @Override - public boolean equals(Object obj) { - if (!(obj instanceof AutoIngestJob)) { + public boolean equals(Object otherJob) { + if (!(otherJob instanceof AutoIngestJob)) { return false; } - if (obj == this) { + if (otherJob == this) { return true; } - return this.getManifest().getFilePath().equals(((AutoIngestJob) obj).getManifest().getFilePath()); + return this.getManifest().getFilePath().equals(((AutoIngestJob) otherJob).getManifest().getFilePath()); } + /** + * Returns a hash code value for the job. The hash code is derived from the + * manifest file path. + * + * @return The hash code. + */ @Override public int hashCode() { int hash = 71 * (Objects.hashCode(this.getManifest().getFilePath())); return hash; } + /** + * Compares one job to another in a way that orders jobs by manifest + * creation date. + * + * @param otherJob The job to which this job is to be compared. + * + * @return A negative integer, zero, or a positive integer as this job is + * less than, equal to, or greater than the specified job. + */ @Override - public int compareTo(AutoIngestJob o) { - return -this.getManifest().getDateFileCreated().compareTo(o.getManifest().getDateFileCreated()); + public int compareTo(AutoIngestJob otherJob) { + return -this.getManifest().getDateFileCreated().compareTo(otherJob.getManifest().getDateFileCreated()); } /** From 676b1248bf2ff2eef433e9501dcf11055ebee3c1 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 12:58:58 -0400 Subject: [PATCH 26/35] Deal with missed job events in AutoIngestMonitor --- .../autopsy/experimental/autoingest/AutoIngestMonitor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 14e5ec9543..5999eae938 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -153,7 +153,9 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ private void handleJobStatusEvent(AutoIngestJobStatusEvent event) { synchronized (jobsLock) { - jobsSnapshot.addOrReplaceRunningJob(event.getJob()); + AutoIngestJob job = event.getJob(); + jobsSnapshot.removePendingJob(job); // In case start event was missed. + jobsSnapshot.addOrReplaceRunningJob(job); setChanged(); notifyObservers(null); } From bf8fd5e890ee5047de935a394973fd010f4939b8 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 13:07:56 -0400 Subject: [PATCH 27/35] Comment on handling of Observable updates by AID --- .../autoingest/AutoIngestDashboard.java | 7 +++++++ .../autoingest/AutoIngestMonitor.java | 17 +++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 4bcfa58d80..2c666ea097 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -434,6 +434,13 @@ public final class AutoIngestDashboard extends JPanel implements Observer { @Override public void update(Observable observable, Object arg) { + /* + * By creating a task to get the latest jobs snapshot, the possibility + * of queuing a refresh task for the EDT with snaphot rendered stale by + * the handling of a user prioritization action, etc. on the EDT is + * avoided. This is why the snapshot pushed ny the auto ingest jobs + * monitor is ignored. + */ updateExecutor.submit(new UpdateJobsSnapshotTask()); } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 5999eae938..1239623e6a 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -142,7 +142,7 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang jobsSnapshot.removePendingJob(event.getJob()); jobsSnapshot.addOrReplaceRunningJob(event.getJob()); setChanged(); - notifyObservers(null); + notifyObservers(jobsSnapshot); } } @@ -153,11 +153,14 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ private void handleJobStatusEvent(AutoIngestJobStatusEvent event) { synchronized (jobsLock) { + /* + * Currently this event is only published for running jobs. + */ AutoIngestJob job = event.getJob(); - jobsSnapshot.removePendingJob(job); // In case start event was missed. + jobsSnapshot.removePendingJob(job); jobsSnapshot.addOrReplaceRunningJob(job); setChanged(); - notifyObservers(null); + notifyObservers(jobsSnapshot); } } @@ -168,10 +171,12 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang */ private void handleJobCompletedEvent(AutoIngestJobCompletedEvent event) { synchronized (jobsLock) { - jobsSnapshot.removeRunningJob(event.getJob()); - jobsSnapshot.addOrReplaceCompletedJob(event.getJob()); + AutoIngestJob job = event.getJob(); + jobsSnapshot.removePendingJob(job); + jobsSnapshot.removeRunningJob(job); + jobsSnapshot.addOrReplaceCompletedJob(job); setChanged(); - notifyObservers(null); + notifyObservers(jobsSnapshot); } } From 1c3c3691ba67da3abce0b9d2518effc69fec5c0d Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 13:12:29 -0400 Subject: [PATCH 28/35] Remove unused static variable from Case.java --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 1becc449d5..c6284859f1 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -125,7 +125,6 @@ public class Case { private static final String LOG_FOLDER = "Log"; //NON-NLS private static final String REPORTS_FOLDER = "Reports"; //NON-NLS private static final String TEMP_FOLDER = "Temp"; //NON-NLS - private static final int MIN_SECS_BETWEEN_TSK_ERROR_REPORTS = 60; private static final String MODULE_FOLDER = "ModuleOutput"; //NON-NLS private static final long EXECUTOR_AWAIT_TIMEOUT_SECS = 5; private static final String CASE_ACTION_THREAD_NAME = "%s-case-action"; From deab0b45605204355210d439c8f57a30d94e2905 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 13:15:14 -0400 Subject: [PATCH 29/35] Remove double-click case metadata file to open feature --- .../autopsy/corecomponents/Installer.java | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java index 074e7f162e..67a1d56307 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java @@ -19,28 +19,15 @@ package org.sleuthkit.autopsy.corecomponents; import java.awt.Insets; -import java.io.File; -import java.util.Collection; import java.util.Map; import java.util.TreeMap; import java.util.logging.Level; import javax.swing.BorderFactory; -import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.UnsupportedLookAndFeelException; -import org.netbeans.spi.sendopts.OptionProcessor; import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI; import org.openide.modules.ModuleInstall; -import org.openide.util.Lookup; -import org.openide.util.NbBundle; -import org.openide.windows.WindowManager; -import org.sleuthkit.autopsy.actions.IngestRunningCheck; -import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.casemodule.CaseActionException; -import org.sleuthkit.autopsy.casemodule.CaseMetadata; -import org.sleuthkit.autopsy.casemodule.OpenFromArguments; -import org.sleuthkit.autopsy.casemodule.StartupWindowProvider; import org.sleuthkit.autopsy.coreutils.Logger; /** @@ -66,35 +53,10 @@ public class Installer extends ModuleInstall { @Override public void restored() { super.restored(); - setLookAndFeel(); UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI"); UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder()); UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0)); - - /* - * Open the case if a case metadata file was double-clicked. This only - * works if the user has associated files with ".aut" extensions with - * Autopsy. - */ - WindowManager.getDefault().invokeWhenUIReady(() -> { - Collection processors = Lookup.getDefault().lookupAll(OptionProcessor.class); - for (OptionProcessor processor : processors) { - if (processor instanceof OpenFromArguments) { - OpenFromArguments argsProcessor = (OpenFromArguments) processor; - final String caseFile = argsProcessor.getDefaultArg(); - if (caseFile != null && !caseFile.isEmpty() && caseFile.endsWith(CaseMetadata.getFileExtension()) && new File(caseFile).exists()) { //NON-NLS - try { - Case.openAsCurrentCase(caseFile); - } catch (CaseActionException ex) { - logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", caseFile), ex); //NON-NLS - } - return; - } - } - } - StartupWindowProvider.getInstance().open(); - }); } @Override From 6403933c7cdc34a6b11dc650e4caf7d174e95ba5 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 13:30:59 -0400 Subject: [PATCH 30/35] Remove separate Image Gallery Help menu item --- .../imagegallery/actions/OpenHelpAction.java | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100755 ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenHelpAction.java diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenHelpAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenHelpAction.java deleted file mode 100755 index 4b3be4813a..0000000000 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenHelpAction.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2013 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.imagegallery.actions; - -import java.awt.Desktop; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.IOException; -import java.net.URI; -import java.util.logging.Level; -import org.openide.awt.ActionID; -import org.openide.awt.ActionReference; -import org.openide.awt.ActionRegistration; -import org.openide.util.NbBundle.Messages; -import org.sleuthkit.autopsy.coreutils.Logger; - -@ActionID( - category = "Help", - id = "org.sleuthkit.autopsy.imagegallery.actions.OpenHelpAction" -) -@ActionRegistration( - displayName = "#CTL_OpenHelpAction" -) -@ActionReference(path = "Menu/Help", position = 350) -@Messages("CTL_OpenHelpAction=Image / Video Gallery Help") -public final class OpenHelpAction implements ActionListener { - - @Override - public void actionPerformed(ActionEvent e) { - try { - Desktop.getDesktop().browse(URI.create("http://sleuthkit.org/autopsy/docs/user-docs/4.4.1/image_gallery_page.html")); //NON-NLS - } catch (IOException ex) { - Logger.getLogger(OpenHelpAction.class.getName()).log(Level.SEVERE, "failed to open help page", ex); //NON-NLS - } - } -} From 7517cc42181ad3be88876cd8f011dcfb25dd0532 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 14:20:11 -0400 Subject: [PATCH 31/35] make setting/unsetting of AutoIngestJob processing host correct --- .../autoingest/AutoIngestDashboard.java | 1 - .../autoingest/AutoIngestJob.java | 34 ++++++++++++------- .../autoingest/AutoIngestManager.java | 6 ++-- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 2c666ea097..68c626c880 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -455,7 +455,6 @@ public final class AutoIngestDashboard extends JPanel implements Observer { List runningJobs = jobsSnapshot.getRunningJobs(); List completedJobs = jobsSnapshot.getCompletedJobs(); pendingJobs.sort(new AutoIngestJob.PriorityComparator()); - runningJobs.sort(new AutoIngestJob.CaseNameAndProcessingHostComparator()); completedJobs.sort(new AutoIngestJob.ReverseCompletedDateComparator()); refreshTable(pendingJobs, pendingTable, pendingTableModel); refreshTable(runningJobs, runningTable, runningTableModel); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java index 9e682b86f4..f6b9ad9bd7 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java @@ -49,7 +49,8 @@ public final class AutoIngestJob implements Comparable, Serializa * Version 0 fields. */ private final Manifest manifest; - private final String nodeName; + @GuardedBy("this") + private String nodeName; @GuardedBy("this") private String caseDirectoryPath; @GuardedBy("this") @@ -93,7 +94,7 @@ public final class AutoIngestJob implements Comparable, Serializa * Version 0 fields. */ this.manifest = manifest; - this.nodeName = AutoIngestJob.LOCAL_HOST_NAME; + this.nodeName = ""; this.caseDirectoryPath = ""; this.priority = DEFAULT_PRIORITY; this.stage = Stage.PENDING; @@ -399,14 +400,23 @@ public final class AutoIngestJob implements Comparable, Serializa } /** - * Gets the processing host for this job. + * Gets the processing host name for this job. * - * @return The processing host. + * @return The processing host name. */ synchronized String getProcessingHostName() { return nodeName; } + /** + * Sets the processing host name for this job. + * + * @param processingHostName The processing host name. + */ + synchronized void setProcessingHostName(String processingHostName) { + this.nodeName = processingHostName; + } + /** * Gets the version number of this object. * @@ -524,19 +534,19 @@ public final class AutoIngestJob implements Comparable, Serializa } /** - * Comparator that supports doing an alphabetical sort of jobs based on case - * name. + * Comparator that supports doing an alphabetical sort of jobs based on a + * combination of case name and processing host. */ static class CaseNameAndProcessingHostComparator implements Comparator { @Override - public int compare(AutoIngestJob o1, AutoIngestJob o2) { - if (o1.getProcessingHostName().equalsIgnoreCase(LOCAL_HOST_NAME)) { - return -1; // o1 is for current case, float to top - } else if (o2.getProcessingHostName().equalsIgnoreCase(LOCAL_HOST_NAME)) { - return 1; // o2 is for current case, float to top + public int compare(AutoIngestJob aJob, AutoIngestJob anotherJob) { + if (aJob.getProcessingHostName().equalsIgnoreCase(LOCAL_HOST_NAME)) { + return -1; // aJob is for this, float to top + } else if (anotherJob.getProcessingHostName().equalsIgnoreCase(LOCAL_HOST_NAME)) { + return 1; // anotherJob is for this, float to top } else { - return o1.getManifest().getCaseName().compareToIgnoreCase(o2.getManifest().getCaseName()); + return aJob.getManifest().getCaseName().compareToIgnoreCase(anotherJob.getManifest().getCaseName()); } } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 75cdc3386f..4ffa430e78 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -1866,10 +1866,11 @@ public final class AutoIngestManager extends Observable implements PropertyChang */ private void processJob() throws CoordinationServiceException, SharedConfigurationException, ServicesMonitorException, DatabaseServerDownException, KeywordSearchServerDownException, CaseManagementException, AnalysisStartupException, FileExportException, AutoIngestAlertFileException, AutoIngestJobLoggerException, InterruptedException, AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException, AutoIngestJobNodeData.InvalidDataException { Path manifestPath = currentJob.getManifest().getFilePath(); - currentJob.setProcessingStatus(AutoIngestJob.ProcessingStatus.PROCESSING); - updateCoordinationServiceNode(currentJob); SYS_LOGGER.log(Level.INFO, "Started processing of {0}", manifestPath); + currentJob.setProcessingStatus(AutoIngestJob.ProcessingStatus.PROCESSING); currentJob.setProcessingStage(AutoIngestJob.Stage.STARTING); + currentJob.setProcessingHostName(AutoIngestManager.LOCAL_HOST_NAME); + updateCoordinationServiceNode(currentJob); setChanged(); notifyObservers(Event.JOB_STARTED); eventPublisher.publishRemotely(new AutoIngestJobStartedEvent(currentJob)); @@ -1892,6 +1893,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang // The job may get retried currentJob.setProcessingStatus(AutoIngestJob.ProcessingStatus.PENDING); } + currentJob.setProcessingHostName(""); updateCoordinationServiceNode(currentJob); boolean retry = (!currentJob.isCanceled() && !currentJob.isCompleted()); From 961aa6a90b7e31673b29105da306eef9dab7c3e4 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 14:36:53 -0400 Subject: [PATCH 32/35] Fix filtering out of version 0 auto ingest node data --- .../experimental/autoingest/AutoIngestDashboard.java | 5 ----- .../experimental/autoingest/AutoIngestJob.java | 11 +---------- .../experimental/autoingest/AutoIngestMonitor.java | 7 +++++++ 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 68c626c880..a05f8cdb79 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -475,11 +475,6 @@ public final class AutoIngestDashboard extends JPanel implements Observer { Path currentRow = getSelectedEntry(table, tableModel); tableModel.setRowCount(0); for (AutoIngestJob job : jobs) { - if (job.getVersion() < 1) { - // Ignore version '0' nodes since they don't carry enough - // data to populate the table. - continue; - } AutoIngestJob.StageDetails status = job.getProcessingStageDetails(); tableModel.addRow(new Object[]{ job.getManifest().getCaseName(), // CASE diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java index f6b9ad9bd7..74a1cb37e6 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJob.java @@ -75,7 +75,7 @@ public final class AutoIngestJob implements Comparable, Serializa /* * Version 1 fields. */ - private final int version; + private final int version; // For possible future use. @GuardedBy("this") private ProcessingStatus processingStatus; @GuardedBy("this") @@ -417,15 +417,6 @@ public final class AutoIngestJob implements Comparable, Serializa this.nodeName = processingHostName; } - /** - * Gets the version number of this object. - * - * @return The version number. - */ - int getVersion() { - return this.version; - } - /** * Gets the processing status of the job. * diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 1239623e6a..3fcc5648ba 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -239,6 +239,13 @@ public final class AutoIngestMonitor extends Observable implements PropertyChang for (String node : nodeList) { try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, node)); + if (nodeData.getVersion() < 1) { + /* + * Ignore version '0' nodes that have not been + * "upgraded" since they don't carry enough data. + */ + continue; + } AutoIngestJob job = new AutoIngestJob(nodeData); ProcessingStatus processingStatus = nodeData.getProcessingStatus(); switch (processingStatus) { From d82c8731ee9aab4b32c2cdaab1f1a1b7124e32f0 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 16:05:50 -0400 Subject: [PATCH 33/35] Update AutoIngestDashboard table model names --- .../autoingest/AutoIngestDashboard.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index a05f8cdb79..213ca60d23 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -32,7 +32,6 @@ import java.util.logging.Level; import javax.swing.DefaultListSelectionModel; import java.awt.Color; import java.beans.PropertyChangeEvent; -import java.util.concurrent.ExecutorService; import javax.swing.JPanel; import javax.swing.JTable; import javax.swing.SwingWorker; @@ -59,17 +58,17 @@ public final class AutoIngestDashboard extends JPanel implements Observer { private static final int GENERIC_COL_MAX_WIDTH = 2000; private static final int PENDING_TABLE_COL_PREFERRED_WIDTH = 280; private static final int RUNNING_TABLE_COL_PREFERRED_WIDTH = 175; - private static final int ACTIVITY_TIME_COL_MIN_WIDTH = 250; - private static final int ACTIVITY_TIME_COL_MAX_WIDTH = 450; + private static final int STAGE_TIME_COL_MIN_WIDTH = 250; + private static final int STAGE_TIME_COL_MAX_WIDTH = 450; private static final int TIME_COL_MIN_WIDTH = 30; private static final int TIME_COL_MAX_WIDTH = 250; private static final int TIME_COL_PREFERRED_WIDTH = 140; private static final int NAME_COL_MIN_WIDTH = 100; private static final int NAME_COL_MAX_WIDTH = 250; private static final int NAME_COL_PREFERRED_WIDTH = 140; - private static final int ACTIVITY_COL_MIN_WIDTH = 70; - private static final int ACTIVITY_COL_MAX_WIDTH = 2000; - private static final int ACTIVITY_COL_PREFERRED_WIDTH = 300; + private static final int STAGE_COL_MIN_WIDTH = 70; + private static final int STAGE_COL_MAX_WIDTH = 2000; + private static final int STAGE_COL_PREFERRED_WIDTH = 300; private static final int STATUS_COL_MIN_WIDTH = 55; private static final int STATUS_COL_MAX_WIDTH = 250; private static final int STATUS_COL_PREFERRED_WIDTH = 55; @@ -319,10 +318,10 @@ public final class AutoIngestDashboard extends JPanel implements Observer { * jobs. */ column = runningTable.getColumn(JobsTableModelColumns.STAGE.getColumnHeader()); - column.setMinWidth(ACTIVITY_COL_MIN_WIDTH); - column.setMaxWidth(ACTIVITY_COL_MAX_WIDTH); - column.setPreferredWidth(ACTIVITY_COL_PREFERRED_WIDTH); - column.setWidth(ACTIVITY_COL_PREFERRED_WIDTH); + column.setMinWidth(STAGE_COL_MIN_WIDTH); + column.setMaxWidth(STAGE_COL_MAX_WIDTH); + column.setPreferredWidth(STAGE_COL_PREFERRED_WIDTH); + column.setWidth(STAGE_COL_PREFERRED_WIDTH); /* * Set up a column to display the ingest activity times associated with @@ -331,9 +330,9 @@ public final class AutoIngestDashboard extends JPanel implements Observer { column = runningTable.getColumn(JobsTableModelColumns.STAGE_TIME.getColumnHeader()); column.setCellRenderer(new DurationCellRenderer()); column.setMinWidth(GENERIC_COL_MIN_WIDTH); - column.setMaxWidth(ACTIVITY_TIME_COL_MAX_WIDTH); - column.setPreferredWidth(ACTIVITY_TIME_COL_MIN_WIDTH); - column.setWidth(ACTIVITY_TIME_COL_MIN_WIDTH); + column.setMaxWidth(STAGE_TIME_COL_MAX_WIDTH); + column.setPreferredWidth(STAGE_TIME_COL_MIN_WIDTH); + column.setWidth(STAGE_TIME_COL_MIN_WIDTH); /* * Prevent sorting when a column header is clicked. @@ -482,9 +481,9 @@ public final class AutoIngestDashboard extends JPanel implements Observer { job.getManifest().getDateFileCreated(), // CREATED_TIME job.getProcessingStageStartDate(), // STARTED_TIME job.getCompletedDate(), // COMPLETED_TIME - status.getDescription(), // ACTIVITY + status.getDescription(), // STAGE job.getErrorsOccurred(), // STATUS - ((Date.from(Instant.now()).getTime()) - (status.getStartDate().getTime())), // ACTIVITY_TIME + ((Date.from(Instant.now()).getTime()) - (status.getStartDate().getTime())), // STAGE_TIME job.getCaseDirectoryPath(), // CASE_DIRECTORY_PATH job.getManifest().getFilePath(), // MANIFEST_FILE_PATH job From 1166caf7c2f5e21ab62ee2b0729041b97b7b6095 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 17:40:20 -0400 Subject: [PATCH 34/35] Add coord svc node update to AIM status pub task --- .../autopsy/experimental/autoingest/AutoIngestManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 4ffa430e78..2cf88cbaa9 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -2777,6 +2777,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang currentJob.getProcessingStageDetails(); setChanged(); notifyObservers(Event.JOB_STATUS_UPDATED); + updateCoordinationServiceNode(currentJob); eventPublisher.publishRemotely(new AutoIngestJobStatusEvent(currentJob)); } From ba77ae07b06cbbeb2eaf21ac1c4b2d6f8415009c Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Tue, 19 Sep 2017 18:15:58 -0400 Subject: [PATCH 35/35] Restore accidentally deleted code to Installer for CoreComponents --- Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java index 67a1d56307..c908f3b35d 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Installer.java @@ -28,6 +28,8 @@ import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.UnsupportedLookAndFeelException; import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI; import org.openide.modules.ModuleInstall; +import org.openide.windows.WindowManager; +import org.sleuthkit.autopsy.casemodule.StartupWindowProvider; import org.sleuthkit.autopsy.coreutils.Logger; /** @@ -57,6 +59,9 @@ public class Installer extends ModuleInstall { UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI"); UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder()); UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0)); + WindowManager.getDefault().invokeWhenUIReady(() -> { + StartupWindowProvider.getInstance().open(); + }); } @Override