mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-01 14:59:50 +00:00
Merge branch 'develop' of github.com:sleuthkit/autopsy into 6733-getArtifactsTest
This commit is contained in:
@@ -1468,9 +1468,16 @@ public class Case {
|
||||
*/
|
||||
public boolean hasData() {
|
||||
boolean hasDataSources = false;
|
||||
try {
|
||||
hasDataSources = (getDataSources().size() > 0);
|
||||
} catch (TskCoreException ex) {
|
||||
String query = "SELECT count(*) AS count FROM tsk_objects WHERE par_obj_id IS NULL";
|
||||
try (SleuthkitCase.CaseDbQuery dbQuery = caseDb.executeQuery(query)) {
|
||||
ResultSet resultSet = dbQuery.getResultSet();
|
||||
if (resultSet.next()) {
|
||||
long numDataSources = resultSet.getLong("count");
|
||||
if (numDataSources > 0) {
|
||||
hasDataSources = true;
|
||||
}
|
||||
}
|
||||
} catch (TskCoreException | SQLException ex) {
|
||||
logger.log(Level.SEVERE, "Error accessing case database", ex); //NON-NLS
|
||||
}
|
||||
return hasDataSources;
|
||||
|
||||
@@ -148,17 +148,12 @@ public class PieChartPanel extends AbstractLoadableComponent<List<PieChartPanel.
|
||||
this.chart = ChartFactory.createPieChart(
|
||||
title,
|
||||
dataset,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false);
|
||||
|
||||
chart.setBackgroundPaint(null);
|
||||
chart.getLegend().setItemFont(DEFAULT_FONT);
|
||||
chart.getTitle().setFont(DEFAULT_HEADER_FONT);
|
||||
|
||||
// don't show a legend by default
|
||||
chart.removeLegend();
|
||||
|
||||
PiePlot plot = ((PiePlot) chart.getPlot());
|
||||
|
||||
plot.setLabelGenerator(DEFAULT_LABEL_GENERATOR);
|
||||
@@ -169,6 +164,8 @@ public class PieChartPanel extends AbstractLoadableComponent<List<PieChartPanel.
|
||||
// Create Panel
|
||||
ChartPanel panel = new ChartPanel(chart);
|
||||
panel.addOverlay(overlay);
|
||||
panel.setPopupMenu(null);
|
||||
|
||||
this.setLayout(new BorderLayout());
|
||||
this.add(panel, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.discovery.ui;
|
||||
|
||||
import java.util.Collections;
|
||||
import org.sleuthkit.autopsy.discovery.search.AbstractFilter;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
@@ -141,10 +142,13 @@ final class DataSourceFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
try {
|
||||
DefaultListModel<DataSourceItem> dsListModel = (DefaultListModel<DataSourceItem>) dataSourceList.getModel();
|
||||
dsListModel.removeAllElements();
|
||||
for (DataSource ds : Case.getCurrentCase().getSleuthkitCase().getDataSources()) {
|
||||
List<DataSource> dataSources = Case.getCurrentCase().getSleuthkitCase().getDataSources();
|
||||
Collections.sort(dataSources, (DataSource ds1, DataSource ds2) -> ds1.getName().compareToIgnoreCase(ds2.getName()));
|
||||
for (DataSource ds : dataSources) {
|
||||
dsListModel.add(count, new DataSourceItem(ds));
|
||||
count++;
|
||||
}
|
||||
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Error loading data sources", ex);
|
||||
dataSourceCheckbox.setEnabled(false);
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule {
|
||||
|
||||
static final boolean DEFAULT_CONFIG_INCLUDE_ELSE_EXCLUDE = false;
|
||||
|
||||
private static final String PHOTOREC_TEMP_SUBDIR = "Photorec";
|
||||
private static final String PHOTOREC_TEMP_SUBDIR = "PhotoRec Carver"; // NON-NLS Note that we need the space in this dir name (JIRA-6878)
|
||||
private static final String PHOTOREC_DIRECTORY = "photorec_exec"; //NON-NLS
|
||||
private static final String PHOTOREC_SUBDIRECTORY = "bin"; //NON-NLS
|
||||
private static final String PHOTOREC_EXECUTABLE = "photorec_win.exe"; //NON-NLS
|
||||
|
||||
Reference in New Issue
Block a user