mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge pull request #1101 from sidheshenator/move_html_report_option_to_top
HTMLReport module swapped to the first place in the list
This commit is contained in:
commit
8cc9cb258b
@ -22,6 +22,7 @@ import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import static java.util.Collections.swap;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@ -37,6 +38,7 @@ import org.openide.util.Lookup;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.python.JythonModuleLoader;
|
||||
import org.sleuthkit.autopsy.report.ReportHTML;
|
||||
|
||||
final class ReportVisualPanel1 extends JPanel implements ListSelectionListener {
|
||||
private static final Logger logger = Logger.getLogger(ReportVisualPanel1.class.getName());
|
||||
@ -97,6 +99,15 @@ import org.sleuthkit.autopsy.python.JythonModuleLoader;
|
||||
}
|
||||
});
|
||||
|
||||
// Results-HTML should always be first in the list of Report Modules.
|
||||
int indexOfHTMLReportModule = 0;
|
||||
for(ReportModule module : modules) {
|
||||
if(module instanceof ReportHTML)
|
||||
break;
|
||||
indexOfHTMLReportModule++;
|
||||
}
|
||||
swap(modules, indexOfHTMLReportModule, 0);
|
||||
|
||||
modulesJList.getSelectionModel().addListSelectionListener(this);
|
||||
modulesJList.setCellRenderer(new ModuleCellRenderer());
|
||||
modulesJList.setListData(modules.toArray(new ReportModule[modules.size()]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user