From ca2780b332c49d0f3c0ec6ae0c33b4956051aafe Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 21 Feb 2018 15:46:37 -0500 Subject: [PATCH 01/23] Added deprioritization functionality. --- .../AutoIngestCaseDeprioritizedEvent.java | 65 ++++++++++ .../autoingest/AutoIngestControlPanel.form | 55 +++++++- .../autoingest/AutoIngestControlPanel.java | 121 +++++++++++++----- .../autoingest/AutoIngestDashboard.form | 38 +++++- .../autoingest/AutoIngestDashboard.java | 84 ++++++++++-- .../autoingest/AutoIngestManager.java | 111 +++++++++++++++- .../autoingest/AutoIngestMonitor.java | 110 +++++++++++++++- .../experimental/autoingest/Bundle.properties | 35 ++++- 8 files changed, 562 insertions(+), 57 deletions(-) create mode 100755 Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java new file mode 100755 index 0000000000..0076f0cc03 --- /dev/null +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java @@ -0,0 +1,65 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2018 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.experimental.autoingest; + +import java.io.Serializable; +import org.sleuthkit.autopsy.events.AutopsyEvent; + +/** + * Event published when an automated ingest manager deprioritizes all or part of + * a case. + */ +public final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Serializable { + + private static final long serialVersionUID = 1L; + private final String caseName; + private final String nodeName; + + /** + * Constructs an event published when an automated ingest manager + * deprioritizes all or part of a case. + * + * @param caseName The name of the case. + * @param nodeName The host name of the node that deprioritized the case. + */ + public AutoIngestCaseDeprioritizedEvent(String nodeName, String caseName) { + super(AutoIngestManager.Event.CASE_DEPRIORITIZED.toString(), null, null); + this.caseName = caseName; + this.nodeName = nodeName; + } + + /** + * Gets the name of the deprioritized case. + * + * @return The case name. + */ + public String getCaseName() { + return caseName; + } + + /** + * Gets the host name of the node that deprioritized the case. + * + * @return The host name of the node. + */ + public String getNodeName() { + return nodeName; + } + +} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form index cf7db34165..1e1cc73c43 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form @@ -73,6 +73,8 @@ + + @@ -102,10 +104,14 @@ - + + + + + @@ -608,5 +614,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index 0d89c08246..fc82ddc1dd 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -73,8 +73,6 @@ import org.sleuthkit.autopsy.ingest.IngestProgressSnapshotDialog; * one such panel per node. */ @Messages({ - "AutoIngestControlPanel.bnClusterMetrics.text=Auto Ingest Metrics", - "AutoIngestControlPanel.bnPause.text=Pause", "AutoIngestControlPanel.bnPause.paused=Paused", "AutoIngestControlPanel.bnPause.running=Running", "AutoIngestControlPanel.bnPause.confirmHeader=Are you sure you want to pause?", @@ -88,38 +86,15 @@ import org.sleuthkit.autopsy.ingest.IngestProgressSnapshotDialog; "AutoIngestControlPanel.pendingTable.toolTipText=The Pending table displays the order upcoming Jobs will be processed with the top of the list first", "AutoIngestControlPanel.runningTable.toolTipText=The Running table displays the currently running Job and information about it", "AutoIngestControlPanel.completedTable.toolTipText=The Completed table shows all Jobs that have been processed already", - "AutoIngestControlPanel.bnCancelJob.text=&Cancel Job", "AutoIngestControlPanel.bnCancelJob.toolTipText=Cancel processing of the current Job and move on to the next Job. This functionality is only available for jobs running on current AIM node.", - "AutoIngestControlPanel.bnDeleteCase.text=&Delete Case", "AutoIngestControlPanel.bnDeleteCase.toolTipText=Delete the selected Case in its entirety", "AutoIngestControlPanel.bnResume.text=Resume", - "AutoIngestControlPanel.lbPending.text=Pending Jobs", - "AutoIngestControlPanel.lbRunning.text=Running Jobs", - "AutoIngestControlPanel.lbCompleted.text=Completed Jobs", - "AutoIngestControlPanel.bnRefresh.text=&Refresh", "AutoIngestControlPanel.bnRefresh.toolTipText=Refresh displayed tables", - "AutoIngestControlPanel.bnCancelModule.text=Cancel &Module", "AutoIngestControlPanel.bnCancelModule.toolTipText=Cancel processing of the current module within the Job and move on to the next module within the Job. This functionality is only available for jobs running on current AIM node.", - "AutoIngestControlPanel.bnExit.text=&Exit", "AutoIngestControlPanel.bnExit.toolTipText=Exit Application", - "AutoIngestControlPanel.bnOptions.text=&Options", "AutoIngestControlPanel.bnOptions.toolTipText=Display options panel. All processing must be paused to open the options panel.", - "AutoIngestControlPanel.bnShowProgress.text=Ingest Progress", "AutoIngestControlPanel.bnShowProgress.toolTipText=Show the progress of the currently running Job. This functionality is only available for jobs running on current AIM node.", - "AutoIngestControlPanel.bnPrioritizeCase.text=Prioritize Case", - "AutoIngestControlPanel.bnPrioritizeCase.toolTipText=Move all images associated with a case to top of Pending queue.", - "AutoIngestControlPanel.bnShowCaseLog.text=Show Case &Log", "AutoIngestControlPanel.bnShowCaseLog.toolTipText=Display case log file for selected case", - "AutoIngestControlPanel.tbStatusMessage.text=", - "AutoIngestControlPanel.lbStatus.text=Status:", - "AutoIngestControlPanel.bnPrioritizeJob.text=Prioritize Job", - "AutoIngestControlPanel.bnPrioritizeJob.toolTipText=Move this folder to the top of the Pending queue.", - "AutoIngestControlPanel.bnPrioritizeJob.actionCommand=", - "AutoIngestControlPanel.lbServicesStatus.text=Services Status:", - "AutoIngestControlPanel.tbServicesStatusMessage.text=", - "AutoIngestControlPanel.bnOpenLogDir.text=Open System Logs Folder", - "AutoIngestControlPanel.bnReprocessJob.text=Reprocess Job", - "AutoIngestControlPanel.bnPrioritizeFolder.label=", "AutoIngestControlPanel.Cancelling=Cancelling...", "AutoIngestControlPanel.AutoIngestStartupWarning.Title=Automated Ingest Warning", "AutoIngestControlPanel.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.", @@ -272,7 +247,12 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { completedTableModel = new AutoIngestTableModel(JobsTableModelColumns.headers, 0); - initComponents(); // Generated code. + try { + initComponents(); // Generated code. + } catch (Throwable ex) { //DLG: + System.out.println(); + return; + } setServicesStatusMessage(); initPendingJobsTable(); initRunningJobsTable(); @@ -652,6 +632,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { private void enablePendingTableButtons(Boolean enable) { bnPrioritizeCase.setEnabled(enable); bnPrioritizeJob.setEnabled(enable); + bnDeprioritizeCase.setEnabled(enable); + bnDeprioritizeJob.setEnabled(enable); } /** @@ -840,6 +822,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { }); break; case CASE_PRIORITIZED: + case CASE_DEPRIORITIZED: updateExecutor.submit(new UpdatePendingJobsTableTask()); break; case JOB_STATUS_UPDATED: @@ -1201,6 +1184,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { bnOpenLogDir = new javax.swing.JButton(); bnClusterMetrics = new javax.swing.JButton(); bnReprocessJob = new javax.swing.JButton(); + bnDeprioritizeCase = new javax.swing.JButton(); + bnDeprioritizeJob = new javax.swing.JButton(); pendingTable.setModel(pendingTableModel); pendingTable.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.pendingTable.toolTipText")); // NOI18N @@ -1434,6 +1419,29 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } }); + org.openide.awt.Mnemonics.setLocalizedText(bnDeprioritizeCase, org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeCase.text")); // NOI18N + bnDeprioritizeCase.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeCase.toolTipText")); // NOI18N + bnDeprioritizeCase.setMaximumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeCase.setMinimumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeCase.setPreferredSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeCase.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnDeprioritizeCaseActionPerformed(evt); + } + }); + + org.openide.awt.Mnemonics.setLocalizedText(bnDeprioritizeJob, org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeJob.text")); // NOI18N + bnDeprioritizeJob.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeJob.toolTipText")); // NOI18N + bnDeprioritizeJob.setActionCommand(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeJob.actionCommand")); // NOI18N + bnDeprioritizeJob.setMaximumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeJob.setMinimumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeJob.setPreferredSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeJob.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnDeprioritizeJobActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -1486,7 +1494,9 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(bnPrioritizeCase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bnDeprioritizeCase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bnDeprioritizeJob, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); @@ -1511,10 +1521,14 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pendingScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() - .addGap(82, 82, 82) + .addGap(48, 48, 48) .addComponent(bnPrioritizeCase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(bnDeprioritizeCase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(30, 30, 30) + .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnDeprioritizeJob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lbRunning) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1747,7 +1761,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { * * @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.errorMessage.casePrioritization=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 (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1757,7 +1771,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { manager.prioritizeCase(caseName); } catch (AutoIngestManager.AutoIngestManagerException ex) { SYS_LOGGER.log(Level.SEVERE, "Error prioritizing a case", ex); - MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_casePrioritization_errorMessage()); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_casePrioritization()); } refreshTables(); pendingTable.clearSelection(); @@ -1807,7 +1821,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } }//GEN-LAST:event_bnShowCaseLogActionPerformed - @Messages({"AutoIngestControlPanel.jobPrioritization.errorMessage=An error occurred when prioritizing the job."}) + @Messages({"AutoIngestControlPanel.errorMessage.jobPrioritization=An error occurred when prioritizing the job."}) private void bnPrioritizeJobActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnPrioritizeJobActionPerformed if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1815,8 +1829,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { try { manager.prioritizeJob(manifestFilePath); } catch (AutoIngestManager.AutoIngestManagerException ex) { - SYS_LOGGER.log(Level.SEVERE, "Error prioritizing a case", ex); - MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_jobPrioritization_errorMessage()); + SYS_LOGGER.log(Level.SEVERE, "Error prioritizing a job", ex); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_jobPrioritization()); } refreshTables(); pendingTable.clearSelection(); @@ -1852,11 +1866,50 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { new AutoIngestMetricsDialog(this.getTopLevelAncestor()); }//GEN-LAST:event_bnClusterMetricsActionPerformed + @Messages({"AutoIngestControlPanel.errorMessage.caseDeprioritization=An error occurred when deprioritizing the case. Some or all jobs may not have been deprioritized."}) + private void bnDeprioritizeCaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDeprioritizeCaseActionPerformed + if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + + String caseName = (pendingTable.getModel().getValueAt(pendingTable.convertRowIndexToModel(pendingTable.getSelectedRow()), JobsTableModelColumns.CASE.ordinal())).toString(); + try { + manager.deprioritizeCase(caseName); + } catch (AutoIngestManager.AutoIngestManagerException ex) { + SYS_LOGGER.log(Level.SEVERE, "Error deprioritizing a case", ex); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_caseDeprioritization()); + } + refreshTables(); + pendingTable.clearSelection(); + enablePendingTableButtons(false); + AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_bnDeprioritizeCaseActionPerformed + + @Messages({"AutoIngestControlPanel.errorMessage.jobDeprioritization=An error occurred when deprioritizing the job."}) + private void bnDeprioritizeJobActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDeprioritizeJobActionPerformed + if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + Path manifestFilePath = (Path) (pendingTable.getModel().getValueAt(pendingTable.convertRowIndexToModel(pendingTable.getSelectedRow()), JobsTableModelColumns.MANIFEST_FILE_PATH.ordinal())); + try { + manager.deprioritizeJob(manifestFilePath); + } catch (AutoIngestManager.AutoIngestManagerException ex) { + SYS_LOGGER.log(Level.SEVERE, "Error deprioritizing a job", ex); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_jobDeprioritization()); + } + refreshTables(); + pendingTable.clearSelection(); + enablePendingTableButtons(false); + AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_bnDeprioritizeJobActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton bnCancelJob; private javax.swing.JButton bnCancelModule; private javax.swing.JButton bnClusterMetrics; private javax.swing.JButton bnDeleteCase; + private javax.swing.JButton bnDeprioritizeCase; + private javax.swing.JButton bnDeprioritizeJob; private javax.swing.JButton bnExit; private javax.swing.JButton bnOpenLogDir; private javax.swing.JButton bnOptions; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form index 45e2a2ef43..9d2a343f56 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form @@ -35,11 +35,15 @@ - + + + - + + + @@ -84,6 +88,8 @@ + + @@ -265,5 +271,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 693bc4ad3d..65b69f1c7c 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -250,6 +250,8 @@ final class AutoIngestDashboard extends JPanel implements Observer { boolean enablePrioritizeButtons = (row >= 0 && row < pendingTable.getRowCount()); this.prioritizeJobButton.setEnabled(enablePrioritizeButtons); this.prioritizeCaseButton.setEnabled(enablePrioritizeButtons); + this.deprioritizeJobButton.setEnabled(enablePrioritizeButtons); + this.deprioritizeCaseButton.setEnabled(enablePrioritizeButtons); }); } @@ -655,6 +657,8 @@ final class AutoIngestDashboard extends JPanel implements Observer { prioritizeJobButton = new javax.swing.JButton(); prioritizeCaseButton = new javax.swing.JButton(); clusterMetricsButton = new javax.swing.JButton(); + deprioritizeJobButton = new javax.swing.JButton(); + deprioritizeCaseButton = new javax.swing.JButton(); org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.jButton1.text")); // NOI18N @@ -759,6 +763,24 @@ final class AutoIngestDashboard extends JPanel implements Observer { } }); + org.openide.awt.Mnemonics.setLocalizedText(deprioritizeJobButton, org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeJobButton.text")); // NOI18N + deprioritizeJobButton.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeJobButton.toolTipText")); // NOI18N + deprioritizeJobButton.setEnabled(false); + deprioritizeJobButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deprioritizeJobButtonActionPerformed(evt); + } + }); + + org.openide.awt.Mnemonics.setLocalizedText(deprioritizeCaseButton, org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeCaseButton.text")); // NOI18N + deprioritizeCaseButton.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeCaseButton.toolTipText")); // NOI18N + deprioritizeCaseButton.setEnabled(false); + deprioritizeCaseButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deprioritizeCaseButtonActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -773,11 +795,15 @@ final class AutoIngestDashboard extends JPanel implements Observer { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGap(18, 18, 18) .addComponent(prioritizeJobButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(deprioritizeJobButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) .addComponent(prioritizeCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(deprioritizeCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) .addComponent(clusterMetricsButton)) .addComponent(lbPending, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbCompleted, javax.swing.GroupLayout.Alignment.LEADING) @@ -816,7 +842,9 @@ final class AutoIngestDashboard extends JPanel implements Observer { .addComponent(refreshButton) .addComponent(prioritizeJobButton) .addComponent(prioritizeCaseButton) - .addComponent(clusterMetricsButton)) + .addComponent(clusterMetricsButton) + .addComponent(deprioritizeJobButton) + .addComponent(deprioritizeCaseButton)) .addContainerGap()) ); }// //GEN-END:initComponents @@ -835,9 +863,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }//GEN-LAST:event_refreshButtonActionPerformed - @Messages({ - "AutoIngestDashboard.PrioritizeJobError=Failed to prioritize job \"%s\"." - }) + @Messages({"AutoIngestDashboard.errorMessage.jobPrioritization=Failed to prioritize job \"%s\"."}) private void prioritizeJobButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prioritizeJobButtonActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -847,7 +873,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { jobsSnapshot = autoIngestMonitor.prioritizeJob(job); refreshTables(jobsSnapshot); } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { - String errorMessage = String.format(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.PrioritizeJobError"), job.getManifest().getFilePath()); + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_jobPrioritization(), job.getManifest().getFilePath()); LOGGER.log(Level.SEVERE, errorMessage, ex); MessageNotifyUtil.Message.error(errorMessage); } @@ -855,9 +881,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { } }//GEN-LAST:event_prioritizeJobButtonActionPerformed - @Messages({ - "AutoIngestDashboard.PrioritizeCaseError=Failed to prioritize job \"%s\"." - }) + @Messages({"AutoIngestDashboard.errorMessage.casePrioritization=Failed to prioritize case \"%s\"."}) private void prioritizeCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prioritizeCaseButtonActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -867,7 +891,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { jobsSnapshot = autoIngestMonitor.prioritizeCase(caseName); refreshTables(jobsSnapshot); } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { - String errorMessage = String.format(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.PrioritizeCaseError"), caseName); + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_casePrioritization(), caseName); LOGGER.log(Level.SEVERE, errorMessage, ex); MessageNotifyUtil.Message.error(errorMessage); } @@ -879,10 +903,48 @@ final class AutoIngestDashboard extends JPanel implements Observer { new AutoIngestMetricsDialog(this.getTopLevelAncestor()); }//GEN-LAST:event_clusterMetricsButtonActionPerformed + @Messages({"AutoIngestDashboard.errorMessage.jobDeprioritization=Failed to deprioritize job \"%s\"."}) + private void deprioritizeJobButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deprioritizeJobButtonActionPerformed + if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + AutoIngestJob job = (AutoIngestJob) (pendingTableModel.getValueAt(pendingTable.getSelectedRow(), JobsTableModelColumns.JOB.ordinal())); + JobsSnapshot jobsSnapshot; + try { + jobsSnapshot = autoIngestMonitor.deprioritizeJob(job); + refreshTables(jobsSnapshot); + } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_jobDeprioritization(), job.getManifest().getFilePath()); + LOGGER.log(Level.SEVERE, errorMessage, ex); + MessageNotifyUtil.Message.error(errorMessage); + } + setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_deprioritizeJobButtonActionPerformed + + @Messages({"AutoIngestDashboard.errorMessage.caseDeprioritization=Failed to deprioritize case \"%s\"."}) + private void deprioritizeCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deprioritizeCaseButtonActionPerformed + if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + String caseName = (pendingTableModel.getValueAt(pendingTable.getSelectedRow(), JobsTableModelColumns.CASE.ordinal())).toString(); + JobsSnapshot jobsSnapshot; + try { + jobsSnapshot = autoIngestMonitor.deprioritizeCase(caseName); + refreshTables(jobsSnapshot); + } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_caseDeprioritization(), caseName); + LOGGER.log(Level.SEVERE, errorMessage, ex); + MessageNotifyUtil.Message.error(errorMessage); + } + setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_deprioritizeCaseButtonActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton clusterMetricsButton; private javax.swing.JScrollPane completedScrollPane; private javax.swing.JTable completedTable; + private javax.swing.JButton deprioritizeCaseButton; + private javax.swing.JButton deprioritizeJobButton; private javax.swing.JButton jButton1; private javax.swing.JLabel lbCompleted; private javax.swing.JLabel lbPending; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 5260a9cd43..0b96b7eb17 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -128,6 +128,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Event.JOB_STATUS_UPDATED.toString(), Event.JOB_COMPLETED.toString(), Event.CASE_PRIORITIZED.toString(), + Event.CASE_DEPRIORITIZED.toString(), Event.JOB_STARTED.toString()})); private static final long JOB_STATUS_EVENT_INTERVAL_SECONDS = 10; private static final String JOB_STATUS_PUBLISHING_THREAD_NAME = "AIM-job-status-event-publisher-%d"; @@ -370,6 +371,20 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen notifyObservers(Event.CASE_PRIORITIZED); } + /** + * Processes a job/case deprioritization event from another node by + * triggering an immediate input directory scan. + * + * @param event A deprioritization event from another auto ingest node. + */ + private void handleRemoteCaseDeprioritizationEvent(AutoIngestCaseDeprioritizedEvent event) { + String hostName = event.getNodeName(); + hostNamesToLastMsgTime.put(hostName, Instant.now()); + scanInputDirsNow(); + setChanged(); + notifyObservers(Event.CASE_DEPRIORITIZED); + } + /** * Processes a case deletin event from another node by triggering an * immediate input directory scan. @@ -530,7 +545,49 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen } /** + * Removes the priority (set to zero) of all pending ingest jobs for a + * specified case. + * + * @param caseName The name of the case to be deprioritized. + * + * @throws AutoIngestManagerException If there is an error removing the + * priority of the jobs for the case. */ + void deprioritizeCase(final String caseName) throws AutoIngestManagerException { + if (state != State.RUNNING) { + return; + } + + List prioritizedJobs = new ArrayList<>(); + synchronized (jobsLock) { + for (AutoIngestJob job : pendingJobs) { + if (job.getManifest().getCaseName().equals(caseName)) { + prioritizedJobs.add(job); + } + } + if (!prioritizedJobs.isEmpty()) { + for (AutoIngestJob job : prioritizedJobs) { + int oldPriority = job.getPriority(); + job.setPriority(0); + try { + this.updateCoordinationServiceManifestNode(job); + } catch (CoordinationServiceException | InterruptedException ex) { + job.setPriority(oldPriority); + throw new AutoIngestManagerException("Error updating case priority", ex); + } + } + } + + Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); + } + + if (!prioritizedJobs.isEmpty()) { + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } + } + /** * Bumps the priority of all pending ingest jobs for a specified case. * @@ -580,6 +637,57 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen } } + /** + * Removes the priority (set to zero) of an auto ingest job. + * + * @param manifestPath The manifest file path for the job to be + * deprioritized. + * + * @throws AutoIngestManagerException If there is an error removing the + * priority of the job. + */ + void deprioritizeJob(Path manifestPath) throws AutoIngestManagerException { + if (state != State.RUNNING) { + return; + } + + AutoIngestJob prioritizedJob = null; + synchronized (jobsLock) { + /* + * Find the job in the pending jobs list. + */ + for (AutoIngestJob job : pendingJobs) { + if (job.getManifest().getFilePath().equals(manifestPath)) { + prioritizedJob = job; + } + } + + /* + * Remove the priority and update the coordination service manifest + * node data for the job. + */ + if (null != prioritizedJob) { + int oldPriority = prioritizedJob.getPriority(); + prioritizedJob.setPriority(0); + try { + this.updateCoordinationServiceManifestNode(prioritizedJob); + } catch (CoordinationServiceException | InterruptedException ex) { + prioritizedJob.setPriority(oldPriority); + throw new AutoIngestManagerException("Error updating job priority", ex); + } + } + + Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); + } + + if (null != prioritizedJob) { + final String caseName = prioritizedJob.getManifest().getCaseName(); + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } + } + /** * Bumps the priority of an auto ingest job. * @@ -2910,6 +3018,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen JOB_STATUS_UPDATED, JOB_COMPLETED, CASE_PRIORITIZED, + CASE_DEPRIORITIZED, CASE_DELETED, PAUSED_BY_REQUEST, PAUSED_FOR_SYSTEM_ERROR, diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index e46a5e43c0..a4ba32a34c 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -55,6 +55,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen AutoIngestManager.Event.JOB_STATUS_UPDATED.toString(), AutoIngestManager.Event.JOB_COMPLETED.toString(), AutoIngestManager.Event.CASE_PRIORITIZED.toString(), + AutoIngestManager.Event.CASE_DEPRIORITIZED.toString(), AutoIngestManager.Event.JOB_STARTED.toString()})); private final AutopsyEventPublisher eventPublisher; private CoordinationService coordinationService; @@ -271,15 +272,59 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen LOGGER.log(Level.SEVERE, String.format("Failed to create a job for '%s'", node), ex); } } - + return newJobsSnapshot; - + } catch (CoordinationServiceException ex) { LOGGER.log(Level.SEVERE, "Failed to get node list from coordination service", ex); return new JobsSnapshot(); } } + /** + * Removes the priority (set to zero) of all pending ingest jobs for a + * specified case. + * + * @param caseName The name of the case to be deprioritized. + * + * @throws AutoIngestMonitorException If there is an error removing the + * priority of the jobs for the case. + * + * @return The latest jobs snapshot. + */ + JobsSnapshot deprioritizeCase(final String caseName) throws AutoIngestMonitorException { + List prioritizedJobs = new ArrayList<>(); + + synchronized (jobsLock) { + for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { + if (pendingJob.getManifest().getCaseName().equals(caseName)) { + prioritizedJobs.add(pendingJob); + } + } + if (!prioritizedJobs.isEmpty()) { + for (AutoIngestJob job : prioritizedJobs) { + String manifestNodePath = job.getManifest().getFilePath().toString(); + try { + AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); + nodeData.setPriority(0); + coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); + } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { + throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); + } + job.setPriority(0); + } + + /* + * Publish a deprioritization event. + */ + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } + return jobsSnapshot; + } + } + /** * Bumps the priority of all pending ingest jobs for a specified case. * @@ -287,7 +332,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * * @throws AutoIngestMonitorException If there is an error bumping the * priority of the jobs for the case. - * + * * @return The latest jobs snapshot. */ JobsSnapshot prioritizeCase(final String caseName) throws AutoIngestMonitorException { @@ -327,14 +372,65 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } } + /** + * Removes the priority (set to zero) of an auto ingest job. + * + * @param job The job to be deprioritized. + * + * @throws AutoIngestMonitorException If there is an error removing the + * priority of the job. + * + * @return The latest jobs snapshot. + */ + JobsSnapshot deprioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { + synchronized (jobsLock) { + AutoIngestJob prioritizedJob = null; + /* + * Make sure the job is still in the pending jobs queue. + */ + for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { + if (pendingJob.equals(job)) { + prioritizedJob = job; + break; + } + } + + /* + * If the job was still in the pending jobs queue, bump its + * priority. + */ + if (null != prioritizedJob) { + String manifestNodePath = job.getManifest().getFilePath().toString(); + try { + AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); + nodeData.setPriority(0); + coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); + } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { + throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); + } + prioritizedJob.setPriority(0); + + /* + * Publish a deprioritization event. + */ + final String caseName = job.getManifest().getCaseName(); + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + + } + return jobsSnapshot; + } + } + /** * Bumps the priority of an auto ingest job. * * @param job The job to be prioritized. - * + * * @throws AutoIngestMonitorException If there is an error bumping the * priority of the job. - * + * * @return The latest jobs snapshot. */ JobsSnapshot prioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { @@ -525,7 +621,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } } - + /** * Exception type thrown when there is an error completing an auto ingest * monitor operation. @@ -556,4 +652,4 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } } -} \ No newline at end of file +} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index 656ccafb3d..633d069cc8 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -227,7 +227,7 @@ AutoIngestDashboard.prioritizeJobButton.text=Prioritize &Job AutoIngestDashboard.prioritizeCaseButton.toolTipText=Move all images associated with a case to top of Pending queue. AutoIngestDashboard.prioritizeCaseButton.text=Prioritize &Case AutoIngestMetricsDialog.reportTextArea.text= -AutoIngestDashboard.clusterMetricsButton.text=Auto Ingest Metrics +AutoIngestDashboard.clusterMetricsButton.text=Auto Ingest &Metrics AutoIngestMetricsDialog.metricsButton.text=Generate Metrics Report AutoIngestMetricsDialog.closeButton.text=Close AutoIngestMetricsDialog.datePicker.toolTipText=Choose a date @@ -236,3 +236,36 @@ ArchiveFilePanel.browseButton.text=Browse ArchiveFilePanel.pathTextField.text= ArchiveFilePanel.errorLabel.text=Error Label AutoIngestMetricsDialog.startingDataLabel.text=Starting Date: +AutoIngestDashboard.deprioritizeJobButton.toolTipText=Move the selected job to the top of the Pending queue. +AutoIngestDashboard.deprioritizeJobButton.text=Deprioritize J&ob +AutoIngestDashboard.deprioritizeCaseButton.text=Deprioritize C&ase +AutoIngestDashboard.deprioritizeCaseButton.toolTipText=Move all images associated with a case to top of Pending queue. +AutoIngestControlPanel.bnDeprioritizeCase.text=Deprioritize Case +AutoIngestControlPanel.bnDeprioritizeJob.text=Deprioritize Job +AutoIngestControlPanel.bnPrioritizeCase.text=Prioritize Case +AutoIngestControlPanel.bnPrioritizeJob.text=Prioritize Job +AutoIngestControlPanel.bnShowProgress.text=Ingest Progress +AutoIngestControlPanel.bnCancelJob.text=&Cancel Job +AutoIngestControlPanel.bnCancelModule.text=Cancel &Module +AutoIngestControlPanel.bnReprocessJob.text=Reprocess Job +AutoIngestControlPanel.bnDeleteCase.text=&Delete Case +AutoIngestControlPanel.bnShowCaseLog.text=Show Case &Log +AutoIngestControlPanel.bnPause.text=Pause +AutoIngestControlPanel.bnRefresh.text=&Refresh +AutoIngestControlPanel.bnOptions.text=&Options +AutoIngestControlPanel.bnOpenLogDir.text=Open System Logs Folder +AutoIngestControlPanel.bnClusterMetrics.text=Auto Ingest Metrics +AutoIngestControlPanel.bnExit.text=&Exit +AutoIngestControlPanel.lbStatus.text=Status: +AutoIngestControlPanel.lbServicesStatus.text=Services Status: +AutoIngestControlPanel.lbPending.text=Pending Jobs +AutoIngestControlPanel.lbRunning.text=Running Jobs +AutoIngestControlPanel.lbCompleted.text=Completed Jobs +AutoIngestControlPanel.tbStatusMessage.text= +AutoIngestControlPanel.tbServicesStatusMessage.text= +AutoIngestControlPanel.bnDeprioritizeJob.toolTipText= +AutoIngestControlPanel.bnDeprioritizeCase.toolTipText= +AutoIngestControlPanel.bnPrioritizeJob.toolTipText=Move this folder to the top of the Pending queue. +AutoIngestControlPanel.bnPrioritizeCase.toolTipText=Move all images associated with a case to top of Pending queue. +AutoIngestControlPanel.bnPrioritizeJob.actionCommand=Prioritize Job +AutoIngestControlPanel.bnDeprioritizeJob.actionCommand=Deprioritize Job From 53acf9d923cde90ce107d08e615894d56425b402 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 21 Feb 2018 15:59:51 -0500 Subject: [PATCH 02/23] Minor tweaks. --- .../experimental/autoingest/AutoIngestControlPanel.java | 7 +------ .../experimental/autoingest/AutoIngestManager.java | 5 +++-- .../experimental/autoingest/AutoIngestMonitor.java | 9 +++++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index fc82ddc1dd..e21b928b99 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -247,12 +247,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { completedTableModel = new AutoIngestTableModel(JobsTableModelColumns.headers, 0); - try { - initComponents(); // Generated code. - } catch (Throwable ex) { //DLG: - System.out.println(); - return; - } + initComponents(); // Generated code. setServicesStatusMessage(); initPendingJobsTable(); initRunningJobsTable(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 0b96b7eb17..2a809e9ad0 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -133,6 +133,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen private static final long JOB_STATUS_EVENT_INTERVAL_SECONDS = 10; private static final String JOB_STATUS_PUBLISHING_THREAD_NAME = "AIM-job-status-event-publisher-%d"; private static final long MAX_MISSED_JOB_STATUS_UPDATES = 10; + private static final int DEFAULT_PRIORITY = 0; private static final java.util.logging.Logger SYS_LOGGER = AutoIngestSystemLogger.getLogger(); private static AutoIngestManager instance; private final AutopsyEventPublisher eventPublisher; @@ -568,7 +569,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen if (!prioritizedJobs.isEmpty()) { for (AutoIngestJob job : prioritizedJobs) { int oldPriority = job.getPriority(); - job.setPriority(0); + job.setPriority(DEFAULT_PRIORITY); try { this.updateCoordinationServiceManifestNode(job); } catch (CoordinationServiceException | InterruptedException ex) { @@ -668,7 +669,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen */ if (null != prioritizedJob) { int oldPriority = prioritizedJob.getPriority(); - prioritizedJob.setPriority(0); + prioritizedJob.setPriority(DEFAULT_PRIORITY); try { this.updateCoordinationServiceManifestNode(prioritizedJob); } catch (CoordinationServiceException | InterruptedException ex) { diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index a4ba32a34c..24b4db1964 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -46,6 +46,7 @@ import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJob.ProcessingSta final class AutoIngestMonitor extends Observable implements PropertyChangeListener { private static final Logger LOGGER = Logger.getLogger(AutoIngestMonitor.class.getName()); + private static final int DEFAULT_PRIORITY = 0; private static final int NUM_COORD_SVC_QUERY_THREADS = 1; private static final String COORD_SVC_QUERY_THREAD_NAME = "AIM-coord-svc-query-thread-%d"; //NON-NLS private static final int CORRD_SVC_QUERY_INERVAL_MINS = 5; @@ -306,12 +307,12 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen String manifestNodePath = job.getManifest().getFilePath().toString(); try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); - nodeData.setPriority(0); + nodeData.setPriority(DEFAULT_PRIORITY); coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); } - job.setPriority(0); + job.setPriority(DEFAULT_PRIORITY); } /* @@ -403,12 +404,12 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen String manifestNodePath = job.getManifest().getFilePath().toString(); try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); - nodeData.setPriority(0); + nodeData.setPriority(DEFAULT_PRIORITY); coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); } - prioritizedJob.setPriority(0); + prioritizedJob.setPriority(DEFAULT_PRIORITY); /* * Publish a deprioritization event. From 5760349475499128da25d1fb4efbdb51e09e070a Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 22 Feb 2018 10:33:34 -0500 Subject: [PATCH 03/23] Minor fix. --- .../autoingest/AutoIngestCaseDeprioritizedEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java index 0076f0cc03..4c95b6b811 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java @@ -25,7 +25,7 @@ import org.sleuthkit.autopsy.events.AutopsyEvent; * Event published when an automated ingest manager deprioritizes all or part of * a case. */ -public final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Serializable { +final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Serializable { private static final long serialVersionUID = 1L; private final String caseName; From bdd1ccd15eb2c58cd27da4878f568124333ea015 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 22 Feb 2018 10:35:31 -0500 Subject: [PATCH 04/23] Minor fix. --- .../autoingest/AutoIngestCaseDeprioritizedEvent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java index 4c95b6b811..b362c1c733 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java @@ -38,7 +38,7 @@ final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Ser * @param caseName The name of the case. * @param nodeName The host name of the node that deprioritized the case. */ - public AutoIngestCaseDeprioritizedEvent(String nodeName, String caseName) { + AutoIngestCaseDeprioritizedEvent(String nodeName, String caseName) { super(AutoIngestManager.Event.CASE_DEPRIORITIZED.toString(), null, null); this.caseName = caseName; this.nodeName = nodeName; @@ -49,7 +49,7 @@ final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Ser * * @return The case name. */ - public String getCaseName() { + String getCaseName() { return caseName; } @@ -58,7 +58,7 @@ final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Ser * * @return The host name of the node. */ - public String getNodeName() { + String getNodeName() { return nodeName; } From 13048e20964999fecbe71432e63abb8608559bca Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 22 Feb 2018 12:19:35 -0500 Subject: [PATCH 05/23] 3565 add MD5 Hash column to File Tags and Interesting Files --- .../autopsy/datamodel/BlackboardArtifactNode.java | 15 +++++++++++---- .../autopsy/datamodel/ContentTagNode.java | 10 +++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 33dd6a2cc0..056d87bfbd 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -178,11 +178,12 @@ public class BlackboardArtifactNode extends AbstractContentNode(Bundle.BlackboardArtifactNode_createSheet_artifactMD5_name(), + Bundle.BlackboardArtifactNode_createSheet_artifactMD5_displayName(), + "", + file != null ? file.getMd5Hash() : "")); } } else { String dataSourceStr = ""; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java index 2108e982d7..9ce002efc0 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java @@ -26,6 +26,7 @@ import javax.swing.Action; import org.openide.nodes.Children; import org.openide.nodes.Sheet; import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; import org.openide.util.lookup.Lookups; import org.sleuthkit.autopsy.actions.DeleteContentTagAction; import org.sleuthkit.autopsy.coreutils.Logger; @@ -56,6 +57,10 @@ class ContentTagNode extends DisplayableItemNode { this.tag = tag; } + @Messages({ + "ContentTagNode.createSheet.artifactMD5.displayName=MD5 Hash", + "ContentTagNode.createSheet.artifactMD5.name=MD5 Hash" + }) @Override protected Sheet createSheet() { Content content = tag.getContent(); @@ -106,7 +111,10 @@ class ContentTagNode extends DisplayableItemNode { NbBundle.getMessage(this.getClass(), "ContentTagNode.createSheet.fileSize.displayName"), "", content.getSize())); - + properties.put(new NodeProperty<>(Bundle.ContentTagNode_createSheet_artifactMD5_name(), + Bundle.ContentTagNode_createSheet_artifactMD5_displayName(), + "", + file != null ? file.getMd5Hash() : "")); return propertySheet; } From 00261361d556330c65a89592670cdda1b9d87fee Mon Sep 17 00:00:00 2001 From: Raman Date: Thu, 22 Feb 2018 15:12:23 -0500 Subject: [PATCH 06/23] 3544: Integrate Media content viewer into Application content viewer - Moved FileTypeViewer to corecomponentinterfaces --- Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java | 2 ++ .../org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java | 2 ++ .../org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java | 1 + .../FileTypeViewer.java | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-) rename Core/src/org/sleuthkit/autopsy/{contentviewers => corecomponentinterfaces}/FileTypeViewer.java (93%) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java index db13e523e5..81a6dfe76a 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.contentviewers; + import com.google.common.base.Strings; import java.awt.Component; import java.util.HashMap; @@ -30,6 +31,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; /** * Generic Application content viewer diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java b/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java index 8aea7540e1..479eefab99 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java @@ -5,10 +5,12 @@ */ package org.sleuthkit.autopsy.contentviewers; + import java.awt.Component; import java.util.Arrays; import java.util.List; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; public class JPEGViewerDummy extends javax.swing.JPanel implements FileTypeViewer { diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java index 627d30e87c..b1ed014ee9 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java @@ -45,6 +45,7 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; public class SQLiteViewer extends javax.swing.JPanel implements FileTypeViewer { diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/FileTypeViewer.java b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/FileTypeViewer.java similarity index 93% rename from Core/src/org/sleuthkit/autopsy/contentviewers/FileTypeViewer.java rename to Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/FileTypeViewer.java index f4a677c4f4..b3ae7210a2 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/FileTypeViewer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/FileTypeViewer.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.contentviewers; +package org.sleuthkit.autopsy.corecomponentinterfaces; import java.awt.Component; import java.util.List; @@ -26,7 +26,7 @@ import org.sleuthkit.datamodel.AbstractFile; * Defines an interface for application specific content viewer * */ -interface FileTypeViewer { +public interface FileTypeViewer { /** * Returns list of MIME types supported by this viewer From a9884f3eff5b2efafd53414c0fabb9c603be056d Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 22 Feb 2018 16:55:08 -0500 Subject: [PATCH 07/23] Initial changes. --- .../autopsy/casemodule/Bundle.properties | 1 + .../casemodule/LocalDiskDSProcessor.java | 36 +++++++++++-- .../autopsy/casemodule/LocalDiskPanel.form | 35 +++++++++++-- .../autopsy/casemodule/LocalDiskPanel.java | 51 +++++++++++++++++-- 4 files changed, 112 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index ea7e5f9b27..75a976efa4 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -232,3 +232,4 @@ MultiUserCasesPanel.searchLabel.text=Select any case and start typing to search MultiUserCasesPanel.cancelButton.text=Cancel ImageFilePanel.pathErrorLabel.text=Error Label ImageFilePanel.sectorSizeLabel.text=Sector size: +LocalDiskPanel.sectorSizeLabel.text=Sector Size: diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java index 169c3d0f00..1df465e02a 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java @@ -54,6 +54,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData */ private String deviceId; private String drivePath; + private int sectorSize; private String timeZone; private ImageWriterSettings imageWriterSettings; private boolean ignoreFatOrphanFiles; @@ -137,6 +138,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData if (!setDataSourceOptionsCalled) { deviceId = UUID.randomUUID().toString(); drivePath = configPanel.getContentPaths(); + sectorSize = configPanel.getSectorSize(); timeZone = configPanel.getTimeZone(); ignoreFatOrphanFiles = configPanel.getNoFatOrphans(); if (configPanel.getImageWriterEnabled()) { @@ -145,7 +147,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData imageWriterSettings = null; } } - addDiskTask = new AddImageTask(deviceId, drivePath, 0, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback); + addDiskTask = new AddImageTask(deviceId, drivePath, sectorSize, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback); new Thread(addDiskTask).start(); } @@ -171,7 +173,33 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData * @param callback Callback to call when processing is done. */ public void run(String deviceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) { - addDiskTask = new AddImageTask(deviceId, drivePath, 0, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback); + run(deviceId, drivePath, 0, timeZone, ignoreFatOrphanFiles, progressMonitor, callback); + } + + /** + * Adds a data source to the case database using a background task in a + * separate thread and the given settings instead of those provided by the + * selection and configuration panel. Returns as soon as the background task + * is started and uses the callback object to signal task completion and + * return results. + * + * @param deviceId An ASCII-printable identifier for the device + * associated with the data source that is + * intended to be unique across multiple cases + * (e.g., a UUID). + * @param drivePath Path to the local drive. + * @param sectorSize The sector size (use '0' for autodetect). + * @param timeZone The time zone to use when processing dates + * and times for the image, obtained from + * java.util.TimeZone.getID. + * @param ignoreFatOrphanFiles Whether to parse orphans if the image has a + * FAT filesystem. + * @param progressMonitor Progress monitor for reporting progress + * during processing. + * @param callback Callback to call when processing is done. + */ + private void run(String deviceId, String drivePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) { + addDiskTask = new AddImageTask(deviceId, drivePath, sectorSize, timeZone, ignoreFatOrphanFiles, imageWriterSettings, progressMonitor, callback); new Thread(addDiskTask).start(); } @@ -227,10 +255,11 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData public void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack) throws AutoIngestDataSourceProcessorException { this.deviceId = deviceId; this.drivePath = dataSourcePath.toString(); + this.sectorSize = 0; this.timeZone = Calendar.getInstance().getTimeZone().getID(); this.ignoreFatOrphanFiles = false; setDataSourceOptionsCalled = true; - run(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, callBack); + run(deviceId, drivePath, sectorSize, timeZone, ignoreFatOrphanFiles, progressMonitor, callBack); } /** @@ -250,6 +279,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor, AutoIngestData public void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles) { this.deviceId = UUID.randomUUID().toString(); this.drivePath = drivePath; + this.sectorSize = 0; this.timeZone = Calendar.getInstance().getTimeZone().getID(); this.ignoreFatOrphanFiles = ignoreFatOrphanFiles; setDataSourceOptionsCalled = true; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form index 09239fe001..2daa15c1c6 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form @@ -46,9 +46,9 @@ - + @@ -64,7 +64,7 @@ - + @@ -79,6 +79,13 @@ + + + + + + + @@ -113,7 +120,12 @@ - + + + + + + @@ -286,5 +298,22 @@ + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index 15abfcf441..8f25b57b55 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -51,6 +51,7 @@ import org.sleuthkit.autopsy.imagewriter.ImageWriterSettings; final class LocalDiskPanel extends JPanel { private static final Logger logger = Logger.getLogger(LocalDiskPanel.class.getName()); + private static final String[] SECTOR_SIZE_CHOICES = {"Auto Detect", "512", "1024", "2048", "4096"}; private static LocalDiskPanel instance; private static final long serialVersionUID = 1L; private List disks; @@ -68,6 +69,7 @@ final class LocalDiskPanel extends JPanel { initComponents(); customInit(); createTimeZoneList(); + createSectorSizeList(); refreshTable(); diskTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override @@ -148,6 +150,8 @@ final class LocalDiskPanel extends JPanel { imageWriterErrorLabel = new javax.swing.JLabel(); changeDatabasePathCheckbox = new javax.swing.JCheckBox(); refreshTablebutton = new javax.swing.JButton(); + sectorSizeLabel = new javax.swing.JLabel(); + sectorSizeComboBox = new javax.swing.JComboBox<>(); setMinimumSize(new java.awt.Dimension(0, 420)); setPreferredSize(new java.awt.Dimension(485, 410)); @@ -212,6 +216,8 @@ final class LocalDiskPanel extends JPanel { } }); + org.openide.awt.Mnemonics.setLocalizedText(sectorSizeLabel, org.openide.util.NbBundle.getMessage(LocalDiskPanel.class, "LocalDiskPanel.sectorSizeLabel.text")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -236,16 +242,16 @@ final class LocalDiskPanel extends JPanel { .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)) + .addComponent(changeDatabasePathCheckbox) + .addComponent(imageWriterErrorLabel)) .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) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 475, 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)) @@ -255,6 +261,12 @@ final class LocalDiskPanel extends JPanel { .addComponent(errorLabel)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(sectorSizeLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -286,7 +298,11 @@ final class LocalDiskPanel extends JPanel { .addComponent(imageWriterErrorLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(errorLabel) - .addContainerGap(58, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(sectorSizeLabel) + .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(27, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -335,6 +351,8 @@ final class LocalDiskPanel extends JPanel { private javax.swing.JCheckBox noFatOrphansCheckbox; private javax.swing.JTextField pathTextField; private javax.swing.JButton refreshTablebutton; + private javax.swing.JComboBox sectorSizeComboBox; + private javax.swing.JLabel sectorSizeLabel; private javax.swing.JComboBox timeZoneComboBox; private javax.swing.JLabel timeZoneLabel; // End of variables declaration//GEN-END:variables @@ -364,6 +382,19 @@ final class LocalDiskPanel extends JPanel { return ""; } } + + /** + * //DLG: + */ + int getSectorSize() { + int sectorSizeSelectionIndex = sectorSizeComboBox.getSelectedIndex(); + + if (sectorSizeSelectionIndex == 0) { + return 0; + } + + return Integer.valueOf((String) sectorSizeComboBox.getSelectedItem()); + } String getTimeZone() { String tz = timeZoneComboBox.getSelectedItem().toString(); @@ -499,6 +530,16 @@ final class LocalDiskPanel extends JPanel { timeZoneComboBox.setSelectedItem(formatted); } + + /** + * //DLG: + */ + private void createSectorSizeList() { + for (String choice : SECTOR_SIZE_CHOICES) { + sectorSizeComboBox.addItem(choice); + } + sectorSizeComboBox.setSelectedIndex(0); + } /** * Table model for displaing information from LocalDisk Objects in a table. From 5be3ae9a8c7da36d5057a0a084a0b92116591ae9 Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 23 Feb 2018 07:26:52 -0500 Subject: [PATCH 08/23] 3544: Integrate Media content viewer into Application content viewer - Moved DataContentViewerMedia from CoreComponents to ContentViewers --- .../autopsy/contentviewers/Bundle.properties | 30 +++++++++ .../contentviewers/Bundle_ja.properties | 65 ++++++++++++++----- .../DataContentViewerMedia.form | 0 .../DataContentViewerMedia.java | 2 +- .../FXVideoPanel.form | 0 .../FXVideoPanel.java | 5 +- .../GstVideoPanel.form | 0 .../GstVideoPanel.java | 5 +- .../MediaViewImagePanel.css | 0 .../MediaViewImagePanel.form | 0 .../MediaViewImagePanel.java | 4 +- .../MediaViewVideoPanel.java | 3 +- .../autopsy/corecomponents/Bundle.properties | 32 --------- .../corecomponents/Bundle_ja.properties | 28 -------- 14 files changed, 91 insertions(+), 83 deletions(-) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/DataContentViewerMedia.form (100%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/DataContentViewerMedia.java (99%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/FXVideoPanel.form (100%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/FXVideoPanel.java (99%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/GstVideoPanel.form (100%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/GstVideoPanel.java (99%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/MediaViewImagePanel.css (100%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/MediaViewImagePanel.form (100%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/MediaViewImagePanel.java (98%) rename Core/src/org/sleuthkit/autopsy/{corecomponents => contentviewers}/MediaViewVideoPanel.java (98%) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties index 68e938a107..9333e4cf01 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties @@ -1,3 +1,33 @@ +DataContentViewerMedia.AccessibleContext.accessibleDescription= +DataContentViewerMedia.title=Media +DataContentViewerMedia.toolTip=Displays supported multimedia files (images, videos, audio) +FXVideoPanel.pauseButton.infoLabel.playbackErr=Unable to play video. +FXVideoPanel.progress.bufferingCancelled=media buffering was canceled +FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted +FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk +FXVideoPanel.mediaPane.infoLabel=Playback of deleted videos is not supported, use an external player. +FXVideoPanel.progress.bufferingFile=Buffering {0} +FXVideoPanel.progressLabel.buffering=Buffering... +FXVideoPanel.media.unsupportedFormat=Unsupported Format. +GstVideoPanel.cannotProcFile.err=The media player cannot process this file. +GstVideoPanel.initGst.gstException.msg=Error initializing gstreamer for audio/video viewing and frame extraction capabilities. Video and audio viewing will be disabled. +GstVideoPanel.initGst.otherException.msg=Error initializing gstreamer for audio/video viewing frame extraction capabilities. Video and audio viewing will be disabled. +GstVideoPanel.setupVideo.infoLabel.text=Playback of deleted videos is not supported, use an external player. +GstVideoPanel.exception.problemFile.msg=Cannot capture frames from this file ({0}). +GstVideoPanel.exception.problemPlay.msg=Problem with video file; problem when attempting to play while obtaining duration. +GstVideoPanel.exception.problemPause.msg=Problem with video file; problem when attempting to pause while obtaining duration. +GstVideoPanel.exception.problemPauseCaptFrame.msg=Problem with video file; problem when attempting to pause while capturing a frame. +GstVideoPanel.exception.problemPlayCaptFrame.msg=Problem with video file; problem when attempting to play while capturing a frame. +GstVideoPanel.exception.problemStopCaptFrame.msg=Problem with video file; problem when attempting to stop while capturing a frame. +GstVideoPanel.progress.buffering=Buffering... +GstVideoPanel.progressLabel.bufferingErr=Error buffering file +GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0} +GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0} +MediaViewVideoPanel.pauseButton.text=\u25ba +MediaViewVideoPanel.progressLabel.text=00:00 +MediaViewVideoPanel.infoLabel.text=info +MediaViewImagePanel.imgFileTooLarge.msg=Could not load image file (too large)\: {0} + Metadata.tableRowTitle.name=Name Metadata.tableRowTitle.size=Size Metadata.tableRowTitle.fileNameAlloc=File Name Allocation diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties index d2bbdc2081..356b342793 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties @@ -1,19 +1,48 @@ -Metadata.tableRowTitle.name=\u540D\u524D -Metadata.tableRowTitle.size=\u30B5\u30A4\u30BA -Metadata.tableRowTitle.fileNameAlloc=\u30D5\u30A1\u30A4\u30EB\u540D\u30A2\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3 -Metadata.tableRowTitle.metadataAlloc=\u30E1\u30BF\u30C7\u30FC\u30BF\u30A2\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3 -Metadata.tableRowTitle.modified=\u4FEE\u6B63\u6E08\u307F -Metadata.tableRowTitle.accessed=\u30A2\u30AF\u30BB\u30B9\u6E08\u307F -Metadata.tableRowTitle.created=\u4F5C\u6210\u6E08\u307F -Metadata.tableRowTitle.changed=\u5909\u66F4\u6E08\u307F -Metadata.tableRowContent.md5notCalc=\u672A\u8A08\u7B97 +DataContentViewerMedia.title=\u30e1\u30c7\u30a3\u30a2 +DataContentViewerMedia.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002 +FXVideoPanel.pauseButton.infoLabel.playbackErr=\u30d3\u30c7\u30aa\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 +FXVideoPanel.progress.bufferingCancelled=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f +FXVideoPanel.progress.bufferingInterrupted=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3057\u305f +FXVideoPanel.progress.errorWritingVideoToDisk=\u30d3\u30c7\u30aa\u3092\u30c7\u30a3\u30b9\u30af\u3078\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f +FXVideoPanel.mediaPane.infoLabel=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 +FXVideoPanel.progress.bufferingFile={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0 +FXVideoPanel.progressLabel.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 +FXVideoPanel.media.unsupportedFormat=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 +GstVideoPanel.cannotProcFile.err=\u30e1\u30c7\u30a4\u30a2\u30d7\u30ec\u30fc\u30e4\u30fc\u3067\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002 +GstVideoPanel.initGst.gstException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 +GstVideoPanel.initGst.otherException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 +GstVideoPanel.setupVideo.infoLabel.text=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 +GstVideoPanel.exception.problemFile.msg=\u30d5\u30a1\u30a4\u30eb({0})\u304b\u3089\u30d5\u30ec\u30fc\u30e0\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 +GstVideoPanel.exception.problemPlay.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u518d\u751f\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemPause.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u518d\u751f\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemStopCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u505c\u6b62\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 +GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc +GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} +GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d +MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0} +MediaViewVideoPanel.pauseButton.text=\u25ba +MediaViewVideoPanel.progressLabel.text=00\:00 +MediaViewVideoPanel.infoLabel.text=\u60c5\u5831 + +Metadata.tableRowTitle.name=\u540d\u524d +Metadata.tableRowTitle.size=\u30b5\u30a4\u30ba +Metadata.tableRowTitle.fileNameAlloc=\u30d5\u30a1\u30a4\u30eb\u540d\u30a2\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 +Metadata.tableRowTitle.metadataAlloc=\u30e1\u30bf\u30c7\u30fc\u30bf\u30a2\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 +Metadata.tableRowTitle.modified=\u4fee\u6b63\u6e08\u307f +Metadata.tableRowTitle.accessed=\u30a2\u30af\u30bb\u30b9\u6e08\u307f +Metadata.tableRowTitle.created=\u4f5c\u6210\u6e08\u307f +Metadata.tableRowTitle.changed=\u5909\u66f4\u6e08\u307f +Metadata.tableRowContent.md5notCalc=\u672a\u8a08\u7b97 Metadata.tableRowTitle.md5=MD5 -Metadata.tableRowTitle.hashLookupResults=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u7D50\u679C -Metadata.tableRowTitle.internalid=\u5185\u90E8ID -Metadata.tableRowTitle.localPath=\u30ED\u30FC\u30AB\u30EB\u30D1\u30B9 -Metadata.title=\u30D5\u30A1\u30A4\u30EB\u30E1\u30BF\u30C7\u30FC\u30BF -Metadata.toolTip=\u30D5\u30A1\u30A4\u30EB\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u8868\u793A\u3057\u307E\u3059\u3002 -Metadata.tableRowTitle.type=\u30BF\u30A4\u30D7 -Metadata.nodeText.exceptionNotice.text=\u30D5\u30A1\u30A4\u30EB\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF1A -Metadata.nodeText.text=Sleuth Kit istat\u30C4\u30FC\u30EB\u304B\u3089\uFF1A -Metadata.nodeText.nonFilePassedIn=\u5165\u529B\u3055\u308C\u305F\u3082\u306E\u306F\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093 \ No newline at end of file +Metadata.tableRowTitle.hashLookupResults=\u30cf\u30c3\u30b7\u30e5\u30eb\u30c3\u30af\u30a2\u30c3\u30d7\u7d50\u679c +Metadata.tableRowTitle.internalid=\u5185\u90e8ID +Metadata.tableRowTitle.localPath=\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9 +Metadata.title=\u30d5\u30a1\u30a4\u30eb\u30e1\u30bf\u30c7\u30fc\u30bf +Metadata.toolTip=\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u307e\u3059\u3002 +Metadata.tableRowTitle.type=\u30bf\u30a4\u30d7 +Metadata.nodeText.exceptionNotice.text=\u30d5\u30a1\u30a4\u30eb\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a +Metadata.nodeText.text=Sleuth Kit istat\u30c4\u30fc\u30eb\u304b\u3089\uff1a +Metadata.nodeText.nonFilePassedIn=\u5165\u529b\u3055\u308c\u305f\u3082\u306e\u306f\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093 \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.form b/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java b/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.java similarity index 99% rename from Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.java index b8e03d51d6..d2137ca48d 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; import java.awt.CardLayout; import java.awt.Component; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.java similarity index 99% rename from Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.java index f12839bd20..d17fdd1edf 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.java @@ -16,8 +16,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; +import org.sleuthkit.autopsy.contentviewers.MediaViewVideoPanel; import com.google.common.io.Files; import java.awt.Dimension; import java.io.File; @@ -60,6 +61,8 @@ import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.core.Installer; +import org.sleuthkit.autopsy.corecomponents.FrameCapture; +import org.sleuthkit.autopsy.corecomponents.VideoFrame; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.VideoUtils; import org.sleuthkit.autopsy.datamodel.ContentUtils; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.java similarity index 99% rename from Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.java index f338a77308..477b29fcf5 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.java @@ -16,8 +16,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; +import org.sleuthkit.autopsy.contentviewers.MediaViewVideoPanel; import com.google.common.io.Files; import java.awt.Dimension; import java.awt.Image; @@ -55,6 +56,8 @@ import org.netbeans.api.progress.ProgressHandle; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; +import org.sleuthkit.autopsy.corecomponents.FrameCapture; +import org.sleuthkit.autopsy.corecomponents.VideoFrame; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.VideoUtils; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.css b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.css similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.css rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.css diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java similarity index 98% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java index f57bc27b9c..828dbeb169 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java @@ -16,8 +16,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; +import org.sleuthkit.autopsy.contentviewers.DataContentViewerMedia; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.event.ActionEvent; @@ -46,6 +47,7 @@ import org.controlsfx.control.MaskerPane; import org.openide.util.NbBundle; import org.python.google.common.collect.Lists; import org.sleuthkit.autopsy.casemodule.Case; +//import org.sleuthkit.autopsy.corecomponents.Bundle; import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.datamodel.FileNode; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java similarity index 98% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewVideoPanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java index 28efdac6ff..478a779c07 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; import java.awt.Dimension; import java.util.Arrays; @@ -26,6 +26,7 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.logging.Level; import javax.swing.JPanel; +import org.sleuthkit.autopsy.corecomponents.FrameCapture; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; import org.sleuthkit.datamodel.AbstractFile; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties index 5f43502f8f..3976f755f0 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties @@ -26,9 +26,7 @@ LBL_Description=
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.6.0/ - FILE_FOR_LOCAL_HELP=file:/// INDEX_FOR_LOCAL_HELP=/docs/index.html LBL_Close=Close @@ -45,7 +43,6 @@ DataContentViewerArtifact.ofLabel.text=of DataContentViewerArtifact.copyMenuItem.text=Copy DataContentViewerArtifact.selectAllMenuItem.text=Select All DataContentViewerArtifact.pageLabel.text=Result: - AdvancedConfigurationDialog.applyButton.text=OK DataContentViewerString.goToPageLabel.text=Go to Page: DataContentViewerString.goToPageTextField.text= @@ -68,10 +65,6 @@ AdvancedConfigurationDialog.cancelButton.text=Cancel DataResultPanel.directoryTablePath.text=directoryPath DataResultPanel.numberMatchLabel.text=0 DataResultPanel.matchLabel.text=Results -MediaViewVideoPanel.pauseButton.text=\u25ba -MediaViewVideoPanel.progressLabel.text=00:00 -DataContentViewerMedia.AccessibleContext.accessibleDescription= -MediaViewVideoPanel.infoLabel.text=info DataContentViewerArtifact.waitText=Retrieving and preparing data, please wait... DataContentViewerArtifact.errorText=Error retrieving result DataContentViewerArtifact.title=Results @@ -81,8 +74,6 @@ DataContentViewerHex.goToPageTextField.err=Invalid page number DataContentViewerHex.setDataView.errorText=(offset {0}-{1} could not be read) DataContentViewerHex.title=Hex DataContentViewerHex.toolTip=Displays the binary contents of a file as hexidecimal, with bytes that are displayable as ASCII characters on the right. -DataContentViewerMedia.title=Media -DataContentViewerMedia.toolTip=Displays supported multimedia files (images, videos, audio) DataContentViewerString.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0} DataContentViewerString.goToPageTextField.err=Invalid page number DataContentViewerString.setDataView.errorText=(offset {0}-{1} could not be read) @@ -97,25 +88,8 @@ DataResultViewerThumbnail.goToPageTextField.msgDlg=Please enter a valid page num DataResultViewerThumbnail.goToPageTextField.err=Invalid page number DataResultViewerThumbnail.genThumbs=Generating Thumbnails... DataResultViewerThumbnail.pageNumbers.curOfTotal={0} of {1} -FXVideoPanel.mediaPane.infoLabel=Playback of deleted videos is not supported, use an external player. -FXVideoPanel.progress.bufferingFile=Buffering {0} -FXVideoPanel.progressLabel.buffering=Buffering... -FXVideoPanel.media.unsupportedFormat=Unsupported Format. GeneralOptionsPanelController.moduleErr=Module Error GeneralOptionsPanelController.moduleErr.msg=A module caused an error listening to GeneralOptionsPanelController updates. See log to determine which module. Some data could be incomplete. -GstVideoPanel.cannotProcFile.err=The media player cannot process this file. -GstVideoPanel.initGst.gstException.msg=Error initializing gstreamer for audio/video viewing and frame extraction capabilities. Video and audio viewing will be disabled. -GstVideoPanel.initGst.otherException.msg=Error initializing gstreamer for audio/video viewing frame extraction capabilities. Video and audio viewing will be disabled. -GstVideoPanel.setupVideo.infoLabel.text=Playback of deleted videos is not supported, use an external player. -GstVideoPanel.exception.problemFile.msg=Cannot capture frames from this file ({0}). -GstVideoPanel.exception.problemPlay.msg=Problem with video file; problem when attempting to play while obtaining duration. -GstVideoPanel.exception.problemPause.msg=Problem with video file; problem when attempting to pause while obtaining duration. -GstVideoPanel.exception.problemPauseCaptFrame.msg=Problem with video file; problem when attempting to pause while capturing a frame. -GstVideoPanel.exception.problemPlayCaptFrame.msg=Problem with video file; problem when attempting to play while capturing a frame. -GstVideoPanel.exception.problemStopCaptFrame.msg=Problem with video file; problem when attempting to stop while capturing a frame. -GstVideoPanel.progress.buffering=Buffering... -GstVideoPanel.progressLabel.bufferingErr=Error buffering file -MediaViewImagePanel.imgFileTooLarge.msg=Could not load image file (too large)\: {0} ProductInformationPanel.verbLoggingEnabled.text=Verbose logging enabled ProductInformationPanel.propertyUnknown.text=unknown ProductInformationPanel.getVMValue.text={0} {1} @@ -124,9 +98,6 @@ DataResultViewerThumbnail.comboBox.smallThumbnails=Small Thumbnails DataResultViewerThumbnail.comboBox.mediumThumbnails=Medium Thumbnails DataResultViewerThumbnail.comboBox.largeThumbnails=Large Thumbnails DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails\: {0} -FXVideoPanel.pauseButton.infoLabel.playbackErr=Unable to play video. -GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0} -GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging AutopsyOptionsPanel.viewsHideKnownCB.text=Views area AutopsyOptionsPanel.dataSourcesHideKnownCB.text=Data Sources area (the directory hierarchy) @@ -139,9 +110,6 @@ AutopsyOptionsPanel.keepCurrentViewerRB.text=Stay on the same file viewer AutopsyOptionsPanel.jLabelSelectFile.text=When selecting a file: AutopsyOptionsPanel.jLabelHideKnownFiles.text=Hide known files (i.e. those in the NIST NSRL) in the: AutopsyOptionsPanel.jLabelTimeDisplay.text=When displaying times: -FXVideoPanel.progress.bufferingCancelled=media buffering was canceled -FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted -FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties index d3a5d76e4d..6505a09862 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties @@ -40,9 +40,6 @@ AdvancedConfigurationDialog.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb DataResultPanel.directoryTablePath.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d1\u30b9 DataResultPanel.numberMatchLabel.text=0 DataResultPanel.matchLabel.text=\u7d50\u679c -MediaViewVideoPanel.pauseButton.text=\u25ba -MediaViewVideoPanel.progressLabel.text=00\:00 -MediaViewVideoPanel.infoLabel.text=\u60c5\u5831 DataContentViewerArtifact.waitText=\u30c7\u30fc\u30bf\u3092\u53d6\u8fbc\u307f\u304a\u3088\u3073\u6e96\u5099\u4e2d\u3002\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u4e0b\u3055\u3044... DataContentViewerArtifact.errorText=\u7d50\u679c\u3092\u53d6\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f DataContentViewerArtifact.title=\u7d50\u679c @@ -52,8 +49,6 @@ DataContentViewerHex.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\ DataContentViewerHex.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09 DataContentViewerHex.title=HEX DataContentViewerHex.toolTip=\u30d0\u30a4\u30ca\u30ea\u30b3\u30f3\u30c6\u30f3\u30c4\u3092HEX\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8868\u793a\u3057\u3001ASCII\u3068\u3057\u3066\u8868\u793a\u3067\u304d\u308b\u30d0\u30a4\u30c8\u306f\u53f3\u5074\u306b\u8868\u793a\u3057\u307e\u3059\u3002 -DataContentViewerMedia.title=\u30e1\u30c7\u30a3\u30a2 -DataContentViewerMedia.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002 DataContentViewerString.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044 DataContentViewerString.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570 DataContentViewerString.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09 @@ -70,27 +65,10 @@ DataResultViewerThumbnail.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u DataResultViewerThumbnail.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570 DataResultViewerThumbnail.genThumbs=\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u2026 DataResultViewerThumbnail.pageNumbers.curOfTotal={0}\uff0f{1}\u76ee -FXVideoPanel.mediaPane.infoLabel=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 -FXVideoPanel.progress.bufferingFile={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0 -FXVideoPanel.progressLabel.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 -FXVideoPanel.media.unsupportedFormat=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 GeneralOptionsPanelController.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc GeneralOptionsPanelController.moduleErr.msg=GeneralOptionsPanelController\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 -GstVideoPanel.cannotProcFile.err=\u30e1\u30c7\u30a4\u30a2\u30d7\u30ec\u30fc\u30e4\u30fc\u3067\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002 -GstVideoPanel.initGst.gstException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 -GstVideoPanel.initGst.otherException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 -GstVideoPanel.setupVideo.infoLabel.text=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 -GstVideoPanel.exception.problemFile.msg=\u30d5\u30a1\u30a4\u30eb({0})\u304b\u3089\u30d5\u30ec\u30fc\u30e0\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -GstVideoPanel.exception.problemPlay.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u518d\u751f\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 LBL_Description=
\n \u88fd\u54c1\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a {0} ({9})
Sleuth Kit\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a {7}
Netbeans RCP\u30d3\u30eb\u30c9\: {8}
Java\: {1}; {2}
\u30b7\u30b9\u30c6\u30e0\uff1a {3}; {4}; {5}
\u30e6\u30fc\u30b6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d {6}
LBL_Copyright=
Autopsy™\u306fSleuth Kit™\u3084\u305d\u306e\u4ed6\u30c4\u30fc\u30eb\u3092\u57fa\u306b\u3057\u305f\u30c7\u30b8\u30bf\u30eb\u30fb\u30d5\u30a9\u30ec\u30f3\u30b8\u30c3\u30af\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002

Copyright © 2003-2013. \u8a73\u7d30\u306f\u4e0b\u8a18\u3092\u3054\u89a7\u4e0b\u3055\u3044\u3002 http\://www.sleuthkit.org.
-GstVideoPanel.exception.problemPause.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u518d\u751f\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.exception.problemStopCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u505c\u6b62\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 -GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc -MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0} ProductInformationPanel.verbLoggingEnabled.text=Verbose\u30ed\u30b0\u304c\u6709\u52b9\u3067\u3059 ProductInformationPanel.propertyUnknown.text=\u4e0d\u660e ProductInformationPanel.getVMValue.text={0} {1} @@ -103,9 +81,6 @@ DataResultViewerThumbnail.comboBox.smallThumbnails=\u30b5\u30e0\u30cd\u30a4\u30e DataResultViewerThumbnail.comboBox.mediumThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u4e2d\uff09 DataResultViewerThumbnail.comboBox.largeThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u5927\uff09 DataResultViewerThumbnail.switchPage.done.errMsg=\u30b5\u30e0\u30cd\u30a4\u30eb\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} -FXVideoPanel.pauseButton.infoLabel.playbackErr=\u30d3\u30c7\u30aa\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} -GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d AboutWindowPanel.actVerboseLogging.text=Verbose\u30ed\u30b0\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8 AutopsyOptionsPanel.viewsHideKnownCB.text=\u30d3\u30e5\u30fc\u30a8\u30ea\u30a2 AutopsyOptionsPanel.dataSourcesHideKnownCB.text=\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u30a8\u30ea\u30a2\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\uff09 @@ -118,9 +93,6 @@ AutopsyOptionsPanel.keepCurrentViewerRB.text=\u305d\u306e\u307e\u307e\u540c\u305 AutopsyOptionsPanel.jLabelSelectFile.text=\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3059\u308b\u5834\u5408\uff1a AutopsyOptionsPanel.jLabelHideKnownFiles.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\uff08NIST NSRL\u5185\u306e\uff09\u3092\u6b21\u306b\u96a0\u3059\uff1a AutopsyOptionsPanel.jLabelTimeDisplay.text=\u6642\u9593\u3092\u8868\u793a\u3059\u308b\u5834\u5408\uff1a -FXVideoPanel.progress.bufferingCancelled=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f -FXVideoPanel.progress.bufferingInterrupted=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3057\u305f -FXVideoPanel.progress.errorWritingVideoToDisk=\u30d3\u30c7\u30aa\u3092\u30c7\u30a3\u30b9\u30af\u3078\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f OptionsCategory_Name_Multi_User_Settings=\u8907\u6570\u306e\u30e6\u30fc\u30b6\u30fc OptionsCategory_Keywords_Multi_User_Options=\u8907\u6570\u306e\u30e6\u30fc\u30b6\u30fc\u30aa\u30d7\u30b7\u30e7\u30f3 MultiUserSettingsPanel.lbSolrSettings.text=Solr\u8a2d\u5b9a From 96aa6ff76f4b1d7832996df69609375604b5e541 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 23 Feb 2018 10:13:57 -0500 Subject: [PATCH 09/23] Block size selection fully implemented. --- .../autopsy/casemodule/AddImageTask.java | 1 + .../autopsy/casemodule/Bundle.properties | 1 + .../autopsy/casemodule/LocalDiskPanel.form | 83 ++++++++++--------- .../autopsy/casemodule/LocalDiskPanel.java | 77 ++++++++--------- 4 files changed, 85 insertions(+), 77 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java index c18b2d225c..f6458e6dd0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java @@ -129,6 +129,7 @@ class AddImageTask implements Runnable { Thread progressUpdateThread = new Thread(new ProgressUpdater(progressMonitor, tskAddImageProcess)); progressUpdateThread.start(); runAddImageProcess(errorMessages); + progressUpdateThread.interrupt(); commitOrRevertAddImageProcess(currentCase, errorMessages, newDataSources); progressMonitor.setProgress(100); } finally { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 75a976efa4..1a49a107f4 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -233,3 +233,4 @@ MultiUserCasesPanel.cancelButton.text=Cancel ImageFilePanel.pathErrorLabel.text=Error Label ImageFilePanel.sectorSizeLabel.text=Sector size: LocalDiskPanel.sectorSizeLabel.text=Sector Size: +LocalDiskPanel.refreshTableButton.text=Refresh Local Disks diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form index 2daa15c1c6..27eeff284d 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form @@ -26,25 +26,23 @@ + - + + - - - - - + - + - + @@ -54,38 +52,45 @@ + + + + + + + + + + + + + + + + + + + + - + + + + + + + - - - - - - - - - - - - - - - - - - - @@ -95,7 +100,7 @@ - + @@ -105,7 +110,12 @@ - + + + + + + @@ -120,12 +130,7 @@ - - - - - - + @@ -288,14 +293,14 @@ - + - + - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index 8f25b57b55..ef86a77bfa 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -42,8 +42,6 @@ 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:. @@ -149,7 +147,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(); + refreshTableButton = new javax.swing.JButton(); sectorSizeLabel = new javax.swing.JLabel(); sectorSizeComboBox = new javax.swing.JComboBox<>(); @@ -209,10 +207,10 @@ 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() { + 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); + refreshTableButtonActionPerformed(evt); } }); @@ -224,15 +222,14 @@ final class LocalDiskPanel extends JPanel { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() - .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(diskLabel) .addGroup(layout.createSequentialGroup() + .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(noFatOrphansCheckbox) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(copyImageCheckbox) - .addComponent(descLabel)) + .addComponent(copyImageCheckbox) .addGroup(layout.createSequentialGroup() .addGap(21, 21, 21) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) @@ -245,28 +242,32 @@ final class LocalDiskPanel extends JPanel { .addComponent(jLabel1) .addComponent(changeDatabasePathCheckbox) .addComponent(imageWriterErrorLabel)) - .addGap(0, 0, Short.MAX_VALUE))))) + .addGap(0, 0, Short.MAX_VALUE)))) + .addComponent(errorLabel) + .addGroup(layout.createSequentialGroup() + .addComponent(sectorSizeLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(21, 21, 21) + .addComponent(descLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 182, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(noFatOrphansCheckbox) .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, 475, 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))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(refreshTableButton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))))))) .addContainerGap()) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(sectorSizeLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -275,7 +276,7 @@ final class LocalDiskPanel extends JPanel { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(refreshTablebutton) + .addComponent(refreshTableButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(timeZoneLabel) @@ -284,7 +285,11 @@ final class LocalDiskPanel extends JPanel { .addComponent(noFatOrphansCheckbox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(descLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(sectorSizeLabel) + .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) .addComponent(copyImageCheckbox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) @@ -298,11 +303,7 @@ final class LocalDiskPanel extends JPanel { .addComponent(imageWriterErrorLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(errorLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(sectorSizeLabel) - .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(27, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -333,9 +334,9 @@ final class LocalDiskPanel extends JPanel { fireUpdateEvent(); }//GEN-LAST:event_browseButtonActionPerformed - private void refreshTablebuttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTablebuttonActionPerformed + private void refreshTableButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshTableButtonActionPerformed refreshTable(); - }//GEN-LAST:event_refreshTablebuttonActionPerformed + }//GEN-LAST:event_refreshTableButtonActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton browseButton; @@ -350,7 +351,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.JButton refreshTableButton; private javax.swing.JComboBox sectorSizeComboBox; private javax.swing.JLabel sectorSizeLabel; private javax.swing.JComboBox timeZoneComboBox; From c1fd998807db128e53ae170f39d25df81805d86a Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 23 Feb 2018 11:38:44 -0500 Subject: [PATCH 10/23] 3544: Integrate Media content viewer into Application content viewer Modified DataContentViewerMedia to implement the FileTypeViewer interface, and renamed it to MediaFileViewer --- .../autopsy/contentviewers/Bundle.properties | 7 +- .../contentviewers/Bundle_ja.properties | 5 +- .../autopsy/contentviewers/FileViewer.java | 3 +- ...tViewerMedia.form => MediaFileViewer.form} | 2 +- ...tViewerMedia.java => MediaFileViewer.java} | 130 ++++-------------- .../contentviewers/MediaViewImagePanel.java | 4 +- .../contentviewers/MediaViewVideoPanel.java | 2 +- 7 files changed, 37 insertions(+), 116 deletions(-) rename Core/src/org/sleuthkit/autopsy/contentviewers/{DataContentViewerMedia.form => MediaFileViewer.form} (89%) rename Core/src/org/sleuthkit/autopsy/contentviewers/{DataContentViewerMedia.java => MediaFileViewer.java} (56%) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties index 9333e4cf01..8abdaca4ec 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties @@ -1,6 +1,4 @@ -DataContentViewerMedia.AccessibleContext.accessibleDescription= -DataContentViewerMedia.title=Media -DataContentViewerMedia.toolTip=Displays supported multimedia files (images, videos, audio) + FXVideoPanel.pauseButton.infoLabel.playbackErr=Unable to play video. FXVideoPanel.progress.bufferingCancelled=media buffering was canceled FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted @@ -23,6 +21,9 @@ GstVideoPanel.progress.buffering=Buffering... GstVideoPanel.progressLabel.bufferingErr=Error buffering file GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0} GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0} +MediaFileViewer.AccessibleContext.accessibleDescription= +MediaFileViewer.title=Media +MediaFileViewer.toolTip=Displays supported multimedia files (images, videos, audio) MediaViewVideoPanel.pauseButton.text=\u25ba MediaViewVideoPanel.progressLabel.text=00:00 MediaViewVideoPanel.infoLabel.text=info diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties index 356b342793..38f772cbf0 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties @@ -1,5 +1,4 @@ -DataContentViewerMedia.title=\u30e1\u30c7\u30a3\u30a2 -DataContentViewerMedia.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002 + FXVideoPanel.pauseButton.infoLabel.playbackErr=\u30d3\u30c7\u30aa\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 FXVideoPanel.progress.bufferingCancelled=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f FXVideoPanel.progress.bufferingInterrupted=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3057\u305f @@ -22,6 +21,8 @@ GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2 GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d +MediaFileViewer.title=\u30e1\u30c7\u30a3\u30a2 +MediaFileViewer.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002 MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0} MediaViewVideoPanel.pauseButton.text=\u25ba MediaViewVideoPanel.progressLabel.text=00\:00 diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java index 81a6dfe76a..b22d26d261 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java @@ -48,7 +48,8 @@ public class FileViewer extends javax.swing.JPanel implements DataContentViewer // TBD: This hardcoded list of viewers should be replaced with a dynamic lookup private static final FileTypeViewer[] KNOWN_VIEWERS = new FileTypeViewer[]{ // new JPEGViewerDummy(), // this if for testing only - new SQLiteViewer() + new SQLiteViewer(), + new MediaFileViewer() }; private FileTypeViewer lastViewer; diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.form b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.form similarity index 89% rename from Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.form index 42f990a713..d26c9f72e7 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.form +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.form @@ -3,7 +3,7 @@
- + diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.java similarity index 56% rename from Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.java index d2137ca48d..43a6da9c73 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/DataContentViewerMedia.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org *s * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,26 +21,19 @@ package org.sleuthkit.autopsy.contentviewers; import java.awt.CardLayout; import java.awt.Component; import java.awt.Dimension; +import java.util.ArrayList; import java.util.List; import java.util.logging.Level; -import org.openide.nodes.Node; -import org.openide.util.NbBundle; -import org.openide.util.lookup.ServiceProvider; -import org.openide.util.lookup.ServiceProviders; -import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.AbstractFile; -import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * Media content viewer for videos, sounds and images. */ -@ServiceProviders(value = { - @ServiceProvider(service = DataContentViewer.class, position = 5) -}) -public class DataContentViewerMedia extends javax.swing.JPanel implements DataContentViewer { +public class MediaFileViewer extends javax.swing.JPanel implements FileTypeViewer { - private static final Logger logger = Logger.getLogger(DataContentViewerMedia.class.getName()); + private static final Logger LOGGER = Logger.getLogger(MediaFileViewer.class.getName()); private AbstractFile lastFile; //UI private final MediaViewVideoPanel videoPanel; @@ -54,7 +47,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo /** * Creates new form DataContentViewerVideo */ - public DataContentViewerMedia() { + public MediaFileViewer() { initComponents(); @@ -66,7 +59,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo imagePanelInited = imagePanel.isInited(); customizeComponents(); - logger.log(Level.INFO, "Created MediaView instance: {0}", this); //NON-NLS + LOGGER.log(Level.INFO, "Created MediaView instance: {0}", this); //NON-NLS } private void customizeComponents() { @@ -86,20 +79,27 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo private void initComponents() { setLayout(new java.awt.CardLayout()); - getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(DataContentViewerMedia.class, "DataContentViewerMedia.AccessibleContext.accessibleDescription")); // NOI18N + getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(MediaFileViewer.class, "MediaFileViewer.AccessibleContext.accessibleDescription")); // NOI18N }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables @Override - public void setNode(Node selectedNode) { + public List getSupportedMIMETypes() { + + List mimeTypes = new ArrayList<>(); + + mimeTypes.addAll(this.imagePanel.getMimeTypes()); + mimeTypes.addAll(this.videoPanel.getMimeTypes()); + + return mimeTypes; + } + + + @Override + public void setFile(AbstractFile file) { try { - if (selectedNode == null) { - resetComponent(); - return; - } - - AbstractFile file = selectedNode.getLookup().lookup(AbstractFile.class); + if (file == null) { resetComponent(); return; @@ -111,7 +111,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo lastFile = file; - final Dimension dims = DataContentViewerMedia.this.getSize(); + final Dimension dims = MediaFileViewer.this.getSize(); //logger.info("setting node on media viewer"); //NON-NLS if (videoPanelInited && videoPanel.isSupported(file)) { videoPanel.setupVideo(file, dims); @@ -121,7 +121,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo this.showVideoPanel(false); } } catch (Exception e) { - logger.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS + LOGGER.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS } } @@ -139,21 +139,6 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo } } - @Override - public String getTitle() { - return NbBundle.getMessage(this.getClass(), "DataContentViewerMedia.title"); - } - - @Override - public String getToolTip() { - return NbBundle.getMessage(this.getClass(), "DataContentViewerMedia.toolTip"); - } - - @Override - public DataContentViewer createInstance() { - return new DataContentViewerMedia(); - } - @Override public Component getComponent() { return this; @@ -166,73 +151,6 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo lastFile = null; } - /** - * Is the given file a video we can display? - * - * @param file - * - * @return True if a video file that can be displayed - */ - private boolean isVideoSupported(AbstractFile file) { - if (null == file || file.getSize() == 0) { - return false; - } - return videoPanel.isSupported(file); - } - - /** - * Is the given file an image that we can display? - * - * @param file - * - * @return True if an image file that can be displayed - */ - private boolean isImageSupported(AbstractFile file) { - if (null == file || file.getSize() == 0) { - return false; - } - - return imagePanel.isSupported(file); - } - - @Override - public boolean isSupported(Node node) { - if (node == null) { - return false; - } - - AbstractFile file = node.getLookup().lookup(AbstractFile.class); - if (file == null) { - return false; - } - - if (file.getSize() == 0) { - return false; - } - - if (imagePanelInited && isImageSupported(file)) { - return true; - } - - return videoPanelInited && isVideoSupported(file); - } - - @Override - public int isPreferred(Node node) { - //special case, check if deleted video, then do not make it preferred - AbstractFile file = node.getLookup().lookup(AbstractFile.class); - if (file == null) { - return 0; - } - boolean deleted = file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC); - - if (videoPanel.isSupported(file) && deleted) { - return 0; - } else { - return 7; - } - } - interface MediaViewPanel { /** diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java index 828dbeb169..b6505544ba 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java @@ -18,7 +18,7 @@ */ package org.sleuthkit.autopsy.contentviewers; -import org.sleuthkit.autopsy.contentviewers.DataContentViewerMedia; + import java.awt.Dimension; import java.awt.EventQueue; import java.awt.event.ActionEvent; @@ -61,7 +61,7 @@ import org.sleuthkit.datamodel.AbstractFile; @NbBundle.Messages({"MediaViewImagePanel.externalViewerButton.text=Open in External Viewer", "MediaViewImagePanel.errorLabel.text=Could not load file into Media View.", "MediaViewImagePanel.errorLabel.OOMText=Could not load file into Media View: insufficent memory."}) -public class MediaViewImagePanel extends JPanel implements DataContentViewerMedia.MediaViewPanel { +public class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPanel { private static final Image EXTERNAL = new Image(MediaViewImagePanel.class.getResource("/org/sleuthkit/autopsy/images/external.png").toExternalForm()); diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java index 478a779c07..8848164683 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java @@ -35,7 +35,7 @@ import org.sleuthkit.datamodel.AbstractFile; * Video viewer part of the Media View layered pane. Uses different engines * depending on platform. */ -public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture, DataContentViewerMedia.MediaViewPanel { +public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture, MediaFileViewer.MediaViewPanel { private static final Set AUDIO_EXTENSIONS = new TreeSet<>(Arrays.asList(".mp3", ".wav", ".wma")); //NON-NLS From 739d7cbb579bcd94726bd3b083e8614039ca28c5 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 23 Feb 2018 12:06:07 -0500 Subject: [PATCH 11/23] Minor tweaks. --- .../autopsy/casemodule/LocalDiskPanel.form | 85 ++++++++----------- .../autopsy/casemodule/LocalDiskPanel.java | 78 ++++++++--------- 2 files changed, 73 insertions(+), 90 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form index 27eeff284d..afdc00e125 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form @@ -26,32 +26,21 @@ - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - @@ -59,32 +48,32 @@ + - - - - - - - + - - + + + - + - - - - - - + + + + + + + + + + @@ -97,7 +86,7 @@ - + @@ -106,23 +95,23 @@ - + - + - + - - - + + + - + @@ -130,7 +119,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index ef86a77bfa..d4e7201592 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -222,58 +222,52 @@ final class LocalDiskPanel extends JPanel { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(diskLabel) - .addGroup(layout.createSequentialGroup() - .addContainerGap() + .addComponent(diskLabel) + .addGap(0, 0, 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)) + .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(copyImageCheckbox) - .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(jLabel1) - .addComponent(changeDatabasePathCheckbox) - .addComponent(imageWriterErrorLabel)) - .addGap(0, 0, Short.MAX_VALUE)))) .addComponent(errorLabel) .addGroup(layout.createSequentialGroup() .addComponent(sectorSizeLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))))) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() + .addComponent(sectorSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(21, 21, 21) - .addComponent(descLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 182, Short.MAX_VALUE)) - .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, 106, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(noFatOrphansCheckbox) .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(timeZoneLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(refreshTableButton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))))))) + .addComponent(timeZoneComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(changeDatabasePathCheckbox, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(imageWriterErrorLabel, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(descLabel, javax.swing.GroupLayout.Alignment.LEADING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(diskLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGap(1, 1, 1) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(refreshTableButton) @@ -281,21 +275,21 @@ final class LocalDiskPanel extends JPanel { .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)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(noFatOrphansCheckbox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(descLabel) - .addGap(18, 18, 18) + .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sectorSizeLabel) .addComponent(sectorSizeComboBox, 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(copyImageCheckbox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(browseButton) - .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(browseButton)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(changeDatabasePathCheckbox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1) @@ -303,7 +297,7 @@ final class LocalDiskPanel extends JPanel { .addComponent(imageWriterErrorLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(errorLabel) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(43, Short.MAX_VALUE)) ); }// //GEN-END:initComponents From 89bf08c1d12bd6269556166083d95cfa59b65ec9 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 23 Feb 2018 13:31:20 -0500 Subject: [PATCH 12/23] Cleanup. --- .../autopsy/casemodule/LocalDiskPanel.form | 42 +++++++++---------- .../autopsy/casemodule/LocalDiskPanel.java | 21 ++++++---- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form index afdc00e125..b2f822bac9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.form @@ -38,28 +38,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -73,7 +51,25 @@ - + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java index d4e7201592..bad8a9bd0f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskPanel.java @@ -115,7 +115,7 @@ final class LocalDiskPanel extends JPanel { diskTable.setEnabled(false); imageWriterErrorLabel.setVisible(false); imageWriterErrorLabel.setText(""); - if(! PlatformUtil.isWindowsOS()){ + if (!PlatformUtil.isWindowsOS()) { copyImageCheckbox.setSelected(false); copyImageCheckbox.setEnabled(false); } @@ -377,17 +377,19 @@ final class LocalDiskPanel extends JPanel { return ""; } } - + /** - * //DLG: + * Get the sector size. + * + * @return 0 if autodetect; otherwise the value selected. */ int getSectorSize() { int sectorSizeSelectionIndex = sectorSizeComboBox.getSelectedIndex(); - + if (sectorSizeSelectionIndex == 0) { return 0; } - + return Integer.valueOf((String) sectorSizeComboBox.getSelectedItem()); } @@ -490,8 +492,8 @@ final class LocalDiskPanel extends JPanel { } /** - * Creates the drop down list for the time zones and then makes the local - * machine time zone to be selected. + * Creates the drop down list for the time zones and defaults the selection + * to the local machine time zone. */ public void createTimeZoneList() { // load and add all timezone @@ -525,9 +527,10 @@ final class LocalDiskPanel extends JPanel { timeZoneComboBox.setSelectedItem(formatted); } - + /** - * //DLG: + * Creates the drop down list for the sector size and defaults the selection + * to "Auto Detect". */ private void createSectorSizeList() { for (String choice : SECTOR_SIZE_CHOICES) { From 9949b77dd184c23e2cd0a8399cf694c91c259cfc Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 23 Feb 2018 14:20:34 -0500 Subject: [PATCH 13/23] Fixes an NPE in the previous commit. --- .../org/sleuthkit/autopsy/contentviewers/PListViewer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java index ff31273dd6..c488c93be8 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java @@ -482,9 +482,11 @@ public class PListViewer extends javax.swing.JPanel implements FileTypeViewer, E } void setChildren(final PropKeyValue... children) { - this.children = Arrays.stream(children) - .map(child -> new PropKeyValue(child)) - .toArray(PropKeyValue[]::new); + if (children != null) { + this.children = Arrays.stream(children) + .map(child -> new PropKeyValue(child)) + .toArray(PropKeyValue[]::new); + } } } From 112b57776d103c07c9efac1d6814f7a930c17c1b Mon Sep 17 00:00:00 2001 From: Ann Priestman Date: Fri, 23 Feb 2018 16:37:34 -0500 Subject: [PATCH 14/23] Implement DIY solr cloud --- .../sleuthkit/autopsy/casemodule/Case.java | 2 +- .../autoingest/AutoIngestManager.java | 11 ++ .../KeywordSearchIngestModule.java | 5 +- .../autopsy/keywordsearch/Server.java | 150 +++++++++++++++++- .../keywordsearch/SolrSearchService.java | 2 +- 5 files changed, 158 insertions(+), 12 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 804e224a70..a6013b2e6f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -806,7 +806,7 @@ public class Case { * * @throws CaseActionException throw if could not create the case dir */ - static void createCaseDirectory(String caseDir, CaseType caseType) throws CaseActionException { + public static void createCaseDirectory(String caseDir, CaseType caseType) throws CaseActionException { File caseDirF = new File(caseDir); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 5260a9cd43..3f87f18a2a 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -97,6 +97,8 @@ import org.sleuthkit.autopsy.ingest.IngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestJobStartResult; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestModuleError; +import org.sleuthkit.autopsy.keywordsearch.KeywordSearchModuleException; +import org.sleuthkit.autopsy.keywordsearch.Server; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.DataSource; import org.sleuthkit.datamodel.SleuthkitCase; @@ -2156,6 +2158,13 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Case.openAsCurrentCase(metadataFilePath.toString()); } else { caseDirectoryPath = PathUtils.createCaseFolderPath(rootOutputDirectory, caseName); + + // Create the case directory now in case it is needed by selectSolrServerForCase + Case.createCaseDirectory(caseDirectoryPath.toString(), CaseType.MULTI_USER_CASE); + + // If a list of servers exists, choose one to use for this case + Server.selectSolrServerForCase(rootOutputDirectory, caseDirectoryPath); + CaseDetails caseDetails = new CaseDetails(caseName); Case.createAsCurrentCase(CaseType.MULTI_USER_CASE, caseDirectoryPath.toString(), caseDetails); /* @@ -2170,6 +2179,8 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen SYS_LOGGER.log(Level.INFO, "Opened case {0} for {1}", new Object[]{caseForJob.getName(), manifest.getFilePath()}); return caseForJob; + } catch (KeywordSearchModuleException ex) { + throw new CaseManagementException(String.format("Error creating solr settings file for case %s for %s", caseName, manifest.getFilePath()), ex); } catch (CaseActionException ex) { throw new CaseManagementException(String.format("Error creating or opening case %s for %s", caseName, manifest.getFilePath()), ex); } catch (IllegalStateException ex) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index 2e0cd18c0e..e63179073f 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -184,15 +184,16 @@ public final class KeywordSearchIngestModule implements FileIngestModule { if (Case.getCurrentCase().getCaseType() == Case.CaseType.MULTI_USER_CASE) { // for multi-user cases need to verify connection to remore SOLR server KeywordSearchService kwsService = new SolrSearchService(); + Server.IndexingServerProperties properties = Server.getMultiUserServerProperties(Case.getCurrentCase().getCaseDirectory()); int port; try { - port = Integer.parseInt(UserPreferences.getIndexingServerPort()); + port = Integer.parseInt(properties.getPort()); } catch (NumberFormatException ex) { // if there is an error parsing the port number throw new IngestModuleException(Bundle.KeywordSearchIngestModule_init_badInitMsg() + " " + Bundle.SolrConnectionCheck_Port(), ex); } try { - kwsService.tryConnect(UserPreferences.getIndexingServerHost(), port); + kwsService.tryConnect(properties.getHost(), port); } catch (KeywordSearchServiceException ex) { throw new IngestModuleException(Bundle.KeywordSearchIngestModule_init_badInitMsg(), ex); } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java index 0e9b804757..23380b15ae 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java @@ -39,7 +39,9 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Iterator; import java.util.List; +import java.util.Random; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.logging.Level; import javax.swing.AbstractAction; @@ -63,6 +65,7 @@ import org.openide.modules.Places; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case.CaseType; +import org.sleuthkit.autopsy.casemodule.CaseMetadata; import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ModuleSettings; @@ -721,16 +724,15 @@ public class Server { */ @NbBundle.Messages({ "# {0} - core name", "Server.deleteCore.exception.msg=Failed to delete Solr core {0}",}) - void deleteCore(String coreName, Case.CaseType caseType) throws KeywordSearchServiceException { + void deleteCore(String coreName, CaseMetadata metadata) throws KeywordSearchServiceException { try { HttpSolrServer solrServer; - if (caseType == CaseType.SINGLE_USER_CASE) { + if (metadata.getCaseType() == CaseType.SINGLE_USER_CASE) { Integer localSolrServerPort = Integer.decode(ModuleSettings.getConfigSetting(PROPERTIES_FILE, PROPERTIES_CURRENT_SERVER_PORT)); solrServer = new HttpSolrServer("http://localhost:" + localSolrServerPort + "/solr"); //NON-NLS } else { - String host = UserPreferences.getIndexingServerHost(); - String port = UserPreferences.getIndexingServerPort(); - solrServer = new HttpSolrServer("http://" + host + ":" + port + "/solr"); //NON-NLS + IndexingServerProperties properties = getMultiUserServerProperties(metadata.getCaseDirectory()); + solrServer = new HttpSolrServer("http://" + properties.getHost() + ":" + properties.getPort() + "/solr"); //NON-NLS } connectToSolrServer(solrServer); CoreAdminResponse response = CoreAdminRequest.getStatus(coreName, solrServer); @@ -768,9 +770,8 @@ public class Server { if (theCase.getCaseType() == CaseType.SINGLE_USER_CASE) { currentSolrServer = this.localSolrServer; } else { - String host = UserPreferences.getIndexingServerHost(); - String port = UserPreferences.getIndexingServerPort(); - currentSolrServer = new HttpSolrServer("http://" + host + ":" + port + "/solr"); //NON-NLS + IndexingServerProperties properties = getMultiUserServerProperties(theCase.getCaseDirectory()); + currentSolrServer = new HttpSolrServer("http://" + properties.getHost() + ":" + properties.getPort() + "/solr"); //NON-NLS } connectToSolrServer(currentSolrServer); @@ -829,6 +830,139 @@ public class Server { throw new KeywordSearchModuleException(NbBundle.getMessage(this.getClass(), "Server.openCore.exception.cantOpen.msg"), ex); } } + + /** + * Get the host and port for a multiuser case. + * If the file solrserver.txt exists, then use the values from that file. + * Otherwise use the settings from the properties file. + * + * @param caseDirectory Current case directory + * @return IndexingServerProperties containing the solr host/port for this case + */ + public static IndexingServerProperties getMultiUserServerProperties(String caseDirectory) { + + Path serverFilePath = Paths.get(caseDirectory, "solrserver.txt"); + if(serverFilePath.toFile().exists()){ + try{ + List lines = Files.readAllLines(serverFilePath); + if(lines.isEmpty()) { + logger.log(Level.SEVERE, "solrserver.txt file does not contain any data"); + } else if (! lines.get(0).contains(",")) { + logger.log(Level.SEVERE, "solrserver.txt file is corrupt - could not read host/port from " + lines.get(0)); + } else { + String[] parts = lines.get(0).split(","); + if(parts.length != 2) { + logger.log(Level.SEVERE, "solrserver.txt file is corrupt - could not read host/port from " + lines.get(0)); + } else { + return new IndexingServerProperties(parts[0], parts[1]); + } + } + } catch (IOException ex) { + logger.log(Level.SEVERE, "solrserver.txt file could not be read", ex); + } + } + + // Default back to the user preferences if the solrserver.txt file was not found or if an error occurred + String host = UserPreferences.getIndexingServerHost(); + String port = UserPreferences.getIndexingServerPort(); + return new IndexingServerProperties(host, port); + } + + /** + * Pick a solr server to use for this case and record it in the case directory. + * Looks for a file named "solrServerList.txt" in the root output directory - + * if this does not exist then no server is recorded. + * + * Format of solrServerList.txt: + * , + * Ex: 10.1.2.34,8983 + * + * @param rootOutputDirectory + * @param caseDirectoryPath + * @throws KeywordSearchModuleException + */ + public static void selectSolrServerForCase(Path rootOutputDirectory, Path caseDirectoryPath) throws KeywordSearchModuleException { + // Look for the solr server list file + String serverListName = "solrServerList.txt"; + Path serverListPath = Paths.get(rootOutputDirectory.toString(), serverListName); + if(serverListPath.toFile().exists()){ + + // Read the list of solr servers + List lines; + try{ + lines = Files.readAllLines(serverListPath); + } catch (IOException ex){ + throw new KeywordSearchModuleException(serverListName + " could not be read", ex); + } + + // Remove any lines that don't contain a comma (these are likely just whitespace) + for (Iterator iterator = lines.iterator(); iterator.hasNext();) { + String line = iterator.next(); + if (! line.contains(",")) { + // Remove the current element from the iterator and the list. + iterator.remove(); + } + } + if(lines.isEmpty()) { + throw new KeywordSearchModuleException(serverListName + " had no valid server information"); + } + + // Choose which server to use + int rnd = new Random().nextInt(lines.size()); + String[] parts = lines.get(rnd).split(","); + if(parts.length != 2) { + throw new KeywordSearchModuleException("Invalid server data: " + lines.get(rnd)); + } + + // Split it up just to do a sanity check on the data + String host = parts[0]; + String port = parts[1]; + if(host.isEmpty() || port.isEmpty()) { + throw new KeywordSearchModuleException("Invalid server data: " + lines.get(rnd)); + } + + // Write the server data to a file + Path serverFile = Paths.get(caseDirectoryPath.toString(), "solrserver.txt"); + try { + caseDirectoryPath.toFile().mkdirs(); + if (! caseDirectoryPath.toFile().exists()) { + throw new KeywordSearchModuleException("Case directory " + caseDirectoryPath.toString() + " does not exist"); + } + Files.write(serverFile, lines.get(rnd).getBytes()); + } catch (IOException ex){ + throw new KeywordSearchModuleException(serverFile.toString() + " could not be written", ex); + } + } + } + + /** + * Helper class to store the current server properties + */ + public static class IndexingServerProperties { + private final String host; + private final String port; + + IndexingServerProperties (String host, String port) { + this.host = host; + this.port = port; + } + + /** + * Get the host + * @return host + */ + public String getHost() { + return host; + } + + /** + * Get the port + * @return port + */ + public String getPort() { + return port; + } + } /** * Commits current core if it exists diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 79174ba134..3c959c4de8 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -173,7 +173,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { * Unload/delete the core on the server and then delete the text * index files. */ - KeywordSearch.getServer().deleteCore(index.getIndexName(), metadata.getCaseType()); + KeywordSearch.getServer().deleteCore(index.getIndexName(), metadata); if (!FileUtil.deleteDir(new File(index.getIndexPath()).getParentFile())) { throw new KeywordSearchServiceException(Bundle.SolrSearchService_exceptionMessage_failedToDeleteIndexFiles(index.getIndexPath())); } From 03943ac78a1e7d31630e83fa3416265f3a32ebd1 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 26 Feb 2018 11:59:27 -0500 Subject: [PATCH 15/23] Minor cleanup. --- .../autoingest/AutoIngestManager.java | 20 +++++++++---------- .../autoingest/AutoIngestMonitor.java | 16 +++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 2a809e9ad0..4f71e1887b 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -559,15 +559,15 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen return; } - List prioritizedJobs = new ArrayList<>(); + List jobsToDeprioritize = new ArrayList<>(); synchronized (jobsLock) { for (AutoIngestJob job : pendingJobs) { if (job.getManifest().getCaseName().equals(caseName)) { - prioritizedJobs.add(job); + jobsToDeprioritize.add(job); } } - if (!prioritizedJobs.isEmpty()) { - for (AutoIngestJob job : prioritizedJobs) { + if (!jobsToDeprioritize.isEmpty()) { + for (AutoIngestJob job : jobsToDeprioritize) { int oldPriority = job.getPriority(); job.setPriority(DEFAULT_PRIORITY); try { @@ -582,7 +582,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToDeprioritize.isEmpty()) { new Thread(() -> { eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); @@ -603,7 +603,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen return; } - List prioritizedJobs = new ArrayList<>(); + List jobsToPrioritize = new ArrayList<>(); int maxPriority = 0; synchronized (jobsLock) { for (AutoIngestJob job : pendingJobs) { @@ -611,12 +611,12 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen maxPriority = job.getPriority(); } if (job.getManifest().getCaseName().equals(caseName)) { - prioritizedJobs.add(job); + jobsToPrioritize.add(job); } } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToPrioritize.isEmpty()) { ++maxPriority; - for (AutoIngestJob job : prioritizedJobs) { + for (AutoIngestJob job : jobsToPrioritize) { int oldPriority = job.getPriority(); job.setPriority(maxPriority); try { @@ -631,7 +631,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToPrioritize.isEmpty()) { new Thread(() -> { eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 24b4db1964..62881f762e 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -294,16 +294,16 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * @return The latest jobs snapshot. */ JobsSnapshot deprioritizeCase(final String caseName) throws AutoIngestMonitorException { - List prioritizedJobs = new ArrayList<>(); + List jobsToDeprioritize = new ArrayList<>(); synchronized (jobsLock) { for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { if (pendingJob.getManifest().getCaseName().equals(caseName)) { - prioritizedJobs.add(pendingJob); + jobsToDeprioritize.add(pendingJob); } } - if (!prioritizedJobs.isEmpty()) { - for (AutoIngestJob job : prioritizedJobs) { + if (!jobsToDeprioritize.isEmpty()) { + for (AutoIngestJob job : jobsToDeprioritize) { String manifestNodePath = job.getManifest().getFilePath().toString(); try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); @@ -337,7 +337,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * @return The latest jobs snapshot. */ JobsSnapshot prioritizeCase(final String caseName) throws AutoIngestMonitorException { - List prioritizedJobs = new ArrayList<>(); + List jobsToPrioritize = new ArrayList<>(); int highestPriority = 0; synchronized (jobsLock) { for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { @@ -345,12 +345,12 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen highestPriority = pendingJob.getPriority(); } if (pendingJob.getManifest().getCaseName().equals(caseName)) { - prioritizedJobs.add(pendingJob); + jobsToPrioritize.add(pendingJob); } } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToPrioritize.isEmpty()) { ++highestPriority; - for (AutoIngestJob job : prioritizedJobs) { + for (AutoIngestJob job : jobsToPrioritize) { String manifestNodePath = job.getManifest().getFilePath().toString(); try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); From e7379f859f2e4297cb1bc2e80611790aa3edda13 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 26 Feb 2018 12:05:18 -0500 Subject: [PATCH 16/23] Cleanup. --- .../autoingest/AutoIngestManager.java | 36 +++++++++---------- .../autoingest/AutoIngestMonitor.java | 16 ++++----- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 4f71e1887b..0ab41afa82 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -652,14 +652,14 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen return; } - AutoIngestJob prioritizedJob = null; + AutoIngestJob jobToDeprioritize = null; synchronized (jobsLock) { /* * Find the job in the pending jobs list. */ for (AutoIngestJob job : pendingJobs) { if (job.getManifest().getFilePath().equals(manifestPath)) { - prioritizedJob = job; + jobToDeprioritize = job; } } @@ -667,13 +667,13 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen * Remove the priority and update the coordination service manifest * node data for the job. */ - if (null != prioritizedJob) { - int oldPriority = prioritizedJob.getPriority(); - prioritizedJob.setPriority(DEFAULT_PRIORITY); + if (null != jobToDeprioritize) { + int oldPriority = jobToDeprioritize.getPriority(); + jobToDeprioritize.setPriority(DEFAULT_PRIORITY); try { - this.updateCoordinationServiceManifestNode(prioritizedJob); + this.updateCoordinationServiceManifestNode(jobToDeprioritize); } catch (CoordinationServiceException | InterruptedException ex) { - prioritizedJob.setPriority(oldPriority); + jobToDeprioritize.setPriority(oldPriority); throw new AutoIngestManagerException("Error updating job priority", ex); } } @@ -681,8 +681,8 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); } - if (null != prioritizedJob) { - final String caseName = prioritizedJob.getManifest().getCaseName(); + if (null != jobToDeprioritize) { + final String caseName = jobToDeprioritize.getManifest().getCaseName(); new Thread(() -> { eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); @@ -703,7 +703,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen } int maxPriority = 0; - AutoIngestJob prioritizedJob = null; + AutoIngestJob jobToPrioritize = null; synchronized (jobsLock) { /* * Find the job in the pending jobs list and record the highest @@ -714,7 +714,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen maxPriority = job.getPriority(); } if (job.getManifest().getFilePath().equals(manifestPath)) { - prioritizedJob = job; + jobToPrioritize = job; } } @@ -722,14 +722,14 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen * Bump the priority by one and update the coordination service * manifest node data for the job. */ - if (null != prioritizedJob) { + if (null != jobToPrioritize) { ++maxPriority; - int oldPriority = prioritizedJob.getPriority(); - prioritizedJob.setPriority(maxPriority); + int oldPriority = jobToPrioritize.getPriority(); + jobToPrioritize.setPriority(maxPriority); try { - this.updateCoordinationServiceManifestNode(prioritizedJob); + this.updateCoordinationServiceManifestNode(jobToPrioritize); } catch (CoordinationServiceException | InterruptedException ex) { - prioritizedJob.setPriority(oldPriority); + jobToPrioritize.setPriority(oldPriority); throw new AutoIngestManagerException("Error updating job priority", ex); } } @@ -737,8 +737,8 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); } - if (null != prioritizedJob) { - final String caseName = prioritizedJob.getManifest().getCaseName(); + if (null != jobToPrioritize) { + final String caseName = jobToPrioritize.getManifest().getCaseName(); new Thread(() -> { eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 62881f762e..870756967b 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -385,13 +385,13 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen */ JobsSnapshot deprioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { synchronized (jobsLock) { - AutoIngestJob prioritizedJob = null; + AutoIngestJob jobToDeprioritize = null; /* * Make sure the job is still in the pending jobs queue. */ for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { if (pendingJob.equals(job)) { - prioritizedJob = job; + jobToDeprioritize = job; break; } } @@ -400,7 +400,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * If the job was still in the pending jobs queue, bump its * priority. */ - if (null != prioritizedJob) { + if (null != jobToDeprioritize) { String manifestNodePath = job.getManifest().getFilePath().toString(); try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); @@ -409,7 +409,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); } - prioritizedJob.setPriority(DEFAULT_PRIORITY); + jobToDeprioritize.setPriority(DEFAULT_PRIORITY); /* * Publish a deprioritization event. @@ -437,7 +437,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen JobsSnapshot prioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { synchronized (jobsLock) { int highestPriority = 0; - AutoIngestJob prioritizedJob = null; + AutoIngestJob jobToPrioritize = null; /* * Get the highest known priority and make sure the job is still in * the pending jobs queue. @@ -447,7 +447,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen highestPriority = pendingJob.getPriority(); } if (pendingJob.equals(job)) { - prioritizedJob = job; + jobToPrioritize = job; } } @@ -455,7 +455,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * If the job was still in the pending jobs queue, bump its * priority. */ - if (null != prioritizedJob) { + if (null != jobToPrioritize) { ++highestPriority; String manifestNodePath = job.getManifest().getFilePath().toString(); try { @@ -465,7 +465,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { throw new AutoIngestMonitorException("Error bumping priority for job " + job.toString(), ex); } - prioritizedJob.setPriority(highestPriority); + jobToPrioritize.setPriority(highestPriority); /* * Publish a prioritization event. From e46a20140556ba25d6762d9cb6a4517d733acda2 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 26 Feb 2018 15:11:19 -0500 Subject: [PATCH 17/23] Removed deprioritization event in favor of existing. --- .../AutoIngestCaseDeprioritizedEvent.java | 65 ------------------- .../autoingest/AutoIngestControlPanel.java | 1 - .../autoingest/AutoIngestManager.java | 20 +----- .../autoingest/AutoIngestMonitor.java | 7 +- 4 files changed, 5 insertions(+), 88 deletions(-) delete mode 100755 Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java deleted file mode 100755 index b362c1c733..0000000000 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestCaseDeprioritizedEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2018 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.experimental.autoingest; - -import java.io.Serializable; -import org.sleuthkit.autopsy.events.AutopsyEvent; - -/** - * Event published when an automated ingest manager deprioritizes all or part of - * a case. - */ -final class AutoIngestCaseDeprioritizedEvent extends AutopsyEvent implements Serializable { - - private static final long serialVersionUID = 1L; - private final String caseName; - private final String nodeName; - - /** - * Constructs an event published when an automated ingest manager - * deprioritizes all or part of a case. - * - * @param caseName The name of the case. - * @param nodeName The host name of the node that deprioritized the case. - */ - AutoIngestCaseDeprioritizedEvent(String nodeName, String caseName) { - super(AutoIngestManager.Event.CASE_DEPRIORITIZED.toString(), null, null); - this.caseName = caseName; - this.nodeName = nodeName; - } - - /** - * Gets the name of the deprioritized case. - * - * @return The case name. - */ - String getCaseName() { - return caseName; - } - - /** - * Gets the host name of the node that deprioritized the case. - * - * @return The host name of the node. - */ - String getNodeName() { - return nodeName; - } - -} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index e21b928b99..19f7840123 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -817,7 +817,6 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { }); break; case CASE_PRIORITIZED: - case CASE_DEPRIORITIZED: updateExecutor.submit(new UpdatePendingJobsTableTask()); break; case JOB_STATUS_UPDATED: diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 0ab41afa82..c1c766d139 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -128,7 +128,6 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Event.JOB_STATUS_UPDATED.toString(), Event.JOB_COMPLETED.toString(), Event.CASE_PRIORITIZED.toString(), - Event.CASE_DEPRIORITIZED.toString(), Event.JOB_STARTED.toString()})); private static final long JOB_STATUS_EVENT_INTERVAL_SECONDS = 10; private static final String JOB_STATUS_PUBLISHING_THREAD_NAME = "AIM-job-status-event-publisher-%d"; @@ -372,20 +371,6 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen notifyObservers(Event.CASE_PRIORITIZED); } - /** - * Processes a job/case deprioritization event from another node by - * triggering an immediate input directory scan. - * - * @param event A deprioritization event from another auto ingest node. - */ - private void handleRemoteCaseDeprioritizationEvent(AutoIngestCaseDeprioritizedEvent event) { - String hostName = event.getNodeName(); - hostNamesToLastMsgTime.put(hostName, Instant.now()); - scanInputDirsNow(); - setChanged(); - notifyObservers(Event.CASE_DEPRIORITIZED); - } - /** * Processes a case deletin event from another node by triggering an * immediate input directory scan. @@ -584,7 +569,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen if (!jobsToDeprioritize.isEmpty()) { new Thread(() -> { - eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); } } @@ -684,7 +669,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen if (null != jobToDeprioritize) { final String caseName = jobToDeprioritize.getManifest().getCaseName(); new Thread(() -> { - eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); } } @@ -3019,7 +3004,6 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen JOB_STATUS_UPDATED, JOB_COMPLETED, CASE_PRIORITIZED, - CASE_DEPRIORITIZED, CASE_DELETED, PAUSED_BY_REQUEST, PAUSED_FOR_SYSTEM_ERROR, diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index 870756967b..9209fa1147 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -56,7 +56,6 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen AutoIngestManager.Event.JOB_STATUS_UPDATED.toString(), AutoIngestManager.Event.JOB_COMPLETED.toString(), AutoIngestManager.Event.CASE_PRIORITIZED.toString(), - AutoIngestManager.Event.CASE_DEPRIORITIZED.toString(), AutoIngestManager.Event.JOB_STARTED.toString()})); private final AutopsyEventPublisher eventPublisher; private CoordinationService coordinationService; @@ -319,7 +318,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * Publish a deprioritization event. */ new Thread(() -> { - eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); } return jobsSnapshot; @@ -416,7 +415,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen */ final String caseName = job.getManifest().getCaseName(); new Thread(() -> { - eventPublisher.publishRemotely(new AutoIngestCaseDeprioritizedEvent(LOCAL_HOST_NAME, caseName)); + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); } From ff6feace5290401daa5594b11b9e5c55dd291033 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 26 Feb 2018 17:29:58 -0500 Subject: [PATCH 18/23] Disable deprioritize buttons when not prioritized. --- .../autoingest/AutoIngestControlPanel.java | 37 +++++++++++++++---- .../autoingest/AutoIngestDashboard.java | 11 ++++-- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index 19f7840123..ea5b7b5ee3 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -393,7 +393,14 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { return; } int row = pendingTable.getSelectedRow(); - enablePendingTableButtons((row >= 0) && (row < pendingTable.getRowCount())); + boolean enablePrioritizeButtons = false; + boolean enableDeprioritizeButtons = false; + if ((row >= 0) && (row < pendingTable.getRowCount())) { + enablePrioritizeButtons = true; + enableDeprioritizeButtons = ((Integer) pendingTableModel.getValueAt(row, JobsTableModelColumns.PRIORITY.ordinal()) > 0); + } + enablePrioritizeButtons(enablePrioritizeButtons); + enableDeprioritizeButtons(enableDeprioritizeButtons); }); /* @@ -597,7 +604,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { private void initButtons() { bnOptions.setEnabled(true); bnDeleteCase.setEnabled(false); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); bnShowCaseLog.setEnabled(false); bnReprocessJob.setEnabled(false); bnPause.setText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnStart.text")); @@ -620,13 +628,22 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } /** - * Enables or disables buttons related to pending jobs table. + * Enables or disables prioritize buttons related to the pending jobs table. * * @param enable Enable/disable the buttons. */ - private void enablePendingTableButtons(Boolean enable) { + private void enablePrioritizeButtons(Boolean enable) { bnPrioritizeCase.setEnabled(enable); bnPrioritizeJob.setEnabled(enable); + } + + /** + * Enables or disables deprioritize buttons related to the pending jobs + * table. + * + * @param enable Enable/disable the buttons. + */ + private void enableDeprioritizeButtons(Boolean enable) { bnDeprioritizeCase.setEnabled(enable); bnDeprioritizeJob.setEnabled(enable); } @@ -1769,7 +1786,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } refreshTables(); pendingTable.clearSelection(); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); } }//GEN-LAST:event_bnPrioritizeCaseActionPerformed @@ -1828,7 +1846,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } refreshTables(); pendingTable.clearSelection(); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); } }//GEN-LAST:event_bnPrioritizeJobActionPerformed @@ -1874,7 +1893,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } refreshTables(); pendingTable.clearSelection(); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); } }//GEN-LAST:event_bnDeprioritizeCaseActionPerformed @@ -1892,7 +1912,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } refreshTables(); pendingTable.clearSelection(); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); } }//GEN-LAST:event_bnDeprioritizeJobActionPerformed diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 65b69f1c7c..9324f782a3 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -247,11 +247,16 @@ final class AutoIngestDashboard extends JPanel implements Observer { } int row = pendingTable.getSelectedRow(); - boolean enablePrioritizeButtons = (row >= 0 && row < pendingTable.getRowCount()); + boolean enablePrioritizeButtons = false; + boolean enableDeprioritizeButtons = false; + if (row >= 0 && row < pendingTable.getRowCount()) { + enablePrioritizeButtons = true; + enableDeprioritizeButtons = (Integer) pendingTableModel.getValueAt(row, JobsTableModelColumns.PRIORITY.ordinal()) > 0; + } this.prioritizeJobButton.setEnabled(enablePrioritizeButtons); this.prioritizeCaseButton.setEnabled(enablePrioritizeButtons); - this.deprioritizeJobButton.setEnabled(enablePrioritizeButtons); - this.deprioritizeCaseButton.setEnabled(enablePrioritizeButtons); + this.deprioritizeJobButton.setEnabled(enableDeprioritizeButtons); + this.deprioritizeCaseButton.setEnabled(enableDeprioritizeButtons); }); } From e1251d7975e0a7022b851d6175f2f5e155e8168c Mon Sep 17 00:00:00 2001 From: "U-BASIS\\zhaohui" Date: Tue, 27 Feb 2018 12:48:58 -0500 Subject: [PATCH 19/23] Delete Autopsy Core Unit test: IngestFileFiltersTest.java --- .../autopsy/ingest/IngestFileFiltersTest.java | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java b/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java deleted file mode 100644 index 29618e30ec..0000000000 --- a/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2011-2017 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.ingest; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -public class IngestFileFiltersTest { - - public IngestFileFiltersTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - @Test - public void testFilters() { - System.out.println("Test filter"); - } -} From 2fda9c44fa998fb2ffd056ffade2357262ba6659 Mon Sep 17 00:00:00 2001 From: esaunders Date: Tue, 27 Feb 2018 16:42:58 -0500 Subject: [PATCH 20/23] Remove date/times from report paths. --- test/script/tskdbdiff.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index d9e4050aaf..97530caf7b 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -322,7 +322,6 @@ class TskDbDiff(object): id_reports_table = build_id_reports_table(conn.cursor(), isMultiUser) id_obj_path_table = build_id_obj_path_table(id_files_table, id_objects_table, id_artifact_types_table, id_reports_table) - #line = normalize_db_entry(line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table) if isMultiUser: # Use PostgreSQL os.environ['PGPASSWORD']=pgSettings.password pgDump = ["pg_dump", "--inserts", "-U", pgSettings.username, "-h", pgSettings.pgHost, "-p", pgSettings.pgPort, "-d", db_file, "-E", "utf-8", "-T", "blackboard_artifacts", "-T", "blackboard_attributes", "-f", "postgreSQLDump.sql"] @@ -482,14 +481,16 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info elif obj_id in reports_table.keys(): path = reports_table[obj_id] - # remove host name from path for reports (only applicable for multi-user) + # remove host name (for multi-user) and dates/times from path for reports if path is not None: - moduleOutput_idx = path.find('ModuleOutput') - if moduleOutput_idx > -1: - path = "'" + path[path.find('ModuleOutput'):] - reports_idx = path.find('\\Reports\\AutopsyTestCase') - if reports_idx > -1: - path = "'" + path[path.find('Reports\\AutopsyTestCase'):] + if 'ModuleOutput' in path: + # skip past the host name (if any) + path = path[path.find('ModuleOutput'):] + if 'BulkExtractor' in path or 'Smirk' in path: + # chop off the last folder (which contains a date/time) + path = path[:path.rfind('\\')] + if '\\Reports\\AutopsyTestCase HTML Report' in path: + path = 'Reports\\AutopsyTestCase HTML Report' if parent_id in files_table.keys(): parent_path = files_table[parent_id] From 274ed59ad759c78437bdd50c17a79760fa3bc2fa Mon Sep 17 00:00:00 2001 From: esaunders Date: Tue, 27 Feb 2018 17:31:29 -0500 Subject: [PATCH 21/23] Fixes for quotes, slashes and host names in paths. --- test/script/tskdbdiff.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index 97530caf7b..66d8340078 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -503,6 +503,11 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info elif parent_id == 'NULL': parent_path = "NULL" + # Remove host name (for multi-user) from parent_path + if parent_path is not None: + if 'ModuleOutput' in parent_path: + # skip past the host name (if any) + parent_path = parent_path[parent_path.find('ModuleOutput'):] if path and parent_path: return newLine + path + ', ' + parent_path + ', ' + ', '.join(fields_list[2:]) + ');' From eb1bb6b93c2709ae03db2a64e058c285126d2882 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Wed, 28 Feb 2018 10:40:33 -0500 Subject: [PATCH 22/23] rearranged methods to group ingest filters from interesting files methods --- .../interestingitems/FilesSetsManager.java | 74 ++++++++++--------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java index 8397d77c72..11831a77c8 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java @@ -102,29 +102,7 @@ public final class FilesSetsManager extends Observable { public static List getStandardFileIngestFilters() { return Arrays.asList(FILES_DIRS_UNALLOC_INGEST_FILTER, FILES_DIRS_INGEST_FILTER); } - - /** - * Get the filter that should be used as the default value, if no filter is - * specified. - * - * @return FILES_DIRS_UNALLOC_INGEST_FILTER - */ - public static FilesSet getDefaultFilter() { - return FILES_DIRS_UNALLOC_INGEST_FILTER; - } - - /** - * Gets a copy of the current interesting files set definitions. - * - * @return A map of interesting files set names to interesting file sets, - * possibly empty. - */ - Map getInterestingFilesSets() throws FilesSetsManagerException { - synchronized (INTERESTING_FILES_SET_LOCK) { - return InterestingItemsFilesSetSettings.readDefinitionsFile(INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME); - } - } - + /** * Gets a copy of the current ingest file set definitions. * @@ -139,6 +117,43 @@ public final class FilesSetsManager extends Observable { } } + /** + * Get the filter that should be used as the default value, if no filter is + * specified. + * + * @return FILES_DIRS_UNALLOC_INGEST_FILTER + */ + public static FilesSet getDefaultFilter() { + return FILES_DIRS_UNALLOC_INGEST_FILTER; + } + + /** + * Sets the current interesting file sets definitions, replacing any + * previous definitions. + * + * @param filesSets A mapping of file ingest filters names to files sets, + * used to enforce unique files set names. + */ + void setCustomFileIngestFilters(Map filesSets) throws FilesSetsManagerException { + synchronized (FILE_INGEST_FILTER_LOCK) { + FileSetsDefinitions.writeDefinitionsFile(FILE_INGEST_FILTER_DEFS_NAME, filesSets); + } + } + + + /** + * Gets a copy of the current interesting files set definitions. + * + * @return A map of interesting files set names to interesting file sets, + * possibly empty. + */ + Map getInterestingFilesSets() throws FilesSetsManagerException { + synchronized (INTERESTING_FILES_SET_LOCK) { + return InterestingItemsFilesSetSettings.readDefinitionsFile(INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME); + } + } + + /** * Sets the current interesting file sets definitions, replacing any * previous definitions. @@ -154,18 +169,7 @@ public final class FilesSetsManager extends Observable { } } - /** - * Sets the current interesting file sets definitions, replacing any - * previous definitions. - * - * @param filesSets A mapping of file ingest filters names to files sets, - * used to enforce unique files set names. - */ - void setCustomFileIngestFilters(Map filesSets) throws FilesSetsManagerException { - synchronized (FILE_INGEST_FILTER_LOCK) { - FileSetsDefinitions.writeDefinitionsFile(FILE_INGEST_FILTER_DEFS_NAME, filesSets); - } - } + public static class FilesSetsManagerException extends Exception { From 80868442fde3936460bae6d53c4b9e27444a1ff1 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Wed, 28 Feb 2018 10:45:05 -0500 Subject: [PATCH 23/23] Made method public so that modules would know what sets were configured --- .../autopsy/modules/interestingitems/FilesSetsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java index 11831a77c8..7347d32c8f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java @@ -147,7 +147,7 @@ public final class FilesSetsManager extends Observable { * @return A map of interesting files set names to interesting file sets, * possibly empty. */ - Map getInterestingFilesSets() throws FilesSetsManagerException { + public Map getInterestingFilesSets() throws FilesSetsManagerException { synchronized (INTERESTING_FILES_SET_LOCK) { return InterestingItemsFilesSetSettings.readDefinitionsFile(INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME); }