From 986296ecfcfe1125baeb0ca93232c8f15f756145 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\zhaohui" Date: Fri, 16 Feb 2018 13:46:33 -0500 Subject: [PATCH 01/19] 3532: Add a html file to include the links to case output directory. --- test/script/regression.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/test/script/regression.py b/test/script/regression.py index 3e9ee2e585..df8173da88 100644 --- a/test/script/regression.py +++ b/test/script/regression.py @@ -82,6 +82,8 @@ AUTOPSY_TEST_CASE = "AutopsyTestCase" Day = 0 +# HTML file name for links of output directories +OUTPUT_DIR_LINK_FILE="output_dir_link.html" def usage(): print ("-f PATH single file") @@ -106,6 +108,10 @@ def main(): if not parse_result: Errors.print_error("The arguments were given wrong") exit(1) + # Remove the output_link_file + if file_exists(OUTPUT_DIR_LINK_FILE): + os.remove(OUTPUT_DIR_LINK_FILE) + test_config = TestConfiguration(args) case_type = test_config.userCaseType.lower() if case_type.startswith('multi'): @@ -874,6 +880,24 @@ class TestConfiguration(object): self.output_dir = make_path(self.output_parent_dir, time.strftime("%Y.%m.%d-%H.%M.%S")) os.makedirs(self.output_dir) + + #write the output_dir to a html file + + linkFile = open(OUTPUT_DIR_LINK_FILE, "a") + index = self.output_dir.find("\\") + linkStr = "Multi test output" + else: + linkStr = linkStr + "\">Single test output" + linkFile.write(linkStr + "\n") + linkFile.close() + self.csv = make_path(self.output_dir, "CSV.txt") self.html_log = make_path(self.output_dir, "AutopsyTestCase.html") log_name = '' @@ -1097,7 +1121,7 @@ class TestResultsDiffer(object): print("This run took " + diff + "% longer to run than the last run.") return False - + class Reports(object): def generate_reports(test_data): """Generate the reports for a single test From ca2780b332c49d0f3c0ec6ae0c33b4956051aafe Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 21 Feb 2018 15:46:37 -0500 Subject: [PATCH 02/19] 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 03/19] 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 04/19] 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 05/19] 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 06/19] 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 07/19] 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 5be3ae9a8c7da36d5057a0a084a0b92116591ae9 Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 23 Feb 2018 07:26:52 -0500 Subject: [PATCH 08/19] 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 c1fd998807db128e53ae170f39d25df81805d86a Mon Sep 17 00:00:00 2001 From: Raman Date: Fri, 23 Feb 2018 11:38:44 -0500 Subject: [PATCH 09/19] 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 03943ac78a1e7d31630e83fa3416265f3a32ebd1 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 26 Feb 2018 11:59:27 -0500 Subject: [PATCH 10/19] 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 11/19] 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 fa51c573c1ed77e24338882b33f91f2e6602cf5b Mon Sep 17 00:00:00 2001 From: esaunders Date: Mon, 26 Feb 2018 12:22:38 -0500 Subject: [PATCH 12/19] Updated regression test script to handle indexed reports. --- test/script/tskdbdiff.py | 51 ++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index 2cfcc58042..d9e4050aaf 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -319,7 +319,8 @@ class TskDbDiff(object): id_fs_info_table = build_id_fs_info_table(conn.cursor(), isMultiUser) id_objects_table = build_id_objects_table(conn.cursor(), isMultiUser) id_artifact_types_table = build_id_artifact_types_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 = 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 @@ -340,7 +341,7 @@ class TskDbDiff(object): continue else: dump_line += line - dump_line = normalize_db_entry(dump_line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table) + dump_line = normalize_db_entry(dump_line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table, id_reports_table) db_log.write('%s\n' % dump_line) dump_line = '' postgreSQL_db.close() @@ -352,7 +353,7 @@ class TskDbDiff(object): # Write to the database dump with codecs.open(dump_file, "wb", "utf_8") as db_log: for line in conn.iterdump(): - line = normalize_db_entry(line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_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, id_reports_table) db_log.write('%s\n' % line) # Now sort the file srtcmdlst = ["sort", dump_file, "-o", dump_file] @@ -404,7 +405,7 @@ class PGSettings(object): return self.password -def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info_table, objects_table): +def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info_table, objects_table, reports_table): """ Make testing more consistent and reasonable by doctoring certain db entries. Args: @@ -464,8 +465,10 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info #if obj_id or parent_id is invalid literal, we simple return the values as it is try: obj_id = int(obj_id) - parent_id = int(parent_id) + if parent_id != 'NULL': + parent_id = int(parent_id) except Exception as e: + print(obj_id, parent_id) return line if obj_id in files_table.keys(): @@ -476,7 +479,18 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info path = vs_info_table[obj_id] elif obj_id in fs_info_table.keys(): path = fs_info_table[obj_id] + elif obj_id in reports_table.keys(): + path = reports_table[obj_id] + # remove host name from path for reports (only applicable for multi-user) + 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 parent_id in files_table.keys(): parent_path = files_table[parent_id] elif parent_id in vs_parts_table.keys(): @@ -485,6 +499,8 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info parent_path = vs_info_table[parent_id] elif parent_id in fs_info_table.keys(): parent_path = fs_info_table[parent_id] + elif parent_id == 'NULL': + parent_path = "NULL" if path and parent_path: @@ -590,20 +606,35 @@ def build_id_artifact_types_table(db_cursor, isPostgreSQL): mapping = dict([(row[0], row[1]) for row in sql_select_execute(db_cursor, isPostgreSQL, "SELECT blackboard_artifacts.artifact_obj_id, blackboard_artifact_types.type_name FROM blackboard_artifacts INNER JOIN blackboard_artifact_types ON blackboard_artifact_types.artifact_type_id = blackboard_artifacts.artifact_type_id ")]) return mapping +def build_id_reports_table(db_cursor, isPostgreSQL): + """Build the map of report object ids to report path. -def build_id_obj_path_table(files_table, objects_table, artifacts_table): + Args: + db_cursor: the database cursor + """ + # for each row in the reports table in the db, create an obj_id -> path map + mapping = dict([(row[0], row[1]) for row in sql_select_execute(db_cursor, isPostgreSQL, "SELECT obj_id, path FROM reports")]) + return mapping + + +def build_id_obj_path_table(files_table, objects_table, artifacts_table, reports_table): """Build the map of object ids to artifact ids. Args: files_table: obj_id, path objects_table: obj_id, par_obj_id, type artifacts_table: obj_id, artifact_type_name + reports_table: obj_id, path """ - # make a copy of files_table and updated it with new data from artifats_table + # make a copy of files_table and update it with new data from artifacts_table and reports_table mapping = files_table.copy() for k, v in objects_table.items(): - if k not in mapping.keys(): # If the mapping table doesn't have data for obj_id(k), we use it's par_obj_id's path+name plus it's artifact_type name as path - if k in artifacts_table.keys(): + if k not in mapping.keys(): # If the mapping table doesn't have data for obj_id(k) i.e. the object is not a file... + if k in reports_table.keys(): # For a report we use the report path + par_obj_id = v[0] + if par_obj_id is not None: + mapping[k] = reports_table[k] + elif k in artifacts_table.keys(): # For an artifact we use it's par_obj_id's path+name plus it's artifact_type name par_obj_id = v[0] path = mapping[par_obj_id] mapping[k] = path + "/" + artifacts_table[k] @@ -641,7 +672,7 @@ def main(): output_db = sys.argv.pop(0) gold_db = sys.argv.pop(0) except: - print("usage: tskdbdiff [OUPUT DB PATH] [GOLD DB PATH]") + print("usage: tskdbdiff [OUTPUT DB PATH] [GOLD DB PATH]") sys.exit(1) db_diff = TskDbDiff(output_db, gold_db, output_dir=".") From e46a20140556ba25d6762d9cb6a4517d733acda2 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 26 Feb 2018 15:11:19 -0500 Subject: [PATCH 13/19] 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 14/19] 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 15/19] 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 16/19] 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 17/19] 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 18/19] 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 19/19] 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); }