diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED index 157506a57f..65d3ba064d 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED @@ -1,4 +1,5 @@ CTL_RunIngestAction=Run Ingest +FileIngestPipeline_SaveResults_Activity=Saving Results IngestJobSettingsPanel.IngestModulesTableRenderer.info.message=A previous version of this ingest module has been run before on this data source. IngestJobSettingsPanel.IngestModulesTableRenderer.warning.message=This ingest module has been run before on this data source. IngestJobSettingsPanel.noPerRunSettings=The selected module has no per-run settings. diff --git a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java index dd6f917fb2..774dd57cd2 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.ingest; import java.util.List; import java.util.Optional; +import org.openide.util.NbBundle; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.TskCoreException; @@ -60,7 +61,11 @@ final class FileIngestPipeline extends IngestTaskPipeline { } @Override + @NbBundle.Messages({ + "FileIngestPipeline_SaveResults_Activity=Saving Results" + }) void completeTask(FileIngestTask task) throws IngestTaskPipelineException { + ingestManager.setIngestTaskProgress(task, Bundle.FileIngestPipeline_SaveResults_Activity()); AbstractFile file = null; try { file = task.getFile(); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index b778cfcfb7..f73960aeca 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -769,67 +769,65 @@ public class IngestManager implements IngestProgressSnapshotProvider { } /** - * Updates the ingest job snapshot when a data source level ingest job task - * starts to be processd by a data source ingest module in the data source - * ingest modules pipeline of an ingest job. + * Updates the ingest progress snapshot when a new ingest module starts + * working on a data source level ingest task. * - * @param task The data source level ingest job task that - * was started. - * @param ingestModuleDisplayName The dislpay name of the data source level - * ingest module that has started processing - * the task. + * @param task The data source ingest task. + * @param currentModuleName The display name of the currently processing + * module. */ - void setIngestTaskProgress(DataSourceIngestTask task, String ingestModuleDisplayName) { - ingestThreadActivitySnapshots.put(task.getThreadId(), new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), ingestModuleDisplayName, task.getDataSource())); - } - - /** - * Updates the ingest job snapshot when a file source level ingest job task - * starts to be processed by a file level ingest module in the file ingest - * modules pipeline of an ingest job. - * - * @param task The file level ingest job task that was - * started. - * @param ingestModuleDisplayName The dislpay name of the file level ingest - * module that has started processing the - * task. - */ - void setIngestTaskProgress(FileIngestTask task, String ingestModuleDisplayName) { + void setIngestTaskProgress(DataSourceIngestTask task, String currentModuleName) { IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId()); - IngestThreadActivitySnapshot newSnap; - try { - newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), ingestModuleDisplayName, task.getDataSource(), task.getFile()); - } catch (TskCoreException ex) { - // In practice, this task would never have been enqueued or processed since the file - // lookup would have failed. - newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), ingestModuleDisplayName, task.getDataSource()); - } + IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource()); ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap); + + /* + * Update the total run time for the PREVIOUS ingest module in the + * pipeline, which has now finished its processing for the task. + */ incrementModuleRunTime(prevSnap.getActivity(), newSnap.getStartTime().getTime() - prevSnap.getStartTime().getTime()); } /** - * Updates the ingest job snapshot when a data source level ingest job task - * is completed by the data source ingest modules in the data source ingest - * modules pipeline of an ingest job. + * Updates the ingest progress snapshot when a new ingest module starts + * working on a file ingest task. * - * @param task The data source level ingest job task that was completed. + * @param task The file ingest task. + * @param currentModuleName The display name of the currently processing + * module. */ - void setIngestTaskProgressCompleted(DataSourceIngestTask task) { - ingestThreadActivitySnapshots.put(task.getThreadId(), new IngestThreadActivitySnapshot(task.getThreadId())); + void setIngestTaskProgress(FileIngestTask task, String currentModuleName) { + IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId()); + IngestThreadActivitySnapshot newSnap; + try { + newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource(), task.getFile()); + } catch (TskCoreException ex) { + logger.log(Level.SEVERE, "Error getting file from file ingest task", ex); + newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource()); + } + ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap); + + /* + * Update the total run time for the PREVIOUS ingest module in the + * pipeline, which has now finished its processing for the task. + */ + incrementModuleRunTime(prevSnap.getActivity(), newSnap.getStartTime().getTime() - prevSnap.getStartTime().getTime()); } /** - * Updates the ingest job snapshot when a file level ingest job task is - * completed by the file ingest modules in the file ingest modules pipeline - * of an ingest job. + * Updates the ingest progress snapshot when an ingest task is completed. * - * @param task The file level ingest job task that was completed. + * @param task The ingest task. */ - void setIngestTaskProgressCompleted(FileIngestTask task) { + void setIngestTaskProgressCompleted(IngestTask task) { IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId()); IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId()); ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap); + + /* + * Update the total run time for the LAST ingest module in the pipeline, + * which has now finished its processing for the task. + */ incrementModuleRunTime(prevSnap.getActivity(), newSnap.getStartTime().getTime() - prevSnap.getStartTime().getTime()); }