mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Merge branch 'develop' of https://github.com/sleuthkit/autopsy into kws
This commit is contained in:
commit
b2bd247fa1
@ -140,6 +140,8 @@ public class EmailExtracted implements AutopsyVisitableItem {
|
|||||||
} catch (TskCoreException | SQLException ex) {
|
} catch (TskCoreException | SQLException ex) {
|
||||||
logger.log(Level.WARNING, "Cannot initialize email extraction: ", ex); //NON-NLS
|
logger.log(Level.WARNING, "Cannot initialize email extraction: ", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
|
setChanged();
|
||||||
|
notifyObservers();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> parsePath(String path) {
|
private Map<String, String> parsePath(String path) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2014 Basis Technology Corp.
|
* Copyright 2011-2016 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -56,12 +56,15 @@ import org.sleuthkit.datamodel.TskCoreException;
|
|||||||
*/
|
*/
|
||||||
public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static ImageIcon warningIcon = new ImageIcon(IngestJobSettingsPanel.class.getResource("/org/sleuthkit/autopsy/images/warning_triangle.png"));
|
||||||
|
private static ImageIcon infoIcon = new ImageIcon(IngestJobSettingsPanel.class.getResource("/org/sleuthkit/autopsy/images/information-frame.png"));
|
||||||
private final IngestJobSettings settings;
|
private final IngestJobSettings settings;
|
||||||
|
private final List<Content> dataSources;
|
||||||
private final List<IngestModuleModel> modules;
|
private final List<IngestModuleModel> modules;
|
||||||
|
private List<IngestJobInfo> ingestJobs;
|
||||||
private IngestModuleModel selectedModule;
|
private IngestModuleModel selectedModule;
|
||||||
private IngestModulesTableModel tableModel = new IngestModulesTableModel();
|
private IngestModulesTableModel tableModel = new IngestModulesTableModel();
|
||||||
private List<IngestJobInfo> ingestJobs;
|
|
||||||
private List<Content> dataSources;
|
|
||||||
private static final Logger logger = Logger.getLogger(IngestJobSettingsPanel.class.getName());
|
private static final Logger logger = Logger.getLogger(IngestJobSettingsPanel.class.getName());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -156,25 +159,22 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
|||||||
// Add a selection listener to the table model that will display the
|
// Add a selection listener to the table model that will display the
|
||||||
// ingest job options panel of the currently selected module model and
|
// ingest job options panel of the currently selected module model and
|
||||||
// enable or disable the resources configuration panel invocation button.
|
// enable or disable the resources configuration panel invocation button.
|
||||||
modulesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
|
modulesTable.getSelectionModel().addListSelectionListener((ListSelectionEvent e) -> {
|
||||||
@Override
|
ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
|
||||||
public void valueChanged(ListSelectionEvent e) {
|
if (!listSelectionModel.isSelectionEmpty()) {
|
||||||
ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
|
int index = listSelectionModel.getMinSelectionIndex();
|
||||||
if (!listSelectionModel.isSelectionEmpty()) {
|
selectedModule = modules.get(index);
|
||||||
int index = listSelectionModel.getMinSelectionIndex();
|
ingestSettingsPanel.removeAll();
|
||||||
selectedModule = modules.get(index);
|
if (null != selectedModule.getModuleSettingsPanel()) {
|
||||||
ingestSettingsPanel.removeAll();
|
ingestSettingsPanel.add(selectedModule.getModuleSettingsPanel());
|
||||||
if (null != selectedModule.getModuleSettingsPanel()) {
|
} else {
|
||||||
ingestSettingsPanel.add(selectedModule.getModuleSettingsPanel());
|
ingestSettingsPanel.add(new JLabel(Bundle.IngestJobSettingsPanel_noPerRunSettings()));
|
||||||
} else {
|
|
||||||
ingestSettingsPanel.add(new JLabel(Bundle.IngestJobSettingsPanel_noPerRunSettings()));
|
|
||||||
}
|
|
||||||
ingestSettingsPanel.revalidate();
|
|
||||||
ingestSettingsPanel.repaint();
|
|
||||||
globalSettingsButton.setEnabled(null != selectedModule.getGlobalSettingsPanel());
|
|
||||||
descriptionLabel.setText(selectedModule.getDescription());
|
|
||||||
descriptionLabel.setToolTipText(selectedModule.getDescription());
|
|
||||||
}
|
}
|
||||||
|
ingestSettingsPanel.revalidate();
|
||||||
|
ingestSettingsPanel.repaint();
|
||||||
|
globalSettingsButton.setEnabled(null != selectedModule.getGlobalSettingsPanel());
|
||||||
|
descriptionLabel.setText(selectedModule.getDescription());
|
||||||
|
descriptionLabel.setToolTipText(selectedModule.getDescription());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
modulesTable.setRowSelectionInterval(0, 0);
|
modulesTable.setRowSelectionInterval(0, 0);
|
||||||
@ -354,14 +354,11 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
|||||||
private void globalSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_globalSettingsButtonActionPerformed
|
private void globalSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_globalSettingsButtonActionPerformed
|
||||||
final AdvancedConfigurationDialog dialog = new AdvancedConfigurationDialog(true);
|
final AdvancedConfigurationDialog dialog = new AdvancedConfigurationDialog(true);
|
||||||
|
|
||||||
dialog.addApplyButtonListener(new ActionListener() {
|
dialog.addApplyButtonListener((ActionEvent e) -> {
|
||||||
@Override
|
if (selectedModule.hasGlobalSettingsPanel()) {
|
||||||
public void actionPerformed(ActionEvent e) {
|
selectedModule.saveResourcesConfig();
|
||||||
if (selectedModule.hasGlobalSettingsPanel()) {
|
|
||||||
selectedModule.saveResourcesConfig();
|
|
||||||
}
|
|
||||||
dialog.close();
|
|
||||||
}
|
}
|
||||||
|
dialog.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog.addWindowListener(new WindowAdapter() {
|
dialog.addWindowListener(new WindowAdapter() {
|
||||||
@ -491,9 +488,6 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
|||||||
*/
|
*/
|
||||||
private class IngestModulesTableModel extends AbstractTableModel {
|
private class IngestModulesTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
ImageIcon warningIcon = new ImageIcon("Core\\src\\org\\sleuthkit\\autopsy\\images\\warning_triangle.png");
|
|
||||||
ImageIcon infoIcon = new ImageIcon("Core\\src\\org\\sleuthkit\\autopsy\\images\\information-frame.png");
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRowCount() {
|
public int getRowCount() {
|
||||||
return modules.size();
|
return modules.size();
|
||||||
@ -507,12 +501,13 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
|||||||
@Override
|
@Override
|
||||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
IngestModuleModel module = modules.get(rowIndex);
|
IngestModuleModel module = modules.get(rowIndex);
|
||||||
if (columnIndex == 0) {
|
switch (columnIndex) {
|
||||||
return module.isEnabled();
|
case 0:
|
||||||
} else if (columnIndex == 1) {
|
return module.isEnabled();
|
||||||
return getIcon(module);
|
case 1:
|
||||||
} else {
|
return getIcon(module);
|
||||||
return module.getName();
|
default:
|
||||||
|
return module.getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,6 +591,8 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
|||||||
"IngestJobSettingsPanel.IngestModulesTableRenderer.info.message=A previous version of this ingest module has been run before on this data source."})
|
"IngestJobSettingsPanel.IngestModulesTableRenderer.info.message=A previous version of this ingest module has been run before on this data source."})
|
||||||
private class IngestModulesTableRenderer extends DefaultTableCellRenderer {
|
private class IngestModulesTableRenderer extends DefaultTableCellRenderer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
List<String> tooltips = new ArrayList<>();
|
List<String> tooltips = new ArrayList<>();
|
||||||
|
|
||||||
public IngestModulesTableRenderer() {
|
public IngestModulesTableRenderer() {
|
||||||
@ -613,9 +610,9 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
|||||||
} else if (1 == column) {
|
} else if (1 == column) {
|
||||||
setIcon((Icon) value);
|
setIcon((Icon) value);
|
||||||
setText("");
|
setText("");
|
||||||
if (tableModel.warningIcon.equals(value)) {
|
if (warningIcon.equals(value)) {
|
||||||
setToolTipText(Bundle.IngestJobSettingsPanel_IngestModulesTableRenderer_warning_message());
|
setToolTipText(Bundle.IngestJobSettingsPanel_IngestModulesTableRenderer_warning_message());
|
||||||
} else if (tableModel.infoIcon.equals(value)) {
|
} else if (infoIcon.equals(value)) {
|
||||||
setToolTipText(Bundle.IngestJobSettingsPanel_IngestModulesTableRenderer_info_message());
|
setToolTipText(Bundle.IngestJobSettingsPanel_IngestModulesTableRenderer_info_message());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,13 +215,21 @@ public class RegressionTest extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testConfigureIngest1() {
|
public void testConfigureIngest1() {
|
||||||
logger.info("Ingest 1");
|
/*
|
||||||
|
* This timeout is to allow the setup for the ingest job settings panel
|
||||||
|
* to complete.
|
||||||
|
*/
|
||||||
|
new Timeout("pausing", 10000).sleep();
|
||||||
|
|
||||||
|
logger.info("Looking for hash lookup module in ingest job settings panel");
|
||||||
WizardOperator wo = new WizardOperator("Add Data");
|
WizardOperator wo = new WizardOperator("Add Data");
|
||||||
JTableOperator jto = new JTableOperator(wo, 0);
|
JTableOperator jto = new JTableOperator(wo, 0);
|
||||||
int row = jto.findCellRow("Hash Lookup", 1, 0);
|
int row = jto.findCellRow("Hash Lookup", 2, 0);
|
||||||
jto.clickOnCell(row, 2);
|
jto.clickOnCell(row, 1);
|
||||||
|
logger.info("Selected hash lookup module in ingest job settings panel");
|
||||||
JButtonOperator jbo1 = new JButtonOperator(wo, "Global Settings");
|
JButtonOperator jbo1 = new JButtonOperator(wo, "Global Settings");
|
||||||
jbo1.pushNoBlock();
|
jbo1.pushNoBlock();
|
||||||
|
logger.info("Pushed Global Settings button for hash lookup module in ingest job settings panel");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testConfigureHash() {
|
public void testConfigureHash() {
|
||||||
@ -255,13 +263,15 @@ public class RegressionTest extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testConfigureIngest2() {
|
public void testConfigureIngest2() {
|
||||||
logger.info("Ingest 2");
|
logger.info("Looking for keyword search module in ingest job settings panel");
|
||||||
WizardOperator wo = new WizardOperator("Add Data");
|
WizardOperator wo = new WizardOperator("Add Data");
|
||||||
JTableOperator jto = new JTableOperator(wo, 0);
|
JTableOperator jto = new JTableOperator(wo, 0);
|
||||||
int row = jto.findCellRow("Keyword Search", 1, 0);
|
int row = jto.findCellRow("Keyword Search", 2, 0);
|
||||||
jto.clickOnCell(row, 2);
|
jto.clickOnCell(row, 1);
|
||||||
|
logger.info("Selected keyword search module in ingest job settings panel");
|
||||||
JButtonOperator jbo1 = new JButtonOperator(wo, "Global Settings");
|
JButtonOperator jbo1 = new JButtonOperator(wo, "Global Settings");
|
||||||
jbo1.pushNoBlock();
|
jbo1.pushNoBlock();
|
||||||
|
logger.info("Pushed Global Settings button for keyword search module in ingest job settings panel");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testConfigureSearch() {
|
public void testConfigureSearch() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user