mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
Merge pull request #2611 from wschaeferB/2418-IngestHistoryFix
2418 ingest history renenabled by using correct constructor
This commit is contained in:
commit
a51c263cd2
@ -74,6 +74,7 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
||||
|
||||
/**
|
||||
* Construct a panel to allow a user to make ingest job settings.
|
||||
* This constructor assumes there is no ingest history.
|
||||
*
|
||||
* @param settings The initial settings for the ingest job.
|
||||
*/
|
||||
@ -88,12 +89,13 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a panel to allow a user to make ingest job settings.
|
||||
* Construct a panel to allow a user to make ingest job settings.
|
||||
* This constructor enables tracking of ingest job history.
|
||||
*
|
||||
* @param settings The initial settings for the ingest job.
|
||||
* @param dataSources The data sources ingest is being run on.
|
||||
*/
|
||||
IngestJobSettingsPanel(IngestJobSettings settings, List<Content> dataSources) {
|
||||
public IngestJobSettingsPanel(IngestJobSettings settings, List<Content> dataSources) {
|
||||
this.settings = settings;
|
||||
this.dataSources.addAll(dataSources);
|
||||
try {
|
||||
|
@ -19,12 +19,14 @@
|
||||
package org.sleuthkit.autopsy.ingest.runIngestModuleWizard;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.util.List;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
* A wizard panel for configuring an ingest job.
|
||||
@ -34,16 +36,17 @@ class IngestModulesConfigWizardPanel extends ShortcutWizardDescriptorPanel {
|
||||
private final String executionContext;
|
||||
private final IngestJobSettings.IngestType ingestType;
|
||||
private IngestJobSettingsPanel ingestJobSettingsPanel;
|
||||
|
||||
private final List<Content> dataSources;
|
||||
/**
|
||||
* Constructs a wizard panel for configuring an ingest job.
|
||||
*
|
||||
* @param executionContest The execution context for the wizard.
|
||||
* @param ingestType The ingest type.
|
||||
*/
|
||||
IngestModulesConfigWizardPanel(String executionContest, IngestJobSettings.IngestType ingestType) {
|
||||
IngestModulesConfigWizardPanel(String executionContest, IngestJobSettings.IngestType ingestType, List<Content> dataSources) {
|
||||
this.executionContext = executionContest;
|
||||
this.ingestType = ingestType;
|
||||
this.dataSources = dataSources;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,7 +67,7 @@ class IngestModulesConfigWizardPanel extends ShortcutWizardDescriptorPanel {
|
||||
* Creating an ingest job settings object is expensive, so it is
|
||||
* deferred until this panel is actually used in the wizard.
|
||||
*/
|
||||
ingestJobSettingsPanel = new IngestJobSettingsPanel(new IngestJobSettings(executionContext, ingestType));
|
||||
ingestJobSettingsPanel = new IngestJobSettingsPanel(new IngestJobSettings(executionContext, ingestType), dataSources);
|
||||
}
|
||||
ingestJobSettingsPanel.setName(Bundle.IngestModulesConfigWizardPanel_name_text());
|
||||
return ingestJobSettingsPanel;
|
||||
|
@ -91,7 +91,7 @@ public final class RunIngestModulesAction extends CallableSystemAction {
|
||||
* WizardDescriptor.Panel.getComponent().getName().
|
||||
*/
|
||||
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
RunIngestModulesWizardIterator wizard = new RunIngestModulesWizardIterator(EXECUTION_CONTEXT, this.ingestType);
|
||||
RunIngestModulesWizardIterator wizard = new RunIngestModulesWizardIterator(EXECUTION_CONTEXT, this.ingestType, this.dataSources);
|
||||
WizardDescriptor wiz = new WizardDescriptor(wizard);
|
||||
wiz.setTitleFormat(new MessageFormat("{0}"));
|
||||
wiz.setTitle(Bundle.RunIngestModulesAction_name());
|
||||
|
@ -27,6 +27,7 @@ import javax.swing.event.ChangeListener;
|
||||
import org.openide.WizardDescriptor;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobSettings;
|
||||
import org.sleuthkit.autopsy.ingest.IngestProfiles;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
* A wizard that allows a user to configure an ingest job.
|
||||
@ -45,7 +46,7 @@ final class RunIngestModulesWizardIterator implements WizardDescriptor.Iterator<
|
||||
* settings can differ by execution context.
|
||||
* @param ingestType The type of ingest to be configured.
|
||||
*/
|
||||
RunIngestModulesWizardIterator(String executionContext, IngestJobSettings.IngestType ingestType) {
|
||||
RunIngestModulesWizardIterator(String executionContext, IngestJobSettings.IngestType ingestType, List<Content> dataSources) {
|
||||
this.ingestType = ingestType;
|
||||
panels = new ArrayList<>();
|
||||
List<IngestProfiles.IngestProfile> profiles = IngestProfiles.getIngestProfiles();
|
||||
@ -53,7 +54,7 @@ final class RunIngestModulesWizardIterator implements WizardDescriptor.Iterator<
|
||||
panels.add(new IngestProfileSelectionWizardPanel(executionContext, PROP_LASTPROFILE_NAME));
|
||||
}
|
||||
|
||||
panels.add(new IngestModulesConfigWizardPanel(executionContext, this.ingestType));
|
||||
panels.add(new IngestModulesConfigWizardPanel(executionContext, this.ingestType, dataSources));
|
||||
String[] steps = new String[panels.size()];
|
||||
for (int i = 0; i < panels.size(); i++) {
|
||||
Component c = panels.get(i).getComponent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user