mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 03:24: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();
|
List<AbstractFile> files = getFiles();
|
||||||
int numFiles = files.size();
|
int numFiles = files.size();
|
||||||
if (fileReportModule != null) {
|
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||||
fileReportModule.startReport(reportPath);
|
fileReportModule.startReport(reportPath);
|
||||||
fileReportModule.startTable(enabledInfo);
|
fileReportModule.startTable(enabledInfo);
|
||||||
}
|
}
|
||||||
@ -329,12 +329,8 @@ class ReportGenerator {
|
|||||||
// Add files to report.
|
// Add files to report.
|
||||||
for (AbstractFile file : files) {
|
for (AbstractFile file : files) {
|
||||||
// Check to see if any reports have been cancelled.
|
// 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) {
|
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||||
fileReportModule = null;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
fileReportModule.addRow(file, enabledInfo);
|
fileReportModule.addRow(file, enabledInfo);
|
||||||
progressPanel.increment();
|
progressPanel.increment();
|
||||||
@ -428,22 +424,28 @@ class ReportGenerator {
|
|||||||
@Override
|
@Override
|
||||||
protected Integer doInBackground() throws Exception {
|
protected Integer doInBackground() throws Exception {
|
||||||
// Start the progress indicators for each active TableReportModule.
|
// Start the progress indicators for each active TableReportModule.
|
||||||
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
|
||||||
} else {
|
|
||||||
tableReportModule.startReport(reportPath);
|
tableReportModule.startReport(reportPath);
|
||||||
progressPanel.start();
|
progressPanel.start();
|
||||||
progressPanel.setIndeterminate(false);
|
progressPanel.setIndeterminate(false);
|
||||||
progressPanel.setMaximumProgress(this.artifactTypes.size() + 2); // +2 for content and blackboard artifact tags
|
progressPanel.setMaximumProgress(this.artifactTypes.size() + 2); // +2 for content and blackboard artifact tags
|
||||||
}
|
|
||||||
// report on the blackboard results
|
// report on the blackboard results
|
||||||
|
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||||
makeBlackboardArtifactTables();
|
makeBlackboardArtifactTables();
|
||||||
|
}
|
||||||
|
|
||||||
// report on the tagged files and artifacts
|
// report on the tagged files and artifacts
|
||||||
|
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||||
makeContentTagsTables();
|
makeContentTagsTables();
|
||||||
makeBlackboardArtifactTagsTables();
|
}
|
||||||
|
|
||||||
|
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||||
|
makeBlackboardArtifactTagsTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (progressPanel.getStatus() != ReportStatus.CANCELED) {
|
||||||
// report on the tagged images
|
// report on the tagged images
|
||||||
makeThumbnailTable();
|
makeThumbnailTable();
|
||||||
|
}
|
||||||
|
|
||||||
// finish progress, wrap up
|
// finish progress, wrap up
|
||||||
progressPanel.complete(ReportStatus.COMPLETE);
|
progressPanel.complete(ReportStatus.COMPLETE);
|
||||||
@ -466,8 +468,8 @@ class ReportGenerator {
|
|||||||
// Add a table to the report for every enabled blackboard artifact type.
|
// Add a table to the report for every enabled blackboard artifact type.
|
||||||
for (BlackboardArtifact.Type type : artifactTypes) {
|
for (BlackboardArtifact.Type type : artifactTypes) {
|
||||||
// Check for cancellaton.
|
// Check for cancellaton.
|
||||||
removeCancelledTableReportModules();
|
|
||||||
if (tableReportModule == null) {
|
if (progressPanel.getStatus() == ReportStatus.CANCELED) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,11 +545,6 @@ class ReportGenerator {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
private void makeContentTagsTables() {
|
private void makeContentTagsTables() {
|
||||||
// Check for cancellaton.
|
|
||||||
removeCancelledTableReportModules();
|
|
||||||
if (tableReportModule == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the content tags.
|
// Get the content tags.
|
||||||
List<ContentTag> tags;
|
List<ContentTag> tags;
|
||||||
@ -660,11 +657,6 @@ class ReportGenerator {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
private void makeBlackboardArtifactTagsTables() {
|
private void makeBlackboardArtifactTagsTables() {
|
||||||
// Check for cancellaton.
|
|
||||||
removeCancelledTableReportModules();
|
|
||||||
if (tableReportModule == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<BlackboardArtifactTag> tags;
|
List<BlackboardArtifactTag> tags;
|
||||||
try {
|
try {
|
||||||
@ -724,12 +716,6 @@ class ReportGenerator {
|
|||||||
return tagNamesFilter.isEmpty() || tagNamesFilter.contains(tagName);
|
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.
|
* 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
|
String reportPath2 = baseReportDir + "ReportKML.txt"; //NON-NLS
|
||||||
currentCase = Case.getCurrentCase();
|
currentCase = Case.getCurrentCase();
|
||||||
skCase = currentCase.getSleuthkitCase();
|
skCase = currentCase.getSleuthkitCase();
|
||||||
|
|
||||||
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
progressPanel.updateStatusLabel(NbBundle.getMessage(this.getClass(), "ReportKML.progress.loading"));
|
progressPanel.updateStatusLabel(NbBundle.getMessage(this.getClass(), "ReportKML.progress.loading"));
|
||||||
// Check if ingest has finished
|
// Check if ingest has finished
|
||||||
String ingestwarning = "";
|
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?
|
// 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
|
// Should pull out time values for all of these points and store in TimeSpan element
|
||||||
try {
|
try {
|
||||||
if (progressPanel.getStatus() == ReportProgressPanel.ReportStatus.CANCELED) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try (BufferedWriter out = new BufferedWriter(new FileWriter(reportPath2))) {
|
try (BufferedWriter out = new BufferedWriter(new FileWriter(reportPath2))) {
|
||||||
|
|
||||||
double lat = 0; // temp latitude
|
double lat = 0; // temp latitude
|
||||||
|
Loading…
x
Reference in New Issue
Block a user