Bug fixes

This commit is contained in:
Eugene Livis 2019-08-20 13:31:13 -04:00
parent 269662c591
commit 82dfa7227f
3 changed files with 6 additions and 27 deletions

View File

@ -57,7 +57,7 @@ public final class ReportWizardAction extends CallableSystemAction implements Pr
private static final Logger logger = Logger.getLogger(ReportWizardAction.class.getName()); private static final Logger logger = Logger.getLogger(ReportWizardAction.class.getName());
private static final String REPORTING_CONFIGURATION_NAME = "ReportAction"; private static final String REPORTING_CONFIGURATION_NAME = "ReportAction";
private static final boolean DISPLAY_CASE_SPECIFIC_DATA = true; private static final boolean DISPLAY_CASE_SPECIFIC_DATA = false; //ELTODO true;
private static final boolean RUN_REPORTS = true; private static final boolean RUN_REPORTS = true;
private final JButton toolbarButton = new JButton(); private final JButton toolbarButton = new JButton();
private static final String ACTION_NAME = NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.actionName.text"); private static final String ACTION_NAME = NbBundle.getMessage(ReportWizardAction.class, "ReportWizardAction.actionName.text");

View File

@ -20,8 +20,6 @@ package org.sleuthkit.autopsy.report;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.Collection;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.prefs.Preferences; import java.util.prefs.Preferences;
import javax.swing.JButton; import javax.swing.JButton;
@ -35,7 +33,7 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
private WizardDescriptor wiz; private WizardDescriptor wiz;
private ReportVisualPanel1 component; private ReportVisualPanel1 component;
private Map<String, ReportModuleConfig> moduleConfigs; private final Map<String, ReportModuleConfig> moduleConfigs;
private final JButton nextButton; private final JButton nextButton;
private final JButton finishButton; private final JButton finishButton;
@ -114,12 +112,11 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
TableReportModule module = getComponent().getTableModule(); TableReportModule module = getComponent().getTableModule();
GeneralReportModule general = getComponent().getGeneralModule(); GeneralReportModule general = getComponent().getGeneralModule();
PortableCaseReportModule portable = getComponent().getPortableCaseModule(); PortableCaseReportModule portable = getComponent().getPortableCaseModule();
Map<String, ReportModuleConfig> moduleConfigs = getComponent().getUpdatedModuleConfigs();
wiz.putProperty("tableModule", module); //NON-NLS wiz.putProperty("tableModule", module); //NON-NLS
wiz.putProperty("generalModule", general); //NON-NLS wiz.putProperty("generalModule", general); //NON-NLS
wiz.putProperty("fileModule", getComponent().getFileModule()); //NON-NLS wiz.putProperty("fileModule", getComponent().getFileModule()); //NON-NLS
wiz.putProperty("portableCaseModule", portable); //NON-NLS wiz.putProperty("portableCaseModule", portable); //NON-NLS
wiz.putProperty("moduleConfigs", moduleConfigs); //NON-NLS wiz.putProperty("moduleConfigs", getComponent().getUpdatedModuleConfigs()); //NON-NLS
// Store preferences that WizardIterator will use to determine what // Store preferences that WizardIterator will use to determine what
// panels need to be shown // panels need to be shown
@ -128,20 +125,4 @@ class ReportWizardPanel1 implements WizardDescriptor.FinishablePanel<WizardDescr
prefs.putBoolean("generalModule", general != null); //NON-NLS prefs.putBoolean("generalModule", general != null); //NON-NLS
prefs.putBoolean("portableCaseModule", portable != null); //NON-NLS prefs.putBoolean("portableCaseModule", portable != null); //NON-NLS
} }
/**
* Are any of the given booleans true?
*
* @param bools
*
* @return
*/
private boolean any(Collection<Boolean> bools) {
for (Boolean b : bools) {
if (b) {
return true;
}
}
return false;
}
} }

View File

@ -82,7 +82,7 @@ class TableReportGenerator {
this.settings = settings; this.settings = settings;
} }
private void getAllExistingTags(boolean addNotableToTagNames) throws NoCurrentCaseException, TskCoreException { private void getAllExistingTags() throws NoCurrentCaseException, TskCoreException {
List<String> tagNames = new ArrayList<>(); List<String> tagNames = new ArrayList<>();
// get all possible tag names // get all possible tag names
@ -90,9 +90,7 @@ class TableReportGenerator {
String notableString = ""; String notableString = "";
for (TagName tagName : tagNamesInUse) { for (TagName tagName : tagNamesInUse) {
if (addNotableToTagNames) { notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
}
tagNames.add(tagName.getDisplayName() + notableString); tagNames.add(tagName.getDisplayName() + notableString);
} }
tagNamesFilter = new HashSet<>(tagNames); tagNamesFilter = new HashSet<>(tagNames);
@ -130,7 +128,7 @@ class TableReportGenerator {
// If report type is "all tagged results", then read all possible tab names from database. // If report type is "all tagged results", then read all possible tab names from database.
// Otherwise do not load tag names, i.e. run "all results" report // Otherwise do not load tag names, i.e. run "all results" report
if (settings.getReportType() == TableReportSettings.TableReportType.ALL_TAGGED_RESULTS) { if (settings.getReportType() == TableReportSettings.TableReportType.ALL_TAGGED_RESULTS) {
getAllExistingTags(true); // ELTODO verify whether we should add (Notable) to tag names like we do in UI getAllExistingTags();
} }
// get all possible artifact types // get all possible artifact types