mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
3815 change arguement to AutoIngestJobsNode back to snapshot from monitor
This commit is contained in:
parent
26cfb15f6b
commit
4a75775257
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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<AutoIngestJob> {
|
||||
|
||||
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<AutoIngestJob> list) {
|
||||
List<AutoIngestJob> jobs;
|
||||
JobsSnapshot jobsSnapshot = autoIngestMonitor.getJobsSnapshot();
|
||||
switch (autoIngestJobStatus) {
|
||||
case PENDING_JOB:
|
||||
jobs = jobsSnapshot.getPendingJobs();
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user