diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties index e486f714f3..51a6c83516 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties @@ -20,8 +20,8 @@ IngestMessagePanel.totalUniqueMessagesNameVal.text=- IngestJob.progress.dataSourceIngest.initialDisplayName=Analyzing {0} IngestJob.progress.dataSourceIngest.displayName={0} for {1} IngestJob.progress.fileIngest.displayName=Analyzing files from {0} -IngestJob.progress.fileIngest.displayName={0} on {1} -IngestJob.progress.canceling={0} (Canceling; Waiting on module...) +IngestJob.progress.fileIngest.cancelMessage=Waiting for {0} on {1} +IngestJob.progress.canceling={0} (Canceling...) IngestJob.cancellationDialog.title=Cancel Ingest IngestDialog.title.text=Ingest Modules IngestDialog.startButton.title=Start diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java index dc36451b92..15f94ca9aa 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java @@ -148,6 +148,8 @@ final class DataSourceIngestJob { private long estimatedFilesToProcess; private long processedFiles; private ProgressHandle fileIngestProgress; + private String currentFileIngestModule; + private String currentFileIngestTask; /** * A data source ingest job uses this field to report its creation time. @@ -172,6 +174,8 @@ final class DataSourceIngestJob { this.settings = settings; this.doUI = runInteractively; this.createTime = new Date().getTime(); + this.currentFileIngestModule = ""; + this.currentFileIngestTask = ""; this.createIngestPipelines(); } @@ -704,6 +708,21 @@ final class DataSourceIngestJob { logIngestModuleErrors(errors); } + if (this.doUI && !this.cancelled) { + synchronized (this.fileIngestProgressLock) { + /** + * Update the file ingest progress bar again, in + * case the file was being displayed. + */ + this.filesInProgress.remove(file.getName()); + if (this.filesInProgress.size() > 0) { + this.fileIngestProgress.progress(this.filesInProgress.get(0)); + } else { + this.fileIngestProgress.progress(""); + } + } + } + } this.fileIngestPipelinesQueue.put(pipeline); } @@ -751,20 +770,6 @@ final class DataSourceIngestJob { } } } - - /** - * Updates the message shown on the current file ingest - * progress bar for this job. - * - * @param displayName The new display name. - */ - void updateFileIngestProgressBarMessage(String message) { - if (this.doUI && !this.cancelled) { - synchronized (this.fileIngestProgressLock) { - this.fileIngestProgress.progress(message); - } - } - } /** * Switches the data source level ingest progress bar for this job to @@ -939,6 +944,10 @@ final class DataSourceIngestJob { this.fileIngestProgress.setDisplayName( NbBundle.getMessage(this.getClass(), "IngestJob.progress.canceling", displayName)); + this.fileIngestProgress.progress(NbBundle.getMessage(this.getClass(), + "IngestJob.progress.fileIngest.cancelMessage", + this.currentFileIngestModule, this.currentFileIngestTask)); + } } } @@ -953,6 +962,11 @@ final class DataSourceIngestJob { this.checkForStageCompleted(); } + void setCurrentFileIngestModule(String moduleName, String taskName) { + this.currentFileIngestModule = moduleName; + this.currentFileIngestTask = taskName; + } + /** * Queries whether or not cancellation, i.e., a shutdown of the data source * level and file level ingest pipelines for this job, has been requested. diff --git a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java index 032de0a967..f7ed45efaf 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java @@ -120,10 +120,7 @@ final class FileIngestPipeline { for (PipelineModule module : this.modules) { try { FileIngestPipeline.ingestManager.setIngestTaskProgress(task, module.getDisplayName()); - String message = NbBundle.getMessage(this.getClass(), - "IngestJob.progress.fileIngest.displayName", - module.getDisplayName(), task.getFile().getName()); - this.job.updateFileIngestProgressBarMessage(message); + this.job.setCurrentFileIngestModule(module.getDisplayName(), task.getFile().getName()); module.process(file); } catch (Throwable ex) { // Catch-all exception firewall errors.add(new IngestModuleError(module.getDisplayName(), ex));