mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge pull request #6813 from rcordovano/7314-fix-file-ingest-module-progress-reporting
7314 fix file ingest module progress reporting
This commit is contained in:
commit
240ca5c3b0
@ -1,4 +1,5 @@
|
|||||||
CTL_RunIngestAction=Run Ingest
|
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.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.IngestModulesTableRenderer.warning.message=This ingest module has been run before on this data source.
|
||||||
IngestJobSettingsPanel.noPerRunSettings=The selected module has no per-run settings.
|
IngestJobSettingsPanel.noPerRunSettings=The selected module has no per-run settings.
|
||||||
|
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.ingest;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.datamodel.AbstractFile;
|
import org.sleuthkit.datamodel.AbstractFile;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
|
|
||||||
@ -60,7 +61,11 @@ final class FileIngestPipeline extends IngestTaskPipeline<FileIngestTask> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NbBundle.Messages({
|
||||||
|
"FileIngestPipeline_SaveResults_Activity=Saving Results"
|
||||||
|
})
|
||||||
void completeTask(FileIngestTask task) throws IngestTaskPipelineException {
|
void completeTask(FileIngestTask task) throws IngestTaskPipelineException {
|
||||||
|
ingestManager.setIngestTaskProgress(task, Bundle.FileIngestPipeline_SaveResults_Activity());
|
||||||
AbstractFile file = null;
|
AbstractFile file = null;
|
||||||
try {
|
try {
|
||||||
file = task.getFile();
|
file = task.getFile();
|
||||||
|
@ -769,67 +769,65 @@ public class IngestManager implements IngestProgressSnapshotProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the ingest job snapshot when a data source level ingest job task
|
* Updates the ingest progress snapshot when a new ingest module starts
|
||||||
* starts to be processd by a data source ingest module in the data source
|
* working on a data source level ingest task.
|
||||||
* ingest modules pipeline of an ingest job.
|
|
||||||
*
|
*
|
||||||
* @param task The data source level ingest job task that
|
* @param task The data source ingest task.
|
||||||
* was started.
|
* @param currentModuleName The display name of the currently processing
|
||||||
* @param ingestModuleDisplayName The dislpay name of the data source level
|
* module.
|
||||||
* ingest module that has started processing
|
|
||||||
* the task.
|
|
||||||
*/
|
*/
|
||||||
void setIngestTaskProgress(DataSourceIngestTask task, String ingestModuleDisplayName) {
|
void setIngestTaskProgress(DataSourceIngestTask task, String currentModuleName) {
|
||||||
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) {
|
|
||||||
IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId());
|
IngestThreadActivitySnapshot prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId());
|
||||||
IngestThreadActivitySnapshot newSnap;
|
IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId(), task.getIngestJobPipeline().getId(), currentModuleName, task.getDataSource());
|
||||||
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());
|
|
||||||
}
|
|
||||||
ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap);
|
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());
|
incrementModuleRunTime(prevSnap.getActivity(), newSnap.getStartTime().getTime() - prevSnap.getStartTime().getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the ingest job snapshot when a data source level ingest job task
|
* Updates the ingest progress snapshot when a new ingest module starts
|
||||||
* is completed by the data source ingest modules in the data source ingest
|
* working on a file ingest task.
|
||||||
* modules pipeline of an ingest job.
|
|
||||||
*
|
*
|
||||||
* @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) {
|
void setIngestTaskProgress(FileIngestTask task, String currentModuleName) {
|
||||||
ingestThreadActivitySnapshots.put(task.getThreadId(), new IngestThreadActivitySnapshot(task.getThreadId()));
|
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
|
* Updates the ingest progress snapshot when an ingest task is completed.
|
||||||
* completed by the file ingest modules in the file ingest modules pipeline
|
|
||||||
* of an ingest job.
|
|
||||||
*
|
*
|
||||||
* @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 prevSnap = ingestThreadActivitySnapshots.get(task.getThreadId());
|
||||||
IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId());
|
IngestThreadActivitySnapshot newSnap = new IngestThreadActivitySnapshot(task.getThreadId());
|
||||||
ingestThreadActivitySnapshots.put(task.getThreadId(), newSnap);
|
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());
|
incrementModuleRunTime(prevSnap.getActivity(), newSnap.getStartTime().getTime() - prevSnap.getStartTime().getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user