mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
Updated cancellation policy.
This commit is contained in:
parent
c29f106d3e
commit
25f954c4d3
@ -318,7 +318,7 @@ class ReportGenerator {
|
||||
|
||||
List<AbstractFile> files = getFiles();
|
||||
int numFiles = files.size();
|
||||
if (fileReportModule != null) {
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
fileReportModule.startReport(reportPath);
|
||||
fileReportModule.startTable(enabledInfo);
|
||||
}
|
||||
@ -329,12 +329,8 @@ class ReportGenerator {
|
||||
// Add files to report.
|
||||
for (AbstractFile file : files) {
|
||||
// Check to see if any reports have been cancelled.
|
||||
if (fileReportModule == null) {
|
||||
break;
|
||||
}
|
||||
// Remove cancelled reports, add files to report otherwise.
|
||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||
fileReportModule = null;
|
||||
return 0;
|
||||
} else {
|
||||
fileReportModule.addRow(file, enabledInfo);
|
||||
progressPanel.increment();
|
||||
@ -428,22 +424,28 @@ class ReportGenerator {
|
||||
@Override
|
||||
protected Integer doInBackground() throws Exception {
|
||||
// Start the progress indicators for each active TableReportModule.
|
||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||
} else {
|
||||
tableReportModule.startReport(reportPath);
|
||||
progressPanel.start();
|
||||
progressPanel.setIndeterminate(false);
|
||||
progressPanel.setMaximumProgress(this.artifactTypes.size() + 2); // +2 for content and blackboard artifact tags
|
||||
}
|
||||
tableReportModule.startReport(reportPath);
|
||||
progressPanel.start();
|
||||
progressPanel.setIndeterminate(false);
|
||||
progressPanel.setMaximumProgress(this.artifactTypes.size() + 2); // +2 for content and blackboard artifact tags
|
||||
// report on the blackboard results
|
||||
makeBlackboardArtifactTables();
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
makeBlackboardArtifactTables();
|
||||
}
|
||||
|
||||
// report on the tagged files and artifacts
|
||||
makeContentTagsTables();
|
||||
makeBlackboardArtifactTagsTables();
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
makeContentTagsTables();
|
||||
}
|
||||
|
||||
// report on the tagged images
|
||||
makeThumbnailTable();
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
makeBlackboardArtifactTagsTables();
|
||||
}
|
||||
|
||||
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||
// report on the tagged images
|
||||
makeThumbnailTable();
|
||||
}
|
||||
|
||||
// finish progress, wrap up
|
||||
progressPanel.complete(ReportStatus.COMPLETE);
|
||||
@ -466,8 +468,8 @@ class ReportGenerator {
|
||||
// Add a table to the report for every enabled blackboard artifact type.
|
||||
for (BlackboardArtifact.Type type : artifactTypes) {
|
||||
// Check for cancellaton.
|
||||
removeCancelledTableReportModules();
|
||||
if (tableReportModule == null) {
|
||||
|
||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -543,11 +545,6 @@ class ReportGenerator {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void makeContentTagsTables() {
|
||||
// Check for cancellaton.
|
||||
removeCancelledTableReportModules();
|
||||
if (tableReportModule == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the content tags.
|
||||
List<ContentTag> tags;
|
||||
@ -660,11 +657,6 @@ class ReportGenerator {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void makeBlackboardArtifactTagsTables() {
|
||||
// Check for cancellaton.
|
||||
removeCancelledTableReportModules();
|
||||
if (tableReportModule == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<BlackboardArtifactTag> tags;
|
||||
try {
|
||||
@ -724,12 +716,6 @@ class ReportGenerator {
|
||||
return tagNamesFilter.isEmpty() || tagNamesFilter.contains(tagName);
|
||||
}
|
||||
|
||||
void removeCancelledTableReportModules() {
|
||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||
tableReportModule = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a report for the files that were previously found to be images.
|
||||
*/
|
||||
|
@ -82,10 +82,6 @@ class ReportKML implements GeneralReportModule {
|
||||
String reportPath2 = baseReportDir + "ReportKML.txt"; //NON-NLS
|
||||
currentCase = Case.getCurrentCase();
|
||||
skCase = currentCase.getSleuthkitCase();
|
||||
|
||||
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
|
||||
return;
|
||||
}
|
||||
progressPanel.updateStatusLabel(NbBundle.getMessage(this.getClass(), "ReportKML.progress.loading"));
|
||||
// Check if ingest has finished
|
||||
String ingestwarning = "";
|
||||
@ -99,9 +95,6 @@ class ReportKML implements GeneralReportModule {
|
||||
// Why not just print the coordinates as we find them and make some utility methods to do the printing?
|
||||
// Should pull out time values for all of these points and store in TimeSpan element
|
||||
try {
|
||||
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
|
||||
return;
|
||||
}
|
||||
try (BufferedWriter out = new BufferedWriter(new FileWriter(reportPath2))) {
|
||||
|
||||
double lat = 0; // temp latitude
|
||||
|
Loading…
x
Reference in New Issue
Block a user