diff --git a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java
index 50fae61d4b..cd5cb85bee 100644
--- a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java
+++ b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java
@@ -23,8 +23,10 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.text.NumberFormat;
import java.time.ZoneId;
import java.util.Collection;
+import java.util.Map;
import java.util.MissingResourceException;
import java.util.TimeZone;
import java.util.concurrent.ExecutionException;
@@ -92,7 +94,7 @@ import org.sleuthkit.datamodel.TskCoreException;
*
*
*/
-public class TimeLineController {
+public class TimeLineController {
private static final Logger LOGGER = Logger.getLogger(TimeLineController.class.getName());
@@ -221,9 +223,9 @@ public class TimeLineController {
filteredEvents = eventsRepository.getEventsModel();
InitialZoomState = new ZoomParams(filteredEvents.getSpanningInterval(),
- EventTypeZoomLevel.BASE_TYPE,
- Filter.getDefaultFilter(),
- DescriptionLOD.SHORT);
+ EventTypeZoomLevel.BASE_TYPE,
+ Filter.getDefaultFilter(),
+ DescriptionLOD.SHORT);
historyManager.advance(InitialZoomState);
//persistent listener instances
@@ -466,13 +468,30 @@ public class TimeLineController {
}
}
- synchronized public void pushDescrLOD(DescriptionLOD newLOD) {
- ZoomParams currentZoom = filteredEvents.getRequestedZoomParamters().get();
- if (currentZoom == null) {
- advance(InitialZoomState.withDescrLOD(newLOD));
- } else if (currentZoom.hasDescrLOD(newLOD) == false) {
- advance(currentZoom.withDescrLOD(newLOD));
+ synchronized public boolean pushDescrLOD(DescriptionLOD newLOD) {
+ Map eventCounts = filteredEvents.getEventCounts(filteredEvents.getRequestedZoomParamters().get().getTimeRange());
+ final Long count = eventCounts.values().stream().reduce(0l, Long::sum);
+
+ boolean shouldContinue = true;
+ if (newLOD == DescriptionLOD.FULL && count > 10_000) {
+
+ int showConfirmDialog = JOptionPane.showConfirmDialog(mainFrame,
+ "You are about to show details for " + NumberFormat.getInstance().format(count) + " events. This might be very slow or even crash Autopsy.\n\nDo you want to continue?",
+ "",
+ JOptionPane.YES_NO_OPTION);
+
+ shouldContinue = (showConfirmDialog == JOptionPane.YES_OPTION);
}
+
+ if (shouldContinue) {
+ ZoomParams currentZoom = filteredEvents.getRequestedZoomParamters().get();
+ if (currentZoom == null) {
+ advance(InitialZoomState.withDescrLOD(newLOD));
+ } else if (currentZoom.hasDescrLOD(newLOD) == false) {
+ advance(currentZoom.withDescrLOD(newLOD));
+ }
+ }
+ return shouldContinue;
}
synchronized public void pushTimeAndType(Interval timeRange, EventTypeZoomLevel typeZoom) {
@@ -599,35 +618,35 @@ public class TimeLineController {
*/
synchronized public boolean outOfDatePromptAndRebuild() {
return showOutOfDateConfirmation() == JOptionPane.YES_OPTION
- ? rebuildRepo()
- : false;
+ ? rebuildRepo()
+ : false;
}
synchronized int showLastPopulatedWhileIngestingConfirmation() {
return JOptionPane.showConfirmDialog(mainFrame,
- DO_REPOPULATE_MESSAGE,
- "re populate events?",
- JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
+ DO_REPOPULATE_MESSAGE,
+ "re populate events?",
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
}
synchronized int showOutOfDateConfirmation() throws MissingResourceException, HeadlessException {
return JOptionPane.showConfirmDialog(mainFrame,
- NbBundle.getMessage(TimeLineController.class,
- "Timeline.propChg.confDlg.timelineOOD.msg"),
- NbBundle.getMessage(TimeLineController.class,
- "Timeline.propChg.confDlg.timelineOOD.details"),
- JOptionPane.YES_NO_OPTION);
+ NbBundle.getMessage(TimeLineController.class,
+ "Timeline.propChg.confDlg.timelineOOD.msg"),
+ NbBundle.getMessage(TimeLineController.class,
+ "Timeline.propChg.confDlg.timelineOOD.details"),
+ JOptionPane.YES_NO_OPTION);
}
synchronized int showIngestConfirmation() throws MissingResourceException, HeadlessException {
return JOptionPane.showConfirmDialog(mainFrame,
- NbBundle.getMessage(TimeLineController.class,
- "Timeline.initTimeline.confDlg.genBeforeIngest.msg"),
- NbBundle.getMessage(TimeLineController.class,
- "Timeline.initTimeline.confDlg.genBeforeIngest.details"),
- JOptionPane.YES_NO_OPTION);
+ NbBundle.getMessage(TimeLineController.class,
+ "Timeline.initTimeline.confDlg.genBeforeIngest.msg"),
+ NbBundle.getMessage(TimeLineController.class,
+ "Timeline.initTimeline.confDlg.genBeforeIngest.details"),
+ JOptionPane.YES_NO_OPTION);
}
private class AutopsyIngestModuleListener implements PropertyChangeListener {
diff --git a/Core/src/org/sleuthkit/autopsy/timeline/events/FilteredEventsModel.java b/Core/src/org/sleuthkit/autopsy/timeline/events/FilteredEventsModel.java
index 3b453930c1..0d19d1e28d 100644
--- a/Core/src/org/sleuthkit/autopsy/timeline/events/FilteredEventsModel.java
+++ b/Core/src/org/sleuthkit/autopsy/timeline/events/FilteredEventsModel.java
@@ -259,4 +259,7 @@ public class FilteredEventsModel {
// requestedLOD.set(zCrumb.getDescrLOD());
// }
// }
+ public DescriptionLOD getDescriptionLOD() {
+ return requestedLOD.get();
+ }
}
diff --git a/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java b/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java
index 8c7defaa03..114df4b35d 100644
--- a/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java
+++ b/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java
@@ -130,7 +130,9 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView {
initializeSlider(descrLODSlider,
() -> {
DescriptionLOD newLOD = DescriptionLOD.values()[Math.round(descrLODSlider.valueProperty().floatValue())];
- controller.pushDescrLOD(newLOD);
+ if (controller.pushDescrLOD(newLOD) == false) {
+ descrLODSlider.setValue(new DescrLODConverter().fromString(filteredEvents.getDescriptionLOD().toString()));
+ }
}, this.filteredEvents.descriptionLOD(),
() -> {
descrLODSlider.setValue(this.filteredEvents.descriptionLOD().get().ordinal());