diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 88ff204696..3704bf7a7e 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -261,9 +261,9 @@ final class AutoIngestDashboard extends JPanel implements Observer { * @param nodeStateSnapshot The jobs snapshot. */ void refreshTables() { - pendingJobsPanel.refresh(autoIngestMonitor); - runningJobsPanel.refresh(autoIngestMonitor); - completedJobsPanel.refresh(autoIngestMonitor); + pendingJobsPanel.refresh(autoIngestMonitor.getJobsSnapshot()); + runningJobsPanel.refresh(autoIngestMonitor.getJobsSnapshot()); + completedJobsPanel.refresh(autoIngestMonitor.getJobsSnapshot()); } /** diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsNode.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsNode.java index 4db9dbf4b7..f7913f5803 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsNode.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsNode.java @@ -60,8 +60,8 @@ final class AutoIngestJobsNode extends AbstractNode { /** * Construct a new AutoIngestJobsNode. */ - AutoIngestJobsNode(AutoIngestMonitor autoIngestMonitor, AutoIngestJobStatus status, EventBus eventBus) { - super(Children.create(new AutoIngestNodeChildren(autoIngestMonitor, status, eventBus), false)); + AutoIngestJobsNode(JobsSnapshot jobsSnapshot, AutoIngestJobStatus status, EventBus eventBus) { + super(Children.create(new AutoIngestNodeChildren(jobsSnapshot, status, eventBus), false)); refreshChildrenEventBus = eventBus; } @@ -78,7 +78,7 @@ final class AutoIngestJobsNode extends AbstractNode { static final class AutoIngestNodeChildren extends ChildFactory { private final AutoIngestJobStatus autoIngestJobStatus; - private final AutoIngestMonitor autoIngestMonitor; + private final JobsSnapshot jobsSnapshot; private final RefreshChildrenSubscriber refreshChildrenSubscriber = new RefreshChildrenSubscriber(); private final EventBus refreshEventBus; @@ -89,8 +89,8 @@ final class AutoIngestJobsNode extends AbstractNode { * @param snapshot the snapshot which contains the AutoIngestJobs * @param status the status of the jobs being displayed */ - AutoIngestNodeChildren(AutoIngestMonitor monitor, AutoIngestJobStatus status, EventBus eventBus) { - autoIngestMonitor = monitor; + AutoIngestNodeChildren(JobsSnapshot snapshot, AutoIngestJobStatus status, EventBus eventBus) { + jobsSnapshot = snapshot; autoIngestJobStatus = status; refreshEventBus = eventBus; refreshChildrenSubscriber.register(refreshEventBus); @@ -99,7 +99,6 @@ final class AutoIngestJobsNode extends AbstractNode { @Override protected boolean createKeys(List list) { List jobs; - JobsSnapshot jobsSnapshot = autoIngestMonitor.getJobsSnapshot(); switch (autoIngestJobStatus) { case PENDING_JOB: jobs = jobsSnapshot.getPendingJobs(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsPanel.java index e900d19a92..f3b0c907ad 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestJobsPanel.java @@ -30,6 +30,7 @@ import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.datamodel.EmptyNode; import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJobsNode.AutoIngestJobStatus; import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJobsNode.JobNode; +import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestMonitor.JobsSnapshot; /** * A panel which displays an outline view with all jobs for a specified status. @@ -162,13 +163,13 @@ final class AutoIngestJobsPanel extends javax.swing.JPanel implements ExplorerMa * @param jobsSnapshot - the JobsSnapshot which will provide the new * contents */ - void refresh(AutoIngestMonitor autoIngestMonitor) { + void refresh(JobsSnapshot jobsSnapshot) { synchronized (this) { outline.setRowSelectionAllowed(false); if (explorerManager.getRootContext() instanceof AutoIngestJobsNode) { ((AutoIngestJobsNode)explorerManager.getRootContext()).refresh(); } else { - explorerManager.setRootContext(new AutoIngestJobsNode(autoIngestMonitor, status, new EventBus("AutoIngestJobsNodeEventBus"))); + explorerManager.setRootContext(new AutoIngestJobsNode(jobsSnapshot, status, new EventBus("AutoIngestJobsNodeEventBus"))); } outline.setRowSelectionAllowed(true); outline.setFocusable(true); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PrioritizationAction.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PrioritizationAction.java index 4e362f4cb5..d50a85f906 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PrioritizationAction.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/PrioritizationAction.java @@ -88,7 +88,7 @@ abstract class PrioritizationAction extends AbstractAction { EventQueue.invokeLater(() -> { try { modifyPriority(dashboard.getMonitor()); - dashboard.getPendingJobsPanel().refresh(dashboard.getMonitor()); + dashboard.getPendingJobsPanel().refresh(dashboard.getMonitor().getJobsSnapshot()); } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { String errorMessage = getErrorMessage(); logger.log(Level.SEVERE, errorMessage, ex);