diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties b/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties
index 9c4f680119..6842d84579 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties
@@ -2,11 +2,16 @@ OpenIDE-Module-Name=CommandLineAutopsy
OptionsCategory_Keywords_Command_Line_Ingest_Settings=Command Line Ingest Settings
OptionsCategory_Keywords_General=Options
OptionsCategory_Name_Command_Line_Ingest=Command Line Ingest
-CommandLinePanel.jLabel1.text=Ingest is running from command line
+CommandLinePanel.jLabel1.text=Running command line taks.
CommandLineStartupWindow.title.text=Running in Command Line Mode
-CommandLineIngestSettingsPanel.bnEditIngestSettings.text=Configure Ingest
+CommandLineIngestSettingsPanel.bnEditIngestSettings.text=Configure
CommandLineIngestSettingsPanel.bnEditReportSettings.actionCommand=Report Module Settings
CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText=Report generation settings for the command line processing mode context.
-CommandLineIngestSettingsPanel.bnEditReportSettings.text=Configure Reporting
-CommandLineIngestSettingsPanel.jLabelDescription.text=You can create cases, add data sources, run ingest modules, and generate reports from the command line.
This options panel allows you to configure the settings to use when running ingest modules and generating reports.
See the user documentation for details.
+CommandLineIngestSettingsPanel.bnEditReportSettings.text=Configure
CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText=Ingest job settings for the command line processing mode context.
+CommandLineIngestSettingsPanel.ingestDescriptionTextPane.text=Configure the profiles to use from the command line.
+CommandLineIngestSettingsPanel.reportDescriptionTextPane.text=Report profiles define which report module and configuration to use.
+CommandLineIngestSettingsPanel.reportProfileLabel.text=Report Profile:
+CommandLineIngestSettingsPanel.ingestProfileLabel.text=Ingest Profile:
+CommandLineIngestSettingsPanel.bnEditReportSettings.AccessibleContext.accessibleName=Configure
+CommandLineIngestSettingsPanel.jTextPane1.text=Ingest profiles define which ingest filters, modules and configuration to use.
diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties-MERGED
index 9c4f680119..c9cdd86225 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties-MERGED
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/Bundle.properties-MERGED
@@ -1,12 +1,22 @@
+CommandLineIngestSettingPanel_empty_report_name_mgs=Report profile name was empty, no profile created.
+CommandLineIngestSettingPanel_existing_report_name_mgs=Report profile name was already exists, no profile created.
+CommandListIngestSettingsPanel_Default_Report_DisplayName=Default
+CommandListIngestSettingsPanel_Make_Config=Make new profile...
+CommandListIngestSettingsPanel_Report_Name_Msg=Please supply a report profile name:
OpenIDE-Module-Name=CommandLineAutopsy
OptionsCategory_Keywords_Command_Line_Ingest_Settings=Command Line Ingest Settings
OptionsCategory_Keywords_General=Options
OptionsCategory_Name_Command_Line_Ingest=Command Line Ingest
-CommandLinePanel.jLabel1.text=Ingest is running from command line
+CommandLinePanel.jLabel1.text=Running command line taks.
CommandLineStartupWindow.title.text=Running in Command Line Mode
-CommandLineIngestSettingsPanel.bnEditIngestSettings.text=Configure Ingest
+CommandLineIngestSettingsPanel.bnEditIngestSettings.text=Configure
CommandLineIngestSettingsPanel.bnEditReportSettings.actionCommand=Report Module Settings
CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText=Report generation settings for the command line processing mode context.
-CommandLineIngestSettingsPanel.bnEditReportSettings.text=Configure Reporting
-CommandLineIngestSettingsPanel.jLabelDescription.text=You can create cases, add data sources, run ingest modules, and generate reports from the command line.
This options panel allows you to configure the settings to use when running ingest modules and generating reports.
See the user documentation for details.
+CommandLineIngestSettingsPanel.bnEditReportSettings.text=Configure
CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText=Ingest job settings for the command line processing mode context.
+CommandLineIngestSettingsPanel.ingestDescriptionTextPane.text=Configure the profiles to use from the command line.
+CommandLineIngestSettingsPanel.reportDescriptionTextPane.text=Report profiles define which report module and configuration to use.
+CommandLineIngestSettingsPanel.reportProfileLabel.text=Report Profile:
+CommandLineIngestSettingsPanel.ingestProfileLabel.text=Ingest Profile:
+CommandLineIngestSettingsPanel.bnEditReportSettings.AccessibleContext.accessibleName=Configure
+CommandLineIngestSettingsPanel.jTextPane1.text=Ingest profiles define which ingest filters, modules and configuration to use.
diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineCommand.java b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineCommand.java
index d9a0c04234..dd3a10530d 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineCommand.java
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineCommand.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2019-2019 Basis Technology Corp.
+ * Copyright 2019-2020 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,7 +48,8 @@ class CommandLineCommand {
CASE_FOLDER_PATH,
DATA_SOURCE_PATH,
DATA_SOURCE_ID,
- INGEST_PROFILE_NAME;
+ INGEST_PROFILE_NAME,
+ REPORT_PROFILE_NAME;
}
private final CommandType type;
diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java
index a608d4a770..15b5211818 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestManager.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2019-2019 Basis Technology Corp.
+ * Copyright 2019-2020 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -42,7 +42,6 @@ import org.sleuthkit.autopsy.casemodule.Case.CaseType;
import org.sleuthkit.autopsy.casemodule.CaseActionException;
import org.sleuthkit.autopsy.casemodule.CaseDetails;
import org.sleuthkit.autopsy.casemodule.CaseMetadata;
-import static org.sleuthkit.autopsy.casemodule.CaseMetadata.getFileExtension;
import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import static org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS;
@@ -166,7 +165,7 @@ public class CommandLineIngestManager extends CommandLineManager{
openCase(baseCaseName, rootOutputDirectory, caseType);
String outputDirPath = getOutputDirPath(caseForJob);
- OutputGenerator.saveCreateCaseOutput(caseForJob, outputDirPath, baseCaseName);
+ OutputGenerator.saveCreateCaseOutput(caseForJob, outputDirPath, baseCaseName);
} catch (CaseActionException ex) {
String baseCaseName = command.getInputs().get(CommandLineCommand.InputType.CASE_NAME.name());
LOGGER.log(Level.SEVERE, "Error creating or opening case " + baseCaseName, ex);
@@ -290,10 +289,15 @@ public class CommandLineIngestManager extends CommandLineManager{
String caseDirPath = inputs.get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
caseForJob = CommandLineIngestManager.this.openCase(caseDirPath);
}
+ // generate reports
+ String reportName = inputs.get(CommandLineCommand.InputType.REPORT_PROFILE_NAME.name());
+ if (reportName == null) {
+ reportName = CommandLineIngestSettingsPanel.getDefaultReportingConfigName();
+ }
// generate reports
ReportProgressIndicator progressIndicator = new ReportProgressIndicator(new LoggingProgressIndicator());
- ReportGenerator generator = new ReportGenerator(CommandLineIngestSettingsPanel.getReportingConfigName(), progressIndicator);
+ ReportGenerator generator = new ReportGenerator(reportName, progressIndicator);
generator.generateReports();
} catch (CaseActionException ex) {
String caseDirPath = command.getInputs().get(CommandLineCommand.InputType.CASE_FOLDER_PATH.name());
@@ -343,7 +347,7 @@ public class CommandLineIngestManager extends CommandLineManager{
* @param baseCaseName Case name
* @param rootOutputDirectory Full path to directory in which case
* output folder will be created
- * @param caseType Type of case being created
+ * @param caseType Type of case being created
*
* @throws CaseActionException
*/
@@ -376,17 +380,11 @@ public class CommandLineIngestManager extends CommandLineManager{
* @param caseForJob The case
* @param dataSource The data source.
*
- * @throws
- * AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorExceptioif
- * there
- * was
- * a
- * DSP
- * processing
- * error
+ * @throws AutoIngestDataSourceProcessorException if there was a DSP
+ * processing error.
*
- * @throws ead running the job processing task is interrupted while
- * blocked, i.e., if auto ingest is shutting down.
+ * @throws InterruptedException running the job processing task while
+ * blocking, i.e., if auto ingest is shutting down.
*/
private void runDataSourceProcessor(Case caseForJob, AutoIngestDataSource dataSource) throws InterruptedException, AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException {
diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.form
index c20e802081..6125fbb6c1 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.form
@@ -16,113 +16,207 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.java
index 63bad0bd23..db60e7a0af 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2019-2019 Basis Technology Corp.
+ * Copyright 2019-2020 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,12 +21,16 @@ package org.sleuthkit.autopsy.commandlineingest;
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.util.List;
+import java.util.Set;
+import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
+import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.ingest.IngestJobSettings;
import org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.coreutils.Logger;
import static org.sleuthkit.autopsy.report.infrastructure.ReportWizardAction.doReportWizard;
+import org.sleuthkit.autopsy.report.infrastructure.ReportWizardAction;
/**
* Configuration panel for auto ingest settings.
@@ -36,7 +40,7 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
private static final long serialVersionUID = 1L;
private static final Logger logger = Logger.getLogger(CommandLineIngestSettingsPanel.class.getName());
-
+
private static final String REPORTING_CONFIGURATION_NAME = "CommandLineIngest";
private static final boolean DISPLAY_CASE_SPECIFIC_DATA = false; // do not try to display case specific data
private static final boolean RUN_REPORTS = false; // do not generate reports as part of running the report wizard
@@ -48,12 +52,13 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
*/
public CommandLineIngestSettingsPanel(CommandLineIngestSettingsPanelController theController) {
initComponents();
+ setupReportList();
}
-
+
/**
* @return the REPORTING_CONFIGURATION_NAME
*/
- public static String getReportingConfigName() {
+ public static String getDefaultReportingConfigName() {
return REPORTING_CONFIGURATION_NAME;
}
@@ -87,6 +92,58 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
}
}
+ @Messages({
+ "CommandListIngestSettingsPanel_Default_Report_DisplayName=Default",
+ "CommandListIngestSettingsPanel_Make_Config=Make new profile..."
+ })
+ /**
+ * Initializes the report profile list combo box.
+ */
+ private void setupReportList() {
+ Set configNames = ReportWizardAction.getReportConfigNames();
+ configNames.remove(REPORTING_CONFIGURATION_NAME);
+
+ DefaultComboBoxModel model = new DefaultComboBoxModel<>();
+ model.addElement(Bundle.CommandListIngestSettingsPanel_Default_Report_DisplayName());
+ for (String name : configNames) {
+ model.addElement(name);
+ }
+
+ model.addElement(Bundle.CommandListIngestSettingsPanel_Make_Config());
+
+ reportProfileCB.setModel(model);
+ reportProfileCB.setSelectedIndex(0);
+ }
+
+ /**
+ * Checks to see if there is currently a profile define with the given name.
+ *
+ * @param name Profile name to check.
+ *
+ * @return True if there is a report with the given name.
+ */
+ private boolean doesReportProfileNameExist(String name) {
+ Set configNames = ReportWizardAction.getReportConfigNames();
+ return configNames.contains(name);
+ }
+
+ /**
+ * Returns the currently selected report profile name from the cb. For backwards
+ * compatibility if Default is selected, the existing default
+ * profile name of CommandLineIngest will be returned.
+ *
+ * @return The selected profile name.
+ */
+ private String getReportName() {
+ String reportName = (String) reportProfileCB.getSelectedItem();
+
+ if (reportName.equals(Bundle.CommandListIngestSettingsPanel_Default_Report_DisplayName())) {
+ reportName = REPORTING_CONFIGURATION_NAME;
+ }
+
+ return reportName;
+ }
+
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
@@ -95,20 +152,26 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
@SuppressWarnings("unchecked")
// //GEN-BEGIN:initComponents
private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
- nodeScrollPane = new javax.swing.JScrollPane();
nodePanel = new javax.swing.JPanel();
bnEditIngestSettings = new javax.swing.JButton();
- jLabelDescription = new javax.swing.JLabel();
bnEditReportSettings = new javax.swing.JButton();
+ javax.swing.JTextPane ingestDescriptionTextPane = new javax.swing.JTextPane();
+ javax.swing.JLabel ingestProfileLabel = new javax.swing.JLabel();
+ ingestProfileCB = new javax.swing.JComboBox<>();
+ javax.swing.JTextPane reportDescriptionTextPane = new javax.swing.JTextPane();
+ javax.swing.JLabel reportProfileLabel = new javax.swing.JLabel();
+ reportProfileCB = new javax.swing.JComboBox<>();
+ javax.swing.Box.Filler bottomFiller = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0));
+ jTextPane1 = new javax.swing.JTextPane();
setPreferredSize(new java.awt.Dimension(810, 422));
-
- nodeScrollPane.setMinimumSize(new java.awt.Dimension(0, 0));
- nodeScrollPane.setPreferredSize(new java.awt.Dimension(803, 553));
+ setLayout(new java.awt.BorderLayout());
nodePanel.setMinimumSize(new java.awt.Dimension(100, 100));
nodePanel.setPreferredSize(new java.awt.Dimension(801, 551));
+ nodePanel.setLayout(new java.awt.GridBagLayout());
org.openide.awt.Mnemonics.setLocalizedText(bnEditIngestSettings, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditIngestSettings.text")); // NOI18N
bnEditIngestSettings.setToolTipText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditIngestSettings.toolTipText")); // NOI18N
@@ -118,8 +181,12 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
bnEditIngestSettingsActionPerformed(evt);
}
});
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabelDescription, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jLabelDescription.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 9, 0, 0);
+ nodePanel.add(bnEditIngestSettings, gridBagConstraints);
org.openide.awt.Mnemonics.setLocalizedText(bnEditReportSettings, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditReportSettings.text")); // NOI18N
bnEditReportSettings.setToolTipText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditReportSettings.toolTipText")); // NOI18N
@@ -129,48 +196,120 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
bnEditReportSettingsActionPerformed(evt);
}
});
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 9, 0, 0);
+ nodePanel.add(bnEditReportSettings, gridBagConstraints);
+ bnEditReportSettings.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.bnEditReportSettings.AccessibleContext.accessibleName")); // NOI18N
- javax.swing.GroupLayout nodePanelLayout = new javax.swing.GroupLayout(nodePanel);
- nodePanel.setLayout(nodePanelLayout);
- nodePanelLayout.setHorizontalGroup(
- nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(nodePanelLayout.createSequentialGroup()
- .addContainerGap()
- .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(jLabelDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(bnEditReportSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- nodePanelLayout.setVerticalGroup(
- nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(nodePanelLayout.createSequentialGroup()
- .addGap(27, 27, 27)
- .addComponent(jLabelDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(bnEditIngestSettings)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(bnEditReportSettings)
- .addContainerGap(381, Short.MAX_VALUE))
- );
+ ingestDescriptionTextPane.setEditable(false);
+ ingestDescriptionTextPane.setBackground(javax.swing.UIManager.getDefaults().getColor("Label.background"));
+ ingestDescriptionTextPane.setText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.ingestDescriptionTextPane.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.gridwidth = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.weightx = 1.0;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 10, 5);
+ nodePanel.add(ingestDescriptionTextPane, gridBagConstraints);
- nodeScrollPane.setViewportView(nodePanel);
+ org.openide.awt.Mnemonics.setLocalizedText(ingestProfileLabel, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.ingestProfileLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 25, 0, 0);
+ nodePanel.add(ingestProfileLabel, gridBagConstraints);
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
- this.setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(nodeScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 421, Short.MAX_VALUE)
- );
+ ingestProfileCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Default" }));
+ ingestProfileCB.setEnabled(false);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
+ nodePanel.add(ingestProfileCB, gridBagConstraints);
+
+ reportDescriptionTextPane.setEditable(false);
+ reportDescriptionTextPane.setBackground(javax.swing.UIManager.getDefaults().getColor("Label.background"));
+ reportDescriptionTextPane.setText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.reportDescriptionTextPane.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.gridwidth = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.insets = new java.awt.Insets(15, 5, 5, 5);
+ nodePanel.add(reportDescriptionTextPane, gridBagConstraints);
+
+ org.openide.awt.Mnemonics.setLocalizedText(reportProfileLabel, org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.reportProfileLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 25, 0, 0);
+ nodePanel.add(reportProfileLabel, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
+ nodePanel.add(reportProfileCB, gridBagConstraints);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.weighty = 1.0;
+ nodePanel.add(bottomFiller, gridBagConstraints);
+
+ jTextPane1.setEditable(false);
+ jTextPane1.setBackground(javax.swing.UIManager.getDefaults().getColor("Label.background"));
+ jTextPane1.setText(org.openide.util.NbBundle.getMessage(CommandLineIngestSettingsPanel.class, "CommandLineIngestSettingsPanel.jTextPane1.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.gridwidth = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5);
+ nodePanel.add(jTextPane1, gridBagConstraints);
+
+ add(nodePanel, java.awt.BorderLayout.CENTER);
}// //GEN-END:initComponents
-
+ @Messages({
+ "CommandListIngestSettingsPanel_Report_Name_Msg=Please supply a report profile name:",
+ "CommandLineIngestSettingPanel_empty_report_name_mgs=Report profile name was empty, no profile created.",
+ "CommandLineIngestSettingPanel_existing_report_name_mgs=Report profile name was already exists, no profile created."
+ })
private void bnEditReportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnEditReportSettingsActionPerformed
+ String reportName = getReportName();
+ if (reportName.equals(Bundle.CommandListIngestSettingsPanel_Make_Config())) {
+ reportName = JOptionPane.showInputDialog(this, Bundle.CommandListIngestSettingsPanel_Report_Name_Msg());
+
+ // User hit cancel
+ if (reportName == null) {
+ return;
+ } else if (reportName.isEmpty()) {
+ JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), Bundle.CommandLineIngestSettingPanel_empty_report_name_mgs());
+ return;
+ } else if (doesReportProfileNameExist(reportName)) {
+ JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), Bundle.CommandLineIngestSettingPanel_existing_report_name_mgs());
+ return;
+ }
+ }
+
this.getParent().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- doReportWizard(getReportingConfigName(), DISPLAY_CASE_SPECIFIC_DATA, RUN_REPORTS);
+ doReportWizard(reportName, DISPLAY_CASE_SPECIFIC_DATA, RUN_REPORTS);
+
+ setupReportList();
+
+ if (((DefaultComboBoxModel) reportProfileCB.getModel()).getIndexOf(reportName) >= 0) {
+ reportProfileCB.setSelectedItem(reportName);
+ }
+
this.getParent().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}//GEN-LAST:event_bnEditReportSettingsActionPerformed
@@ -181,8 +320,9 @@ public class CommandLineIngestSettingsPanel extends javax.swing.JPanel {
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton bnEditIngestSettings;
private javax.swing.JButton bnEditReportSettings;
- private javax.swing.JLabel jLabelDescription;
+ private javax.swing.JComboBox ingestProfileCB;
+ private javax.swing.JTextPane jTextPane1;
private javax.swing.JPanel nodePanel;
- private javax.swing.JScrollPane nodeScrollPane;
+ private javax.swing.JComboBox reportProfileCB;
// End of variables declaration//GEN-END:variables
}
diff --git a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineOptionProcessor.java b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineOptionProcessor.java
index 4658158314..361a32a6ac 100755
--- a/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineOptionProcessor.java
+++ b/Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineOptionProcessor.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2019-2019 Basis Technology Corp.
+ * Copyright 2019-2020 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,8 +51,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
private final Option runIngestCommandOption = Option.withoutArgument('r', "runIngest");
private final Option ingestProfileOption = Option.requiredArgument('p', "ingestProfile");
private final Option listAllDataSourcesCommandOption = Option.withoutArgument('l', "listAllDataSources");
- private final Option generateReportsOption = Option.withoutArgument('g', "generateReports");
- private final Option runUICommandOption = Option.requiredArgument('u', "runUI");
+ private final Option generateReportsOption = Option.optionalArgument('g', "generateReports");
private boolean runFromCommandLine = false;
@@ -60,7 +59,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
final static String CASETYPE_MULTI = "multi";
final static String CASETYPE_SINGLE = "single";
-
+
@Override
protected Set