mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Centered more windows.
This commit is contained in:
parent
01b1467689
commit
afa6ec95b5
@ -82,7 +82,7 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
|||||||
this.repaint();
|
this.repaint();
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
logger.log(Level.SEVERE, "Failed to load ingest jobs.", ex);
|
logger.log(Level.SEVERE, "Failed to load ingest jobs.", ex);
|
||||||
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(this), Bundle.IngestJobInfoPanel_loadIngestJob_error_text(), Bundle.IngestJobInfoPanel_loadIngestJob_error_title(), JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(this, Bundle.IngestJobInfoPanel_loadIngestJob_error_text(), Bundle.IngestJobInfoPanel_loadIngestJob_error_title(), JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
|
|||||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.SwingUtilities;
|
|
||||||
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
|
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.PathValidator;
|
import org.sleuthkit.autopsy.coreutils.PathValidator;
|
||||||
@ -280,7 +279,7 @@ final class LocalFilesPanel extends JPanel {
|
|||||||
}//GEN-LAST:event_clearButtonActionPerformed
|
}//GEN-LAST:event_clearButtonActionPerformed
|
||||||
|
|
||||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||||
String displayName = JOptionPane.showInputDialog(SwingUtilities.getWindowAncestor(this), "New Display Name: ");
|
String displayName = JOptionPane.showInputDialog(this, "New Display Name: ");
|
||||||
if (displayName != null && !displayName.equals("")) {
|
if (displayName != null && !displayName.equals("")) {
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
this.displayNameLabel.setText("Display Name: " + this.displayName);
|
this.displayNameLabel.setText("Display Name: " + this.displayName);
|
||||||
|
@ -29,6 +29,7 @@ import javax.swing.event.DocumentEvent;
|
|||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.datamodel.TskData;
|
import org.sleuthkit.datamodel.TskData;
|
||||||
|
|
||||||
@Messages({"TagNameDialog.descriptionLabel.text=Description:",
|
@Messages({"TagNameDialog.descriptionLabel.text=Description:",
|
||||||
@ -76,10 +77,7 @@ final class TagNameDialog extends javax.swing.JDialog {
|
|||||||
/*
|
/*
|
||||||
* Center the dialog
|
* Center the dialog
|
||||||
*/
|
*/
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
int width = this.getSize().width;
|
|
||||||
int height = this.getSize().height;
|
|
||||||
setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add a handler for when the dialog window is closed directly.
|
* Add a handler for when the dialog window is closed directly.
|
||||||
|
@ -328,7 +328,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
|||||||
updatePanel();
|
updatePanel();
|
||||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(this),
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.message"),
|
NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.message"),
|
||||||
NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.title"),
|
NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.title"),
|
||||||
JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.INFORMATION_MESSAGE);
|
||||||
|
@ -95,7 +95,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
|||||||
boolean result = EamDbUtil.upgradeDatabase();
|
boolean result = EamDbUtil.upgradeDatabase();
|
||||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||||
if(! result){
|
if(! result){
|
||||||
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(this),
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"GlobalSettingsPanel.updateFailed.message"),
|
"GlobalSettingsPanel.updateFailed.message"),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Central Repository
|
* Central Repository
|
||||||
*
|
*
|
||||||
* Copyright 2015-2017 Basis Technology Corp.
|
* Copyright 2015-2018 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");
|
||||||
@ -19,8 +19,6 @@
|
|||||||
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.DefaultListCellRenderer;
|
import javax.swing.DefaultListCellRenderer;
|
||||||
@ -46,7 +44,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
|||||||
private EamDb dbManager;
|
private EamDb dbManager;
|
||||||
private EamOrganization newOrg;
|
private EamOrganization newOrg;
|
||||||
private final DefaultListModel<EamOrganization> rulesListModel = new DefaultListModel<>();
|
private final DefaultListModel<EamOrganization> rulesListModel = new DefaultListModel<>();
|
||||||
private final static Logger LOGGER = Logger.getLogger(ManageOrganizationsDialog.class.getName());
|
private final static Logger logger = Logger.getLogger(ManageOrganizationsDialog.class.getName());
|
||||||
|
|
||||||
@Messages({"ManageOrganizationsDialog.title.text=Manage Organizations"})
|
@Messages({"ManageOrganizationsDialog.title.text=Manage Organizations"})
|
||||||
/**
|
/**
|
||||||
@ -352,7 +350,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
|||||||
} catch (EamDbException ex) {
|
} catch (EamDbException ex) {
|
||||||
JOptionPane.showMessageDialog(this,
|
JOptionPane.showMessageDialog(this,
|
||||||
ex.getMessage(), Bundle.ManageOrganizationsDialog_unableToDeleteOrg_title(), JOptionPane.WARNING_MESSAGE);
|
ex.getMessage(), Bundle.ManageOrganizationsDialog_unableToDeleteOrg_title(), JOptionPane.WARNING_MESSAGE);
|
||||||
LOGGER.log(Level.INFO, "Was unable to delete organization from central repository", ex);
|
logger.log(Level.INFO, "Was unable to delete organization from central repository", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.directorytree;
|
|||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
@ -31,6 +30,7 @@ import javax.swing.JDialog;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A dialog for adding or editing an external viewer rule
|
* A dialog for adding or editing an external viewer rule
|
||||||
@ -78,10 +78,7 @@ class AddExternalViewerRuleDialog extends JDialog {
|
|||||||
/**
|
/**
|
||||||
* Center the dialog.
|
* Center the dialog.
|
||||||
*/
|
*/
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
int width = this.getSize().width;
|
|
||||||
int height = this.getSize().height;
|
|
||||||
setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
|
|
||||||
|
|
||||||
add(this.addRulePanel, BorderLayout.PAGE_START);
|
add(this.addRulePanel, BorderLayout.PAGE_START);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -134,7 +134,7 @@ class AddExternalViewerRulePanel extends javax.swing.JPanel {
|
|||||||
ExternalViewerRule getRule() {
|
ExternalViewerRule getRule() {
|
||||||
String exePath = exePathTextField.getText();
|
String exePath = exePathTextField.getText();
|
||||||
if (exePath.isEmpty()) {
|
if (exePath.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExePath.message"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExePath.message"),
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExePath.title"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExePath.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -151,7 +151,7 @@ class AddExternalViewerRulePanel extends javax.swing.JPanel {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (name.isEmpty() || !detector.isDetectable(name)) {
|
if (name.isEmpty() || !detector.isDetectable(name)) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidMime.message"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidMime.message"),
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidMime.title"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidMime.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -160,7 +160,7 @@ class AddExternalViewerRulePanel extends javax.swing.JPanel {
|
|||||||
return new ExternalViewerRule(name, exePath, ExternalViewerRule.RuleType.MIME);
|
return new ExternalViewerRule(name, exePath, ExternalViewerRule.RuleType.MIME);
|
||||||
} else if (extRadioButton.isSelected()) {
|
} else if (extRadioButton.isSelected()) {
|
||||||
if (name.isEmpty() || !name.matches("^\\.?\\w+$")) {
|
if (name.isEmpty() || !name.matches("^\\.?\\w+$")) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExt.message"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExt.message"),
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExt.title"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.invalidExt.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -27,6 +27,7 @@ import javax.swing.AbstractAction;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
@ -129,32 +130,32 @@ public class ExternalViewerAction extends AbstractAction {
|
|||||||
runtime.exec(s);
|
runtime.exec(s);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
logger.log(Level.WARNING, "Could not open the specified viewer for the given file: " + file.getName(), ex); //NON-NLS
|
logger.log(Level.WARNING, "Could not open the specified viewer for the given file: " + file.getName(), ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null, Bundle.ExternalViewerAction_actionPerformed_failure_IO_message(), Bundle.ExternalViewerAction_actionPerformed_failure_title(), JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), Bundle.ExternalViewerAction_actionPerformed_failure_IO_message(), Bundle.ExternalViewerAction_actionPerformed_failure_title(), JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().open(file);
|
Desktop.getDesktop().open(file);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
logger.log(Level.WARNING, "Could not find a viewer for the given file: " + file.getName(), ex); //NON-NLS
|
logger.log(Level.WARNING, "Could not find a viewer for the given file: " + file.getName(), ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_IO_message(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_IO_message(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (UnsupportedOperationException ex) {
|
} catch (UnsupportedOperationException ex) {
|
||||||
logger.log(Level.WARNING, "Platform cannot open " + file.getName() + " in the defined editor.", ex); //NON-NLS
|
logger.log(Level.WARNING, "Platform cannot open " + file.getName() + " in the defined editor.", ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_support_message(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_support_message(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
logger.log(Level.WARNING, "Could not find the given file: " + file.getName(), ex); //NON-NLS
|
logger.log(Level.WARNING, "Could not find the given file: " + file.getName(), ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_missingFile_message(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_missingFile_message(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (SecurityException ex) {
|
} catch (SecurityException ex) {
|
||||||
logger.log(Level.WARNING, "Could not get permission to open the given file: " + file.getName(), ex); //NON-NLS
|
logger.log(Level.WARNING, "Could not get permission to open the given file: " + file.getName(), ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_permission_message(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_permission_message(),
|
||||||
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
Bundle.ExternalViewerAction_actionPerformed_failure_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -36,7 +36,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
*/
|
*/
|
||||||
final class ExternalViewerGlobalSettingsPanel extends javax.swing.JPanel implements OptionsPanel {
|
final class ExternalViewerGlobalSettingsPanel extends javax.swing.JPanel implements OptionsPanel {
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(ExternalViewerGlobalSettingsPanel.class.getName());
|
private static final Logger logger = Logger.getLogger(ExternalViewerGlobalSettingsPanel.class.getName());
|
||||||
private DefaultListModel<ExternalViewerRule> rulesListModel;
|
private DefaultListModel<ExternalViewerRule> rulesListModel;
|
||||||
private java.util.List<ExternalViewerRule> rules;
|
private java.util.List<ExternalViewerRule> rules;
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ final class ExternalViewerGlobalSettingsPanel extends javax.swing.JPanel impleme
|
|||||||
ExternalViewerRule newRule = dialog.getRule();
|
ExternalViewerRule newRule = dialog.getRule();
|
||||||
// Only allow one association for each MIME type or extension.
|
// Only allow one association for each MIME type or extension.
|
||||||
if (rules.contains(newRule)) {
|
if (rules.contains(newRule)) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.message"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.message"),
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.title"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -277,7 +277,7 @@ final class ExternalViewerGlobalSettingsPanel extends javax.swing.JPanel impleme
|
|||||||
ExternalViewerRule newRule = dialog.getRule();
|
ExternalViewerRule newRule = dialog.getRule();
|
||||||
// Only allow one association for each MIME type or extension.
|
// Only allow one association for each MIME type or extension.
|
||||||
if (rules.contains(newRule)) {
|
if (rules.contains(newRule)) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.message"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.message"),
|
||||||
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.title"),
|
NbBundle.getMessage(ExternalViewerGlobalSettingsPanel.class, "ExternalViewerGlobalSettingsPanel.JOptionPane.ruleAlreadyExists.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2014-2017 Basis Technology Corp.
|
* Copyright 2014-2018 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");
|
||||||
@ -32,6 +32,7 @@ import javax.swing.JOptionPane;
|
|||||||
import org.netbeans.api.progress.ProgressHandle;
|
import org.netbeans.api.progress.ProgressHandle;
|
||||||
import org.openide.util.Cancellable;
|
import org.openide.util.Cancellable;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.NetworkUtils;
|
import org.sleuthkit.autopsy.coreutils.NetworkUtils;
|
||||||
@ -551,7 +552,7 @@ final class DataSourceIngestJob {
|
|||||||
// data source ingest module or the entire ingest job.
|
// data source ingest module or the entire ingest job.
|
||||||
DataSourceIngestCancellationPanel panel = new DataSourceIngestCancellationPanel();
|
DataSourceIngestCancellationPanel panel = new DataSourceIngestCancellationPanel();
|
||||||
String dialogTitle = NbBundle.getMessage(DataSourceIngestJob.this.getClass(), "IngestJob.cancellationDialog.title");
|
String dialogTitle = NbBundle.getMessage(DataSourceIngestJob.this.getClass(), "IngestJob.cancellationDialog.title");
|
||||||
JOptionPane.showConfirmDialog(null, panel, dialogTitle, JOptionPane.OK_OPTION, JOptionPane.PLAIN_MESSAGE);
|
JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(), panel, dialogTitle, JOptionPane.OK_OPTION, JOptionPane.PLAIN_MESSAGE);
|
||||||
if (panel.cancelAllDataSourceIngestModules()) {
|
if (panel.cancelAllDataSourceIngestModules()) {
|
||||||
DataSourceIngestJob.this.cancel(IngestJob.CancellationReason.USER_CANCELLED);
|
DataSourceIngestJob.this.cancel(IngestJob.CancellationReason.USER_CANCELLED);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -48,6 +48,7 @@ import javax.swing.JOptionPane;
|
|||||||
import org.netbeans.api.progress.ProgressHandle;
|
import org.netbeans.api.progress.ProgressHandle;
|
||||||
import org.openide.util.Cancellable;
|
import org.openide.util.Cancellable;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||||
import org.sleuthkit.autopsy.core.ServicesMonitor;
|
import org.sleuthkit.autopsy.core.ServicesMonitor;
|
||||||
@ -107,7 +108,7 @@ import org.sleuthkit.datamodel.Content;
|
|||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public class IngestManager {
|
public class IngestManager {
|
||||||
|
|
||||||
private final static Logger LOGGER = Logger.getLogger(IngestManager.class.getName());
|
private final static Logger logger = Logger.getLogger(IngestManager.class.getName());
|
||||||
private final static String INGEST_JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; //NON-NLS
|
private final static String INGEST_JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"; //NON-NLS
|
||||||
private final static Set<String> INGEST_JOB_EVENT_NAMES = Stream.of(IngestJobEvent.values()).map(IngestJobEvent::toString).collect(Collectors.toSet());
|
private final static Set<String> INGEST_JOB_EVENT_NAMES = Stream.of(IngestJobEvent.values()).map(IngestJobEvent::toString).collect(Collectors.toSet());
|
||||||
private final static String INGEST_MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; //NON-NLS
|
private final static String INGEST_MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"; //NON-NLS
|
||||||
@ -197,12 +198,12 @@ public class IngestManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String serviceDisplayName = ServicesMonitor.Service.valueOf(evt.getPropertyName()).getDisplayName();
|
String serviceDisplayName = ServicesMonitor.Service.valueOf(evt.getPropertyName()).getDisplayName();
|
||||||
LOGGER.log(Level.SEVERE, "Service {0} is down, cancelling all running ingest jobs", serviceDisplayName); //NON-NLS
|
logger.log(Level.SEVERE, "Service {0} is down, cancelling all running ingest jobs", serviceDisplayName); //NON-NLS
|
||||||
if (isIngestRunning() && RuntimeProperties.runningWithGUI()) {
|
if (isIngestRunning() && RuntimeProperties.runningWithGUI()) {
|
||||||
EventQueue.invokeLater(new Runnable() {
|
EventQueue.invokeLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(), "IngestManager.cancellingIngest.msgDlg.text"),
|
NbBundle.getMessage(this.getClass(), "IngestManager.cancellingIngest.msgDlg.text"),
|
||||||
NbBundle.getMessage(this.getClass(), "IngestManager.serviceIsDown.msgDlg.text", serviceDisplayName),
|
NbBundle.getMessage(this.getClass(), "IngestManager.serviceIsDown.msgDlg.text", serviceDisplayName),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -257,7 +258,7 @@ public class IngestManager {
|
|||||||
moduleEventPublisher.openRemoteEventChannel(String.format(INGEST_MODULE_EVENT_CHANNEL_NAME, channelPrefix));
|
moduleEventPublisher.openRemoteEventChannel(String.format(INGEST_MODULE_EVENT_CHANNEL_NAME, channelPrefix));
|
||||||
}
|
}
|
||||||
} catch (IllegalStateException | AutopsyEventException ex) {
|
} catch (IllegalStateException | AutopsyEventException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to open remote events channel", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Failed to open remote events channel", ex); //NON-NLS
|
||||||
MessageNotifyUtil.Notify.error(NbBundle.getMessage(IngestManager.class, "IngestManager.OpenEventChannel.Fail.Title"),
|
MessageNotifyUtil.Notify.error(NbBundle.getMessage(IngestManager.class, "IngestManager.OpenEventChannel.Fail.Title"),
|
||||||
NbBundle.getMessage(IngestManager.class, "IngestManager.OpenEventChannel.Fail.ErrMsg"));
|
NbBundle.getMessage(IngestManager.class, "IngestManager.OpenEventChannel.Fail.ErrMsg"));
|
||||||
}
|
}
|
||||||
@ -355,7 +356,7 @@ public class IngestManager {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
String serviceDisplayName = ServicesMonitor.Service.REMOTE_CASE_DATABASE.getDisplayName();
|
String serviceDisplayName = ServicesMonitor.Service.REMOTE_CASE_DATABASE.getDisplayName();
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(), "IngestManager.cancellingIngest.msgDlg.text"),
|
NbBundle.getMessage(this.getClass(), "IngestManager.cancellingIngest.msgDlg.text"),
|
||||||
NbBundle.getMessage(this.getClass(), "IngestManager.serviceIsDown.msgDlg.text", serviceDisplayName),
|
NbBundle.getMessage(this.getClass(), "IngestManager.serviceIsDown.msgDlg.text", serviceDisplayName),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -377,13 +378,13 @@ public class IngestManager {
|
|||||||
errors = job.start();
|
errors = job.start();
|
||||||
if (errors.isEmpty()) {
|
if (errors.isEmpty()) {
|
||||||
this.fireIngestJobStarted(job.getId());
|
this.fireIngestJobStarted(job.getId());
|
||||||
IngestManager.LOGGER.log(Level.INFO, "Ingest job {0} started", job.getId()); //NON-NLS
|
IngestManager.logger.log(Level.INFO, "Ingest job {0} started", job.getId()); //NON-NLS
|
||||||
} else {
|
} else {
|
||||||
this.ingestJobsById.remove(job.getId());
|
this.ingestJobsById.remove(job.getId());
|
||||||
for (IngestModuleError error : errors) {
|
for (IngestModuleError error : errors) {
|
||||||
LOGGER.log(Level.SEVERE, String.format("Error starting %s ingest module for job %d", error.getModuleDisplayName(), job.getId()), error.getThrowable()); //NON-NLS
|
logger.log(Level.SEVERE, String.format("Error starting %s ingest module for job %d", error.getModuleDisplayName(), job.getId()), error.getThrowable()); //NON-NLS
|
||||||
}
|
}
|
||||||
IngestManager.LOGGER.log(Level.SEVERE, "Ingest job {0} could not be started", job.getId()); //NON-NLS
|
IngestManager.logger.log(Level.SEVERE, "Ingest job {0} could not be started", job.getId()); //NON-NLS
|
||||||
if (RuntimeProperties.runningWithGUI()) {
|
if (RuntimeProperties.runningWithGUI()) {
|
||||||
final StringBuilder message = new StringBuilder(1024);
|
final StringBuilder message = new StringBuilder(1024);
|
||||||
message.append(Bundle.IngestManager_startupErr_dlgMsg()).append("\n"); //NON-NLS
|
message.append(Bundle.IngestManager_startupErr_dlgMsg()).append("\n"); //NON-NLS
|
||||||
@ -396,7 +397,7 @@ public class IngestManager {
|
|||||||
}
|
}
|
||||||
message.append("\n\n");
|
message.append("\n\n");
|
||||||
EventQueue.invokeLater(() -> {
|
EventQueue.invokeLater(() -> {
|
||||||
JOptionPane.showMessageDialog(null, message, Bundle.IngestManager_startupErr_dlgTitle(), JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), message, Bundle.IngestManager_startupErr_dlgTitle(), JOptionPane.ERROR_MESSAGE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new IngestJobStartResult(null, new IngestManagerException("Errors occurred while starting ingest"), errors); //NON-NLS
|
return new IngestJobStartResult(null, new IngestManagerException("Errors occurred while starting ingest"), errors); //NON-NLS
|
||||||
@ -415,10 +416,10 @@ public class IngestManager {
|
|||||||
long jobId = job.getId();
|
long jobId = job.getId();
|
||||||
ingestJobsById.remove(jobId);
|
ingestJobsById.remove(jobId);
|
||||||
if (!job.isCancelled()) {
|
if (!job.isCancelled()) {
|
||||||
IngestManager.LOGGER.log(Level.INFO, "Ingest job {0} completed", jobId); //NON-NLS
|
IngestManager.logger.log(Level.INFO, "Ingest job {0} completed", jobId); //NON-NLS
|
||||||
fireIngestJobCompleted(jobId);
|
fireIngestJobCompleted(jobId);
|
||||||
} else {
|
} else {
|
||||||
IngestManager.LOGGER.log(Level.INFO, "Ingest job {0} cancelled", jobId); //NON-NLS
|
IngestManager.logger.log(Level.INFO, "Ingest job {0} cancelled", jobId); //NON-NLS
|
||||||
fireIngestJobCancelled(jobId);
|
fireIngestJobCancelled(jobId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -64,7 +64,7 @@ public final class RunIngestModulesAction extends AbstractAction {
|
|||||||
for (String warning : warnings) {
|
for (String warning : warnings) {
|
||||||
warningMessage.append(warning).append("\n");
|
warningMessage.append(warning).append("\n");
|
||||||
}
|
}
|
||||||
JOptionPane.showMessageDialog(null, warningMessage.toString());
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), warningMessage.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private final List<Content> dataSources = new ArrayList<>();
|
private final List<Content> dataSources = new ArrayList<>();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -26,6 +26,7 @@ import javax.swing.AbstractAction;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +60,7 @@ class AddFileExtensionAction extends AbstractAction {
|
|||||||
FileExtMismatchSettings.writeSettings(new FileExtMismatchSettings(editableMap));
|
FileExtMismatchSettings.writeSettings(new FileExtMismatchSettings(editableMap));
|
||||||
} catch (FileExtMismatchSettings.FileExtMismatchSettingsException ex) {
|
} catch (FileExtMismatchSettings.FileExtMismatchSettingsException ex) {
|
||||||
//error
|
//error
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.AddFileExtensionAction_writeError_message(),
|
Bundle.AddFileExtensionAction_writeError_message(),
|
||||||
NbBundle.getMessage(this.getClass(), "AddFileExtensionAction.msgDlg.title"),
|
NbBundle.getMessage(this.getClass(), "AddFileExtensionAction.msgDlg.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -29,6 +29,7 @@ import javax.swing.JOptionPane;
|
|||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.Utilities;
|
import org.openide.util.Utilities;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.corecomponentinterfaces.ContextMenuActionsProvider;
|
import org.sleuthkit.autopsy.corecomponentinterfaces.ContextMenuActionsProvider;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||||
@ -98,7 +99,7 @@ public class FileExtMismatchContextMenuActionsProvider implements ContextMenuAct
|
|||||||
actions.get(0).setEnabled(false);
|
actions.get(0).setEnabled(false);
|
||||||
}
|
}
|
||||||
} catch (FileExtMismatchSettings.FileExtMismatchSettingsException ex) {
|
} catch (FileExtMismatchSettings.FileExtMismatchSettingsException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(), "AddFileExtensionAction.msgDlg.msg2"),
|
NbBundle.getMessage(this.getClass(), "AddFileExtensionAction.msgDlg.msg2"),
|
||||||
NbBundle.getMessage(this.getClass(), "AddFileExtensionAction.msgDlg.title"),
|
NbBundle.getMessage(this.getClass(), "AddFileExtensionAction.msgDlg.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -319,28 +319,28 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
|||||||
|
|
||||||
// Add a user-provided filename extension string to the selecte mimetype
|
// Add a user-provided filename extension string to the selecte mimetype
|
||||||
private void newExtButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newExtButtonActionPerformed
|
private void newExtButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newExtButtonActionPerformed
|
||||||
String newExt = (String) JOptionPane.showInputDialog(null, NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.message"),
|
String newExt = (String) JOptionPane.showInputDialog(this, NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.title"), JOptionPane.PLAIN_MESSAGE, null, null, "");
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.title"), JOptionPane.PLAIN_MESSAGE, null, null, "");
|
||||||
|
|
||||||
if (newExt == null) {
|
if (newExt == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newExt.isEmpty()) {
|
if (newExt.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.empty.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.empty.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.empty.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.empty.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (selectedMime.isEmpty()) {
|
if (selectedMime.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (currentExtensions.contains(newExt)) {
|
if (currentExtensions.contains(newExt)) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.extExists.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.extExists.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.extExists.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newExtPrompt.extExists.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -361,7 +361,7 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
|||||||
|
|
||||||
private void removeExtButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeExtButtonActionPerformed
|
private void removeExtButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeExtButtonActionPerformed
|
||||||
if (selectedExt.isEmpty()) {
|
if (selectedExt.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noneSelected.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noneSelected.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noneSelected.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noneSelected.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -369,7 +369,7 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (selectedMime.isEmpty()) {
|
if (selectedMime.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -391,7 +391,7 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
|||||||
|
|
||||||
private void removeTypeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeTypeButtonActionPerformed
|
private void removeTypeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeTypeButtonActionPerformed
|
||||||
if (selectedMime.isEmpty()) {
|
if (selectedMime.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -407,28 +407,28 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
|||||||
}//GEN-LAST:event_removeTypeButtonActionPerformed
|
}//GEN-LAST:event_removeTypeButtonActionPerformed
|
||||||
|
|
||||||
private void newTypeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newTypeButtonActionPerformed
|
private void newTypeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newTypeButtonActionPerformed
|
||||||
String newMime = (String) JOptionPane.showInputDialog(null, NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.message"),
|
String newMime = (String) JOptionPane.showInputDialog(this, NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.title"), JOptionPane.PLAIN_MESSAGE, null, null, "");
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.title"), JOptionPane.PLAIN_MESSAGE, null, null, "");
|
||||||
|
|
||||||
if (newMime == null) {
|
if (newMime == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newMime.isEmpty()) {
|
if (newMime.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newMime.equals("application/octet-stream")) { //NON-NLS
|
if (newMime.equals("application/octet-stream")) { //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mimeList.contains(newMime)) {
|
if (mimeList.contains(newMime)) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -444,7 +444,7 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
|||||||
}
|
}
|
||||||
boolean mimeTypeDetectable = (null != detector) ? detector.isDetectable(newMime) : false;
|
boolean mimeTypeDetectable = (null != detector) ? detector.isDetectable(newMime) : false;
|
||||||
if (!mimeTypeDetectable) {
|
if (!mimeTypeDetectable) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.message"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.message"),
|
||||||
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.title"),
|
NbBundle.getMessage(FileExtMismatchSettingsPanel.class, "FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -34,6 +34,7 @@ import javax.swing.JFrame;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog used for editing or adding file types.
|
* Dialog used for editing or adding file types.
|
||||||
@ -92,10 +93,7 @@ class AddFileTypeDialog extends JDialog {
|
|||||||
/**
|
/**
|
||||||
* Center the dialog.
|
* Center the dialog.
|
||||||
*/
|
*/
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
int width = this.getSize().width;
|
|
||||||
int height = this.getSize().height;
|
|
||||||
setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the default or saved ingest job settings for this context and use
|
* Get the default or saved ingest job settings for this context and use
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -105,7 +105,7 @@ class AddFileTypePanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
//if typeName does not equal sanitized typeName display message saying this name will be used instead
|
//if typeName does not equal sanitized typeName display message saying this name will be used instead
|
||||||
if (typeName.isEmpty()) {
|
if (typeName.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidMIMEType.message"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidMIMEType.message"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidMIMEType.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidMIMEType.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -114,7 +114,7 @@ class AddFileTypePanel extends javax.swing.JPanel {
|
|||||||
//if we need to remove more characters could use matches instead of contains and regex "[^\\w\s\\-\\/] to remove everything that isnt a letter, number, underscore, whitespace, dash, or forward slash.
|
//if we need to remove more characters could use matches instead of contains and regex "[^\\w\s\\-\\/] to remove everything that isnt a letter, number, underscore, whitespace, dash, or forward slash.
|
||||||
if (typeName.contains("\'")) { //remove single apostraphes as they are an easy way to accidently screw up PostgreSQL
|
if (typeName.contains("\'")) { //remove single apostraphes as they are an easy way to accidently screw up PostgreSQL
|
||||||
typeName = typeName.replaceAll("[\\']", "");
|
typeName = typeName.replaceAll("[\\']", "");
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.containsIllegalCharacter.message", typeName),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.containsIllegalCharacter.message", typeName),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.containsIllegalCharacter.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.containsIllegalCharacter.title"),
|
||||||
JOptionPane.WARNING_MESSAGE);
|
JOptionPane.WARNING_MESSAGE);
|
||||||
@ -125,7 +125,7 @@ class AddFileTypePanel extends javax.swing.JPanel {
|
|||||||
//if the MIME type has more than 2 parts the first part will be used as a media type and the remainder of the string as the sub-type
|
//if the MIME type has more than 2 parts the first part will be used as a media type and the remainder of the string as the sub-type
|
||||||
String[] splitName = typeName.split("/");
|
String[] splitName = typeName.split("/");
|
||||||
if (splitName.length < 2 || splitName[0].isEmpty()) {
|
if (splitName.length < 2 || splitName[0].isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.message", typeName),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.message", typeName),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.title"),
|
||||||
JOptionPane.WARNING_MESSAGE);
|
JOptionPane.WARNING_MESSAGE);
|
||||||
@ -137,7 +137,7 @@ class AddFileTypePanel extends javax.swing.JPanel {
|
|||||||
//suggests a mime_type that will be the same after it is split appart and rejoined
|
//suggests a mime_type that will be the same after it is split appart and rejoined
|
||||||
if (!StringUtils.join(ArrayUtils.subarray(splitName, 0, splitName.length), "/").equals(typeName)) {
|
if (!StringUtils.join(ArrayUtils.subarray(splitName, 0, splitName.length), "/").equals(typeName)) {
|
||||||
String rejoinedMimeType = StringUtils.join(ArrayUtils.subarray(splitName, 0, splitName.length), "/");
|
String rejoinedMimeType = StringUtils.join(ArrayUtils.subarray(splitName, 0, splitName.length), "/");
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.message", rejoinedMimeType),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.message", rejoinedMimeType),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "AddFileTypePanel.nonStandardMIMEType.title"),
|
||||||
JOptionPane.WARNING_MESSAGE);
|
JOptionPane.WARNING_MESSAGE);
|
||||||
@ -145,7 +145,7 @@ class AddFileTypePanel extends javax.swing.JPanel {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (this.signaturesListModel.isEmpty()) {
|
if (this.signaturesListModel.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
Bundle.AddMimeTypePanel_emptySigList_message(),
|
Bundle.AddMimeTypePanel_emptySigList_message(),
|
||||||
Bundle.AddMimeTypePanel_emptySigList_title(),
|
Bundle.AddMimeTypePanel_emptySigList_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -159,7 +159,7 @@ class AddFileTypePanel extends javax.swing.JPanel {
|
|||||||
String setName = "";
|
String setName = "";
|
||||||
if (this.postHitCheckBox.isSelected()) {
|
if (this.postHitCheckBox.isSelected()) {
|
||||||
if (this.setNameTextField.getText().isEmpty()) {
|
if (this.setNameTextField.getText().isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
Bundle.AddMimeTypePanel_emptySetName_message(),
|
Bundle.AddMimeTypePanel_emptySetName_message(),
|
||||||
Bundle.AddMimeTypePanel_emptySetName_title(),
|
Bundle.AddMimeTypePanel_emptySetName_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -32,6 +32,7 @@ import javax.swing.JFrame;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.RunIngestModulesAction;
|
import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.RunIngestModulesAction;
|
||||||
import org.sleuthkit.autopsy.modules.filetypeid.FileType.Signature;
|
import org.sleuthkit.autopsy.modules.filetypeid.FileType.Signature;
|
||||||
|
|
||||||
@ -109,10 +110,7 @@ final class AddFileTypeSignatureDialog extends JDialog {
|
|||||||
/**
|
/**
|
||||||
* Center the dialog.
|
* Center the dialog.
|
||||||
*/
|
*/
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
int width = this.getSize().width;
|
|
||||||
int height = this.getSize().height;
|
|
||||||
setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the default or saved ingest job settings for this context and use
|
* Get the default or saved ingest job settings for this context and use
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -106,7 +106,7 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel {
|
|||||||
try {
|
try {
|
||||||
this.signatureTextField.setText(new String(toEdit.getSignatureBytes(), "UTF-8"));
|
this.signatureTextField.setText(new String(toEdit.getSignatureBytes(), "UTF-8"));
|
||||||
} catch (UnsupportedEncodingException ex) {
|
} catch (UnsupportedEncodingException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
ex.getLocalizedMessage(),
|
ex.getLocalizedMessage(),
|
||||||
Bundle.AddFileTypeSignaturePanel_signatureStringFail_text(),
|
Bundle.AddFileTypeSignaturePanel_signatureStringFail_text(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -134,7 +134,7 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel {
|
|||||||
String sigString = signatureTextField.getText();
|
String sigString = signatureTextField.getText();
|
||||||
|
|
||||||
if (sigString.isEmpty()) {
|
if (sigString.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignature.message"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignature.message"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignature.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignature.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -147,7 +147,7 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel {
|
|||||||
sigString = sigString.replaceAll("\\s", ""); //NON-NLS
|
sigString = sigString.replaceAll("\\s", ""); //NON-NLS
|
||||||
signatureBytes = DatatypeConverter.parseHexBinary(sigString);
|
signatureBytes = DatatypeConverter.parseHexBinary(sigString);
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidRawSignatureBytes.message"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidRawSignatureBytes.message"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignatureBytes.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidSignatureBytes.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -166,14 +166,14 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel {
|
|||||||
try {
|
try {
|
||||||
offset = Long.parseUnsignedLong(offsetTextField.getText());
|
offset = Long.parseUnsignedLong(offsetTextField.getText());
|
||||||
if (!isRelativeToStart && signatureBytes.length > offset + 1) {
|
if (!isRelativeToStart && signatureBytes.length > offset + 1) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.length"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.length"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException ex) {
|
} catch (NumberFormatException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.message"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.message"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.invalidOffset.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015 Basis Technology Corp.
|
* Copyright 2014-2018 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");
|
||||||
@ -29,6 +29,7 @@ import java.util.Objects;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.xml.bind.DatatypeConverter;
|
import javax.xml.bind.DatatypeConverter;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
@ -384,7 +385,7 @@ class FileType implements Serializable {
|
|||||||
try {
|
try {
|
||||||
signatureBytesString = new String(this.getSignatureBytes(), "UTF-8");
|
signatureBytesString = new String(this.getSignatureBytes(), "UTF-8");
|
||||||
} catch (UnsupportedEncodingException ex) {
|
} catch (UnsupportedEncodingException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
ex.getLocalizedMessage(),
|
ex.getLocalizedMessage(),
|
||||||
Bundle.AddFileTypeSignaturePanel_signatureStringFail_text(),
|
Bundle.AddFileTypeSignaturePanel_signatureStringFail_text(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -207,7 +207,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane
|
|||||||
}
|
}
|
||||||
} catch (CustomFileTypesException ex) {
|
} catch (CustomFileTypesException ex) {
|
||||||
logger.log(Level.SEVERE, "Failed to get custom file types", ex);
|
logger.log(Level.SEVERE, "Failed to get custom file types", ex);
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.loadFileTypes.errorMessage"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.loadFileTypes.errorMessage"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.loadFailed.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.loadFailed.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -263,7 +263,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane
|
|||||||
CustomFileTypesManager.getInstance().setUserDefinedFileTypes(fileTypes);
|
CustomFileTypesManager.getInstance().setUserDefinedFileTypes(fileTypes);
|
||||||
} catch (CustomFileTypesManager.CustomFileTypesException ex) {
|
} catch (CustomFileTypesManager.CustomFileTypesException ex) {
|
||||||
logger.log(Level.SEVERE, "Failed to set custom file types", ex);
|
logger.log(Level.SEVERE, "Failed to set custom file types", ex);
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.saveFileTypes.errorMessage"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.saveFileTypes.errorMessage"),
|
||||||
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.storeFailed.title"),
|
NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.JOptionPane.storeFailed.title"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013 Basis Technology Corp.
|
* Copyright 2013-2018 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");
|
||||||
@ -30,6 +30,7 @@ import javax.swing.JOptionPane;
|
|||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.Utilities;
|
import org.openide.util.Utilities;
|
||||||
import org.openide.util.actions.Presenter;
|
import org.openide.util.actions.Presenter;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||||
import static org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
|
import static org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
|
||||||
@ -150,7 +151,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
|
|||||||
// don't let them add the hash for an empty file to the DB
|
// don't let them add the hash for an empty file to the DB
|
||||||
if (HashUtility.isNoDataMd5(md5Hash)) { //NON-NLS
|
if (HashUtility.isNoDataMd5(md5Hash)) { //NON-NLS
|
||||||
Logger.getLogger(AddContentToHashDbAction.class.getName()).log(Level.INFO, "Not adding " + file.getName() + " to database (empty content)"); //NON-NLS
|
Logger.getLogger(AddContentToHashDbAction.class.getName()).log(Level.INFO, "Not adding " + file.getName() + " to database (empty content)"); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"AddContentToHashDbAction.addFilesToHashSet.unableToAddFileEmptyMsg",
|
"AddContentToHashDbAction.addFilesToHashSet.unableToAddFileEmptyMsg",
|
||||||
file.getName()),
|
file.getName()),
|
||||||
@ -163,7 +164,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
|
|||||||
hashSet.addHashes(file);
|
hashSet.addHashes(file);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Logger.getLogger(AddContentToHashDbAction.class.getName()).log(Level.SEVERE, "Error adding to hash database", ex); //NON-NLS
|
Logger.getLogger(AddContentToHashDbAction.class.getName()).log(Level.SEVERE, "Error adding to hash database", ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"AddContentToHashDbAction.addFilesToHashSet.unableToAddFileMsg",
|
"AddContentToHashDbAction.addFilesToHashSet.unableToAddFileMsg",
|
||||||
file.getName()),
|
file.getName()),
|
||||||
@ -172,7 +173,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
|
|||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"AddContentToHashDbAction.addFilesToHashSet.unableToAddFileSzMsg",
|
"AddContentToHashDbAction.addFilesToHashSet.unableToAddFileSzMsg",
|
||||||
files.size() > 1 ? NbBundle
|
files.size() > 1 ? NbBundle
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013 Basis Technology Corp.
|
* Copyright 2013-2018 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");
|
||||||
@ -18,8 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.modules.hashdatabase;
|
package org.sleuthkit.autopsy.modules.hashdatabase;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -59,8 +57,7 @@ public class AddHashValuesToDatabaseDialog extends javax.swing.JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void display() {
|
private void display() {
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013 Basis Technology Corp.
|
* Copyright 2013-2018 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");
|
||||||
@ -19,8 +19,8 @@
|
|||||||
package org.sleuthkit.autopsy.modules.hashdatabase;
|
package org.sleuthkit.autopsy.modules.hashdatabase;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Component;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@ -61,7 +61,7 @@ public class AddHashValuesToDatabaseProgressDialog extends javax.swing.JDialog {
|
|||||||
AddHashValuesToDatabaseProgressDialog(AddHashValuesToDatabaseDialog parent, HashDb hashDb, String text) {
|
AddHashValuesToDatabaseProgressDialog(AddHashValuesToDatabaseDialog parent, HashDb hashDb, String text) {
|
||||||
super(parent);
|
super(parent);
|
||||||
initComponents();
|
initComponents();
|
||||||
display();
|
display(parent);
|
||||||
this.hashes = new ArrayList<>();
|
this.hashes = new ArrayList<>();
|
||||||
this.invalidHashes = new ArrayList<>();
|
this.invalidHashes = new ArrayList<>();
|
||||||
this.md5Pattern = Pattern.compile("^[a-fA-F0-9]{32}$"); // NON-NLS
|
this.md5Pattern = Pattern.compile("^[a-fA-F0-9]{32}$"); // NON-NLS
|
||||||
@ -70,9 +70,8 @@ public class AddHashValuesToDatabaseProgressDialog extends javax.swing.JDialog {
|
|||||||
this.text = text;
|
this.text = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void display() {
|
private void display(Component parent) {
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(parent);
|
||||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013 Basis Technology Corp.
|
* Copyright 2013-2018 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");
|
||||||
@ -18,8 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.modules.hashdatabase;
|
package org.sleuthkit.autopsy.modules.hashdatabase;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@ -121,8 +119,7 @@ final class HashDbCreateDatabaseDialog extends javax.swing.JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void display() {
|
private void display() {
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +162,7 @@ final class HashDbCreateDatabaseDialog extends javax.swing.JDialog {
|
|||||||
selectedOrg = orgs.get(0);
|
selectedOrg = orgs.get(0);
|
||||||
}
|
}
|
||||||
} catch (EamDbException ex) {
|
} catch (EamDbException ex) {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashDbCreateDatabaseDialog_populateOrgsError_message());
|
JOptionPane.showMessageDialog(this, Bundle.HashDbCreateDatabaseDialog_populateOrgsError_message());
|
||||||
Logger.getLogger(ImportCentralRepoDbProgressDialog.class.getName()).log(Level.SEVERE, "Failure loading organizations", ex);
|
Logger.getLogger(ImportCentralRepoDbProgressDialog.class.getName()).log(Level.SEVERE, "Failure loading organizations", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 - 2013 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -18,8 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.modules.hashdatabase;
|
package org.sleuthkit.autopsy.modules.hashdatabase;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@ -93,8 +91,7 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void display() {
|
private void display() {
|
||||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +142,7 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
|
|||||||
selectedOrg = orgs.get(0);
|
selectedOrg = orgs.get(0);
|
||||||
}
|
}
|
||||||
} catch (EamDbException ex) {
|
} catch (EamDbException ex) {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashDbImportDatabaseDialog_populateOrgsError_message());
|
JOptionPane.showMessageDialog(this, Bundle.HashDbImportDatabaseDialog_populateOrgsError_message());
|
||||||
Logger.getLogger(ImportCentralRepoDbProgressDialog.class.getName()).log(Level.SEVERE, "Failure loading organizations", ex);
|
Logger.getLogger(ImportCentralRepoDbProgressDialog.class.getName()).log(Level.SEVERE, "Failure loading organizations", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 - 2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -38,6 +38,7 @@ import org.apache.commons.io.FilenameUtils;
|
|||||||
import org.netbeans.api.progress.ProgressHandle;
|
import org.netbeans.api.progress.ProgressHandle;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
|
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||||
@ -579,7 +580,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
|
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"HashDbManager.unableToOpenHashDbMsg", hashDbInfo.getHashSetName()),
|
"HashDbManager.unableToOpenHashDbMsg", hashDbInfo.getHashSetName()),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbManager.openHashDbErr"),
|
NbBundle.getMessage(this.getClass(), "HashDbManager.openHashDbErr"),
|
||||||
@ -594,7 +595,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
} catch (TskCoreException ex){
|
} catch (TskCoreException ex){
|
||||||
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
|
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
|
||||||
|
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.HashDbManager_centralRepoLoadError_message(),
|
Bundle.HashDbManager_centralRepoLoadError_message(),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbManager.openHashDbErr"),
|
NbBundle.getMessage(this.getClass(), "HashDbManager.openHashDbErr"),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
@ -653,7 +654,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
// Give the user an opportunity to find the desired file.
|
// Give the user an opportunity to find the desired file.
|
||||||
String newPath = null;
|
String newPath = null;
|
||||||
if (RuntimeProperties.runningWithGUI() &&
|
if (RuntimeProperties.runningWithGUI() &&
|
||||||
JOptionPane.showConfirmDialog(null,
|
JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbManager.dlgMsg.dbNotFoundAtLoc",
|
NbBundle.getMessage(this.getClass(), "HashDbManager.dlgMsg.dbNotFoundAtLoc",
|
||||||
hashSetName, configuredPath),
|
hashSetName, configuredPath),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbManager.dlgTitle.MissingDb"),
|
NbBundle.getMessage(this.getClass(), "HashDbManager.dlgTitle.MissingDb"),
|
||||||
@ -1415,7 +1416,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
SleuthkitJNI.createLookupIndexForHashDatabase(hashDb.getHandle());
|
SleuthkitJNI.createLookupIndexForHashDatabase(hashDb.getHandle());
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Logger.getLogger(HashDbIndexer.class.getName()).log(Level.SEVERE, "Error indexing hash set " + hashDb.getHashSetName(), ex); //NON-NLS
|
Logger.getLogger(HashDbIndexer.class.getName()).log(Level.SEVERE, "Error indexing hash set " + hashDb.getHashSetName(), ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"HashDbManager.dlgMsg.errorIndexingHashSet",
|
"HashDbManager.dlgMsg.errorIndexingHashSet",
|
||||||
hashDb.getHashSetName()),
|
hashDb.getHashSetName()),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -23,6 +23,7 @@ import org.openide.nodes.Node;
|
|||||||
import org.openide.util.HelpCtx;
|
import org.openide.util.HelpCtx;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.actions.CallableSystemAction;
|
import org.openide.util.actions.CallableSystemAction;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||||
import org.sleuthkit.autopsy.directorytree.HashSearchProvider;
|
import org.sleuthkit.autopsy.directorytree.HashSearchProvider;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
@ -122,7 +123,7 @@ public class HashDbSearchAction extends CallableSystemAction implements HashSear
|
|||||||
if (file != null && HashDbSearcher.countFilesMd5Hashed() > 0) {
|
if (file != null && HashDbSearcher.countFilesMd5Hashed() > 0) {
|
||||||
doSearch();
|
doSearch();
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"HashDbSearchAction.dlgMsg.noFilesHaveMD5Calculated"),
|
"HashDbSearchAction.dlgMsg.noFilesHaveMD5Calculated"),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbSearchAction.dlgMsg.title"),
|
NbBundle.getMessage(this.getClass(), "HashDbSearchAction.dlgMsg.title"),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -28,6 +28,7 @@ import org.openide.nodes.Children;
|
|||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.windows.TopComponent;
|
import org.openide.windows.TopComponent;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
|
|
||||||
@ -90,7 +91,7 @@ class HashDbSearchManager {
|
|||||||
|
|
||||||
searchResultWin.requestActive();
|
searchResultWin.requestActive();
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbSearchManager.noResultsFoundMsg"));
|
NbBundle.getMessage(this.getClass(), "HashDbSearchManager.noResultsFoundMsg"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -297,7 +297,7 @@ class HashDbSearchPanel extends javax.swing.JPanel implements ActionListener {
|
|||||||
if (HashDbSearcher.countFilesMd5Hashed() > 0) {
|
if (HashDbSearcher.countFilesMd5Hashed() > 0) {
|
||||||
return doSearch();
|
return doSearch();
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"HashDbSearchPanel.noFilesHaveMD5HashMsg"),
|
"HashDbSearchPanel.noFilesHaveMD5HashMsg"),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbSearchPanel.dlgMsg.title"),
|
NbBundle.getMessage(this.getClass(), "HashDbSearchPanel.dlgMsg.title"),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -28,6 +28,7 @@ import javax.swing.SwingWorker;
|
|||||||
import org.netbeans.api.progress.ProgressHandle;
|
import org.netbeans.api.progress.ProgressHandle;
|
||||||
import org.openide.util.Cancellable;
|
import org.openide.util.Cancellable;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ class HashDbSearchThread extends SwingWorker<Object, Void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quit) {
|
if (quit) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"HashDbSearchThread.noMoreFilesWithMD5Msg"));
|
"HashDbSearchThread.noMoreFilesWithMD5Msg"));
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 - 2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -32,6 +32,7 @@ import org.apache.commons.io.FileUtils;
|
|||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.io.NbObjectInputStream;
|
import org.openide.util.io.NbObjectInputStream;
|
||||||
import org.openide.util.io.NbObjectOutputStream;
|
import org.openide.util.io.NbObjectOutputStream;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
import org.sleuthkit.autopsy.core.RuntimeProperties;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||||
@ -185,7 +186,7 @@ final class HashLookupSettings implements Serializable {
|
|||||||
} while (hashSetNames.contains(newHashSetName));
|
} while (hashSetNames.contains(newHashSetName));
|
||||||
logger.log(Level.INFO, "Duplicate hash set name " + hashSetName + " found. Replacing with " + newHashSetName + ".");
|
logger.log(Level.INFO, "Duplicate hash set name " + hashSetName + " found. Replacing with " + newHashSetName + ".");
|
||||||
if (RuntimeProperties.runningWithGUI()) {
|
if (RuntimeProperties.runningWithGUI()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(HashLookupSettings.class,
|
NbBundle.getMessage(HashLookupSettings.class,
|
||||||
"HashDbManager.replacingDuplicateHashsetNameMsg",
|
"HashDbManager.replacingDuplicateHashsetNameMsg",
|
||||||
hashSetName, newHashSetName),
|
hashSetName, newHashSetName),
|
||||||
@ -251,7 +252,7 @@ final class HashLookupSettings implements Serializable {
|
|||||||
FileUtils.copyFile(new File(configFilePath), new File(backupFilePath));
|
FileUtils.copyFile(new File(configFilePath), new File(backupFilePath));
|
||||||
logger.log(Level.INFO, "Updated the schema, backup saved at: " + backupFilePath);
|
logger.log(Level.INFO, "Updated the schema, backup saved at: " + backupFilePath);
|
||||||
if (RuntimeProperties.runningWithGUI()) {
|
if (RuntimeProperties.runningWithGUI()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(HashLookupSettings.class,
|
NbBundle.getMessage(HashLookupSettings.class,
|
||||||
"HashDbManager.savedBackupOfOldConfigMsg",
|
"HashDbManager.savedBackupOfOldConfigMsg",
|
||||||
baseMessage, backupFilePath),
|
baseMessage, backupFilePath),
|
||||||
@ -260,7 +261,7 @@ final class HashLookupSettings implements Serializable {
|
|||||||
}
|
}
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
logger.log(Level.WARNING, "Failed to save backup of old format configuration file to " + backupFilePath, ex); //NON-NLS
|
logger.log(Level.WARNING, "Failed to save backup of old format configuration file to " + backupFilePath, ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null, baseMessage, messageBoxTitle, JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), baseMessage, messageBoxTitle, JOptionPane.INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
HashLookupSettings settings;
|
HashLookupSettings settings;
|
||||||
settings = new HashLookupSettings(hashDbInfoList);
|
settings = new HashLookupSettings(hashDbInfoList);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 - 2015 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -340,7 +340,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
hashSetManager.save();
|
hashSetManager.save();
|
||||||
} catch (HashDbManager.HashDbManagerException ex) {
|
} catch (HashDbManager.HashDbManagerException ex) {
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_saveFail_message(), Bundle.HashLookupSettingsPanel_saveFail_title(), JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(this, Bundle.HashLookupSettingsPanel_saveFail_message(), Bundle.HashLookupSettingsPanel_saveFail_title(), JOptionPane.ERROR_MESSAGE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -388,7 +388,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
try {
|
try {
|
||||||
hashSetManager.removeHashDatabaseNoSave(hashDb);
|
hashSetManager.removeHashDatabaseNoSave(hashDb);
|
||||||
} catch (HashDbManager.HashDbManagerException ex) {
|
} catch (HashDbManager.HashDbManagerException ex) {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
|
JOptionPane.showMessageDialog(this, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hashSetTableModel.refreshModel();
|
hashSetTableModel.refreshModel();
|
||||||
@ -432,7 +432,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
try {
|
try {
|
||||||
hashSetManager.save();
|
hashSetManager.save();
|
||||||
} catch (HashDbManager.HashDbManagerException ex) {
|
} catch (HashDbManager.HashDbManagerException ex) {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_saveFail_message(), Bundle.HashLookupSettingsPanel_saveFail_title(), JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(this, Bundle.HashLookupSettingsPanel_saveFail_message(), Bundle.HashLookupSettingsPanel_saveFail_title(), JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1000,7 +1000,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
|
|
||||||
@Messages({})
|
@Messages({})
|
||||||
private void deleteDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteDatabaseButtonActionPerformed
|
private void deleteDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteDatabaseButtonActionPerformed
|
||||||
if (JOptionPane.showConfirmDialog(null,
|
if (JOptionPane.showConfirmDialog(this,
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"HashDbConfigPanel.deleteDbActionConfirmMsg"),
|
"HashDbConfigPanel.deleteDbActionConfirmMsg"),
|
||||||
NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.deleteDbActionMsg"),
|
NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.deleteDbActionMsg"),
|
||||||
@ -1011,7 +1011,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
try {
|
try {
|
||||||
hashSetManager.removeHashDatabaseNoSave(hashDb);
|
hashSetManager.removeHashDatabaseNoSave(hashDb);
|
||||||
} catch (HashDbManager.HashDbManagerException ex) {
|
} catch (HashDbManager.HashDbManagerException ex) {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
|
JOptionPane.showMessageDialog(this, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
|
||||||
}
|
}
|
||||||
hashSetTableModel.refreshModel();
|
hashSetTableModel.refreshModel();
|
||||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
@ -1026,7 +1026,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
try {
|
try {
|
||||||
hashSetManager.removeHashDatabaseNoSave(hashDb);
|
hashSetManager.removeHashDatabaseNoSave(hashDb);
|
||||||
} catch (HashDbManager.HashDbManagerException ex) {
|
} catch (HashDbManager.HashDbManagerException ex) {
|
||||||
JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
|
JOptionPane.showMessageDialog(this, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
|
||||||
}
|
}
|
||||||
hashSetTableModel.refreshModel();
|
hashSetTableModel.refreshModel();
|
||||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -411,7 +411,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
|
|||||||
// feedback when isValidDefinition() is called.
|
// feedback when isValidDefinition() is called.
|
||||||
int option = JOptionPane.OK_OPTION;
|
int option = JOptionPane.OK_OPTION;
|
||||||
do {
|
do {
|
||||||
option = JOptionPane.showConfirmDialog(null, panel, NbBundle.getMessage(FilesSetPanel.class, filterDialogTitle), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
option = JOptionPane.showConfirmDialog(this, panel, NbBundle.getMessage(FilesSetPanel.class, filterDialogTitle), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
|
||||||
} while (option == JOptionPane.OK_OPTION && !panel.isValidDefinition());
|
} while (option == JOptionPane.OK_OPTION && !panel.isValidDefinition());
|
||||||
|
|
||||||
// While adding new ruleset(selectedSet == null), if rule set with same name already exists, do not add to the filesSets hashMap.
|
// While adding new ruleset(selectedSet == null), if rule set with same name already exists, do not add to the filesSets hashMap.
|
||||||
@ -461,7 +461,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
|
|||||||
// feedback when isValidDefinition() is called.
|
// feedback when isValidDefinition() is called.
|
||||||
int option = JOptionPane.OK_OPTION;
|
int option = JOptionPane.OK_OPTION;
|
||||||
do {
|
do {
|
||||||
option = JOptionPane.showOptionDialog(null, panel, NbBundle.getMessage(FilesSetPanel.class, ruleDialogTitle), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, new Object[]{okButton, cancelButton}, okButton);
|
option = JOptionPane.showOptionDialog(this, panel, NbBundle.getMessage(FilesSetPanel.class, ruleDialogTitle), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, new Object[]{okButton, cancelButton}, okButton);
|
||||||
|
|
||||||
} while (option == JOptionPane.OK_OPTION && !panel.isValidRuleDefinition());
|
} while (option == JOptionPane.OK_OPTION && !panel.isValidRuleDefinition());
|
||||||
|
|
||||||
@ -1233,7 +1233,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp
|
|||||||
//if the file already exists ask the user how to proceed
|
//if the file already exists ask the user how to proceed
|
||||||
final String FILE_EXISTS_MESSAGE = NbBundle.getMessage(this.getClass(),
|
final String FILE_EXISTS_MESSAGE = NbBundle.getMessage(this.getClass(),
|
||||||
"FilesSetDefsPanel.exportButtonActionPerformed.fileExistPrompt", selFile.getName());
|
"FilesSetDefsPanel.exportButtonActionPerformed.fileExistPrompt", selFile.getName());
|
||||||
boolean shouldWrite = JOptionPane.showConfirmDialog(null, FILE_EXISTS_MESSAGE, FEATURE_NAME, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION;
|
boolean shouldWrite = JOptionPane.showConfirmDialog(this, FILE_EXISTS_MESSAGE, FEATURE_NAME, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION;
|
||||||
if (!shouldWrite) {
|
if (!shouldWrite) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -112,7 +112,7 @@ class ReportGenerationPanel extends javax.swing.JPanel {
|
|||||||
if (closeable) {
|
if (closeable) {
|
||||||
actionListener.actionPerformed(null);
|
actionListener.actionPerformed(null);
|
||||||
} else {
|
} else {
|
||||||
int result = JOptionPane.showConfirmDialog(null,
|
int result = JOptionPane.showConfirmDialog(this,
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"ReportGenerationPanel.confDlg.sureToClose.msg"),
|
"ReportGenerationPanel.confDlg.sureToClose.msg"),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
@ -215,7 +215,7 @@ class ReportGenerationPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
||||||
if (progressPanel.getStatus() == ReportStatus.QUEUING || progressPanel.getStatus() == ReportStatus.RUNNING) {
|
if (progressPanel.getStatus() == ReportStatus.QUEUING || progressPanel.getStatus() == ReportStatus.RUNNING) {
|
||||||
int result = JOptionPane.showConfirmDialog(null, NbBundle.getMessage(this.getClass(),
|
int result = JOptionPane.showConfirmDialog(this, NbBundle.getMessage(this.getClass(),
|
||||||
"ReportGenerationPanel.confDlg.cancelReport.msg"),
|
"ReportGenerationPanel.confDlg.cancelReport.msg"),
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
"ReportGenerationPanel.cancelButton.text"),
|
"ReportGenerationPanel.cancelButton.text"),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -25,6 +25,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||||
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
|
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb;
|
||||||
@ -96,14 +97,14 @@ public class AddTaggedHashesToHashDb implements GeneralReportModule {
|
|||||||
failedExports.add(tag.getContent().getName());
|
failedExports.add(tag.getContent().getName());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null, "Unable to add the " + (tags.size() > 1 ? "files" : "file") + " to the hash database. Hashes have not been calculated. Please configure and run an appropriate ingest module.", "Add to Hash Database Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), "Unable to add the " + (tags.size() > 1 ? "files" : "file") + " to the hash database. Hashes have not been calculated. Please configure and run an appropriate ingest module.", "Add to Hash Database Error", JOptionPane.ERROR_MESSAGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Logger.getLogger(AddTaggedHashesToHashDb.class.getName()).log(Level.SEVERE, "Error adding to hash database", ex);
|
Logger.getLogger(AddTaggedHashesToHashDb.class.getName()).log(Level.SEVERE, "Error adding to hash database", ex);
|
||||||
JOptionPane.showMessageDialog(null, "Error getting selected tags for case.", "Hash Export Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), "Error getting selected tags for case.", "Hash Export Error", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!failedExports.isEmpty()) {
|
if (!failedExports.isEmpty()) {
|
||||||
@ -117,7 +118,7 @@ public class AddTaggedHashesToHashDb implements GeneralReportModule {
|
|||||||
errorMessage.append(".");
|
errorMessage.append(".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JOptionPane.showMessageDialog(null, errorMessage.toString(), "Hash Export Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), errorMessage.toString(), "Hash Export Error", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
progressPanel.setIndeterminate(false);
|
progressPanel.setIndeterminate(false);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -70,7 +70,7 @@ class AddTaggedHashesToHashDbConfigPanel extends javax.swing.JPanel {
|
|||||||
tagNames = Case.getCurrentCase().getServices().getTagsManager().getTagNamesInUse();
|
tagNames = Case.getCurrentCase().getServices().getTagsManager().getTagNamesInUse();
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Logger.getLogger(AddTaggedHashesToHashDbConfigPanel.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
|
Logger.getLogger(AddTaggedHashesToHashDbConfigPanel.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
|
||||||
JOptionPane.showMessageDialog(null, "Error getting tag names for case.", "Tag Names Not Found", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(this, "Error getting tag names for case.", "Tag Names Not Found", JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark the tag names as unselected. Note that tagNameSelections is a
|
// Mark the tag names as unselected. Note that tagNameSelections is a
|
||||||
@ -299,7 +299,7 @@ class AddTaggedHashesToHashDbConfigPanel extends javax.swing.JPanel {
|
|||||||
private void configureHashDatabasesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configureHashDatabasesButtonActionPerformed
|
private void configureHashDatabasesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configureHashDatabasesButtonActionPerformed
|
||||||
HashLookupSettingsPanel configPanel = new HashLookupSettingsPanel();
|
HashLookupSettingsPanel configPanel = new HashLookupSettingsPanel();
|
||||||
configPanel.load();
|
configPanel.load();
|
||||||
if (JOptionPane.showConfirmDialog(null, configPanel, "Hash Set Configuration", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) {
|
if (JOptionPane.showConfirmDialog(this, configPanel, "Hash Set Configuration", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) {
|
||||||
configPanel.store();
|
configPanel.store();
|
||||||
populateHashSetComponents();
|
populateHashSetComponents();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2014-16 Basis Technology Corp.
|
* Copyright 2014-2018 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");
|
||||||
@ -45,6 +45,7 @@ import org.controlsfx.validation.ValidationResult;
|
|||||||
import org.controlsfx.validation.ValidationSupport;
|
import org.controlsfx.validation.ValidationSupport;
|
||||||
import org.controlsfx.validation.Validator;
|
import org.controlsfx.validation.Validator;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
@ -192,22 +193,22 @@ public class SaveSnapshotAsReport extends Action {
|
|||||||
try {
|
try {
|
||||||
Desktop.getDesktop().open(reportHTMLFIle.toFile());
|
Desktop.getDesktop().open(reportHTMLFIle.toFile());
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.OpenReportAction_NoAssociatedEditorMessage(),
|
Bundle.OpenReportAction_NoAssociatedEditorMessage(),
|
||||||
Bundle.OpenReportAction_MessageBoxTitle(),
|
Bundle.OpenReportAction_MessageBoxTitle(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (UnsupportedOperationException ex) {
|
} catch (UnsupportedOperationException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.OpenReportAction_NoOpenInEditorSupportMessage(),
|
Bundle.OpenReportAction_NoOpenInEditorSupportMessage(),
|
||||||
Bundle.OpenReportAction_MessageBoxTitle(),
|
Bundle.OpenReportAction_MessageBoxTitle(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.OpenReportAction_MissingReportFileMessage(),
|
Bundle.OpenReportAction_MissingReportFileMessage(),
|
||||||
Bundle.OpenReportAction_MessageBoxTitle(),
|
Bundle.OpenReportAction_MessageBoxTitle(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
} catch (SecurityException ex) {
|
} catch (SecurityException ex) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.OpenReportAction_ReportFileOpenPermissionDeniedMessage(),
|
Bundle.OpenReportAction_ReportFileOpenPermissionDeniedMessage(),
|
||||||
Bundle.OpenReportAction_MessageBoxTitle(),
|
Bundle.OpenReportAction_MessageBoxTitle(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -51,6 +51,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
import org.netbeans.api.progress.ProgressHandle;
|
import org.netbeans.api.progress.ProgressHandle;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
import org.sleuthkit.autopsy.casemodule.services.TagsManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
@ -95,7 +96,7 @@ import org.sleuthkit.datamodel.TskData;
|
|||||||
*/
|
*/
|
||||||
public class EventsRepository {
|
public class EventsRepository {
|
||||||
|
|
||||||
private final static Logger LOGGER = Logger.getLogger(EventsRepository.class.getName());
|
private final static Logger logger = Logger.getLogger(EventsRepository.class.getName());
|
||||||
|
|
||||||
private final Executor workerExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("eventrepository-worker-%d").build()); //NON-NLS
|
private final Executor workerExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("eventrepository-worker-%d").build()); //NON-NLS
|
||||||
private DBPopulationWorker dbWorker;
|
private DBPopulationWorker dbWorker;
|
||||||
@ -194,7 +195,7 @@ public class EventsRepository {
|
|||||||
try {
|
try {
|
||||||
return eventStripeCache.get(params);
|
return eventStripeCache.get(params);
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to load Event Stripes from cache for " + params.toString(), ex); //NON-NLS
|
logger.log(Level.SEVERE, "Failed to load Event Stripes from cache for " + params.toString(), ex); //NON-NLS
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -302,7 +303,7 @@ public class EventsRepository {
|
|||||||
try {
|
try {
|
||||||
datasourcesMap.putIfAbsent(id, skCase.getContentById(id).getDataSource().getName());
|
datasourcesMap.putIfAbsent(id, skCase.getContentById(id).getDataSource().getName());
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to get datasource by ID.", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Failed to get datasource by ID.", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,7 +311,7 @@ public class EventsRepository {
|
|||||||
//should this only be tags applied to files or event bearing artifacts?
|
//should this only be tags applied to files or event bearing artifacts?
|
||||||
tagNames.setAll(skCase.getTagNamesInUse());
|
tagNames.setAll(skCase.getTagNamesInUse());
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to get tag names in use.", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Failed to get tag names in use.", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,7 +338,7 @@ public class EventsRepository {
|
|||||||
try {
|
try {
|
||||||
tagNames.setAll(autoCase.getSleuthkitCase().getTagNamesInUse());
|
tagNames.setAll(autoCase.getSleuthkitCase().getTagNamesInUse());
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to get tag names in use.", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Failed to get tag names in use.", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +408,7 @@ public class EventsRepository {
|
|||||||
*/
|
*/
|
||||||
@ThreadConfined(type = ThreadConfined.ThreadType.JFX)
|
@ThreadConfined(type = ThreadConfined.ThreadType.JFX)
|
||||||
private CancellationProgressTask<Void> rebuildRepository(final DBPopulationMode mode, Consumer<Worker.State> onStateChange) {
|
private CancellationProgressTask<Void> rebuildRepository(final DBPopulationMode mode, Consumer<Worker.State> onStateChange) {
|
||||||
LOGGER.log(Level.INFO, "(re)starting {0} db population task", mode); //NON-NLS
|
logger.log(Level.INFO, "(re)starting {0} db population task", mode); //NON-NLS
|
||||||
if (dbWorker != null) {
|
if (dbWorker != null) {
|
||||||
dbWorker.cancel();
|
dbWorker.cancel();
|
||||||
}
|
}
|
||||||
@ -512,7 +513,7 @@ public class EventsRepository {
|
|||||||
|
|
||||||
if (dbPopulationMode == DBPopulationMode.FULL) {
|
if (dbPopulationMode == DBPopulationMode.FULL) {
|
||||||
//drop old db, and add back MAC and artifact events
|
//drop old db, and add back MAC and artifact events
|
||||||
LOGGER.log(Level.INFO, "Beginning population of timeline db."); // NON-NLS
|
logger.log(Level.INFO, "Beginning population of timeline db."); // NON-NLS
|
||||||
restartProgressHandle(Bundle.progressWindow_msg_gatheringData(), "", -1D, 1, true);
|
restartProgressHandle(Bundle.progressWindow_msg_gatheringData(), "", -1D, 1, true);
|
||||||
//reset database //TODO: can we do more incremental updates? -jm
|
//reset database //TODO: can we do more incremental updates? -jm
|
||||||
eventDB.reInitializeDB();
|
eventDB.reInitializeDB();
|
||||||
@ -529,23 +530,23 @@ public class EventsRepository {
|
|||||||
//tags
|
//tags
|
||||||
if (dbPopulationMode == DBPopulationMode.TAGS_ONLY) {
|
if (dbPopulationMode == DBPopulationMode.TAGS_ONLY) {
|
||||||
trans = eventDB.beginTransaction();
|
trans = eventDB.beginTransaction();
|
||||||
LOGGER.log(Level.INFO, "dropping old tags"); // NON-NLS
|
logger.log(Level.INFO, "dropping old tags"); // NON-NLS
|
||||||
eventDB.reInitializeTags();
|
eventDB.reInitializeTags();
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGER.log(Level.INFO, "updating content tags"); // NON-NLS
|
logger.log(Level.INFO, "updating content tags"); // NON-NLS
|
||||||
List<ContentTag> contentTags = tagsManager.getAllContentTags();
|
List<ContentTag> contentTags = tagsManager.getAllContentTags();
|
||||||
int currentWorkTotal = contentTags.size();
|
int currentWorkTotal = contentTags.size();
|
||||||
restartProgressHandle(Bundle.progressWindow_msg_refreshingFileTags(), "", 0D, currentWorkTotal, true);
|
restartProgressHandle(Bundle.progressWindow_msg_refreshingFileTags(), "", 0D, currentWorkTotal, true);
|
||||||
insertContentTags(currentWorkTotal, contentTags, trans);
|
insertContentTags(currentWorkTotal, contentTags, trans);
|
||||||
|
|
||||||
LOGGER.log(Level.INFO, "updating artifact tags"); // NON-NLS
|
logger.log(Level.INFO, "updating artifact tags"); // NON-NLS
|
||||||
List<BlackboardArtifactTag> artifactTags = tagsManager.getAllBlackboardArtifactTags();
|
List<BlackboardArtifactTag> artifactTags = tagsManager.getAllBlackboardArtifactTags();
|
||||||
currentWorkTotal = artifactTags.size();
|
currentWorkTotal = artifactTags.size();
|
||||||
restartProgressHandle(Bundle.progressWindow_msg_refreshingResultTags(), "", 0D, currentWorkTotal, true);
|
restartProgressHandle(Bundle.progressWindow_msg_refreshingResultTags(), "", 0D, currentWorkTotal, true);
|
||||||
insertArtifactTags(currentWorkTotal, artifactTags, trans);
|
insertArtifactTags(currentWorkTotal, artifactTags, trans);
|
||||||
|
|
||||||
LOGGER.log(Level.INFO, "committing db"); // NON-NLS
|
logger.log(Level.INFO, "committing db"); // NON-NLS
|
||||||
Platform.runLater(() -> cancellable.set(false));
|
Platform.runLater(() -> cancellable.set(false));
|
||||||
restartProgressHandle(Bundle.progressWindow_msg_commitingDb(), "", -1D, 1, false);
|
restartProgressHandle(Bundle.progressWindow_msg_commitingDb(), "", -1D, 1, false);
|
||||||
eventDB.commitTransaction(trans);
|
eventDB.commitTransaction(trans);
|
||||||
@ -609,14 +610,14 @@ public class EventsRepository {
|
|||||||
AbstractFile f = skCase.getAbstractFileById(fID);
|
AbstractFile f = skCase.getAbstractFileById(fID);
|
||||||
|
|
||||||
if (isNull(f)) {
|
if (isNull(f)) {
|
||||||
LOGGER.log(Level.WARNING, "Failed to get data for file : {0}", fID); // NON-NLS
|
logger.log(Level.WARNING, "Failed to get data for file : {0}", fID); // NON-NLS
|
||||||
} else {
|
} else {
|
||||||
insertEventsForFile(f, trans);
|
insertEventsForFile(f, trans);
|
||||||
updateProgress(i, numFiles);
|
updateProgress(i, numFiles);
|
||||||
updateMessage(f.getName());
|
updateMessage(f.getName());
|
||||||
}
|
}
|
||||||
} catch (TskCoreException tskCoreException) {
|
} catch (TskCoreException tskCoreException) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to insert MAC time events for file : " + fID, tskCoreException); // NON-NLS
|
logger.log(Level.SEVERE, "Failed to insert MAC time events for file : " + fID, tskCoreException); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -669,11 +670,11 @@ public class EventsRepository {
|
|||||||
try {
|
try {
|
||||||
get();
|
get();
|
||||||
} catch (CancellationException ex) {
|
} catch (CancellationException ex) {
|
||||||
LOGGER.log(Level.WARNING, "Timeline database population was cancelled by the user. " //NON-NLS
|
logger.log(Level.WARNING, "Timeline database population was cancelled by the user. " //NON-NLS
|
||||||
+ " Not all events may be present or accurate."); // NON-NLS
|
+ " Not all events may be present or accurate."); // NON-NLS
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOGGER.log(Level.WARNING, "Unexpected exception while populating database.", ex); // NON-NLS
|
logger.log(Level.WARNING, "Unexpected exception while populating database.", ex); // NON-NLS
|
||||||
JOptionPane.showMessageDialog(null, Bundle.msgdlg_problem_text());
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), Bundle.msgdlg_problem_text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,11 +697,11 @@ public class EventsRepository {
|
|||||||
insertEventForArtifact(type, blackboardArtifacts.get(i), trans);
|
insertEventForArtifact(type, blackboardArtifacts.get(i), trans);
|
||||||
updateProgress(i, numArtifacts);
|
updateProgress(i, numArtifacts);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "There was a problem inserting event for artifact: " + blackboardArtifacts.get(i).getArtifactID(), ex); // NON-NLS
|
logger.log(Level.SEVERE, "There was a problem inserting event for artifact: " + blackboardArtifacts.get(i).getArtifactID(), ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "There was a problem getting events with sub type " + type.toString() + ".", ex); // NON-NLS
|
logger.log(Level.SEVERE, "There was a problem getting events with sub type " + type.toString() + ".", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2016 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -45,6 +45,7 @@ import org.joda.time.DateTime;
|
|||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
import org.joda.time.Seconds;
|
import org.joda.time.Seconds;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.ColorUtilities;
|
import org.sleuthkit.autopsy.coreutils.ColorUtilities;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
import org.sleuthkit.autopsy.timeline.ViewMode;
|
import org.sleuthkit.autopsy.timeline.ViewMode;
|
||||||
@ -394,7 +395,7 @@ final class EventCountsChart extends StackedBarChart<String, Number> implements
|
|||||||
controller.pushTimeRange(interval);
|
controller.pushTimeRange(interval);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
int showConfirmDialog = JOptionPane.showConfirmDialog(null,
|
int showConfirmDialog = JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.CountsViewPane_detailSwitchMessage(),
|
Bundle.CountsViewPane_detailSwitchMessage(),
|
||||||
Bundle.CountsViewPane_detailSwitchTitle(), JOptionPane.YES_NO_OPTION);
|
Bundle.CountsViewPane_detailSwitchTitle(), JOptionPane.YES_NO_OPTION);
|
||||||
if (showConfirmDialog == JOptionPane.YES_OPTION) {
|
if (showConfirmDialog == JOptionPane.YES_OPTION) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2015-2017 Basis Technology Corp.
|
* Copyright 2015-2018 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");
|
||||||
@ -1422,7 +1422,7 @@ public final class FileExporterSettingsPanel extends JPanel {
|
|||||||
}
|
}
|
||||||
populateRuleTree(ruleName);
|
populateRuleTree(ruleName);
|
||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.RuleNotSaved"),
|
NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.RuleNotSaved"),
|
||||||
NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.MalformedRule"),
|
NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.MalformedRule"),
|
||||||
JOptionPane.OK_OPTION);
|
JOptionPane.OK_OPTION);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2015-2017 Basis Technology Corp.
|
* Copyright 2015-2018 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");
|
||||||
@ -226,7 +226,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
if (needsRestart) {
|
if (needsRestart) {
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.MustRestart"),
|
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.MustRestart"),
|
||||||
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.restartRequiredLabel.text"),
|
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.restartRequiredLabel.text"),
|
||||||
JOptionPane.WARNING_MESSAGE);
|
JOptionPane.WARNING_MESSAGE);
|
||||||
@ -530,7 +530,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
add(ingestJobSettingsPanel, BorderLayout.PAGE_START);
|
add(ingestJobSettingsPanel, BorderLayout.PAGE_START);
|
||||||
|
|
||||||
if (JOptionPane.showConfirmDialog(null, ingestJobSettingsPanel, "Ingest Module Configuration", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) {
|
if (JOptionPane.showConfirmDialog(this, ingestJobSettingsPanel, "Ingest Module Configuration", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) {
|
||||||
// store the updated settings
|
// store the updated settings
|
||||||
ingestJobSettings = ingestJobSettingsPanel.getSettings();
|
ingestJobSettings = ingestJobSettingsPanel.getSettings();
|
||||||
ingestJobSettings.save();
|
ingestJobSettings.save();
|
||||||
@ -547,7 +547,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
for (String warning : warnings) {
|
for (String warning : warnings) {
|
||||||
warningMessage.append(warning).append("\n");
|
warningMessage.append(warning).append("\n");
|
||||||
}
|
}
|
||||||
JOptionPane.showMessageDialog(null, warningMessage.toString());
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), warningMessage.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1082,7 +1082,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private void bnAdvancedSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnAdvancedSettingsActionPerformed
|
private void bnAdvancedSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnAdvancedSettingsActionPerformed
|
||||||
AdvancedAutoIngestSettingsPanel advancedAutoIngestSettingsPanel = new AdvancedAutoIngestSettingsPanel(getModeFromRadioButtons());
|
AdvancedAutoIngestSettingsPanel advancedAutoIngestSettingsPanel = new AdvancedAutoIngestSettingsPanel(getModeFromRadioButtons());
|
||||||
if (JOptionPane.showConfirmDialog(null, advancedAutoIngestSettingsPanel,
|
if (JOptionPane.showConfirmDialog(this, advancedAutoIngestSettingsPanel,
|
||||||
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title"),
|
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title"),
|
||||||
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) {
|
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) {
|
||||||
advancedAutoIngestSettingsPanel.store();
|
advancedAutoIngestSettingsPanel.store();
|
||||||
@ -1175,7 +1175,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
if (uploadResult == SharedConfiguration.SharedConfigResult.LOCKED) {
|
if (uploadResult == SharedConfiguration.SharedConfigResult.LOCKED) {
|
||||||
jLabelTaskDescription.setText("Transfer of shared configuration incomplete");
|
jLabelTaskDescription.setText("Transfer of shared configuration incomplete");
|
||||||
JOptionPane.showMessageDialog(null, "Shared configuration folder is currently locked by another node - try again in a few minutes", "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), "Shared configuration folder is currently locked by another node - try again in a few minutes", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
} else if (errorMessage != null) {
|
} else if (errorMessage != null) {
|
||||||
//MessageNotifyUtil.Message.info(errorMessage);
|
//MessageNotifyUtil.Message.info(errorMessage);
|
||||||
jLabelTaskDescription.setText("Transfer of shared configuration incomplete");
|
jLabelTaskDescription.setText("Transfer of shared configuration incomplete");
|
||||||
@ -1186,7 +1186,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
// Check if anything requiring a reset has changed and update the UI
|
// Check if anything requiring a reset has changed and update the UI
|
||||||
if (isResetNeeded()) {
|
if (isResetNeeded()) {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.MustRestart"),
|
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.MustRestart"),
|
||||||
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.restartRequiredLabel.text"),
|
NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.restartRequiredLabel.text"),
|
||||||
JOptionPane.WARNING_MESSAGE);
|
JOptionPane.WARNING_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2013-16 Basis Technology Corp.
|
* Copyright 2013-2018 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");
|
||||||
@ -38,6 +38,7 @@ import javax.swing.JOptionPane;
|
|||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
import org.controlsfx.control.action.ActionUtils;
|
import org.controlsfx.control.action.ActionUtils;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.imagegallery.ImageGalleryController;
|
import org.sleuthkit.autopsy.imagegallery.ImageGalleryController;
|
||||||
import org.sleuthkit.autopsy.datamodel.DhsImageCategory;
|
import org.sleuthkit.autopsy.datamodel.DhsImageCategory;
|
||||||
@ -56,7 +57,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
|||||||
@NbBundle.Messages({"CategorizeAction.displayName=Categorize"})
|
@NbBundle.Messages({"CategorizeAction.displayName=Categorize"})
|
||||||
public class CategorizeAction extends Action {
|
public class CategorizeAction extends Action {
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(CategorizeAction.class.getName());
|
private static final Logger logger = Logger.getLogger(CategorizeAction.class.getName());
|
||||||
|
|
||||||
private final ImageGalleryController controller;
|
private final ImageGalleryController controller;
|
||||||
private final UndoRedoManager undoManager;
|
private final UndoRedoManager undoManager;
|
||||||
@ -155,7 +156,7 @@ public class CategorizeAction extends Action {
|
|||||||
try {
|
try {
|
||||||
tagsManager.deleteContentTag(ct);
|
tagsManager.deleteContentTag(ct);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error removing old categories result", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Error removing old categories result", ex); //NON-NLS
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -168,8 +169,8 @@ public class CategorizeAction extends Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error categorizing result", ex); //NON-NLS
|
logger.log(Level.SEVERE, "Error categorizing result", ex); //NON-NLS
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
Bundle.CategorizeTask_errorUnable_msg(fileID),
|
Bundle.CategorizeTask_errorUnable_msg(fileID),
|
||||||
Bundle.CategorizeTask_errorUnable_title(),
|
Bundle.CategorizeTask_errorUnable_title(),
|
||||||
JOptionPane.ERROR_MESSAGE);
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2017 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -103,7 +103,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option
|
|||||||
keywords.addAll(currentKeywordList.getKeywords());
|
keywords.addAll(currentKeywordList.getKeywords());
|
||||||
|
|
||||||
String listName = (String) JOptionPane.showInputDialog(
|
String listName = (String) JOptionPane.showInputDialog(
|
||||||
null,
|
this,
|
||||||
NbBundle.getMessage(this.getClass(), "KeywordSearch.newKwListTitle"),
|
NbBundle.getMessage(this.getClass(), "KeywordSearch.newKwListTitle"),
|
||||||
FEATURE_NAME,
|
FEATURE_NAME,
|
||||||
JOptionPane.PLAIN_MESSAGE,
|
JOptionPane.PLAIN_MESSAGE,
|
||||||
|
@ -113,7 +113,7 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
|
|||||||
XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent();
|
XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent();
|
||||||
String listName = "";
|
String listName = "";
|
||||||
|
|
||||||
listName = (String) JOptionPane.showInputDialog(null, NbBundle.getMessage(this.getClass(), "KeywordSearch.newKwListTitle"),
|
listName = (String) JOptionPane.showInputDialog(this, NbBundle.getMessage(this.getClass(), "KeywordSearch.newKwListTitle"),
|
||||||
NbBundle.getMessage(this.getClass(), "KeywordSearch.newKeywordListMsg"), JOptionPane.PLAIN_MESSAGE, null, null, listName);
|
NbBundle.getMessage(this.getClass(), "KeywordSearch.newKeywordListMsg"), JOptionPane.PLAIN_MESSAGE, null, null, listName);
|
||||||
|
|
||||||
if (listName == null || listName.trim().isEmpty()) {
|
if (listName == null || listName.trim().isEmpty()) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011 Basis Technology Corp.
|
* Copyright 2011-2018 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");
|
||||||
@ -120,7 +120,7 @@ class KeywordSearchUtil {
|
|||||||
} else {
|
} else {
|
||||||
messageType = JOptionPane.INFORMATION_MESSAGE;
|
messageType = JOptionPane.INFORMATION_MESSAGE;
|
||||||
}
|
}
|
||||||
if (JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_OPTION, messageType) == JOptionPane.YES_OPTION) {
|
if (JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(), message, title, JOptionPane.YES_NO_OPTION, messageType) == JOptionPane.YES_OPTION) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user