From c63ec6894f2cd31af69c9a663bb541de89edbfb0 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 21 Mar 2017 17:42:43 -0400 Subject: [PATCH 1/8] 2452 update text on Change to VHD checkbox --- Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 7390868798..05c2693128 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -241,4 +241,4 @@ CasePropertiesPanel.lbDbType.text=Case Type: CasePropertiesPanel.examinerLabel.text=Examiner: CasePropertiesPanel.caseNumberLabel.text=Case Number: CasePropertiesPanel.deleteCaseButton.text=Delete Case -LocalDiskPanel.changeDatabasePathCheckbox.text=Change image path in the case to the VHD upon completion +LocalDiskPanel.changeDatabasePathCheckbox.text=Update case to use VHD file upon completion From c907bee915fe3b510ec446e9886552e0db7d564d Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 15:40:58 -0400 Subject: [PATCH 2/8] 2452 partially working refresh button and warning fixed localDisk DSP --- .../autopsy/casemodule/LocalDiskPanel.form | 81 +++++++++------- .../autopsy/casemodule/LocalDiskPanel.java | 95 +++++++++++-------- 2 files changed, 105 insertions(+), 71 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form index 3683577766..bf8566a593 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form @@ -29,41 +29,44 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -73,14 +76,14 @@ - - - + + + - + @@ -97,7 +100,9 @@ - + + + @@ -260,5 +265,15 @@ + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index 8e6da54b7b..396572f65b 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -42,6 +42,8 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.PlatformUtil; import org.sleuthkit.autopsy.imagewriter.ImageWriterSettings; +@NbBundle.Messages({"LocalDiskPanel.refreshTablebutton.text=Refresh Local Disks" +}) /** * ImageTypePanel for adding a local disk or partition such as PhysicalDrive0 or * C:. @@ -141,6 +143,7 @@ final class LocalDiskPanel extends JPanel { jLabel1 = new javax.swing.JLabel(); imageWriterErrorLabel = new javax.swing.JLabel(); changeDatabasePathCheckbox = new javax.swing.JCheckBox(); + refreshTablebutton = new javax.swing.JButton(); setMinimumSize(new java.awt.Dimension(0, 420)); setPreferredSize(new java.awt.Dimension(485, 410)); @@ -198,6 +201,13 @@ final class LocalDiskPanel extends JPanel { org.openide.awt.Mnemonics.setLocalizedText(changeDatabasePathCheckbox, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.changeDatabasePathCheckbox.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(refreshTablebutton, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.refreshTablebutton.text")); // NOI18N + refreshTablebutton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + refreshTablebuttonActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -207,31 +217,33 @@ final class LocalDiskPanel extends JPanel { .addComponent(diskLabel) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(errorLabel) - .addGroup(layout.createSequentialGroup() - .addComponent(timeZoneLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(noFatOrphansCheckbox) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(copyImageCheckbox) - .addComponent(descLabel)) - .addGroup(layout.createSequentialGroup() - .addGap(21, 21, 21) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(imageWriterErrorLabel) - .addComponent(jLabel1) - .addComponent(changeDatabasePathCheckbox)) - .addGap(0, 0, Short.MAX_VALUE))))))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(errorLabel) + .addGroup(layout.createSequentialGroup() + .addComponent(timeZoneLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(noFatOrphansCheckbox) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(copyImageCheckbox) + .addComponent(descLabel)) + .addGroup(layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(browseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(imageWriterErrorLabel) + .addComponent(jLabel1) + .addComponent(changeDatabasePathCheckbox)) + .addGap(0, 0, Short.MAX_VALUE))))) + .addComponent(refreshTablebutton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap(14, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -239,13 +251,13 @@ final class LocalDiskPanel extends JPanel { .addComponent(diskLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(errorLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(refreshTablebutton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(timeZoneLabel) .addComponent(timeZoneComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(noFatOrphansCheckbox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(descLabel) @@ -261,7 +273,9 @@ final class LocalDiskPanel extends JPanel { .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(imageWriterErrorLabel) - .addContainerGap(66, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(errorLabel) + .addContainerGap(58, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -292,6 +306,10 @@ final class LocalDiskPanel extends JPanel { fireUpdateEvent(); }//GEN-LAST:event_browseButtonActionPerformed + private void refreshTablebuttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTablebuttonActionPerformed + refreshTable(); + }//GEN-LAST:event_refreshTablebuttonActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton browseButton; private javax.swing.JCheckBox changeDatabasePathCheckbox; @@ -305,6 +323,7 @@ final class LocalDiskPanel extends JPanel { private javax.swing.JScrollPane jScrollPane1; private javax.swing.JCheckBox noFatOrphansCheckbox; private javax.swing.JTextField pathTextField; + private javax.swing.JButton refreshTablebutton; private javax.swing.JComboBox timeZoneComboBox; private javax.swing.JLabel timeZoneLabel; // End of variables declaration//GEN-END:variables @@ -357,26 +376,26 @@ final class LocalDiskPanel extends JPanel { } String path = disk.getName(); - + // Remove any character that isn't alphanumeric, a space, parent, or underscore. // If the name ends up empty or starting with a space, prepend "localDisk" path = path.replaceAll("[^0-9A-Za-z _()]", ""); // NON-NLS - if(path.isEmpty() || path.startsWith(" ")){ + if (path.isEmpty() || path.startsWith(" ")) { path = "localDisk" + path; } - + path += " " + System.currentTimeMillis(); path += ".vhd"; pathTextField.setText(Paths.get(getDefaultImageWriterFolder(), path).toString()); } - private boolean imageWriterPathIsValid() { - if((! copyImageCheckbox.isSelected()) || ! (diskTable.getSelectedRow() >= 0 && diskTable.getSelectedRow() < disks.size())){ + private boolean imageWriterPathIsValid() { + if ((!copyImageCheckbox.isSelected()) || !(diskTable.getSelectedRow() >= 0 && diskTable.getSelectedRow() < disks.size())) { imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setText(""); return true; } - + if (pathTextField.getText().isEmpty()) { imageWriterErrorLabel.setVisible(true); imageWriterErrorLabel.setText(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.imageWriterEmptyPathError.text")); @@ -611,12 +630,14 @@ final class LocalDiskPanel extends JPanel { errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.drivesNotDetected.toolTipText")); } + errorLabel.setVisible(true); diskTable.setEnabled(false); } else if (physicalDrives.isEmpty()) { errorLabel.setText( NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.someDisksNotDetected.text")); errorLabel.setToolTipText(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.errLabel.someDisksNotDetected.toolTipText")); + errorLabel.setVisible(true); } } @@ -644,8 +665,6 @@ final class LocalDiskPanel extends JPanel { diskTable.clearSelection(); } pathTextField.setText(""); - errorLabel.setText(""); - errorLabel.setVisible(false); fireUpdateEvent(); ready = true; } else { From ad1c5ba0cf44f5e6f15a4d84ba01b7c6f53a9829 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 17:14:47 -0400 Subject: [PATCH 3/8] 2452 fixed refresh local disks button --- Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index 396572f65b..2d238d136b 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -671,6 +671,7 @@ final class LocalDiskPanel extends JPanel { logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS } } + diskTable.revalidate(); } } } From 48dbd52dd246e804337d0c8597d2bd91922d4bec Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Thu, 30 Mar 2017 21:20:20 -0400 Subject: [PATCH 4/8] Added more support in tree for INTERESTING_ARTIFACTS and send ingest inbox for interesting file hits --- .../autopsy/datamodel/BlackboardArtifactNode.java | 7 +++++-- .../FilesIdentifierIngestModule.java | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index dc6f5ab2ab..6c245954d9 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -70,7 +70,8 @@ public class BlackboardArtifactNode extends DisplayableItemNode { private static final Integer[] SHOW_UNIQUE_PATH = new Integer[]{ BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID(), BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID(), - BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID(),}; + BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT.getTypeID(), + BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID(),}; // TODO (RC): This is an unattractive alternative to subclassing BlackboardArtifactNode, // cut from the same cloth as the equally unattractive SHOW_UNIQUE_PATH array @@ -207,7 +208,9 @@ public class BlackboardArtifactNode extends DisplayableItemNode { // If this is a node for a keyword hit on an artifact, we set the // display name to be the artifact type name followed by " Artifact" // e.g. "Messages Artifact". - if (artifact != null && artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { + if (artifact != null && + (artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID() || + artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID())) { try { for (BlackboardAttribute attribute : artifact.getAttributes()) { if (attribute.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) { diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java index 8a9a2b8469..78a8481f17 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesIdentifierIngestModule.java @@ -32,6 +32,7 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.ingest.FileIngestModule; import org.sleuthkit.autopsy.ingest.IngestJobContext; +import org.sleuthkit.autopsy.ingest.IngestMessage; import org.sleuthkit.autopsy.ingest.IngestModuleReferenceCounter; import org.sleuthkit.autopsy.ingest.IngestServices; import org.sleuthkit.autopsy.ingest.ModuleDataEvent; @@ -55,6 +56,7 @@ final class FilesIdentifierIngestModule implements FileIngestModule { private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter(); private static final Map> interestingFileSetsByJob = new ConcurrentHashMap<>(); private final FilesIdentifierIngestJobSettings settings; + private final IngestServices services = IngestServices.getInstance(); private IngestJobContext context; private Blackboard blackboard; @@ -141,7 +143,18 @@ final class FilesIdentifierIngestModule implements FileIngestModule { MessageNotifyUtil.Notify.error(Bundle.FilesIdentifierIngestModule_indexError_message(), artifact.getDisplayName()); } - IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(moduleName, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Collections.singletonList(artifact))); + services.fireModuleDataEvent(new ModuleDataEvent(moduleName, BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_FILE_HIT, Collections.singletonList(artifact))); + + // make an ingest inbox message + StringBuilder detailsSb = new StringBuilder(); + detailsSb.append("File: " + file.getParentPath() + file.getName() + "
\n"); + detailsSb.append("Rule Set: " + filesSet.getName()); + + services.postMessage(IngestMessage.createDataMessage(InterestingItemsIngestModuleFactory.getModuleName(), + "Interesting File Match: " + filesSet.getName() + "(" + file.getName() +")", + detailsSb.toString(), + file.getName(), + artifact)); } catch (TskCoreException ex) { FilesIdentifierIngestModule.logger.log(Level.SEVERE, "Error posting to the blackboard", ex); //NOI18N NON-NLS From 60d49e4237f9349a0cfb2c8e8e504050591ddaeb Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 31 Mar 2017 10:46:08 -0400 Subject: [PATCH 5/8] 2452 Right side of local disk panel now lines up correctly --- .../autopsy/casemodule/LocalDiskPanel.form | 71 +++++++++++-------- .../autopsy/casemodule/LocalDiskPanel.java | 65 +++++++++-------- 2 files changed, 78 insertions(+), 58 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form index bf8566a593..09239fe001 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form @@ -26,47 +26,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + + + + + + - + + + + + + + + + + + + - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index 2d238d136b..e779942b67 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -214,36 +214,43 @@ final class LocalDiskPanel extends JPanel { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(diskLabel) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(errorLabel) - .addGroup(layout.createSequentialGroup() - .addComponent(timeZoneLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(noFatOrphansCheckbox) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(copyImageCheckbox) - .addComponent(descLabel)) - .addGroup(layout.createSequentialGroup() - .addGap(21, 21, 21) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(imageWriterErrorLabel) - .addComponent(jLabel1) - .addComponent(changeDatabasePathCheckbox)) - .addGap(0, 0, Short.MAX_VALUE))))) - .addComponent(refreshTablebutton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(14, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(noFatOrphansCheckbox) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(copyImageCheckbox) + .addComponent(descLabel)) + .addGroup(layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(layout.createSequentialGroup() + .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(browseButton, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(imageWriterErrorLabel) + .addComponent(jLabel1) + .addComponent(changeDatabasePathCheckbox)) + .addGap(0, 0, Short.MAX_VALUE))))) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(timeZoneLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(refreshTablebutton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(diskLabel) + .addComponent(errorLabel)) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -668,7 +675,9 @@ final class LocalDiskPanel extends JPanel { fireUpdateEvent(); ready = true; } else { - logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS + //this should not be possible but happens + //possible threading error when this method is called while running + logger.log(Level.INFO, "Loading local disks was canceled"); //NON-NLS } } diskTable.revalidate(); From bd02d052616d6405163fd240a337177114a8b7c0 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 31 Mar 2017 11:15:36 -0400 Subject: [PATCH 6/8] 2452 correct logger message regarding cancellation --- Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index e779942b67..865882c62f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -653,7 +653,7 @@ final class LocalDiskPanel extends JPanel { try { super.get(); //block and get all exceptions thrown while doInBackground() } catch (CancellationException ex) { - logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS + logger.log(Level.INFO, "Loading local disks was canceled."); //NON-NLS } catch (InterruptedException ex) { logger.log(Level.INFO, "Loading local disks was interrupted."); //NON-NLS } catch (Exception ex) { From 657b9c3fa6d31b484a920dffc53915d0e0c98db2 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 31 Mar 2017 15:56:48 -0400 Subject: [PATCH 7/8] Updated copyright date. --- Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties index 1aa7a3b24e..525c46c071 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties @@ -24,7 +24,7 @@ DataContentViewerString.pageLabel2.text=Page # Product Information panel LBL_Description=
\n Product Version: {0} ({9})
Sleuth Kit Version: {7}
Netbeans RCP Build: {8}
Java: {1}; {2}
System: {3}; {4}; {5}
Userdir: {6}
Format_OperatingSystem_Value={0} version {1} running on {2} -LBL_Copyright=
Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
Copyright © 2003-2016.
+LBL_Copyright=
Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
Copyright © 2003-2017.
URL_ON_IMG=http://www.sleuthkit.org/ URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.3/ From 4b723283df172f09f7d16469488ced2dfb3cd0cb Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 31 Mar 2017 16:10:48 -0400 Subject: [PATCH 8/8] VIK-2502: Change radio buttons to toggle buttons for picking profile --- .../autopsy/corecomponents/checkbox24.png | Bin 0 -> 1573 bytes .../IngestProfileSelectionPanel.java | 135 +++++++++++------- 2 files changed, 86 insertions(+), 49 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/corecomponents/checkbox24.png diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/checkbox24.png b/Core/src/org/sleuthkit/autopsy/corecomponents/checkbox24.png new file mode 100644 index 0000000000000000000000000000000000000000..4d9dd4562c18657952986735df9981057ed3e1f4 GIT binary patch literal 1573 zcmV+=2HN?FP)Xf`IcFM2C}8ZVQx4s2mnbODUyA z5ILkAa<#O!oPr#J5Dq~DAqrt5s8has-WN+?Teg3eHTfj%^FGh#`|Iy*fA6wo|HJEz z)YR1Fj~+epn3p+nzOLl zf`v7U&@@ZHX;u>sN2y@{C+s4XunMTcjNo21`WW!|Lkl^o4-(^78b) zzCMJ<3+dJ@2{@F7jW!%;+i;<6%Y~kk04HMZz$Ly3E^&=;iEV&0;dqP+Ho-NBO1=*A zD?(*uC5N~_paL{XOG`Puy}hJ=;`sm~*0Sbcqa6=l+4HfVTC61qIxW zjt<0JE5Om3(+uIS(DaM!9Tx@d6CGr9|#4FJ=_A5&7jbqm( z8Ma-jhrItOUc7vT`{T3l%$df?puz<9o0Gm&j;A}=asq`6se>I2vwh5?)rtxZS4&7rja7*vNvDjwVN2rKg z0qYxIXUAa9l^ijYux*2wi23UtGa4@hArsqqMBB%t_jhvjEg@DyO9xqF!QXy4X z1#PG6&^sl;cb>Pg!>bNPeoCAY^kMMnb97BSgHy%>n1r@scR(X7LK^V{qY+lY3Rniz zVW;OUT+68jnM2_7`GSRjjEsydg+hTeaSe2i=acFypntvwh8N}7MMNfHZEzP2!Jan& zv&e4j3GaYuNGnVOo3WpSnENYWda)MzXNr-QTMMdKE|*IMd`t(h*=&JKCIcr=1|8=D zZ2jpr^u44o^i{$*s1amT~>Ci0y|tvzHDr32w!nz((x$k;9O*Q}1LE?VyS! z<2qX%u!cMjvdKIG?}lO_VEY9bX^#rV!FOTC=z>K|Kdcf*Xe>#{Ub1E!+=iY04fNiv z9#znBxd|?D)Ya92IECtfFOrgygk&CpU#P^!V>h68wi4TZmSTsG3OmU+FbVI38M6=j zt_;DFU>4m+uTj?w$ewNIrSutXayIj(lA1$EPEO7t?oX(IwJa7Zhs+M-lr&(SqX;^# z#n3%njxFbEpnp*T1OG-C5!tSgb{eCgyD;!;q_1r`S4;1u&a8J7Lr5Hyi#SC~0?5Ea zUA+q8vL*;iTOcaC3sFTIax3rQdQ~U#swui&(@C#U*Tfa=^j`Xmq?vY5uEhbXJUl$u z5*q3~1+`gCMMVY8;x+ZY#plTAdEx2lnWnx6?`ddg>~nK-%MT3=l~aU; zg~=HV22Dgngq+D_(nLo`)2KgF*VOx{GwSn{OH)&GKXJdMe(=9d&?Id5kDy%dP~txT XkDWOoq*RWW00000NkvXXu0mjfHdE+l literal 0 HcmV?d00001 diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionPanel.java index 2d19de0bea..39146417c7 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestProfileSelectionPanel.java @@ -20,18 +20,20 @@ package org.sleuthkit.autopsy.ingest.runIngestModuleWizard; import java.awt.Color; import java.awt.Component; +import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; +import java.awt.event.ActionListener; import java.util.Collections; import java.util.List; +import javax.swing.Box; import static javax.swing.Box.createVerticalGlue; +import javax.swing.ButtonModel; import javax.swing.JPanel; -import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JTextArea; +import javax.swing.JToggleButton; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog; import org.sleuthkit.autopsy.ingest.IngestOptionsPanel; @@ -42,7 +44,7 @@ import org.sleuthkit.autopsy.ingest.IngestProfiles.IngestProfile; * Visual panel for the choosing of ingest profiles by the user when running * ingest. */ -final class IngestProfileSelectionPanel extends JPanel implements ItemListener { +final class IngestProfileSelectionPanel extends JPanel { @Messages({"IngestProfileSelectionPanel.customSettings.name=Custom Settings", "IngestProfileSelectionPanel.customSettings.description=configure individual module settings in next step of wizard"}) @@ -55,6 +57,10 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { private List profiles = Collections.emptyList(); boolean isLastPanel = false; + //Listener for profile button selection + ActionListener buttonGroupActionListener = (ActionEvent e) -> { + updateSelectedProfile(); + }; /** * Creates new IngestProfileSelectionPanel * @@ -65,8 +71,9 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { initComponents(); wizardPanel = panel; selectedProfile = lastSelectedProfile; + isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext()); - populateListOfCheckboxes(); + populateProfilesList(); } /** @@ -79,11 +86,28 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { } /** - * Adds a radio button for custom settings as well as one for each profile + * Handles the change to selected profile + * if custom settings button is selected, it enables the next button, otherwise + * it enables the Finish button. + */ + private void updateSelectedProfile() { + + ButtonModel selectedButton = profileListButtonGroup.getSelection(); + selectedProfile = selectedButton.getActionCommand(); + + boolean wasLastPanel = isLastPanel; + isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext()); + wizardPanel.fireChangeEvent(); + this.firePropertyChange("LAST_ENABLED", wasLastPanel, isLastPanel); //NON-NLS + } + + /** + * Adds a button for custom settings as well as one for each profile * that has been created to the panel containing them. */ - private void populateListOfCheckboxes() { + private void populateProfilesList() { profiles = getProfiles(); + GridBagLayout gridBagLayout = new GridBagLayout(); GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.HORIZONTAL; @@ -92,13 +116,15 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { constraints.weighty = .0; constraints.anchor = GridBagConstraints.FIRST_LINE_START; - addRadioButton(CUSTOM_SETTINGS_DISPLAY_NAME, wizardPanel.getDefaultContext(), CUSTOM_SETTINGS_DESCRIPTION, gridBagLayout, constraints); - for (IngestProfile profile : profiles) { + addButton(CUSTOM_SETTINGS_DISPLAY_NAME, wizardPanel.getDefaultContext(), CUSTOM_SETTINGS_DESCRIPTION, gridBagLayout, constraints); + + profiles.forEach((profile) -> { constraints.weightx = 0; constraints.gridy++; constraints.gridx = 0; - addRadioButton(profile.toString(), profile.toString(), profile.getDescription(), gridBagLayout, constraints); - } + + addButton(profile.toString(), profile.toString(), profile.getDescription(), gridBagLayout, constraints); + }); //Add vertical glue at the bottom of the scroll panel so spacing //between elements is less dependent on the number of elements constraints.gridy++; @@ -119,29 +145,64 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { * programmatically * @param profileDesc - the description of the profile */ - private void addRadioButton(String profileDisplayName, String profileContextName, String profileDesc, GridBagLayout layout, GridBagConstraints constraints) { - String displayText = profileDisplayName + " - " + profileDesc; - JRadioButton myRadio = new JRadioButton(); + private void addButton(String profileDisplayName, String profileContextName, String profileDesc, GridBagLayout layout, GridBagConstraints constraints) { + + //Add a spacer + Dimension spacerBlockDimension = new Dimension(6, 4); // Space between left edge and button, Space between rows + Box.Filler spacer = new Box.Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension); + constraints.weightx = 1; + layout.setConstraints(spacer, constraints); + profileListPanel.add(spacer); + constraints.gridx++; + constraints.gridy++; + + + JToggleButton profileButton = new JToggleButton(); + profileButton.setMaximumSize(new java.awt.Dimension(48, 48)); + profileButton.setMinimumSize(new java.awt.Dimension(48, 48)); + profileButton.setPreferredSize(new java.awt.Dimension(48, 48)); + + profileButton.setName(profileContextName); + profileButton.setActionCommand(profileContextName); + + profileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/timeline/images/magnifier-zoom-in-green.png"))); + profileButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/checkbox24.png"))); + profileButton.setFocusable(false); + profileButton.setFocusPainted(false); + profileButton.addActionListener(buttonGroupActionListener); + + if (profileContextName.equals(selectedProfile)) { + profileButton.setSelected(true); + } + + profileListButtonGroup.add(profileButton); + profileListPanel.add(profileButton); + layout.setConstraints(profileButton, constraints); + constraints.gridx++; + constraints.weightx = 1; + //Using a JTextArea as though it is a label in order to get multi-line support + String displayText = profileDisplayName; + if (!profileDesc.isEmpty()) { + displayText += " - " + profileDesc; + } JTextArea myLabel = new JTextArea(displayText); Color gray = new Color(240, 240, 240); //matches background of panel myLabel.setBackground(gray); myLabel.setEditable(false); myLabel.setWrapStyleWord(true); myLabel.setLineWrap(true); - myRadio.setName(profileContextName); - myRadio.setToolTipText(profileDesc); - myRadio.addItemListener(this); - if (profileContextName.equals(selectedProfile)) { - myRadio.setSelected(true); - } - profileListButtonGroup.add(myRadio); - profileListPanel.add(myRadio); - layout.setConstraints(myRadio, constraints); + + //Add space between the button and text + Box.Filler buttonTextSpacer = new Box.Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension); + layout.setConstraints(buttonTextSpacer, constraints); + profileListPanel.add(buttonTextSpacer); constraints.gridx++; - constraints.weightx = 1; + + //Add the text area serving as a label to the right of the button profileListPanel.add(myLabel); layout.setConstraints(myLabel, constraints); + } /** @@ -164,30 +225,6 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { profileListPanel.removeAll(); } - /** - * Listens for changes and checks the currently selected radio button if - * custom settings button is enabled it enables the next button, otherwise - * it enables the Finish button. - * - * @param e - */ - @Override - public void itemStateChanged(ItemEvent e) { - for (Component rButton : profileListPanel.getComponents()) { - if (rButton instanceof JRadioButton){ - JRadioButton jrb = (JRadioButton) rButton; - if (jrb.isSelected()) { - selectedProfile = jrb.getName(); - break; - } - } - } - boolean wasLastPanel = isLastPanel; - isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext()); - wizardPanel.fireChangeEvent(); - this.firePropertyChange("LAST_ENABLED", wasLastPanel, isLastPanel); //NON-NLS - } - /** * Get all the currently existing ingest profiles. */ @@ -272,7 +309,7 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener { fetchProfileList(); profileListPanel.revalidate(); profileListPanel.repaint(); - populateListOfCheckboxes(); + populateProfilesList(); dialog.close(); } );