mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Extracted hard coded strings.
Created Bundle_ja.properties files. Annotated non-extracted lines with NON-NLS.
This commit is contained in:
parent
7e1128d8ca
commit
5dea29e2ac
@ -41,3 +41,4 @@ Timeline.ProgressWindow.cancel.confdlg.msg=Do you want to cancel time line creat
|
|||||||
Timeline.ProgressWindow.cancel.confdlg.detail=Cancel timeline creation?
|
Timeline.ProgressWindow.cancel.confdlg.detail=Cancel timeline creation?
|
||||||
Timeline.progressWindow.name=Timeline
|
Timeline.progressWindow.name=Timeline
|
||||||
Timeline.progressWindow.title=Generating Timeline data
|
Timeline.progressWindow.title=Generating Timeline data
|
||||||
|
OpenTimeLineAction.msgdlg.text=Error creating timeline, there are no data sources.
|
||||||
|
@ -67,7 +67,8 @@ public class OpenTimelineAction extends CallableSystemAction {
|
|||||||
final Case currentCase = Case.getCurrentCase();
|
final Case currentCase = Case.getCurrentCase();
|
||||||
|
|
||||||
if (currentCase.hasData() == false) {
|
if (currentCase.hasData() == false) {
|
||||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), "Error creating timeline, there are no data sources.");
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
|
NbBundle.getMessage(this.getClass(), "OpenTimeLineAction.msgdlg.text"));
|
||||||
LOGGER.log(Level.INFO, "Error creating timeline, there are no data sources.");// NON-NLS
|
LOGGER.log(Level.INFO, "Error creating timeline, there are no data sources.");// NON-NLS
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,11 @@ public final class TimeLineTopComponent extends TopComponent implements Explorer
|
|||||||
|
|
||||||
filterTab.setClosable(false);
|
filterTab.setClosable(false);
|
||||||
filterTab.setContent(filtersPanel);
|
filterTab.setContent(filtersPanel);
|
||||||
filterTab.setGraphic(new ImageView("org/sleuthkit/autopsy/timeline/images/funnel.png"));
|
filterTab.setGraphic(new ImageView("org/sleuthkit/autopsy/timeline/images/funnel.png")); // NON-NLS
|
||||||
|
|
||||||
eventsTab.setClosable(false);
|
eventsTab.setClosable(false);
|
||||||
eventsTab.setContent(navPanel);
|
eventsTab.setContent(navPanel);
|
||||||
eventsTab.setGraphic(new ImageView("org/sleuthkit/autopsy/timeline/images/timeline_marker.png"));
|
eventsTab.setGraphic(new ImageView("org/sleuthkit/autopsy/timeline/images/timeline_marker.png")); // NON-NLS
|
||||||
|
|
||||||
tabPane.getTabs().addAll(filterTab, eventsTab);
|
tabPane.getTabs().addAll(filterTab, eventsTab);
|
||||||
VBox.setVgrow(tabPane, Priority.ALWAYS);
|
VBox.setVgrow(tabPane, Priority.ALWAYS);
|
||||||
|
@ -24,6 +24,7 @@ import javafx.scene.image.ImageView;
|
|||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import javafx.scene.input.KeyCodeCombination;
|
import javafx.scene.input.KeyCodeCombination;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,12 +33,12 @@ import org.sleuthkit.autopsy.timeline.TimeLineController;
|
|||||||
//TODO: This and the corresponding imageanalyzer action are identical except for the type of the controller... abstract something! -jm
|
//TODO: This and the corresponding imageanalyzer action are identical except for the type of the controller... abstract something! -jm
|
||||||
public class Back extends Action {
|
public class Back extends Action {
|
||||||
|
|
||||||
private static final Image BACK_IMAGE = new Image("/org/sleuthkit/autopsy/timeline/images/arrow-180.png", 16, 16, true, true, true);
|
private static final Image BACK_IMAGE = new Image("/org/sleuthkit/autopsy/timeline/images/arrow-180.png", 16, 16, true, true, true); // NON-NLS
|
||||||
|
|
||||||
private final TimeLineController controller;
|
private final TimeLineController controller;
|
||||||
|
|
||||||
public Back(TimeLineController controller) {
|
public Back(TimeLineController controller) {
|
||||||
super("Back");
|
super(NbBundle.getMessage(Back.class, "Back.actions.name.text"));
|
||||||
setGraphic(new ImageView(BACK_IMAGE));
|
setGraphic(new ImageView(BACK_IMAGE));
|
||||||
setAccelerator(new KeyCodeCombination(KeyCode.LEFT, KeyCodeCombination.ALT_DOWN));
|
setAccelerator(new KeyCodeCombination(KeyCode.LEFT, KeyCodeCombination.ALT_DOWN));
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
Back.actions.name.text=Back
|
||||||
|
DefaultFilters.action.name.text=apply default filters
|
||||||
|
Forward.action.name.text=Forward
|
||||||
|
SaveSnapshot.action.name.text=save snapshot
|
||||||
|
SaveSnapshot.fileChoose.title.text=Save snapshot to
|
||||||
|
ZoomOut.action.name.text=apply default filters
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.timeline.actions;
|
|||||||
import javafx.beans.binding.BooleanBinding;
|
import javafx.beans.binding.BooleanBinding;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
||||||
import org.sleuthkit.autopsy.timeline.filters.Filter;
|
import org.sleuthkit.autopsy.timeline.filters.Filter;
|
||||||
@ -35,7 +36,7 @@ public class DefaultFilters extends Action {
|
|||||||
private FilteredEventsModel eventsModel;
|
private FilteredEventsModel eventsModel;
|
||||||
|
|
||||||
public DefaultFilters(final TimeLineController controller) {
|
public DefaultFilters(final TimeLineController controller) {
|
||||||
super("apply default filters");
|
super(NbBundle.getMessage(DefaultFilters.class, "DefaultFilters.action.name.text"));
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
eventsModel = controller.getEventsModel();
|
eventsModel = controller.getEventsModel();
|
||||||
disabledProperty().bind(new BooleanBinding() {
|
disabledProperty().bind(new BooleanBinding() {
|
||||||
|
@ -24,6 +24,7 @@ import javafx.scene.image.ImageView;
|
|||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import javafx.scene.input.KeyCodeCombination;
|
import javafx.scene.input.KeyCodeCombination;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,12 +33,12 @@ import org.sleuthkit.autopsy.timeline.TimeLineController;
|
|||||||
//TODO: This and the corresponding imageanalyzer action are identical except for the type of the controller... abstract something! -jm
|
//TODO: This and the corresponding imageanalyzer action are identical except for the type of the controller... abstract something! -jm
|
||||||
public class Forward extends Action {
|
public class Forward extends Action {
|
||||||
|
|
||||||
private static final Image BACK_IMAGE = new Image("/org/sleuthkit/autopsy/timeline/images/arrow.png", 16, 16, true, true, true);
|
private static final Image BACK_IMAGE = new Image("/org/sleuthkit/autopsy/timeline/images/arrow.png", 16, 16, true, true, true); // NON-NLS
|
||||||
|
|
||||||
private final TimeLineController controller;
|
private final TimeLineController controller;
|
||||||
|
|
||||||
public Forward(TimeLineController controller) {
|
public Forward(TimeLineController controller) {
|
||||||
super("Forward");
|
super(NbBundle.getMessage(Forward.class, "Forward.action.name.text"));
|
||||||
setGraphic(new ImageView(BACK_IMAGE));
|
setGraphic(new ImageView(BACK_IMAGE));
|
||||||
setAccelerator(new KeyCodeCombination(KeyCode.RIGHT, KeyCodeCombination.ALT_DOWN));
|
setAccelerator(new KeyCodeCombination(KeyCode.RIGHT, KeyCodeCombination.ALT_DOWN));
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
|
@ -37,6 +37,7 @@ import javafx.stage.DirectoryChooser;
|
|||||||
import javafx.util.Pair;
|
import javafx.util.Pair;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
@ -58,7 +59,7 @@ public class SaveSnapshot extends Action {
|
|||||||
private final WritableImage snapshot;
|
private final WritableImage snapshot;
|
||||||
|
|
||||||
public SaveSnapshot(TimeLineController controller, WritableImage snapshot) {
|
public SaveSnapshot(TimeLineController controller, WritableImage snapshot) {
|
||||||
super("save snapshot");
|
super(NbBundle.getMessage(SaveSnapshot.class, "SaveSnapshot.action.name.text"));
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
this.snapshot = snapshot;
|
this.snapshot = snapshot;
|
||||||
setEventHandler(new Consumer<ActionEvent>() {
|
setEventHandler(new Consumer<ActionEvent>() {
|
||||||
@ -67,8 +68,8 @@ public class SaveSnapshot extends Action {
|
|||||||
public void accept(ActionEvent t) {
|
public void accept(ActionEvent t) {
|
||||||
//choose location/name
|
//choose location/name
|
||||||
DirectoryChooser fileChooser = new DirectoryChooser();
|
DirectoryChooser fileChooser = new DirectoryChooser();
|
||||||
fileChooser.setTitle("Save snapshot to");
|
fileChooser.setTitle(NbBundle.getMessage(this.getClass(), "SaveSnapshot.fileChoose.title.text"));
|
||||||
fileChooser.setInitialDirectory(new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Reports"));
|
fileChooser.setInitialDirectory(new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Reports")); // NON-NLS
|
||||||
File outFolder = fileChooser.showDialog(null);
|
File outFolder = fileChooser.showDialog(null);
|
||||||
if (outFolder == null) {
|
if (outFolder == null) {
|
||||||
return;
|
return;
|
||||||
@ -79,57 +80,57 @@ public class SaveSnapshot extends Action {
|
|||||||
//gather metadata
|
//gather metadata
|
||||||
List<Pair<String, String>> reportMetaData = new ArrayList<>();
|
List<Pair<String, String>> reportMetaData = new ArrayList<>();
|
||||||
|
|
||||||
reportMetaData.add(new Pair<>("Case", Case.getCurrentCase().getName()));
|
reportMetaData.add(new Pair<>("Case", Case.getCurrentCase().getName())); // NON-NLS
|
||||||
|
|
||||||
ZoomParams get = controller.getEventsModel().getRequestedZoomParamters().get();
|
ZoomParams get = controller.getEventsModel().getRequestedZoomParamters().get();
|
||||||
reportMetaData.add(new Pair<>("Time Range", get.getTimeRange().toString()));
|
reportMetaData.add(new Pair<>("Time Range", get.getTimeRange().toString())); // NON-NLS
|
||||||
reportMetaData.add(new Pair<>("Description Level of Detail", get.getDescrLOD().getDisplayName()));
|
reportMetaData.add(new Pair<>("Description Level of Detail", get.getDescrLOD().getDisplayName())); // NON-NLS
|
||||||
reportMetaData.add(new Pair<>("Event Type Zoom Level", get.getTypeZoomLevel().getDisplayName()));
|
reportMetaData.add(new Pair<>("Event Type Zoom Level", get.getTypeZoomLevel().getDisplayName())); // NON-NLS
|
||||||
reportMetaData.add(new Pair<>("Filters", get.getFilter().getHTMLReportString()));
|
reportMetaData.add(new Pair<>("Filters", get.getFilter().getHTMLReportString())); // NON-NLS
|
||||||
|
|
||||||
//save snapshot as png
|
//save snapshot as png
|
||||||
try {
|
try {
|
||||||
ImageIO.write(SwingFXUtils.fromFXImage(snapshot, null), "png", new File(outFolder.getPath() + File.separator + outFolder.getName() + REPORT_IMAGE_EXTENSION));
|
ImageIO.write(SwingFXUtils.fromFXImage(snapshot, null), "png", new File(outFolder.getPath() + File.separator + outFolder.getName() + REPORT_IMAGE_EXTENSION)); // NON-NLS
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LOGGER.log(Level.WARNING, "failed to write snapshot to disk", ex);
|
LOGGER.log(Level.WARNING, "failed to write snapshot to disk", ex); // NON-NLS
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//build html string
|
//build html string
|
||||||
StringBuilder wrapper = new StringBuilder();
|
StringBuilder wrapper = new StringBuilder();
|
||||||
wrapper.append("<html>\n<head>\n\t<title>").append("timeline snapshot").append("</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"index.css\" />\n</head>\n<body>\n");
|
wrapper.append("<html>\n<head>\n\t<title>").append("timeline snapshot").append("</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"index.css\" />\n</head>\n<body>\n"); // NON-NLS
|
||||||
wrapper.append("<div id=\"content\">\n<h1>").append(outFolder.getName()).append("</h1>\n");
|
wrapper.append("<div id=\"content\">\n<h1>").append(outFolder.getName()).append("</h1>\n"); // NON-NLS
|
||||||
wrapper.append("<img src = \"").append(outFolder.getName()).append(REPORT_IMAGE_EXTENSION + "\" alt = \"snaphot\">");
|
wrapper.append("<img src = \"").append(outFolder.getName()).append(REPORT_IMAGE_EXTENSION + "\" alt = \"snaphot\">"); // NON-NLS
|
||||||
wrapper.append("<table>\n");
|
wrapper.append("<table>\n"); // NON-NLS
|
||||||
for (Pair<String, String> pair : reportMetaData) {
|
for (Pair<String, String> pair : reportMetaData) {
|
||||||
wrapper.append("<tr><td>").append(pair.getKey()).append(": </td><td>").append(pair.getValue()).append("</td></tr>\n");
|
wrapper.append("<tr><td>").append(pair.getKey()).append(": </td><td>").append(pair.getValue()).append("</td></tr>\n"); // NON-NLS
|
||||||
}
|
}
|
||||||
wrapper.append("</table>\n");
|
wrapper.append("</table>\n"); // NON-NLS
|
||||||
wrapper.append("</div>\n</body>\n</html>");
|
wrapper.append("</div>\n</body>\n</html>"); // NON-NLS
|
||||||
|
|
||||||
//write html wrapper
|
//write html wrapper
|
||||||
try (Writer htmlWriter = new FileWriter(new File(outFolder, name + HTML_EXT))) {
|
try (Writer htmlWriter = new FileWriter(new File(outFolder, name + HTML_EXT))) {
|
||||||
htmlWriter.write(wrapper.toString());
|
htmlWriter.write(wrapper.toString());
|
||||||
} catch (FileNotFoundException ex) {
|
} catch (FileNotFoundException ex) {
|
||||||
LOGGER.log(Level.WARNING, "failed to open html wrapper file for writing ", ex);
|
LOGGER.log(Level.WARNING, "failed to open html wrapper file for writing ", ex); // NON-NLS
|
||||||
return;
|
return;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LOGGER.log(Level.WARNING, "failed to write html wrapper file", ex);
|
LOGGER.log(Level.WARNING, "failed to write html wrapper file", ex); // NON-NLS
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy css
|
//copy css
|
||||||
try (InputStream resource = this.getClass().getResourceAsStream("/org/sleuthkit/autopsy/timeline/index.css")) {
|
try (InputStream resource = this.getClass().getResourceAsStream("/org/sleuthkit/autopsy/timeline/index.css")) { // NON-NLS
|
||||||
Files.copy(resource, Paths.get(outFolder.getPath(), "index.css"));
|
Files.copy(resource, Paths.get(outFolder.getPath(), "index.css")); // NON-NLS
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LOGGER.log(Level.WARNING, "failed to copy css file", ex);
|
LOGGER.log(Level.WARNING, "failed to copy css file", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
//add html file as report to case
|
//add html file as report to case
|
||||||
try {
|
try {
|
||||||
Case.getCurrentCase().addReport(outFolder.getPath() + File.separator + outFolder.getName() + HTML_EXT, "Timeline", outFolder.getName() + HTML_EXT);
|
Case.getCurrentCase().addReport(outFolder.getPath() + File.separator + outFolder.getName() + HTML_EXT, "Timeline", outFolder.getName() + HTML_EXT); // NON-NLS
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.WARNING, "failed add html wrapper as a report", ex);
|
LOGGER.log(Level.WARNING, "failed add html wrapper as a report", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.timeline.actions;
|
|||||||
import javafx.beans.binding.BooleanBinding;
|
import javafx.beans.binding.BooleanBinding;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ public class ZoomOut extends Action {
|
|||||||
private final FilteredEventsModel eventsModel;
|
private final FilteredEventsModel eventsModel;
|
||||||
|
|
||||||
public ZoomOut(final TimeLineController controller) {
|
public ZoomOut(final TimeLineController controller) {
|
||||||
super("apply default filters");
|
super(NbBundle.getMessage(ZoomOut.class, "ZoomOut.action.name.text"));
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
eventsModel = controller.getEventsModel();
|
eventsModel = controller.getEventsModel();
|
||||||
disabledProperty().bind(new BooleanBinding() {
|
disabledProperty().bind(new BooleanBinding() {
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
EventsRepository.progressWindow.msg.reinit_db=(re)initializing events database
|
||||||
|
EventsRepository.progressWindow.msg.populateMacEventsFiles=populating mac events for files\:
|
||||||
|
EventsRepository.progressWindow.msg.populateMacEventsFiles2=populating mac events for files\:
|
||||||
|
EventsRepository.progressWindow.msg.commitingDb=committing events db
|
||||||
|
EventsRepository.msgdlg.problem.text=There was a problem populating the timeline. Not all events may be present or accurate. See the log for details.
|
||||||
|
EventsRepository.progressWindow.populatingXevents=populating {0} events
|
@ -79,41 +79,41 @@ import org.sqlite.SQLiteJDBCLoader;
|
|||||||
*/
|
*/
|
||||||
public class EventDB {
|
public class EventDB {
|
||||||
|
|
||||||
private static final String ARTIFACT_ID_COLUMN = "artifact_id";
|
private static final String ARTIFACT_ID_COLUMN = "artifact_id"; // NON-NLS
|
||||||
|
|
||||||
private static final String BASE_TYPE_COLUMN = "base_type";
|
private static final String BASE_TYPE_COLUMN = "base_type"; // NON-NLS
|
||||||
|
|
||||||
private static final String EVENT_ID_COLUMN = "event_id";
|
private static final String EVENT_ID_COLUMN = "event_id"; // NON-NLS
|
||||||
|
|
||||||
//column name constants//////////////////////
|
//column name constants//////////////////////
|
||||||
private static final String FILE_ID_COLUMN = "file_id";
|
private static final String FILE_ID_COLUMN = "file_id"; // NON-NLS
|
||||||
|
|
||||||
private static final String FULL_DESCRIPTION_COLUMN = "full_description";
|
private static final String FULL_DESCRIPTION_COLUMN = "full_description"; // NON-NLS
|
||||||
|
|
||||||
private static final String KNOWN_COLUMN = "known_state";
|
private static final String KNOWN_COLUMN = "known_state"; // NON-NLS
|
||||||
|
|
||||||
private static final String LAST_ARTIFACT_ID_KEY = "last_artifact_id";
|
private static final String LAST_ARTIFACT_ID_KEY = "last_artifact_id"; // NON-NLS
|
||||||
|
|
||||||
private static final String LAST_OBJECT_ID_KEY = "last_object_id";
|
private static final String LAST_OBJECT_ID_KEY = "last_object_id"; // NON-NLS
|
||||||
|
|
||||||
private static final java.util.logging.Logger LOGGER = Logger.getLogger(EventDB.class.getName());
|
private static final java.util.logging.Logger LOGGER = Logger.getLogger(EventDB.class.getName());
|
||||||
|
|
||||||
private static final String MED_DESCRIPTION_COLUMN = "med_description";
|
private static final String MED_DESCRIPTION_COLUMN = "med_description"; // NON-NLS
|
||||||
|
|
||||||
private static final String SHORT_DESCRIPTION_COLUMN = "short_description";
|
private static final String SHORT_DESCRIPTION_COLUMN = "short_description"; // NON-NLS
|
||||||
|
|
||||||
private static final String SUB_TYPE_COLUMN = "sub_type";
|
private static final String SUB_TYPE_COLUMN = "sub_type"; // NON-NLS
|
||||||
|
|
||||||
private static final String TIME_COLUMN = "time";
|
private static final String TIME_COLUMN = "time"; // NON-NLS
|
||||||
|
|
||||||
private static final String WAS_INGEST_RUNNING_KEY = "was_ingest_running";
|
private static final String WAS_INGEST_RUNNING_KEY = "was_ingest_running"; // NON-NLS
|
||||||
|
|
||||||
static {
|
static {
|
||||||
//make sure sqlite driver is loaded // possibly redundant
|
//make sure sqlite driver is loaded // possibly redundant
|
||||||
try {
|
try {
|
||||||
Class.forName("org.sqlite.JDBC");
|
Class.forName("org.sqlite.JDBC"); // NON-NLS
|
||||||
} catch (ClassNotFoundException ex) {
|
} catch (ClassNotFoundException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to load sqlite JDBC driver", ex);
|
LOGGER.log(Level.SEVERE, "Failed to load sqlite JDBC driver", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,14 +128,14 @@ public class EventDB {
|
|||||||
*/
|
*/
|
||||||
public static EventDB getEventDB(String dbPath) {
|
public static EventDB getEventDB(String dbPath) {
|
||||||
try {
|
try {
|
||||||
EventDB eventDB = new EventDB(dbPath + File.separator + "events.db");
|
EventDB eventDB = new EventDB(dbPath + File.separator + "events.db"); // NON-NLS
|
||||||
|
|
||||||
return eventDB;
|
return eventDB;
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "sql error creating database connection", ex);
|
LOGGER.log(Level.SEVERE, "sql error creating database connection", ex); // NON-NLS
|
||||||
return null;
|
return null;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOGGER.log(Level.SEVERE, "error creating database connection", ex);
|
LOGGER.log(Level.SEVERE, "error creating database connection", ex); // NON-NLS
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,14 +156,14 @@ public class EventDB {
|
|||||||
return filter.getSubFilters().stream()
|
return filter.getSubFilters().stream()
|
||||||
.filter(Filter::isActive)
|
.filter(Filter::isActive)
|
||||||
.map(EventDB::getSQLWhere)
|
.map(EventDB::getSQLWhere)
|
||||||
.collect(Collectors.joining(" and ", "( ", ")"));
|
.collect(Collectors.joining(" and ", "( ", ")")); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getSQLWhere(UnionFilter filter) {
|
static String getSQLWhere(UnionFilter filter) {
|
||||||
return filter.getSubFilters().stream()
|
return filter.getSubFilters().stream()
|
||||||
.filter(Filter::isActive)
|
.filter(Filter::isActive)
|
||||||
.map(EventDB::getSQLWhere)
|
.map(EventDB::getSQLWhere)
|
||||||
.collect(Collectors.joining(" or ", "( ", ")"));
|
.collect(Collectors.joining(" or ", "( ", ")")); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getSQLWhere(Filter filter) {
|
private static String getSQLWhere(Filter filter) {
|
||||||
@ -185,14 +185,14 @@ public class EventDB {
|
|||||||
} else {
|
} else {
|
||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
result = StringUtils.deleteWhitespace(result).equals("(1and1and1)") ? "1" : result;
|
result = StringUtils.deleteWhitespace(result).equals("(1and1and1)") ? "1" : result; // NON-NLS
|
||||||
//System.out.println(result);
|
//System.out.println(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getSQLWhere(HideKnownFilter filter) {
|
private static String getSQLWhere(HideKnownFilter filter) {
|
||||||
return (filter.isActive())
|
return (filter.isActive())
|
||||||
? "(known_state is not '" + TskData.FileKnown.KNOWN.getFileKnownValue() + "')"
|
? "(known_state is not '" + TskData.FileKnown.KNOWN.getFileKnownValue() + "')" // NON-NLS
|
||||||
: "1";
|
: "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,9 +202,9 @@ public class EventDB {
|
|||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
String strip = StringUtils.strip(filter.getText());
|
String strip = StringUtils.strip(filter.getText());
|
||||||
return "((" + MED_DESCRIPTION_COLUMN + " like '%" + strip + "%') or ("
|
return "((" + MED_DESCRIPTION_COLUMN + " like '%" + strip + "%') or (" // NON-NLS
|
||||||
+ FULL_DESCRIPTION_COLUMN + " like '%" + strip + "%') or ("
|
+ FULL_DESCRIPTION_COLUMN + " like '%" + strip + "%') or (" // NON-NLS
|
||||||
+ SHORT_DESCRIPTION_COLUMN + " like '%" + strip + "%'))";
|
+ SHORT_DESCRIPTION_COLUMN + " like '%" + strip + "%'))"; // NON-NLS
|
||||||
} else {
|
} else {
|
||||||
return "1";
|
return "1";
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ public class EventDB {
|
|||||||
return "1"; //then collapse clause to true
|
return "1"; //then collapse clause to true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "(" + SUB_TYPE_COLUMN + " in (" + StringUtils.join(getActiveSubTypes(filter), ",") + "))";
|
return "(" + SUB_TYPE_COLUMN + " in (" + StringUtils.join(getActiveSubTypes(filter), ",") + "))"; // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
private volatile Connection con;
|
private volatile Connection con;
|
||||||
@ -274,13 +274,13 @@ public class EventDB {
|
|||||||
try (Statement stmt = con.createStatement();
|
try (Statement stmt = con.createStatement();
|
||||||
//You can't inject multiple values into one ? paramater in prepared statement,
|
//You can't inject multiple values into one ? paramater in prepared statement,
|
||||||
//so we make new statement each time...
|
//so we make new statement each time...
|
||||||
ResultSet rs = stmt.executeQuery("select Min(time), Max(time) from events where event_id in (" + StringUtils.join(eventIDs, ", ") + ")");) {
|
ResultSet rs = stmt.executeQuery("select Min(time), Max(time) from events where event_id in (" + StringUtils.join(eventIDs, ", ") + ")");) { // NON-NLS
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
span = new Interval(rs.getLong("Min(time)"), rs.getLong("Max(time)") + 1, DateTimeZone.UTC);
|
span = new Interval(rs.getLong("Min(time)"), rs.getLong("Max(time)") + 1, DateTimeZone.UTC); // NON-NLS
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error executing get spanning interval query.", ex);
|
LOGGER.log(Level.SEVERE, "Error executing get spanning interval query.", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
@ -297,7 +297,7 @@ public class EventDB {
|
|||||||
closeStatements();
|
closeStatements();
|
||||||
con.close();
|
con.close();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.WARNING, "Failed to close connection to evetns.db", ex);
|
LOGGER.log(Level.WARNING, "Failed to close connection to evetns.db", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
con = null;
|
con = null;
|
||||||
@ -305,7 +305,7 @@ public class EventDB {
|
|||||||
|
|
||||||
void commitTransaction(EventTransaction tr, Boolean notify) {
|
void commitTransaction(EventTransaction tr, Boolean notify) {
|
||||||
if (tr.isClosed()) {
|
if (tr.isClosed()) {
|
||||||
throw new IllegalArgumentException("can't close already closed transaction");
|
throw new IllegalArgumentException("can't close already closed transaction"); // NON-NLS
|
||||||
}
|
}
|
||||||
tr.commit(notify);
|
tr.commit(notify);
|
||||||
}
|
}
|
||||||
@ -314,9 +314,9 @@ public class EventDB {
|
|||||||
int result = -1;
|
int result = -1;
|
||||||
dbReadLock();
|
dbReadLock();
|
||||||
//TODO convert this to prepared statement -jm
|
//TODO convert this to prepared statement -jm
|
||||||
try (ResultSet rs = con.createStatement().executeQuery("select count(*) as count from events")) {
|
try (ResultSet rs = con.createStatement().executeQuery("select count(*) as count from events")) { // NON-NLS
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
result = rs.getInt("count");
|
result = rs.getInt("count"); // NON-NLS
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@ -374,9 +374,9 @@ public class EventDB {
|
|||||||
//TODO: use prepared statement - jm
|
//TODO: use prepared statement - jm
|
||||||
dbWriteLock();
|
dbWriteLock();
|
||||||
try (Statement createStatement = con.createStatement()) {
|
try (Statement createStatement = con.createStatement()) {
|
||||||
createStatement.execute("drop table if exists events");
|
createStatement.execute("drop table if exists events"); // NON-NLS
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "could not drop old events table", ex);
|
LOGGER.log(Level.SEVERE, "could not drop old events table", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbWriteUnlock();
|
dbWriteUnlock();
|
||||||
}
|
}
|
||||||
@ -393,11 +393,11 @@ public class EventDB {
|
|||||||
|
|
||||||
dbReadLock();
|
dbReadLock();
|
||||||
try (Statement stmt = con.createStatement(); //can't use prepared statement because of complex where clause
|
try (Statement stmt = con.createStatement(); //can't use prepared statement because of complex where clause
|
||||||
ResultSet rs = stmt.executeQuery(" select (select Max(time) from events where time <=" + start + " and " + sqlWhere + ") as start,(select Min(time) from events where time >= " + end + " and " + sqlWhere + ") as end")) {
|
ResultSet rs = stmt.executeQuery(" select (select Max(time) from events where time <=" + start + " and " + sqlWhere + ") as start,(select Min(time) from events where time >= " + end + " and " + sqlWhere + ") as end")) { // NON-NLS
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
|
|
||||||
long start2 = rs.getLong("start");
|
long start2 = rs.getLong("start"); // NON-NLS
|
||||||
long end2 = rs.getLong("end");
|
long end2 = rs.getLong("end"); // NON-NLS
|
||||||
|
|
||||||
if (end2 == 0) {
|
if (end2 == 0) {
|
||||||
end2 = getMaxTime();
|
end2 = getMaxTime();
|
||||||
@ -406,7 +406,7 @@ public class EventDB {
|
|||||||
return new Interval(start2 * 1000, (end2 + 1) * 1000, TimeLineController.getJodaTimeZone());
|
return new Interval(start2 * 1000, (end2 + 1) * 1000, TimeLineController.getJodaTimeZone());
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to get MIN time.", ex);
|
LOGGER.log(Level.SEVERE, "Failed to get MIN time.", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
@ -426,7 +426,7 @@ public class EventDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException sqlEx) {
|
} catch (SQLException sqlEx) {
|
||||||
LOGGER.log(Level.SEVERE, "exception while querying for event with id = " + eventID, sqlEx);
|
LOGGER.log(Level.SEVERE, "exception while querying for event with id = " + eventID, sqlEx); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
@ -444,7 +444,7 @@ public class EventDB {
|
|||||||
Set<Long> resultIDs = new HashSet<>();
|
Set<Long> resultIDs = new HashSet<>();
|
||||||
|
|
||||||
dbReadLock();
|
dbReadLock();
|
||||||
final String query = "select event_id from events where time >= " + startTime + " and time <" + endTime + " and " + getSQLWhere(filter);
|
final String query = "select event_id from events where time >= " + startTime + " and time <" + endTime + " and " + getSQLWhere(filter); // NON-NLS
|
||||||
//System.out.println(query);
|
//System.out.println(query);
|
||||||
try (Statement stmt = con.createStatement();
|
try (Statement stmt = con.createStatement();
|
||||||
ResultSet rs = stmt.executeQuery(query)) {
|
ResultSet rs = stmt.executeQuery(query)) {
|
||||||
@ -454,7 +454,7 @@ public class EventDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (SQLException sqlEx) {
|
} catch (SQLException sqlEx) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to execute query for event ids in range", sqlEx);
|
LOGGER.log(Level.SEVERE, "failed to execute query for event ids in range", sqlEx); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
@ -475,10 +475,10 @@ public class EventDB {
|
|||||||
dbReadLock();
|
dbReadLock();
|
||||||
try (ResultSet rs = getMaxTimeStmt.executeQuery()) {
|
try (ResultSet rs = getMaxTimeStmt.executeQuery()) {
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
return rs.getLong("max");
|
return rs.getLong("max"); // NON-NLS
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to get MAX time.", ex);
|
LOGGER.log(Level.SEVERE, "Failed to get MAX time.", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
@ -490,10 +490,10 @@ public class EventDB {
|
|||||||
dbReadLock();
|
dbReadLock();
|
||||||
try (ResultSet rs = getMinTimeStmt.executeQuery()) {
|
try (ResultSet rs = getMinTimeStmt.executeQuery()) {
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
return rs.getLong("min");
|
return rs.getLong("min"); // NON-NLS
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Failed to get MIN time.", ex);
|
LOGGER.log(Level.SEVERE, "Failed to get MIN time.", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
@ -519,49 +519,49 @@ public class EventDB {
|
|||||||
configureDB();
|
configureDB();
|
||||||
|
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem accessing database", ex);
|
LOGGER.log(Level.SEVERE, "problem accessing database", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
dbWriteLock();
|
dbWriteLock();
|
||||||
try {
|
try {
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE TABLE if not exists db_info "
|
String sql = "CREATE TABLE if not exists db_info " // NON-NLS
|
||||||
+ " ( key TEXT, "
|
+ " ( key TEXT, " // NON-NLS
|
||||||
+ " value INTEGER, "
|
+ " value INTEGER, " // NON-NLS
|
||||||
+ "PRIMARY KEY (key))";
|
+ "PRIMARY KEY (key))"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating db_info table", ex);
|
LOGGER.log(Level.SEVERE, "problem creating db_info table", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE TABLE if not exists events "
|
String sql = "CREATE TABLE if not exists events " // NON-NLS
|
||||||
+ " (event_id INTEGER PRIMARY KEY, "
|
+ " (event_id INTEGER PRIMARY KEY, " // NON-NLS
|
||||||
+ " file_id INTEGER, "
|
+ " file_id INTEGER, " // NON-NLS
|
||||||
+ " artifact_id INTEGER, "
|
+ " artifact_id INTEGER, " // NON-NLS
|
||||||
+ " time INTEGER, "
|
+ " time INTEGER, " // NON-NLS
|
||||||
+ " sub_type INTEGER, "
|
+ " sub_type INTEGER, " // NON-NLS
|
||||||
+ " base_type INTEGER, "
|
+ " base_type INTEGER, " // NON-NLS
|
||||||
+ " full_description TEXT, "
|
+ " full_description TEXT, " // NON-NLS
|
||||||
+ " med_description TEXT, "
|
+ " med_description TEXT, " // NON-NLS
|
||||||
+ " short_description TEXT, "
|
+ " short_description TEXT, " // NON-NLS
|
||||||
+ " known_state INTEGER)";
|
+ " known_state INTEGER)"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating database table", ex);
|
LOGGER.log(Level.SEVERE, "problem creating database table", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE INDEX if not exists file_idx ON events(file_id)";
|
String sql = "CREATE INDEX if not exists file_idx ON events(file_id)"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating file_idx", ex);
|
LOGGER.log(Level.SEVERE, "problem creating file_idx", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE INDEX if not exists artifact_idx ON events(artifact_id)";
|
String sql = "CREATE INDEX if not exists artifact_idx ON events(artifact_id)"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating artifact_idx", ex);
|
LOGGER.log(Level.SEVERE, "problem creating artifact_idx", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
//for common queries the covering indexes below were better, but having the time index 'blocke' them
|
//for common queries the covering indexes below were better, but having the time index 'blocke' them
|
||||||
@ -572,38 +572,38 @@ public class EventDB {
|
|||||||
// LOGGER.log(Level.SEVERE, "problem creating time_idx", ex);
|
// LOGGER.log(Level.SEVERE, "problem creating time_idx", ex);
|
||||||
// }
|
// }
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE INDEX if not exists sub_type_idx ON events(sub_type, time)";
|
String sql = "CREATE INDEX if not exists sub_type_idx ON events(sub_type, time)"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating sub_type_idx", ex);
|
LOGGER.log(Level.SEVERE, "problem creating sub_type_idx", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE INDEX if not exists base_type_idx ON events(base_type, time)";
|
String sql = "CREATE INDEX if not exists base_type_idx ON events(base_type, time)"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating base_type_idx", ex);
|
LOGGER.log(Level.SEVERE, "problem creating base_type_idx", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
try (Statement stmt = con.createStatement()) {
|
try (Statement stmt = con.createStatement()) {
|
||||||
String sql = "CREATE INDEX if not exists known_idx ON events(known_state)";
|
String sql = "CREATE INDEX if not exists known_idx ON events(known_state)"; // NON-NLS
|
||||||
stmt.execute(sql);
|
stmt.execute(sql);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "problem creating known_idx", ex);
|
LOGGER.log(Level.SEVERE, "problem creating known_idx", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
insertRowStmt = prepareStatement(
|
insertRowStmt = prepareStatement(
|
||||||
"INSERT INTO events (file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state) "
|
"INSERT INTO events (file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state) " // NON-NLS
|
||||||
+ "VALUES (?,?,?,?,?,?,?,?,?)");
|
+ "VALUES (?,?,?,?,?,?,?,?,?)"); // NON-NLS
|
||||||
|
|
||||||
getMaxTimeStmt = prepareStatement("select Max(time) as max from events");
|
getMaxTimeStmt = prepareStatement("select Max(time) as max from events"); // NON-NLS
|
||||||
getMinTimeStmt = prepareStatement("select Min(time) as min from events");
|
getMinTimeStmt = prepareStatement("select Min(time) as min from events"); // NON-NLS
|
||||||
getEventByIDStmt = prepareStatement("select * from events where event_id = ?");
|
getEventByIDStmt = prepareStatement("select * from events where event_id = ?"); // NON-NLS
|
||||||
recordDBInfoStmt = prepareStatement("insert or replace into db_info (key, value) values (?, ?)");
|
recordDBInfoStmt = prepareStatement("insert or replace into db_info (key, value) values (?, ?)"); // NON-NLS
|
||||||
getDBInfoStmt = prepareStatement("select value from db_info where key = ?");
|
getDBInfoStmt = prepareStatement("select value from db_info where key = ?"); // NON-NLS
|
||||||
} catch (SQLException sQLException) {
|
} catch (SQLException sQLException) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException);
|
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
@ -626,7 +626,7 @@ public class EventDB {
|
|||||||
*/
|
*/
|
||||||
void insertEvent(long time, EventType type, Long objID, Long artifactID, String fullDescription, String medDescription, String shortDescription, TskData.FileKnown known, EventTransaction tr) {
|
void insertEvent(long time, EventType type, Long objID, Long artifactID, String fullDescription, String medDescription, String shortDescription, TskData.FileKnown known, EventTransaction tr) {
|
||||||
if (tr.isClosed()) {
|
if (tr.isClosed()) {
|
||||||
throw new IllegalArgumentException("can't update database with closed transaction");
|
throw new IllegalArgumentException("can't update database with closed transaction"); // NON-NLS
|
||||||
}
|
}
|
||||||
int typeNum;
|
int typeNum;
|
||||||
int superTypeNum;
|
int superTypeNum;
|
||||||
@ -667,7 +667,7 @@ public class EventDB {
|
|||||||
insertRowStmt.executeUpdate();
|
insertRowStmt.executeUpdate();
|
||||||
|
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to insert event", ex);
|
LOGGER.log(Level.SEVERE, "failed to insert event", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbWriteUnlock();
|
dbWriteUnlock();
|
||||||
}
|
}
|
||||||
@ -683,10 +683,10 @@ public class EventDB {
|
|||||||
void openDBCon() {
|
void openDBCon() {
|
||||||
try {
|
try {
|
||||||
if (con == null || con.isClosed()) {
|
if (con == null || con.isClosed()) {
|
||||||
con = DriverManager.getConnection("jdbc:sqlite:" + dbPath);
|
con = DriverManager.getConnection("jdbc:sqlite:" + dbPath); // NON-NLS
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.WARNING, "Failed to open connection to events.db", ex);
|
LOGGER.log(Level.WARNING, "Failed to open connection to events.db", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,8 +709,8 @@ public class EventDB {
|
|||||||
boolean tableExists() {
|
boolean tableExists() {
|
||||||
//TODO: use prepared statement - jm
|
//TODO: use prepared statement - jm
|
||||||
try (Statement createStatement = con.createStatement();
|
try (Statement createStatement = con.createStatement();
|
||||||
ResultSet executeQuery = createStatement.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='events'")) {
|
ResultSet executeQuery = createStatement.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='events'")) { // NON-NLS
|
||||||
if (executeQuery.getString("name").equals("events") == false) {
|
if (executeQuery.getString("name").equals("events") == false) { // NON-NLS
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@ -730,26 +730,26 @@ public class EventDB {
|
|||||||
//this should match Sleuthkit db setupt
|
//this should match Sleuthkit db setupt
|
||||||
try (Statement statement = con.createStatement()) {
|
try (Statement statement = con.createStatement()) {
|
||||||
//reduce i/o operations, we have no OS crash recovery anyway
|
//reduce i/o operations, we have no OS crash recovery anyway
|
||||||
statement.execute("PRAGMA synchronous = OFF;");
|
statement.execute("PRAGMA synchronous = OFF;"); // NON-NLS
|
||||||
//we don't use this feature, so turn it off for minimal speed up on queries
|
//we don't use this feature, so turn it off for minimal speed up on queries
|
||||||
//this is deprecated and not recomended
|
//this is deprecated and not recomended
|
||||||
statement.execute("PRAGMA count_changes = OFF;");
|
statement.execute("PRAGMA count_changes = OFF;"); // NON-NLS
|
||||||
//this made a big difference to query speed
|
//this made a big difference to query speed
|
||||||
statement.execute("PRAGMA temp_store = MEMORY");
|
statement.execute("PRAGMA temp_store = MEMORY"); // NON-NLS
|
||||||
//this made a modest improvement in query speeds
|
//this made a modest improvement in query speeds
|
||||||
statement.execute("PRAGMA cache_size = 50000");
|
statement.execute("PRAGMA cache_size = 50000"); // NON-NLS
|
||||||
//we never delete anything so...
|
//we never delete anything so...
|
||||||
statement.execute("PRAGMA auto_vacuum = 0");
|
statement.execute("PRAGMA auto_vacuum = 0"); // NON-NLS
|
||||||
//allow to query while in transaction - no need read locks
|
//allow to query while in transaction - no need read locks
|
||||||
statement.execute("PRAGMA read_uncommitted = True;");
|
statement.execute("PRAGMA read_uncommitted = True;"); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbWriteUnlock();
|
dbWriteUnlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LOGGER.log(Level.INFO, String.format("sqlite-jdbc version %s loaded in %s mode",
|
LOGGER.log(Level.INFO, String.format("sqlite-jdbc version %s loaded in %s mode", // NON-NLS
|
||||||
SQLiteJDBCLoader.getVersion(), SQLiteJDBCLoader.isNativeMode()
|
SQLiteJDBCLoader.getVersion(), SQLiteJDBCLoader.isNativeMode()
|
||||||
? "native" : "pure-java"));
|
? "native" : "pure-java")); // NON-NLS
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -795,9 +795,9 @@ public class EventDB {
|
|||||||
final boolean useSubTypes = (zoomLevel == EventTypeZoomLevel.SUB_TYPE);
|
final boolean useSubTypes = (zoomLevel == EventTypeZoomLevel.SUB_TYPE);
|
||||||
|
|
||||||
//get some info about the range of dates requested
|
//get some info about the range of dates requested
|
||||||
final String queryString = "select count(*), " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN)
|
final String queryString = "select count(*), " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN) // NON-NLS
|
||||||
+ " from events where time >= " + startTime + " and time < " + endTime + " and " + getSQLWhere(filter)
|
+ " from events where time >= " + startTime + " and time < " + endTime + " and " + getSQLWhere(filter) // NON-NLS
|
||||||
+ " GROUP BY " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN);
|
+ " GROUP BY " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN); // NON-NLS
|
||||||
|
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
dbReadLock();
|
dbReadLock();
|
||||||
@ -814,11 +814,11 @@ public class EventDB {
|
|||||||
? RootEventType.allTypes.get(rs.getInt(SUB_TYPE_COLUMN))
|
? RootEventType.allTypes.get(rs.getInt(SUB_TYPE_COLUMN))
|
||||||
: BaseTypes.values()[rs.getInt(BASE_TYPE_COLUMN)];
|
: BaseTypes.values()[rs.getInt(BASE_TYPE_COLUMN)];
|
||||||
|
|
||||||
typeMap.put(type, rs.getLong("count(*)"));
|
typeMap.put(type, rs.getLong("count(*)")); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOGGER.log(Level.SEVERE, "error getting count of events from db.", ex);
|
LOGGER.log(Level.SEVERE, "error getting count of events from db.", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
rs.close();
|
rs.close();
|
||||||
@ -876,10 +876,10 @@ public class EventDB {
|
|||||||
|
|
||||||
//get all agregate events in this time unit
|
//get all agregate events in this time unit
|
||||||
dbReadLock();
|
dbReadLock();
|
||||||
String query = "select strftime('" + strfTimeFormat + "',time , 'unixepoch'" + (TimeLineController.getTimeZone().get().equals(TimeZone.getDefault()) ? ", 'localtime'" : "") + ") as interval, group_concat(event_id) as event_ids, Min(time), Max(time), " + descriptionColumn + ", " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN)
|
String query = "select strftime('" + strfTimeFormat + "',time , 'unixepoch'" + (TimeLineController.getTimeZone().get().equals(TimeZone.getDefault()) ? ", 'localtime'" : "") + ") as interval, group_concat(event_id) as event_ids, Min(time), Max(time), " + descriptionColumn + ", " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN) // NON-NLS
|
||||||
+ " from events where time >= " + start + " and time < " + end + " and " + getSQLWhere(filter)
|
+ " from events where time >= " + start + " and time < " + end + " and " + getSQLWhere(filter) // NON-NLS
|
||||||
+ " group by interval, " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN) + " , " + descriptionColumn
|
+ " group by interval, " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN) + " , " + descriptionColumn // NON-NLS
|
||||||
+ " order by Min(time)";
|
+ " order by Min(time)"; // NON-NLS
|
||||||
//System.out.println(query);
|
//System.out.println(query);
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try (Statement stmt = con.createStatement(); // scoop up requested events in groups organized by interval, type, and desription
|
try (Statement stmt = con.createStatement(); // scoop up requested events in groups organized by interval, type, and desription
|
||||||
@ -895,9 +895,9 @@ public class EventDB {
|
|||||||
EventType type = useSubTypes ? RootEventType.allTypes.get(rs.getInt(SUB_TYPE_COLUMN)) : BaseTypes.values()[rs.getInt(BASE_TYPE_COLUMN)];
|
EventType type = useSubTypes ? RootEventType.allTypes.get(rs.getInt(SUB_TYPE_COLUMN)) : BaseTypes.values()[rs.getInt(BASE_TYPE_COLUMN)];
|
||||||
|
|
||||||
AggregateEvent aggregateEvent = new AggregateEvent(
|
AggregateEvent aggregateEvent = new AggregateEvent(
|
||||||
new Interval(rs.getLong("Min(time)") * 1000, rs.getLong("Max(time)") * 1000, TimeLineController.getJodaTimeZone()),
|
new Interval(rs.getLong("Min(time)") * 1000, rs.getLong("Max(time)") * 1000, TimeLineController.getJodaTimeZone()), // NON-NLS
|
||||||
type,
|
type,
|
||||||
Arrays.asList(rs.getString("event_ids").split(",")),
|
Arrays.asList(rs.getString("event_ids").split(",")), // NON-NLS
|
||||||
rs.getString(descriptionColumn), lod);
|
rs.getString(descriptionColumn), lod);
|
||||||
|
|
||||||
//put events in map from type/descrition -> event
|
//put events in map from type/descrition -> event
|
||||||
@ -967,16 +967,16 @@ public class EventDB {
|
|||||||
try (ResultSet rs = getDBInfoStmt.executeQuery()) {
|
try (ResultSet rs = getDBInfoStmt.executeQuery()) {
|
||||||
long result = defaultValue;
|
long result = defaultValue;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
result = rs.getLong("value");
|
result = rs.getLong("value"); // NON-NLS
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to read key: " + key + " from db_info", ex);
|
LOGGER.log(Level.SEVERE, "failed to read key: " + key + " from db_info", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbReadUnlock();
|
dbReadUnlock();
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to set key: " + key + " on getDBInfoStmt ", ex);
|
LOGGER.log(Level.SEVERE, "failed to set key: " + key + " on getDBInfoStmt ", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
@ -997,19 +997,19 @@ public class EventDB {
|
|||||||
private String getStrfTimeFormat(TimeUnits info) {
|
private String getStrfTimeFormat(TimeUnits info) {
|
||||||
switch (info) {
|
switch (info) {
|
||||||
case DAYS:
|
case DAYS:
|
||||||
return "%Y-%m-%dT00:00:00";
|
return "%Y-%m-%dT00:00:00"; // NON-NLS
|
||||||
case HOURS:
|
case HOURS:
|
||||||
return "%Y-%m-%dT%H:00:00";
|
return "%Y-%m-%dT%H:00:00"; // NON-NLS
|
||||||
case MINUTES:
|
case MINUTES:
|
||||||
return "%Y-%m-%dT%H:%M:00";
|
return "%Y-%m-%dT%H:%M:00"; // NON-NLS
|
||||||
case MONTHS:
|
case MONTHS:
|
||||||
return "%Y-%m-01T00:00:00";
|
return "%Y-%m-01T00:00:00"; // NON-NLS
|
||||||
case SECONDS:
|
case SECONDS:
|
||||||
return "%Y-%m-%dT%H:%M:%S";
|
return "%Y-%m-%dT%H:%M:%S"; // NON-NLS
|
||||||
case YEARS:
|
case YEARS:
|
||||||
return "%Y-01-01T00:00:00";
|
return "%Y-01-01T00:00:00"; // NON-NLS
|
||||||
default:
|
default:
|
||||||
return "%Y-%m-%dT%H:%M:%S";
|
return "%Y-%m-%dT%H:%M:%S"; // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1026,7 +1026,7 @@ public class EventDB {
|
|||||||
recordDBInfoStmt.setLong(2, value);
|
recordDBInfoStmt.setLong(2, value);
|
||||||
recordDBInfoStmt.executeUpdate();
|
recordDBInfoStmt.executeUpdate();
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to set dbinfo key: " + key + " value: " + value, ex);
|
LOGGER.log(Level.SEVERE, "failed to set dbinfo key: " + key + " value: " + value, ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
dbWriteUnlock();
|
dbWriteUnlock();
|
||||||
}
|
}
|
||||||
@ -1056,7 +1056,7 @@ public class EventDB {
|
|||||||
con.setAutoCommit(false);
|
con.setAutoCommit(false);
|
||||||
|
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "failed to set auto-commit to to false", ex);
|
LOGGER.log(Level.SEVERE, "failed to set auto-commit to to false", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1067,7 +1067,7 @@ public class EventDB {
|
|||||||
con.rollback();
|
con.rollback();
|
||||||
|
|
||||||
} catch (SQLException ex1) {
|
} catch (SQLException ex1) {
|
||||||
LOGGER.log(Level.SEVERE, "Exception while attempting to rollback!!", ex1);
|
LOGGER.log(Level.SEVERE, "Exception while attempting to rollback!!", ex1); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
@ -1085,7 +1085,7 @@ public class EventDB {
|
|||||||
// fireNewEvents(newEvents);
|
// fireNewEvents(newEvents);
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error commiting events.db.", ex);
|
LOGGER.log(Level.SEVERE, "Error commiting events.db.", ex); // NON-NLS
|
||||||
rollback();
|
rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1096,7 +1096,7 @@ public class EventDB {
|
|||||||
try {
|
try {
|
||||||
con.setAutoCommit(true);
|
con.setAutoCommit(true);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error setting auto-commit to true.", ex);
|
LOGGER.log(Level.SEVERE, "Error setting auto-commit to true.", ex); // NON-NLS
|
||||||
} finally {
|
} finally {
|
||||||
closed = true;
|
closed = true;
|
||||||
|
|
||||||
@ -1112,10 +1112,10 @@ public class EventDB {
|
|||||||
|
|
||||||
public class MultipleTransactionException extends IllegalStateException {
|
public class MultipleTransactionException extends IllegalStateException {
|
||||||
|
|
||||||
private static final String CANNOT_HAVE_MORE_THAN_ONE_OPEN_TRANSACTIO = "cannot have more than one open transaction";
|
private static final String CANNOT_HAVE_MORE_THAN_ONE_OPEN_TRANSACTION = "cannot have more than one open transaction"; // NON-NLS
|
||||||
|
|
||||||
public MultipleTransactionException() {
|
public MultipleTransactionException() {
|
||||||
super(CANNOT_HAVE_MORE_THAN_ONE_OPEN_TRANSACTIO);
|
super(CANNOT_HAVE_MORE_THAN_ONE_OPEN_TRANSACTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ import javax.swing.JOptionPane;
|
|||||||
import javax.swing.SwingWorker;
|
import javax.swing.SwingWorker;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.timeline.ProgressWindow;
|
import org.sleuthkit.autopsy.timeline.ProgressWindow;
|
||||||
@ -126,13 +127,13 @@ public class EventsRepository {
|
|||||||
|
|
||||||
/** @return min time (in seconds from unix epoch) */
|
/** @return min time (in seconds from unix epoch) */
|
||||||
public Long getMaxTime() {
|
public Long getMaxTime() {
|
||||||
return maxCache.getUnchecked("max");
|
return maxCache.getUnchecked("max"); // NON-NLS
|
||||||
// return eventDB.getMaxTime();
|
// return eventDB.getMaxTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return max tie (in seconds from unix epoch) */
|
/** @return max tie (in seconds from unix epoch) */
|
||||||
public Long getMinTime() {
|
public Long getMinTime() {
|
||||||
return minCache.getUnchecked("min");
|
return minCache.getUnchecked("min"); // NON-NLS
|
||||||
// return eventDB.getMinTime();
|
// return eventDB.getMinTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +219,8 @@ public class EventsRepository {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground() throws Exception {
|
protected Void doInBackground() throws Exception {
|
||||||
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, -1, "(re)initializing events database", "")));
|
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, -1, NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.progressWindow.msg.reinit_db"), "")));
|
||||||
//reset database
|
//reset database
|
||||||
//TODO: can we do more incremental updates? -jm
|
//TODO: can we do more incremental updates? -jm
|
||||||
eventDB.dropTable();
|
eventDB.dropTable();
|
||||||
@ -229,7 +231,8 @@ public class EventsRepository {
|
|||||||
List<Long> files = skCase.findAllFileIdsWhere(FILES_AND_DIRS_WHERE_CLAUSE);
|
List<Long> files = skCase.findAllFileIdsWhere(FILES_AND_DIRS_WHERE_CLAUSE);
|
||||||
|
|
||||||
final int numFiles = files.size();
|
final int numFiles = files.size();
|
||||||
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, numFiles, "populating mac events for files: ", "")));
|
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, numFiles, NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.progressWindow.msg.populateMacEventsFiles"), "")));
|
||||||
|
|
||||||
//insert file events into db
|
//insert file events into db
|
||||||
int i = 1;
|
int i = 1;
|
||||||
@ -263,9 +266,11 @@ public class EventsRepository {
|
|||||||
eventDB.insertEvent(f.getCrtime(), FileSystemTypes.FILE_CREATED, fID, null, uniquePath, medD, shortDesc, f.getKnown(), trans);
|
eventDB.insertEvent(f.getCrtime(), FileSystemTypes.FILE_CREATED, fID, null, uniquePath, medD, shortDesc, f.getKnown(), trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
process(Arrays.asList(new ProgressWindow.ProgressUpdate(i, numFiles, "populating mac events for files: ", f.getName())));
|
process(Arrays.asList(new ProgressWindow.ProgressUpdate(i, numFiles,
|
||||||
|
NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.progressWindow.msg.populateMacEventsFiles2"), f.getName())));
|
||||||
} catch (TskCoreException tskCoreException) {
|
} catch (TskCoreException tskCoreException) {
|
||||||
LOGGER.log(Level.WARNING, "failed to insert mac event for file : " + fID, tskCoreException);
|
LOGGER.log(Level.WARNING, "failed to insert mac event for file : " + fID, tskCoreException); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
@ -283,7 +288,8 @@ public class EventsRepository {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, -1, "commiting events db", "")));
|
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, -1, NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.progressWindow.msg.commitingDb"), "")));
|
||||||
if (isCancelled()) {
|
if (isCancelled()) {
|
||||||
eventDB.rollBackTransaction(trans);
|
eventDB.rollBackTransaction(trans);
|
||||||
} else {
|
} else {
|
||||||
@ -315,13 +321,15 @@ public class EventsRepository {
|
|||||||
get();
|
get();
|
||||||
|
|
||||||
} catch (CancellationException ex) {
|
} catch (CancellationException ex) {
|
||||||
LOGGER.log(Level.INFO, "Database population was cancelled by the user. Not all events may be present or accurate. See the log for details.", ex);
|
LOGGER.log(Level.INFO, "Database population was cancelled by the user. Not all events may be present or accurate. See the log for details.", ex); // NON-NLS
|
||||||
} catch (InterruptedException | ExecutionException ex) {
|
} catch (InterruptedException | ExecutionException ex) {
|
||||||
LOGGER.log(Level.WARNING, "Exception while populating database.", ex);
|
LOGGER.log(Level.WARNING, "Exception while populating database.", ex); // NON-NLS
|
||||||
JOptionPane.showMessageDialog(null, "There was a problem populating the timeline. Not all events may be present or accurate. See the log for details.");
|
JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.msgdlg.problem.text"));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOGGER.log(Level.WARNING, "Unexpected exception while populating database.", ex);
|
LOGGER.log(Level.WARNING, "Unexpected exception while populating database.", ex); // NON-NLS
|
||||||
JOptionPane.showMessageDialog(null, "There was a problem populating the timeline. Not all events may be present or accurate. See the log for details.");
|
JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.msgdlg.problem.text"));
|
||||||
}
|
}
|
||||||
r.run(); //execute post db population operation
|
r.run(); //execute post db population operation
|
||||||
}
|
}
|
||||||
@ -339,7 +347,10 @@ public class EventsRepository {
|
|||||||
final ArrayList<BlackboardArtifact> blackboardArtifacts = skCase.getBlackboardArtifacts(type.getArtifactType());
|
final ArrayList<BlackboardArtifact> blackboardArtifacts = skCase.getBlackboardArtifacts(type.getArtifactType());
|
||||||
final int numArtifacts = blackboardArtifacts.size();
|
final int numArtifacts = blackboardArtifacts.size();
|
||||||
|
|
||||||
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, numArtifacts, "populating " + type.toString() + " events", "")));
|
process(Arrays.asList(new ProgressWindow.ProgressUpdate(0, numArtifacts,
|
||||||
|
NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.progressWindow.populatingXevents",
|
||||||
|
type.toString()), "")));
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (final BlackboardArtifact bbart : blackboardArtifacts) {
|
for (final BlackboardArtifact bbart : blackboardArtifacts) {
|
||||||
@ -351,10 +362,13 @@ public class EventsRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
process(Arrays.asList(new ProgressWindow.ProgressUpdate(i, numArtifacts, "populating " + type.toString() + " events", "")));
|
process(Arrays.asList(new ProgressWindow.ProgressUpdate(i, numArtifacts,
|
||||||
|
NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventsRepository.progressWindow.populatingXevents",
|
||||||
|
type.toString()), "")));
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "There was a problem getting events with sub type = " + type.toString() + ".", ex);
|
LOGGER.log(Level.SEVERE, "There was a problem getting events with sub type = " + type.toString() + ".", ex); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ public interface ArtifactEventType extends EventType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attrMap.get(type.getDateTimeAttrubuteType()) == null) {
|
if (attrMap.get(type.getDateTimeAttrubuteType()) == null) {
|
||||||
Logger.getLogger(AttributeEventDescription.class.getName()).log(Level.WARNING, "Artifact {0} has no date/time attribute, skipping it.", artf.getArtifactID());
|
Logger.getLogger(AttributeEventDescription.class.getName()).log(Level.WARNING, "Artifact {0} has no date/time attribute, skipping it.", artf.getArtifactID()); // NON-NLS
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//use the hook provided by this subtype implementation
|
//use the hook provided by this subtype implementation
|
||||||
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.timeline.events.type;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,7 +29,7 @@ import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
|||||||
*/
|
*/
|
||||||
public enum BaseTypes implements EventType {
|
public enum BaseTypes implements EventType {
|
||||||
|
|
||||||
FILE_SYSTEM("File System", "blue-document.png") {
|
FILE_SYSTEM(NbBundle.getMessage(BaseTypes.class, "BaseTypes.fileSystem.name"), "blue-document.png") { // NON-NLS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends EventType> getSubTypes() {
|
public List<? extends EventType> getSubTypes() {
|
||||||
@ -40,7 +41,7 @@ public enum BaseTypes implements EventType {
|
|||||||
return FileSystemTypes.valueOf(string);
|
return FileSystemTypes.valueOf(string);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
WEB_ACTIVITY("Web Activity", "web-file.png") {
|
WEB_ACTIVITY(NbBundle.getMessage(BaseTypes.class, "BaseTypes.webActivity.name"), "web-file.png") { // NON-NLS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends EventType> getSubTypes() {
|
public List<? extends EventType> getSubTypes() {
|
||||||
@ -52,7 +53,7 @@ public enum BaseTypes implements EventType {
|
|||||||
return WebTypes.valueOf(string);
|
return WebTypes.valueOf(string);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MISC_TYPES("Misc Types", "block.png") {
|
MISC_TYPES(NbBundle.getMessage(BaseTypes.class, "BaseTypes.miscTypes.name"), "block.png") { // NON-NLS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends EventType> getSubTypes() {
|
public List<? extends EventType> getSubTypes() {
|
||||||
@ -93,7 +94,7 @@ public enum BaseTypes implements EventType {
|
|||||||
private BaseTypes(String displayName, String iconBase) {
|
private BaseTypes(String displayName, String iconBase) {
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
this.iconBase = iconBase;
|
this.iconBase = iconBase;
|
||||||
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true);
|
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
BaseTypes.fileSystem.name=File System
|
||||||
|
BaseTypes.webActivity.name=Web Activity
|
||||||
|
BaseTypes.miscTypes.name=Misc Types
|
||||||
|
FileSystemTypes.fileModified.name=File Modified
|
||||||
|
FileSystemTypes.fileAccessed.name=File Accessed
|
||||||
|
FileSystemTypes.fileCreated.name=File Created
|
||||||
|
FileSystemTypes.fileChanged.name=File Changed
|
||||||
|
MiscTypes.message.name=Messages
|
||||||
|
MiscTypes.GPSRoutes.name=GPS Routes
|
||||||
|
MiscTypes.GPSTrackpoint.name=Location History
|
||||||
|
MiscTypes.Calls.name=Calls
|
||||||
|
MiscTypes.Email.name=Email
|
||||||
|
MiscTypes.recentDocuments.name=Recent Documents
|
||||||
|
MiscTypes.installedPrograms.name=Installed Programs
|
||||||
|
MiscTypes.exif.name=Exif
|
||||||
|
MiscTypes.devicesAttached.name=Devices Attached
|
||||||
|
RootEventType.eventTypes.name=Event Types
|
||||||
|
WebTypes.webDownloads.name=Web Downloads
|
||||||
|
WebTypes.webCookies.name=Web Cookies
|
||||||
|
WebTypes.webBookmarks.name=Web Bookmarks
|
||||||
|
WebTypes.webHistory.name=Web History
|
||||||
|
WebTypes.webSearch.name=Web Searches
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.timeline.events.type;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,10 +29,10 @@ import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
|||||||
*/
|
*/
|
||||||
public enum FileSystemTypes implements EventType {
|
public enum FileSystemTypes implements EventType {
|
||||||
|
|
||||||
FILE_MODIFIED("File Modified", "blue-document-attribute-m.png"),
|
FILE_MODIFIED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileModified.name"), "blue-document-attribute-m.png"), // NON-NLS
|
||||||
FILE_ACCESSED("File Accessed", "blue-document-attribute-a.png"),
|
FILE_ACCESSED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileAccessed.name"), "blue-document-attribute-a.png"), // NON-NLS
|
||||||
FILE_CREATED("File Created", "blue-document-attribute-b.png"),
|
FILE_CREATED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileCreated.name"), "blue-document-attribute-b.png"), // NON-NLS
|
||||||
FILE_CHANGED("File Changed", "blue-document-attribute-c.png");
|
FILE_CHANGED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileChanged.name"), "blue-document-attribute-c.png"); // NON-NLS
|
||||||
|
|
||||||
private final String iconBase;
|
private final String iconBase;
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ public enum FileSystemTypes implements EventType {
|
|||||||
private FileSystemTypes(String displayName, String iconBase) {
|
private FileSystemTypes(String displayName, String iconBase) {
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
this.iconBase = iconBase;
|
this.iconBase = iconBase;
|
||||||
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true);
|
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,6 +26,7 @@ import java.util.function.BiFunction;
|
|||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.util.Exceptions;
|
import org.openide.util.Exceptions;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||||
@ -36,7 +37,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
|||||||
*/
|
*/
|
||||||
public enum MiscTypes implements EventType, ArtifactEventType {
|
public enum MiscTypes implements EventType, ArtifactEventType {
|
||||||
|
|
||||||
MESSAGE("Messages", "message.png",
|
MESSAGE(NbBundle.getMessage(MiscTypes.class, "MiscTypes.message.name"), "message.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE),
|
||||||
@ -50,7 +51,7 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
|||||||
return StringUtils.join(asList, " ");
|
return StringUtils.join(asList, " ");
|
||||||
},
|
},
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT)),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT)),
|
||||||
GPS_ROUTE("GPS Routes", "gps-search.png",
|
GPS_ROUTE(NbBundle.getMessage(MiscTypes.class, "MiscTypes.GPSRoutes.name"), "gps-search.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
||||||
@ -60,35 +61,35 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
|||||||
final BlackboardAttribute longStart = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_START);
|
final BlackboardAttribute longStart = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_START);
|
||||||
final BlackboardAttribute latEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_END);
|
final BlackboardAttribute latEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_END);
|
||||||
final BlackboardAttribute longEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END);
|
final BlackboardAttribute longEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END);
|
||||||
return String.format("from %1$g %2$g to %3$g %4$g", latStart.getValueDouble(), longStart.getValueDouble(), latEnd.getValueDouble(), longEnd.getValueDouble());
|
return String.format("from %1$g %2$g to %3$g %4$g", latStart.getValueDouble(), longStart.getValueDouble(), latEnd.getValueDouble(), longEnd.getValueDouble()); // NON-NLS
|
||||||
}),
|
}),
|
||||||
GPS_TRACKPOINT("Location History", "gps-trackpoint.png",
|
GPS_TRACKPOINT(NbBundle.getMessage(MiscTypes.class, "MiscTypes.GPSTrackpoint.name"), "gps-trackpoint.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
||||||
(artf, attrMap) -> {
|
(artf, attrMap) -> {
|
||||||
final BlackboardAttribute longitude = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE);
|
final BlackboardAttribute longitude = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE);
|
||||||
final BlackboardAttribute latitude = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE);
|
final BlackboardAttribute latitude = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE);
|
||||||
return (latitude != null ? latitude.getValueDouble() : "") + " " + (longitude != null ? longitude.getValueDouble() : "");
|
return (latitude != null ? latitude.getValueDouble() : "") + " " + (longitude != null ? longitude.getValueDouble() : ""); // NON-NLS
|
||||||
},
|
},
|
||||||
(artf, attrMap) -> ""),
|
(artf, attrMap) -> ""),
|
||||||
CALL_LOG("Calls", "calllog.png",
|
CALL_LOG(NbBundle.getMessage(MiscTypes.class, "MiscTypes.Calls.name"), "calllog.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION)),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION)),
|
||||||
EMAIL("Email", "mail-icon-16.png",
|
EMAIL(NbBundle.getMessage(MiscTypes.class, "MiscTypes.Email.name"), "mail-icon-16.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_SENT,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_SENT,
|
||||||
(artifact, attrMap) -> {
|
(artifact, attrMap) -> {
|
||||||
final BlackboardAttribute emailFrom = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_FROM);
|
final BlackboardAttribute emailFrom = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_FROM);
|
||||||
final BlackboardAttribute emailTo = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_TO);
|
final BlackboardAttribute emailTo = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_TO);
|
||||||
return (emailFrom != null ? emailFrom.getValueString() : "") + " to " + (emailTo != null ? emailTo.getValueString() : "");
|
return (emailFrom != null ? emailFrom.getValueString() : "") + " to " + (emailTo != null ? emailTo.getValueString() : ""); // NON-NLS
|
||||||
},
|
},
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SUBJECT),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SUBJECT),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_PLAIN)),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_PLAIN)),
|
||||||
RECENT_DOCUMENTS("Recent Documents", "recent_docs.png",
|
RECENT_DOCUMENTS(NbBundle.getMessage(MiscTypes.class, "MiscTypes.recentDocuments.name"), "recent_docs.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_RECENT_OBJECT,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_RECENT_OBJECT,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH).andThen(
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH).andThen(
|
||||||
@ -114,13 +115,13 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
|||||||
return new AttributeEventDescription(time, shortDescription, medDescription, fullDescription);
|
return new AttributeEventDescription(time, shortDescription, medDescription, fullDescription);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
INSTALLED_PROGRAM("Installed Programs", "programs.png",
|
INSTALLED_PROGRAM(NbBundle.getMessage(MiscTypes.class, "MiscTypes.installedPrograms.name"), "programs.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_INSTALLED_PROG,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_INSTALLED_PROG,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
||||||
new EmptyExtractor(),
|
new EmptyExtractor(),
|
||||||
new EmptyExtractor()),
|
new EmptyExtractor()),
|
||||||
EXIF("Exif", "camera-icon-16.png",
|
EXIF(NbBundle.getMessage(MiscTypes.class, "MiscTypes.exif.name"), "camera-icon-16.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE),
|
||||||
@ -131,10 +132,10 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
|||||||
return t.getSleuthkitCase().getAbstractFileById(t.getObjectID()).getName();
|
return t.getSleuthkitCase().getAbstractFileById(t.getObjectID()).getName();
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
Exceptions.printStackTrace(ex);
|
Exceptions.printStackTrace(ex);
|
||||||
return " error loading file name";
|
return " error loading file name"; // NON-NLS
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
DEVICES_ATTACHED("Devices Attached", "usb_devices.png",
|
DEVICES_ATTACHED(NbBundle.getMessage(MiscTypes.class, "MiscTypes.devicesAttached.name"), "usb_devices.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_DEVICE_ATTACHED,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_DEVICE_ATTACHED,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE),
|
||||||
@ -150,12 +151,12 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
|||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
switch (dir.getDisplayString()) {
|
switch (dir.getDisplayString()) {
|
||||||
case "Incoming":
|
case "Incoming": // NON-NLS
|
||||||
return "from";
|
return "from"; // NON-NLS
|
||||||
case "Outgoing":
|
case "Outgoing": // NON-NLS
|
||||||
return "to";
|
return "to"; // NON-NLS
|
||||||
default:
|
default:
|
||||||
return "";
|
return ""; // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,7 +234,7 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
|||||||
this.shortExtractor = shortExtractor;
|
this.shortExtractor = shortExtractor;
|
||||||
this.medExtractor = medExtractor;
|
this.medExtractor = medExtractor;
|
||||||
this.longExtractor = longExtractor;
|
this.longExtractor = longExtractor;
|
||||||
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true);
|
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,6 +23,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||||
|
|
||||||
/** A singleton {@link } EventType to represent the root type of all event
|
/** A singleton {@link } EventType to represent the root type of all event
|
||||||
@ -81,12 +82,12 @@ public class RootEventType implements EventType {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getIconBase() {
|
public String getIconBase() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); // NON-NLS //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return "Event Types";
|
return NbBundle.getMessage(this.getClass(), "RootEventType.eventTypes.name");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,6 +24,7 @@ import java.util.Map;
|
|||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||||
@ -33,8 +34,8 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
|||||||
*/
|
*/
|
||||||
public enum WebTypes implements EventType, ArtifactEventType {
|
public enum WebTypes implements EventType, ArtifactEventType {
|
||||||
|
|
||||||
WEB_DOWNLOADS("Web Downloads",
|
WEB_DOWNLOADS(NbBundle.getMessage(WebTypes.class, "WebTypes.webDownloads.name"),
|
||||||
"downloads.png",
|
"downloads.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||||
@ -52,40 +53,40 @@ public enum WebTypes implements EventType, ArtifactEventType {
|
|||||||
String fileName = StringUtils.substringAfterLast(path, "/");
|
String fileName = StringUtils.substringAfterLast(path, "/");
|
||||||
String url = getFullExtractor().apply(artf, attrMap);
|
String url = getFullExtractor().apply(artf, attrMap);
|
||||||
|
|
||||||
//TODO: review non default descritpion construction
|
//TODO: review non default description construction
|
||||||
String shortDescription = fileName + " from " + domain;
|
String shortDescription = fileName + " from " + domain; // NON-NLS
|
||||||
String medDescription = fileName + " from " + url;
|
String medDescription = fileName + " from " + url; // NON-NLS
|
||||||
String fullDescription = path + " from " + url;
|
String fullDescription = path + " from " + url; // NON-NLS
|
||||||
return new AttributeEventDescription(time, shortDescription, medDescription, fullDescription);
|
return new AttributeEventDescription(time, shortDescription, medDescription, fullDescription);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//TODO: review description seperators
|
//TODO: review description separators
|
||||||
WEB_COOKIE("Web Cookies",
|
WEB_COOKIE(NbBundle.getMessage(WebTypes.class, "WebTypes.webCookies.name"),
|
||||||
"cookies.png",
|
"cookies.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE)),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE)),
|
||||||
//TODO: review description seperators
|
//TODO: review description separators
|
||||||
WEB_BOOKMARK("Web Bookmarks",
|
WEB_BOOKMARK(NbBundle.getMessage(WebTypes.class, "WebTypes.webBookmarks.name"),
|
||||||
"bookmarks.png",
|
"bookmarks.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE)),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE)),
|
||||||
//TODO: review description seperators
|
//TODO: review description separators
|
||||||
WEB_HISTORY("Web History",
|
WEB_HISTORY(NbBundle.getMessage(WebTypes.class, "WebTypes.webHistory.name"),
|
||||||
"history.png",
|
"history.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL),
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE)),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE)),
|
||||||
//TODO: review description seperators
|
//TODO: review description separators
|
||||||
WEB_SEARCH("Web Searches",
|
WEB_SEARCH(NbBundle.getMessage(WebTypes.class, "WebTypes.webSearch.name"),
|
||||||
"searchquery.png",
|
"searchquery.png", // NON-NLS
|
||||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY,
|
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY,
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT),
|
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT),
|
||||||
@ -160,7 +161,7 @@ public enum WebTypes implements EventType, ArtifactEventType {
|
|||||||
this.shortExtractor = shortExtractor;
|
this.shortExtractor = shortExtractor;
|
||||||
this.medExtractor = medExtractor;
|
this.medExtractor = medExtractor;
|
||||||
this.longExtractor = longExtractor;
|
this.longExtractor = longExtractor;
|
||||||
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true);
|
this.image = new Image("org/sleuthkit/autopsy/timeline/images/" + iconBase, true); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
EventRoodNode.tooManyNode.displayName=Too many events to display. Maximum \= {0}. But there are {1} to display.
|
@ -49,13 +49,13 @@ class EventNode extends DisplayableItemNode {
|
|||||||
EventNode(TimeLineEvent eventById, AbstractFile file, BlackboardArtifact artifact) {
|
EventNode(TimeLineEvent eventById, AbstractFile file, BlackboardArtifact artifact) {
|
||||||
super(Children.LEAF, Lookups.fixed(eventById, file, artifact));
|
super(Children.LEAF, Lookups.fixed(eventById, file, artifact));
|
||||||
this.e = eventById;
|
this.e = eventById;
|
||||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/timeline/images/" + e.getType().getIconBase());
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/timeline/images/" + e.getType().getIconBase()); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
EventNode(TimeLineEvent eventById, AbstractFile file) {
|
EventNode(TimeLineEvent eventById, AbstractFile file) {
|
||||||
super(Children.LEAF, Lookups.fixed(eventById, file));
|
super(Children.LEAF, Lookups.fixed(eventById, file));
|
||||||
this.e = eventById;
|
this.e = eventById;
|
||||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/timeline/images/" + e.getType().getIconBase());
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/timeline/images/" + e.getType().getIconBase()); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -67,7 +67,7 @@ class EventNode extends DisplayableItemNode {
|
|||||||
s.put(properties);
|
s.put(properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
final TimeProperty timePropery = new TimeProperty("time", "Date/Time", "time ", getDateTimeString());
|
final TimeProperty timePropery = new TimeProperty("time", "Date/Time", "time ", getDateTimeString()); // NON-NLS
|
||||||
|
|
||||||
TimeLineController.getTimeZone().addListener((Observable observable) -> {
|
TimeLineController.getTimeZone().addListener((Observable observable) -> {
|
||||||
try {
|
try {
|
||||||
@ -77,12 +77,12 @@ class EventNode extends DisplayableItemNode {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
properties.put(new NodeProperty<>("icon", "Icon", "icon", true)); //gets overriden with icon
|
properties.put(new NodeProperty<>("icon", "Icon", "icon", true)); // NON-NLS //gets overridden with icon
|
||||||
properties.put(timePropery);
|
properties.put(timePropery);
|
||||||
properties.put(new NodeProperty<>("description", "Description", "description", e.getFullDescription()));
|
properties.put(new NodeProperty<>("description", "Description", "description", e.getFullDescription())); // NON-NLS
|
||||||
properties.put(new NodeProperty<>("eventBaseType", "Base Type", "base type", e.getType().getSuperType().getDisplayName()));
|
properties.put(new NodeProperty<>("eventBaseType", "Base Type", "base type", e.getType().getSuperType().getDisplayName())); // NON-NLS
|
||||||
properties.put(new NodeProperty<>("eventSubType", "Sub Type", "sub type", e.getType().getDisplayName()));
|
properties.put(new NodeProperty<>("eventSubType", "Sub Type", "sub type", e.getType().getDisplayName())); // NON-NLS
|
||||||
properties.put(new NodeProperty<>("Known", "Known", "known", e.getKnown().toString()));
|
properties.put(new NodeProperty<>("Known", "Known", "known", e.getKnown().toString())); // NON-NLS
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ class EventNode extends DisplayableItemNode {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T accept(DisplayableItemNodeVisitor<T> dinv) {
|
public <T> T accept(DisplayableItemNodeVisitor<T> dinv) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); // NON-NLS //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
class TimeProperty extends PropertySupport.ReadWrite<String> {
|
class TimeProperty extends PropertySupport.ReadWrite<String> {
|
||||||
@ -140,7 +140,7 @@ class EventNode extends DisplayableItemNode {
|
|||||||
public void setValue(String t) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
|
public void setValue(String t) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
|
||||||
String oldValue = getValue();
|
String oldValue = getValue();
|
||||||
value = t;
|
value = t;
|
||||||
firePropertyChange("time", oldValue, t);
|
firePropertyChange("time", oldValue, t); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ import org.openide.nodes.AbstractNode;
|
|||||||
import org.openide.nodes.ChildFactory;
|
import org.openide.nodes.ChildFactory;
|
||||||
import org.openide.nodes.Children;
|
import org.openide.nodes.Children;
|
||||||
import org.openide.nodes.Node;
|
import org.openide.nodes.Node;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.openide.util.lookup.Lookups;
|
import org.openide.util.lookup.Lookups;
|
||||||
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
||||||
import org.sleuthkit.autopsy.timeline.events.TimeLineEvent;
|
import org.sleuthkit.autopsy.timeline.events.TimeLineEvent;
|
||||||
@ -110,7 +111,7 @@ public class EventRootNode extends DisplayableItemNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (TskCoreException tskCoreException) {
|
} catch (TskCoreException tskCoreException) {
|
||||||
LOGGER.log(Level.WARNING, "Failed to lookup sleuthkit object backing TimeLineEvent.", tskCoreException);
|
LOGGER.log(Level.WARNING, "Failed to lookup sleuthkit object backing TimeLineEvent.", tskCoreException); // NON-NLS
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -123,8 +124,12 @@ public class EventRootNode extends DisplayableItemNode {
|
|||||||
|
|
||||||
public TooManyNode(int size) {
|
public TooManyNode(int size) {
|
||||||
super(Children.LEAF);
|
super(Children.LEAF);
|
||||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/info-icon-16.png");
|
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/info-icon-16.png"); // NON-NLS
|
||||||
setDisplayName("Too many events to display. Maximum = " + MAX_EVENTS_TO_DISPLAY + ". But there are " + size + " to display.");
|
setDisplayName(
|
||||||
|
NbBundle.getMessage(this.getClass(),
|
||||||
|
"EventRoodNode.tooManyNode.displayName",
|
||||||
|
MAX_EVENTS_TO_DISPLAY,
|
||||||
|
size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public abstract class AbstractFilter implements Filter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getStringCheckBox() {
|
public String getStringCheckBox() {
|
||||||
return "[" + (isActive() ? "x" : " ") + "]";
|
return "[" + (isActive() ? "x" : " ") + "]"; // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
hideKnownFilter.displayName.text=Hide Known Files
|
||||||
|
IntersectionFilter.displayName.text=Intersection{0}
|
||||||
|
TextFilter.displayName.text=Text Filter
|
||||||
|
TypeFilter.displayName.text=Event Type Filter
|
@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.timeline.filters;
|
package org.sleuthkit.autopsy.timeline.filters;
|
||||||
|
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter to hide known files
|
* Filter to hide known files
|
||||||
*/
|
*/
|
||||||
@ -25,7 +27,7 @@ public class HideKnownFilter extends AbstractFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return "Hide Known Files";
|
return NbBundle.getMessage(this.getClass(), "hideKnownFilter.displayName.text");
|
||||||
}
|
}
|
||||||
|
|
||||||
public HideKnownFilter() {
|
public HideKnownFilter() {
|
||||||
@ -43,7 +45,7 @@ public class HideKnownFilter extends AbstractFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getHTMLReportString() {
|
public String getHTMLReportString() {
|
||||||
return "hide known" + getStringCheckBox();
|
return "hide known" + getStringCheckBox();// NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -7,6 +7,7 @@ package org.sleuthkit.autopsy.timeline.filters;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
/** Intersection(And) filter */
|
/** Intersection(And) filter */
|
||||||
public class IntersectionFilter extends CompoundFilter {
|
public class IntersectionFilter extends CompoundFilter {
|
||||||
@ -32,14 +33,16 @@ public class IntersectionFilter extends CompoundFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return "Intersection" + getSubFilters().stream()
|
return NbBundle.getMessage(this.getClass(),
|
||||||
.map(Filter::getDisplayName)
|
"IntersectionFilter.displayName.text",
|
||||||
.collect(Collectors.joining(",", "[", "]"));
|
getSubFilters().stream()
|
||||||
|
.map(Filter::getDisplayName)
|
||||||
|
.collect(Collectors.joining(",", "[", "]")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getHTMLReportString() {
|
public String getHTMLReportString() {
|
||||||
return getSubFilters().stream().filter(Filter::isActive).map(Filter::getHTMLReportString).collect(Collectors.joining("</li><li>", "<ul><li>", "</li></ul>"));
|
return getSubFilters().stream().filter(Filter::isActive).map(Filter::getHTMLReportString).collect(Collectors.joining("</li><li>", "<ul><li>", "</li></ul>")); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -22,6 +22,7 @@ import java.util.Objects;
|
|||||||
import javafx.beans.property.Property;
|
import javafx.beans.property.Property;
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
/** Filter for text matching */
|
/** Filter for text matching */
|
||||||
public class TextFilter extends AbstractFilter {
|
public class TextFilter extends AbstractFilter {
|
||||||
@ -41,7 +42,7 @@ public class TextFilter extends AbstractFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return "Text Filter";
|
return NbBundle.getMessage(this.getClass(), "TextFilter.displayName.text");
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized public String getText() {
|
synchronized public String getText() {
|
||||||
@ -62,7 +63,7 @@ public class TextFilter extends AbstractFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getHTMLReportString() {
|
public String getHTMLReportString() {
|
||||||
return "text like \"" + StringUtils.defaultIfBlank(text.getValue(), "") + "\"" + getStringCheckBox();
|
return "text like \"" + StringUtils.defaultIfBlank(text.getValue(), "") + "\"" + getStringCheckBox(); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,6 +23,7 @@ import java.util.stream.Collectors;
|
|||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.events.type.EventType;
|
import org.sleuthkit.autopsy.timeline.events.type.EventType;
|
||||||
import org.sleuthkit.autopsy.timeline.events.type.RootEventType;
|
import org.sleuthkit.autopsy.timeline.events.type.RootEventType;
|
||||||
|
|
||||||
@ -64,7 +65,11 @@ public class TypeFilter extends UnionFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return eventType == RootEventType.getInstance() ? "Event Type Filter" : eventType.getDisplayName();
|
if (eventType == RootEventType.getInstance()) {
|
||||||
|
return NbBundle.getMessage(this.getClass(), "TypeFilter.displayName.text");
|
||||||
|
} else {
|
||||||
|
return eventType.getDisplayName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return a color to use in GUI components representing this filter */
|
/** @return a color to use in GUI components representing this filter */
|
||||||
@ -95,7 +100,7 @@ public class TypeFilter extends UnionFilter {
|
|||||||
public String getHTMLReportString() {
|
public String getHTMLReportString() {
|
||||||
String string = getEventType().getDisplayName() + getStringCheckBox();
|
String string = getEventType().getDisplayName() + getStringCheckBox();
|
||||||
if (getSubFilters().isEmpty() == false) {
|
if (getSubFilters().isEmpty() == false) {
|
||||||
string = string + " : " + getSubFilters().stream().filter(Filter::isActive).map(Filter::getHTMLReportString).collect(Collectors.joining("</li><li>", "<ul><li>", "</li></ul>"));
|
string = string + " : " + getSubFilters().stream().filter(Filter::isActive).map(Filter::getHTMLReportString).collect(Collectors.joining("</li><li>", "<ul><li>", "</li></ul>")); // NON-NLS
|
||||||
}
|
}
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
@ -374,9 +374,9 @@ public abstract class AbstractVisualization<X, Y, N extends Node, C extends XYCh
|
|||||||
label.relocate(labelX, 0);
|
label.relocate(labelX, 0);
|
||||||
|
|
||||||
if (labelX == 0) { // first label has no border
|
if (labelX == 0) { // first label has no border
|
||||||
label.setStyle("-fx-border-width: 0 0 0 0 ; -fx-border-color:black;");
|
label.setStyle("-fx-border-width: 0 0 0 0 ; -fx-border-color:black;"); // NON-NLS
|
||||||
} else { // subsequent labels have border on left to create dividers
|
} else { // subsequent labels have border on left to create dividers
|
||||||
label.setStyle("-fx-border-width: 0 0 0 1; -fx-border-color:black;");
|
label.setStyle("-fx-border-width: 0 0 0 1; -fx-border-color:black;"); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
branchPane.getChildren().add(label);
|
branchPane.getChildren().add(label);
|
||||||
|
@ -35,4 +35,10 @@ Timeline.ui.ZoomRanges.threeyears.text=Three Years
|
|||||||
Timeline.ui.ZoomRanges.fiveyears.text=Five Years
|
Timeline.ui.ZoomRanges.fiveyears.text=Five Years
|
||||||
Timeline.ui.ZoomRanges.tenyears.text=Ten Years
|
Timeline.ui.ZoomRanges.tenyears.text=Ten Years
|
||||||
Timeline.ui.ZoomRanges.all.text=All
|
Timeline.ui.ZoomRanges.all.text=All
|
||||||
Timeline.ui.TimeLineChart.tooltip.text=Double-click to zoom into range\:\n{0} to {1}\nRight-click to clear.
|
Timeline.ui.TimeLineChart.tooltip.text=Double-click to zoom into range\:\n{0} to {1}\nRight-click to clear.
|
||||||
|
TimeLineResultView.startDateToEndDate.text={0} to {1}
|
||||||
|
VisualizationPanel.histogramTask.title=Rebuild Histogram
|
||||||
|
VisualizationPanel.histogramTask.preparing=preparing
|
||||||
|
VisualizationPanel.histogramTask.resetUI=resetting ui
|
||||||
|
VisualizationPanel.histogramTask.queryDb=querying db
|
||||||
|
VisualizationPanel.histogramTask.updateUI2=updating ui
|
@ -53,16 +53,16 @@ public class StatusBar extends ToolBar implements TimeLineUI {
|
|||||||
private Label messageLabel;
|
private Label messageLabel;
|
||||||
|
|
||||||
public StatusBar() {
|
public StatusBar() {
|
||||||
FXMLConstructor.construct(this, "StatusBar.fxml");
|
FXMLConstructor.construct(this, "StatusBar.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void initialize() {
|
void initialize() {
|
||||||
assert refreshLabel != null : "fx:id=\"refreshLabel\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
assert refreshLabel != null : "fx:id=\"refreshLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
|
||||||
assert progressBar != null : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
assert progressBar != null : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
|
||||||
assert spacer != null : "fx:id=\"spacer\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
assert spacer != null : "fx:id=\"spacer\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
|
||||||
assert taskLabel != null : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
assert taskLabel != null : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
|
||||||
assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
|
||||||
refreshLabel.setVisible(false);
|
refreshLabel.setVisible(false);
|
||||||
taskLabel.setVisible(false);
|
taskLabel.setVisible(false);
|
||||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||||
|
@ -93,9 +93,13 @@ public class TimeLineResultView implements TimeLineView {
|
|||||||
private String getSummaryString() {
|
private String getSummaryString() {
|
||||||
if (controller.getSelectedTimeRange().get() != null) {
|
if (controller.getSelectedTimeRange().get() != null) {
|
||||||
final DateTimeFormatter zonedFormatter = TimeLineController.getZonedFormatter();
|
final DateTimeFormatter zonedFormatter = TimeLineController.getZonedFormatter();
|
||||||
return controller.getSelectedTimeRange().get().getStart().withZone(TimeLineController.getJodaTimeZone()).toString(zonedFormatter)
|
return NbBundle.getMessage(this.getClass(), "TimeLineResultView.startDateToEndDate.text",
|
||||||
+ " to "
|
controller.getSelectedTimeRange().get().getStart()
|
||||||
+ controller.getSelectedTimeRange().get().getEnd().withZone(TimeLineController.getJodaTimeZone()).toString(zonedFormatter);
|
.withZone(TimeLineController.getJodaTimeZone())
|
||||||
|
.toString(zonedFormatter),
|
||||||
|
controller.getSelectedTimeRange().get().getEnd()
|
||||||
|
.withZone(TimeLineController.getJodaTimeZone())
|
||||||
|
.toString(zonedFormatter));
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class TimeZonePanel extends TitledPane {
|
|||||||
|
|
||||||
static private String getTimeZoneString(final TimeZone timeZone) {
|
static private String getTimeZoneString(final TimeZone timeZone) {
|
||||||
final String id = ZoneOffset.ofTotalSeconds(timeZone.getOffset(System.currentTimeMillis()) / 1000).getId();
|
final String id = ZoneOffset.ofTotalSeconds(timeZone.getOffset(System.currentTimeMillis()) / 1000).getId();
|
||||||
final String timeZoneString = "(GMT" + ("Z".equals(id) ? "+00:00" : id) + ") " + timeZone.getID() + " [" + timeZone.getDisplayName(timeZone.observesDaylightTime() && timeZone.inDaylightTime(new Date()), TimeZone.SHORT) + "]";
|
final String timeZoneString = "(GMT" + ("Z".equals(id) ? "+00:00" : id) + ") " + timeZone.getID() + " [" + timeZone.getDisplayName(timeZone.observesDaylightTime() && timeZone.inDaylightTime(new Date()), TimeZone.SHORT) + "]"; // NON-NLS
|
||||||
return timeZoneString;
|
return timeZoneString;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,6 +65,6 @@ public class TimeZonePanel extends TitledPane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TimeZonePanel() {
|
public TimeZonePanel() {
|
||||||
FXMLConstructor.construct(this, "TimeZonePanel.fxml");
|
FXMLConstructor.construct(this, "TimeZonePanel.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ import org.controlsfx.control.action.Action;
|
|||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.DateTimeZone;
|
import org.joda.time.DateTimeZone;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||||
@ -194,17 +195,17 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
public VisualizationPanel(NavPanel navPanel) {
|
public VisualizationPanel(NavPanel navPanel) {
|
||||||
this.navPanel = navPanel;
|
this.navPanel = navPanel;
|
||||||
FXMLConstructor.construct(this, "VisualizationPanel.fxml");
|
FXMLConstructor.construct(this, "VisualizationPanel.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML // This method is called by the FXMLLoader when initialization is complete
|
@FXML // This method is called by the FXMLLoader when initialization is complete
|
||||||
protected void initialize() {
|
protected void initialize() {
|
||||||
assert endPicker != null : "fx:id=\"endPicker\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
assert endPicker != null : "fx:id=\"endPicker\" was not injected: check your FXML file 'ViewWrapper.fxml'."; // NON-NLS
|
||||||
assert histogramBox != null : "fx:id=\"histogramBox\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
assert histogramBox != null : "fx:id=\"histogramBox\" was not injected: check your FXML file 'ViewWrapper.fxml'."; // NON-NLS
|
||||||
assert startPicker != null : "fx:id=\"startPicker\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
assert startPicker != null : "fx:id=\"startPicker\" was not injected: check your FXML file 'ViewWrapper.fxml'."; // NON-NLS
|
||||||
assert rangeHistogramStack != null : "fx:id=\"rangeHistogramStack\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
assert rangeHistogramStack != null : "fx:id=\"rangeHistogramStack\" was not injected: check your FXML file 'ViewWrapper.fxml'."; // NON-NLS
|
||||||
assert countsToggle != null : "fx:id=\"countsToggle\" was not injected: check your FXML file 'VisToggle.fxml'.";
|
assert countsToggle != null : "fx:id=\"countsToggle\" was not injected: check your FXML file 'VisToggle.fxml'."; // NON-NLS
|
||||||
assert detailsToggle != null : "fx:id=\"eventsToggle\" was not injected: check your FXML file 'VisToggle.fxml'.";
|
assert detailsToggle != null : "fx:id=\"eventsToggle\" was not injected: check your FXML file 'VisToggle.fxml'."; // NON-NLS
|
||||||
|
|
||||||
HBox.setHgrow(leftSeperator, Priority.ALWAYS);
|
HBox.setHgrow(leftSeperator, Priority.ALWAYS);
|
||||||
HBox.setHgrow(rightSeperator, Priority.ALWAYS);
|
HBox.setHgrow(rightSeperator, Priority.ALWAYS);
|
||||||
@ -253,7 +254,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
/* this padding attempts to compensates for the fact that the
|
/* this padding attempts to compensates for the fact that the
|
||||||
* rangeslider track doesn't extend to edge of node,and so the
|
* rangeslider track doesn't extend to edge of node,and so the
|
||||||
* histrogram doesn't quite line up with the rangeslider */
|
* histrogram doesn't quite line up with the rangeslider */
|
||||||
histogramBox.setStyle(" -fx-padding: 0,0.5em,0,.5em; ");
|
histogramBox.setStyle(" -fx-padding: 0,0.5em,0,.5em; "); // NON-NLS
|
||||||
|
|
||||||
zoomMenuButton.getItems().clear();
|
zoomMenuButton.getItems().clear();
|
||||||
for (ZoomRanges b : ZoomRanges.values()) {
|
for (ZoomRanges b : ZoomRanges.values()) {
|
||||||
@ -416,12 +417,13 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
histogramTask.cancel(true);
|
histogramTask.cancel(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
histogramTask = new LoggedTask<Void>("Rebuild Histogram", true) {
|
histogramTask = new LoggedTask<Void>(
|
||||||
|
NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.title"), true) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void call() throws Exception {
|
protected Void call() throws Exception {
|
||||||
|
|
||||||
updateMessage("preparing");
|
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.preparing"));
|
||||||
|
|
||||||
long max = 0;
|
long max = 0;
|
||||||
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.getSpanningInterval());
|
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.getSpanningInterval());
|
||||||
@ -434,7 +436,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
//clear old data, and reset ranges and series
|
//clear old data, and reset ranges and series
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage("resetting ui");
|
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.resetUI"));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -451,7 +453,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
start = end;
|
start = end;
|
||||||
|
|
||||||
updateMessage("querying db");
|
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.queryDb"));
|
||||||
//query for current range
|
//query for current range
|
||||||
long count = filteredEvents.getEventCounts(interval).values().stream().mapToLong(Long::valueOf).sum();
|
long count = filteredEvents.getEventCounts(interval).values().stream().mapToLong(Long::valueOf).sum();
|
||||||
bins.add(count);
|
bins.add(count);
|
||||||
@ -461,7 +463,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
final double fMax = Math.log(max);
|
final double fMax = Math.log(max);
|
||||||
final ArrayList<Long> fbins = new ArrayList<>(bins);
|
final ArrayList<Long> fbins = new ArrayList<>(bins);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage("updating ui");
|
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.updateUI2"));
|
||||||
|
|
||||||
histogramBox.getChildren().clear();
|
histogramBox.getChildren().clear();
|
||||||
|
|
||||||
@ -479,7 +481,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
Tooltip.install(bar, new Tooltip(bin.toString()));
|
Tooltip.install(bar, new Tooltip(bin.toString()));
|
||||||
});
|
});
|
||||||
bar.setEffect(lighting);
|
bar.setEffect(lighting);
|
||||||
//they each get equal width to fill the histogram horizontaly
|
//they each get equal width to fill the histogram horizontally
|
||||||
HBox.setHgrow(bar, Priority.ALWAYS);
|
HBox.setHgrow(bar, Priority.ALWAYS);
|
||||||
histogramBox.getChildren().add(bar);
|
histogramBox.getChildren().add(bar);
|
||||||
}
|
}
|
||||||
@ -555,15 +557,15 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
public NoEventsDialog(Runnable closeCallback) {
|
public NoEventsDialog(Runnable closeCallback) {
|
||||||
this.closeCallback = closeCallback;
|
this.closeCallback = closeCallback;
|
||||||
FXMLConstructor.construct(this, "NoEventsDialog.fxml");
|
FXMLConstructor.construct(this, "NoEventsDialog.fxml"); // NON-NLS
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void initialize() {
|
void initialize() {
|
||||||
assert resetFiltersButton != null : "fx:id=\"resetFiltersButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'.";
|
assert resetFiltersButton != null : "fx:id=\"resetFiltersButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'."; // NON-NLS
|
||||||
assert dismissButton != null : "fx:id=\"dismissButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'.";
|
assert dismissButton != null : "fx:id=\"dismissButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'."; // NON-NLS
|
||||||
assert zoomButton != null : "fx:id=\"zoomButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'.";
|
assert zoomButton != null : "fx:id=\"zoomButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'."; // NON-NLS
|
||||||
|
|
||||||
Action zoomOutAction = new ZoomOut(controller);
|
Action zoomOutAction = new ZoomOut(controller);
|
||||||
zoomButton.setOnAction(zoomOutAction);
|
zoomButton.setOnAction(zoomOutAction);
|
||||||
|
@ -27,3 +27,10 @@ Timeline.ui.countsview.menuItem.selectEventType=Select Event Type
|
|||||||
Timeline.ui.countsview.menuItem.selectTimeandType=Select Time and Type
|
Timeline.ui.countsview.menuItem.selectTimeandType=Select Time and Type
|
||||||
Timeline.ui.countsview.menuItem.zoomIntoTimeRange=Zoom into Time Range
|
Timeline.ui.countsview.menuItem.zoomIntoTimeRange=Zoom into Time Range
|
||||||
Timeline.ui.countsview.contextMenu.ActionGroup.zoomHistory.title=Zoom History
|
Timeline.ui.countsview.contextMenu.ActionGroup.zoomHistory.title=Zoom History
|
||||||
|
CountsViewPane.loggedTask.name=Updating Counts Graph
|
||||||
|
CountsViewPane.loggedTask.prepUpdate=preparing update
|
||||||
|
CountsViewPane.loggedTask.resetUI=resetting ui
|
||||||
|
CountsViewPane.tooltip.text={0} {1} events\nbetween {2}\nand {3}
|
||||||
|
CountsViewPane.loggedTask.updatingCounts=updating counts
|
||||||
|
CountsViewPane.loggedTask.wrappingUp=wrapping up
|
||||||
|
EventCountsChart.contextMenu.zoomHistory.name=Zoom History
|
||||||
|
@ -133,7 +133,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Task<Boolean> getUpdateTask() {
|
protected Task<Boolean> getUpdateTask() {
|
||||||
return new LoggedTask<Boolean>("Updating Counts Graph", true) {
|
return new LoggedTask<Boolean>(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.name"), true) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean call() throws Exception {
|
protected Boolean call() throws Exception {
|
||||||
@ -141,7 +141,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
updateProgress(-1, 1);
|
updateProgress(-1, 1);
|
||||||
updateMessage("preparing update");
|
updateMessage(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.prepUpdate"));
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
setCursor(Cursor.WAIT);
|
setCursor(Cursor.WAIT);
|
||||||
});
|
});
|
||||||
@ -158,7 +158,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
|
|
||||||
//clear old data, and reset ranges and series
|
//clear old data, and reset ranges and series
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage("resetting ui");
|
updateMessage(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.resetUI"));
|
||||||
eventTypeMap.clear();
|
eventTypeMap.clear();
|
||||||
dataSets.clear();
|
dataSets.clear();
|
||||||
dateAxis.getCategories().clear();
|
dateAxis.getCategories().clear();
|
||||||
@ -209,15 +209,18 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
xyData.nodeProperty().addListener((Observable o) -> {
|
xyData.nodeProperty().addListener((Observable o) -> {
|
||||||
final Node node = xyData.getNode();
|
final Node node = xyData.getNode();
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
node.setStyle("-fx-border-width: 2; -fx-border-color: " + ColorUtilities.getRGBCode(et.getSuperType().getColor()) + "; -fx-bar-fill: " + ColorUtilities.getRGBCode(et.getColor()));
|
node.setStyle("-fx-border-width: 2; -fx-border-color: " + ColorUtilities.getRGBCode(et.getSuperType().getColor()) + "; -fx-bar-fill: " + ColorUtilities.getRGBCode(et.getColor())); // NON-NLS
|
||||||
node.setCursor(Cursor.HAND);
|
node.setCursor(Cursor.HAND);
|
||||||
|
|
||||||
node.setOnMouseEntered((MouseEvent event) -> {
|
node.setOnMouseEntered((MouseEvent event) -> {
|
||||||
//defer tooltip creation till needed, this had a surprisingly large impact on speed of loading the chart
|
//defer tooltip creation till needed, this had a surprisingly large impact on speed of loading the chart
|
||||||
final Tooltip tooltip = new Tooltip(count + " " + et.getDisplayName() + " events\n"
|
final Tooltip tooltip = new Tooltip(
|
||||||
+ "between " + dateString + "\n"
|
NbBundle.getMessage(this.getClass(), "CountsViewPane.tooltip.text",
|
||||||
+ "and "
|
count,
|
||||||
+ interval.getEnd().toString(rangeInfo.getTickFormatter()));
|
et.getDisplayName(),
|
||||||
|
dateString,
|
||||||
|
interval.getEnd().toString(
|
||||||
|
rangeInfo.getTickFormatter())));
|
||||||
tooltip.setGraphic(new ImageView(et.getFXImage()));
|
tooltip.setGraphic(new ImageView(et.getFXImage()));
|
||||||
Tooltip.install(node, tooltip);
|
Tooltip.install(node, tooltip);
|
||||||
node.setEffect(new DropShadow(10, et.getColor()));
|
node.setEffect(new DropShadow(10, et.getColor()));
|
||||||
@ -239,7 +242,8 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
final double fmax = max;
|
final double fmax = max;
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage("updating counts");
|
updateMessage(
|
||||||
|
NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.updatingCounts"));
|
||||||
getSeries(et).getData().add(xyData);
|
getSeries(et).getData().add(xyData);
|
||||||
if (scale.get().equals(ScaleType.LINEAR)) {
|
if (scale.get().equals(ScaleType.LINEAR)) {
|
||||||
countAxis.setTickUnit(Math.pow(10, Math.max(0, Math.floor(Math.log10(fmax)) - 1)));
|
countAxis.setTickUnit(Math.pow(10, Math.max(0, Math.floor(Math.log10(fmax)) - 1)));
|
||||||
@ -254,7 +258,8 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
final double fmax = max;
|
final double fmax = max;
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage("updating counts");
|
updateMessage(
|
||||||
|
NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.updatingCounts"));
|
||||||
updateProgress(fp, rangeInfo.getPeriodsInRange());
|
updateProgress(fp, rangeInfo.getPeriodsInRange());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -262,7 +267,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage("wrapping up");
|
updateMessage(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.wrappingUp"));
|
||||||
updateProgress(1, 1);
|
updateProgress(1, 1);
|
||||||
layoutDateLabels();
|
layoutDateLabels();
|
||||||
setCursor(Cursor.NONE);
|
setCursor(Cursor.NONE);
|
||||||
@ -507,8 +512,8 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void initialize() {
|
void initialize() {
|
||||||
assert logRadio != null : "fx:id=\"logRadio\" was not injected: check your FXML file 'CountsViewSettingsPane.fxml'.";
|
assert logRadio != null : "fx:id=\"logRadio\" was not injected: check your FXML file 'CountsViewSettingsPane.fxml'."; // NON-NLS
|
||||||
assert linearRadio != null : "fx:id=\"linearRadio\" was not injected: check your FXML file 'CountsViewSettingsPane.fxml'.";
|
assert linearRadio != null : "fx:id=\"linearRadio\" was not injected: check your FXML file 'CountsViewSettingsPane.fxml'."; // NON-NLS
|
||||||
logRadio.setSelected(true);
|
logRadio.setSelected(true);
|
||||||
scaleGroup.selectedToggleProperty().addListener(observable -> {
|
scaleGroup.selectedToggleProperty().addListener(observable -> {
|
||||||
if (scaleGroup.getSelectedToggle() == linearRadio) {
|
if (scaleGroup.getSelectedToggle() == linearRadio) {
|
||||||
@ -521,7 +526,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CountsViewSettingsPane() {
|
public CountsViewSettingsPane() {
|
||||||
FXMLConstructor.construct(this, "CountsViewSettingsPane.fxml");
|
FXMLConstructor.construct(this, "CountsViewSettingsPane.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,10 @@ class EventCountsChart extends StackedBarChart<String, Number> implements TimeLi
|
|||||||
setModel(this.controller.getEventsModel());
|
setModel(this.controller.getEventsModel());
|
||||||
//we have defered creating context menu until control is available
|
//we have defered creating context menu until control is available
|
||||||
contextMenu = ActionUtils.createContextMenu(
|
contextMenu = ActionUtils.createContextMenu(
|
||||||
Arrays.asList(new ActionGroup("Zoom History", new Back(controller), new Forward(controller))));
|
Arrays.asList(new ActionGroup(
|
||||||
|
NbBundle.getMessage(this.getClass(), "EventCountsChart.contextMenu.zoomHistory.name"),
|
||||||
|
new Back(controller),
|
||||||
|
new Forward(controller))));
|
||||||
contextMenu.setAutoHide(true);
|
contextMenu.setAutoHide(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
import org.openide.util.Exceptions;
|
import org.openide.util.Exceptions;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.coreutils.ColorUtilities;
|
import org.sleuthkit.autopsy.coreutils.ColorUtilities;
|
||||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
@ -68,8 +69,8 @@ import org.sleuthkit.autopsy.timeline.zooming.ZoomParams;
|
|||||||
/** Represents an {@link AggregateEvent} in a {@link EventDetailChart}. */
|
/** Represents an {@link AggregateEvent} in a {@link EventDetailChart}. */
|
||||||
public class AggregateEventNode extends StackPane {
|
public class AggregateEventNode extends StackPane {
|
||||||
|
|
||||||
private final static Image PLUS = new Image("/org/sleuthkit/autopsy/timeline/images/plus-button.png");
|
private final static Image PLUS = new Image("/org/sleuthkit/autopsy/timeline/images/plus-button.png"); // NON-NLS
|
||||||
private final static Image MINUS = new Image("/org/sleuthkit/autopsy/timeline/images/minus-button.png");
|
private final static Image MINUS = new Image("/org/sleuthkit/autopsy/timeline/images/minus-button.png"); // NON-NLS
|
||||||
|
|
||||||
private static final CornerRadii CORNER_RADII = new CornerRadii(3);
|
private static final CornerRadii CORNER_RADII = new CornerRadii(3);
|
||||||
|
|
||||||
@ -181,7 +182,7 @@ public class AggregateEventNode extends StackPane {
|
|||||||
spanFill = new Background(new BackgroundFill(evtColor.deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY));
|
spanFill = new Background(new BackgroundFill(evtColor.deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY));
|
||||||
setBackground(new Background(new BackgroundFill(evtColor.deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY)));
|
setBackground(new Background(new BackgroundFill(evtColor.deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY)));
|
||||||
setCursor(Cursor.HAND);
|
setCursor(Cursor.HAND);
|
||||||
spanRegion.setStyle("-fx-border-width:2 0 2 2; -fx-border-radius: 2; -fx-border-color: " + ColorUtilities.getRGBCode(evtColor) + ";");
|
spanRegion.setStyle("-fx-border-width:2 0 2 2; -fx-border-radius: 2; -fx-border-color: " + ColorUtilities.getRGBCode(evtColor) + ";"); // NON-NLS
|
||||||
spanRegion.setBackground(spanFill);
|
spanRegion.setBackground(spanFill);
|
||||||
|
|
||||||
//set up mouse hover effect and tooltip
|
//set up mouse hover effect and tooltip
|
||||||
@ -228,10 +229,11 @@ public class AggregateEventNode extends StackPane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void installTooltip() {
|
private void installTooltip() {
|
||||||
Tooltip.install(AggregateEventNode.this, new Tooltip(getEvent().getEventIDs().size() + " " + getEvent().getType() + " events\n"
|
Tooltip.install(AggregateEventNode.this, new Tooltip(
|
||||||
+ getEvent().getDescription()
|
NbBundle.getMessage(this.getClass(), "AggregateEventNode.installTooltip.text",
|
||||||
+ "\nbetween " + getEvent().getSpan().getStart().toString(TimeLineController.getZonedFormatter())
|
getEvent().getEventIDs().size(), getEvent().getType(), getEvent().getDescription(),
|
||||||
+ "\nand " + getEvent().getSpan().getEnd().toString(TimeLineController.getZonedFormatter())));
|
getEvent().getSpan().getStart().toString(TimeLineController.getZonedFormatter()),
|
||||||
|
getEvent().getSpan().getEnd().toString(TimeLineController.getZonedFormatter()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pane getSubNodePane() {
|
public Pane getSubNodePane() {
|
||||||
@ -284,7 +286,7 @@ public class AggregateEventNode extends StackPane {
|
|||||||
? " ..." + StringUtils.substringAfter(description, parentEventNode.getEvent().getDescription())
|
? " ..." + StringUtils.substringAfter(description, parentEventNode.getEvent().getDescription())
|
||||||
: description;
|
: description;
|
||||||
descrLabel.setText(description);
|
descrLabel.setText(description);
|
||||||
countLabel.setText(((size == 1) ? "" : " (" + size + ")"));
|
countLabel.setText(((size == 1) ? "" : " (" + size + ")")); // NON-NLS
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,12 +312,12 @@ public class AggregateEventNode extends StackPane {
|
|||||||
void applyHighlightEffect(boolean applied) {
|
void applyHighlightEffect(boolean applied) {
|
||||||
|
|
||||||
if (applied) {
|
if (applied) {
|
||||||
descrLabel.setStyle("-fx-font-weight: bold;");
|
descrLabel.setStyle("-fx-font-weight: bold;"); // NON-NLS
|
||||||
spanFill = new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .3), CORNER_RADII, Insets.EMPTY));
|
spanFill = new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .3), CORNER_RADII, Insets.EMPTY));
|
||||||
spanRegion.setBackground(spanFill);
|
spanRegion.setBackground(spanFill);
|
||||||
setBackground(new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .2), CORNER_RADII, Insets.EMPTY)));
|
setBackground(new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .2), CORNER_RADII, Insets.EMPTY)));
|
||||||
} else {
|
} else {
|
||||||
descrLabel.setStyle("-fx-font-weight: normal;");
|
descrLabel.setStyle("-fx-font-weight: normal;"); // NON-NLS
|
||||||
spanFill = new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY));
|
spanFill = new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY));
|
||||||
spanRegion.setBackground(spanFill);
|
spanRegion.setBackground(spanFill);
|
||||||
setBackground(new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY)));
|
setBackground(new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY)));
|
||||||
@ -366,7 +368,8 @@ public class AggregateEventNode extends StackPane {
|
|||||||
final Interval span = event.getSpan().withEndMillis(event.getSpan().getEndMillis() + 1000);
|
final Interval span = event.getSpan().withEndMillis(event.getSpan().getEndMillis() + 1000);
|
||||||
|
|
||||||
//make a task to load the subnodes
|
//make a task to load the subnodes
|
||||||
LoggedTask<List<AggregateEventNode>> loggedTask = new LoggedTask<List<AggregateEventNode>>("Load sub events", true) {
|
LoggedTask<List<AggregateEventNode>> loggedTask = new LoggedTask<List<AggregateEventNode>>(
|
||||||
|
NbBundle.getMessage(this.getClass(), "AggregateEventNode.loggedTask.name"), true) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<AggregateEventNode> call() throws Exception {
|
protected List<AggregateEventNode> call() throws Exception {
|
||||||
|
@ -1 +1,9 @@
|
|||||||
Timeline.ui.detailview.tooltip.text={0}\nRight-click to remove.\nRight-drag to reposition.
|
Timeline.ui.detailview.tooltip.text={0}\nRight-click to remove.\nRight-drag to reposition.
|
||||||
|
AggregateEventNode.installTooltip.text={0} {1} events\n{2}\nbetween {3}\nand {4}
|
||||||
|
AggregateEventNode.loggedTask.name=Load sub events
|
||||||
|
DetailViewPane.loggedTask.name=Update Details
|
||||||
|
DetailViewPane.loggedTask.preparing=preparing
|
||||||
|
DetailViewPane.loggedTask.queryDb=querying db
|
||||||
|
DetailViewPane.loggedTask.updateUI=updating ui
|
||||||
|
EventDetailChart.contextMenu.zoomHistory.name=Zoom History
|
||||||
|
EventDetailChart.chartContextMenu.placeMarker.name=Place Marker
|
@ -67,7 +67,7 @@ final class DateAxis extends Axis<DateTime> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "lowerBound";
|
return "lowerBound"; // NON-NLS
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ final class DateAxis extends Axis<DateTime> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "upperBound";
|
return "upperBound"; // NON-NLS
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ import javafx.scene.layout.Priority;
|
|||||||
import javafx.scene.layout.Region;
|
import javafx.scene.layout.Region;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||||
@ -287,7 +288,7 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
|||||||
@Override
|
@Override
|
||||||
protected Task<Boolean> getUpdateTask() {
|
protected Task<Boolean> getUpdateTask() {
|
||||||
|
|
||||||
return new LoggedTask<Boolean>("Update Details", true) {
|
return new LoggedTask<Boolean>(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.name"), true) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean call() throws Exception {
|
protected Boolean call() throws Exception {
|
||||||
@ -301,13 +302,13 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
|||||||
});
|
});
|
||||||
|
|
||||||
updateProgress(-1, 1);
|
updateProgress(-1, 1);
|
||||||
updateMessage("preparing");
|
updateMessage(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.preparing"));
|
||||||
|
|
||||||
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.timeRange().get());
|
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.timeRange().get());
|
||||||
final long lowerBound = rangeInfo.getLowerBound();
|
final long lowerBound = rangeInfo.getLowerBound();
|
||||||
final long upperBound = rangeInfo.getUpperBound();
|
final long upperBound = rangeInfo.getUpperBound();
|
||||||
|
|
||||||
updateMessage("querying db");
|
updateMessage(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.queryDb"));
|
||||||
aggregatedEvents.setAll(filteredEvents.getAggregatedEvents());
|
aggregatedEvents.setAll(filteredEvents.getAggregatedEvents());
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
@ -330,7 +331,7 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
updateProgress(i++, size);
|
updateProgress(i++, size);
|
||||||
updateMessage("updating ui");
|
updateMessage(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.updateUI"));
|
||||||
final XYChart.Data<DateTime, AggregateEvent> xyData = new BarChart.Data<>(new DateTime(e.getSpan().getStartMillis()), e);
|
final XYChart.Data<DateTime, AggregateEvent> xyData = new BarChart.Data<>(new DateTime(e.getSpan().getStartMillis()), e);
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
@ -396,15 +397,15 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
|||||||
private Label truncateSliderLabel;
|
private Label truncateSliderLabel;
|
||||||
|
|
||||||
public DetailViewSettingsPane() {
|
public DetailViewSettingsPane() {
|
||||||
FXMLConstructor.construct(this, "DetailViewSettingsPane.fxml");
|
FXMLConstructor.construct(this, "DetailViewSettingsPane.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void initialize() {
|
void initialize() {
|
||||||
assert bandByTypeBox != null : "fx:id=\"bandByTypeBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
assert bandByTypeBox != null : "fx:id=\"bandByTypeBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'."; // NON-NLS
|
||||||
assert oneEventPerRowBox != null : "fx:id=\"oneEventPerRowBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
assert oneEventPerRowBox != null : "fx:id=\"oneEventPerRowBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'."; // NON-NLS
|
||||||
assert truncateAllBox != null : "fx:id=\"truncateAllBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
assert truncateAllBox != null : "fx:id=\"truncateAllBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'."; // NON-NLS
|
||||||
assert truncateWidthSlider != null : "fx:id=\"truncateAllSlider\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
assert truncateWidthSlider != null : "fx:id=\"truncateAllSlider\" was not injected: check your FXML file 'DetailViewSettings.fxml'."; // NON-NLS
|
||||||
bandByTypeBox.selectedProperty().bindBidirectional(chart.getBandByType());
|
bandByTypeBox.selectedProperty().bindBidirectional(chart.getBandByType());
|
||||||
truncateAllBox.selectedProperty().bindBidirectional(chart.getTruncateAll());
|
truncateAllBox.selectedProperty().bindBidirectional(chart.getTruncateAll());
|
||||||
oneEventPerRowBox.selectedProperty().bindBidirectional(chart.getOneEventPerRow());
|
oneEventPerRowBox.selectedProperty().bindBidirectional(chart.getOneEventPerRow());
|
||||||
|
@ -67,6 +67,7 @@ import org.controlsfx.control.action.ActionGroup;
|
|||||||
import org.controlsfx.control.action.ActionUtils;
|
import org.controlsfx.control.action.ActionUtils;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
import org.sleuthkit.autopsy.timeline.actions.Back;
|
import org.sleuthkit.autopsy.timeline.actions.Back;
|
||||||
import org.sleuthkit.autopsy.timeline.actions.Forward;
|
import org.sleuthkit.autopsy.timeline.actions.Forward;
|
||||||
@ -219,9 +220,10 @@ public final class EventDetailChart extends XYChart<DateTime, AggregateEvent> im
|
|||||||
}
|
}
|
||||||
if (clickEvent.getButton() == MouseButton.SECONDARY && clickEvent.isStillSincePress()) {
|
if (clickEvent.getButton() == MouseButton.SECONDARY && clickEvent.isStillSincePress()) {
|
||||||
|
|
||||||
chartContextMenu = ActionUtils.createContextMenu(Arrays.asList(new Action("Place Marker") {
|
chartContextMenu = ActionUtils.createContextMenu(Arrays.asList(new Action(
|
||||||
|
NbBundle.getMessage(this.getClass(), "EventDetailChart.chartContextMenu.placeMarker.name")) {
|
||||||
{
|
{
|
||||||
setGraphic(new ImageView(new Image("/org/sleuthkit/autopsy/timeline/images/marker.png", 16, 16, true, true, true)));
|
setGraphic(new ImageView(new Image("/org/sleuthkit/autopsy/timeline/images/marker.png", 16, 16, true, true, true))); // NON-NLS
|
||||||
setEventHandler((ActionEvent t) -> {
|
setEventHandler((ActionEvent t) -> {
|
||||||
if (guideLine == null) {
|
if (guideLine == null) {
|
||||||
guideLine = new GuideLine(0, 0, 0, getHeight(), dateAxis);
|
guideLine = new GuideLine(0, 0, 0, getHeight(), dateAxis);
|
||||||
@ -242,7 +244,9 @@ public final class EventDetailChart extends XYChart<DateTime, AggregateEvent> im
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}, new ActionGroup("Zoom History", new Back(controller),
|
}, new ActionGroup(
|
||||||
|
NbBundle.getMessage(this.getClass(), "EventDetailChart.contextMenu.zoomHistory.name"),
|
||||||
|
new Back(controller),
|
||||||
new Forward(controller))));
|
new Forward(controller))));
|
||||||
chartContextMenu.setAutoHide(true);
|
chartContextMenu.setAutoHide(true);
|
||||||
chartContextMenu.show(EventDetailChart.this, clickEvent.getScreenX(), clickEvent.getScreenY());
|
chartContextMenu.show(EventDetailChart.this, clickEvent.getScreenX(), clickEvent.getScreenY());
|
||||||
@ -392,7 +396,7 @@ public final class EventDetailChart extends XYChart<DateTime, AggregateEvent> im
|
|||||||
@Override
|
@Override
|
||||||
protected synchronized void dataItemChanged(Data<DateTime, AggregateEvent> data) {
|
protected synchronized void dataItemChanged(Data<DateTime, AggregateEvent> data) {
|
||||||
//TODO: can we use this to help with local detail level adjustment -jm
|
//TODO: can we use this to help with local detail level adjustment -jm
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); // NON-NLS //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -74,7 +74,7 @@ public class NavPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
public NavPanel() {
|
public NavPanel() {
|
||||||
|
|
||||||
FXMLConstructor.construct(this, "NavPanel.fxml");
|
FXMLConstructor.construct(this, "NavPanel.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChart(DetailViewPane detailViewPane) {
|
public void setChart(DetailViewPane detailViewPane) {
|
||||||
@ -121,7 +121,7 @@ public class NavPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void initialize() {
|
void initialize() {
|
||||||
assert sortByBox != null : "fx:id=\"sortByBox\" was not injected: check your FXML file 'NavPanel.fxml'.";
|
assert sortByBox != null : "fx:id=\"sortByBox\" was not injected: check your FXML file 'NavPanel.fxml'."; // NON-NLS
|
||||||
|
|
||||||
sortByBox.getItems().setAll(Arrays.asList(TreeComparator.Description, TreeComparator.Count));
|
sortByBox.getItems().setAll(Arrays.asList(TreeComparator.Description, TreeComparator.Count));
|
||||||
sortByBox.getSelectionModel().select(TreeComparator.Description);
|
sortByBox.getSelectionModel().select(TreeComparator.Description);
|
||||||
@ -141,7 +141,7 @@ public class NavPanel extends BorderPane implements TimeLineView {
|
|||||||
protected void updateItem(NavTreeNode item, boolean empty) {
|
protected void updateItem(NavTreeNode item, boolean empty) {
|
||||||
super.updateItem(item, empty);
|
super.updateItem(item, empty);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
final String text = item.getDescription() + " (" + item.getCount() + ")";
|
final String text = item.getDescription() + " (" + item.getCount() + ")"; // NON-NLS
|
||||||
setText(text);
|
setText(text);
|
||||||
setTooltip(new Tooltip(text));
|
setTooltip(new Tooltip(text));
|
||||||
Rectangle rect = new Rectangle(24, 24);
|
Rectangle rect = new Rectangle(24, 24);
|
||||||
|
@ -3,4 +3,5 @@ Timeline.ui.filtering.menuItem.none=none
|
|||||||
Timeline.ui.filtering.menuItem.only=only
|
Timeline.ui.filtering.menuItem.only=only
|
||||||
Timeline.ui.filtering.menuItem.others=others
|
Timeline.ui.filtering.menuItem.others=others
|
||||||
Timeline.ui.filtering.menuItem.select=select
|
Timeline.ui.filtering.menuItem.select=select
|
||||||
Timeline.ui.filtering.promptText=enter filter string
|
Timeline.ui.filtering.promptText=enter filter string
|
||||||
|
FilterSetPanel.eventTypeFilter.title=Event Type Filter
|
@ -75,14 +75,14 @@ public class FilterSetPanel extends BorderPane implements TimeLineView {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void initialize() {
|
void initialize() {
|
||||||
assert applyButton != null : "fx:id=\"applyButton\" was not injected: check your FXML file 'FilterSetPanel.fxml'.";
|
assert applyButton != null : "fx:id=\"applyButton\" was not injected: check your FXML file 'FilterSetPanel.fxml'."; // NON-NLS
|
||||||
|
|
||||||
applyButton.setOnAction(e -> {
|
applyButton.setOnAction(e -> {
|
||||||
controller.pushFilters(filterTreeTable.getRoot().getValue().copyOf());
|
controller.pushFilters(filterTreeTable.getRoot().getValue().copyOf());
|
||||||
});
|
});
|
||||||
|
|
||||||
//remove column headers via css.
|
//remove column headers via css.
|
||||||
filterTreeTable.getStylesheets().addAll(getClass().getResource("FilterTable.css").toExternalForm());
|
filterTreeTable.getStylesheets().addAll(getClass().getResource("FilterTable.css").toExternalForm()); // NON-NLS
|
||||||
|
|
||||||
//use row factory as hook to attach context menus to.
|
//use row factory as hook to attach context menus to.
|
||||||
filterTreeTable.setRowFactory((TreeTableView<Filter> param) -> {
|
filterTreeTable.setRowFactory((TreeTableView<Filter> param) -> {
|
||||||
@ -143,8 +143,8 @@ public class FilterSetPanel extends BorderPane implements TimeLineView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FilterSetPanel() {
|
public FilterSetPanel() {
|
||||||
FXMLConstructor.construct(this, "FilterSetPanel.fxml");
|
FXMLConstructor.construct(this, "FilterSetPanel.fxml"); // NON-NLS
|
||||||
expansionMap.put("Event Type Filter", Boolean.TRUE);
|
expansionMap.put(NbBundle.getMessage(this.getClass(), "FilterSetPanel.eventTypeFilter.title"), Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,27 +105,27 @@ public class RangeDivisionInfo {
|
|||||||
timeUnit = DateTimeFieldType.monthOfYear();
|
timeUnit = DateTimeFieldType.monthOfYear();
|
||||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
||||||
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
||||||
return new RangeDivisionInfo(timeRange, Months.monthsIn(timeRange).getMonths() + 1, TimeUnits.MONTHS, DateTimeFormat.forPattern("YYYY'-'MMMM"), lower, upper);
|
return new RangeDivisionInfo(timeRange, Months.monthsIn(timeRange).getMonths() + 1, TimeUnits.MONTHS, DateTimeFormat.forPattern("YYYY'-'MMMM"), lower, upper); // NON-NLS
|
||||||
} else if (Days.daysIn(timeRange).isGreaterThan(Days.THREE)) {
|
} else if (Days.daysIn(timeRange).isGreaterThan(Days.THREE)) {
|
||||||
timeUnit = DateTimeFieldType.dayOfMonth();
|
timeUnit = DateTimeFieldType.dayOfMonth();
|
||||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
||||||
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
||||||
return new RangeDivisionInfo(timeRange, Days.daysIn(timeRange).getDays() + 1, TimeUnits.DAYS, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd"), lower, upper);
|
return new RangeDivisionInfo(timeRange, Days.daysIn(timeRange).getDays() + 1, TimeUnits.DAYS, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd"), lower, upper); // NON-NLS
|
||||||
} else if (Hours.hoursIn(timeRange).isGreaterThan(Hours.THREE)) {
|
} else if (Hours.hoursIn(timeRange).isGreaterThan(Hours.THREE)) {
|
||||||
timeUnit = DateTimeFieldType.hourOfDay();
|
timeUnit = DateTimeFieldType.hourOfDay();
|
||||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
||||||
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
||||||
return new RangeDivisionInfo(timeRange, Hours.hoursIn(timeRange).getHours() + 1, TimeUnits.HOURS, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd HH"), lower, upper);
|
return new RangeDivisionInfo(timeRange, Hours.hoursIn(timeRange).getHours() + 1, TimeUnits.HOURS, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd HH"), lower, upper); // NON-NLS
|
||||||
} else if (Minutes.minutesIn(timeRange).isGreaterThan(Minutes.THREE)) {
|
} else if (Minutes.minutesIn(timeRange).isGreaterThan(Minutes.THREE)) {
|
||||||
timeUnit = DateTimeFieldType.minuteOfHour();
|
timeUnit = DateTimeFieldType.minuteOfHour();
|
||||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
||||||
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
||||||
return new RangeDivisionInfo(timeRange, Minutes.minutesIn(timeRange).getMinutes() + 1, TimeUnits.MINUTES, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd HH':'mm"), lower, upper);
|
return new RangeDivisionInfo(timeRange, Minutes.minutesIn(timeRange).getMinutes() + 1, TimeUnits.MINUTES, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd HH':'mm"), lower, upper); // NON-NLS
|
||||||
} else {
|
} else {
|
||||||
timeUnit = DateTimeFieldType.secondOfMinute();
|
timeUnit = DateTimeFieldType.secondOfMinute();
|
||||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
long lower = startWithZone.property(timeUnit).roundFloorCopy().getMillis();
|
||||||
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
long upper = endWithZone.property(timeUnit).roundCeilingCopy().getMillis();
|
||||||
return new RangeDivisionInfo(timeRange, Seconds.secondsIn(timeRange).getSeconds() + 1, TimeUnits.SECONDS, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd HH':'mm':'ss"), lower, upper);
|
return new RangeDivisionInfo(timeRange, Seconds.secondsIn(timeRange).getSeconds() + 1, TimeUnits.SECONDS, DateTimeFormat.forPattern("YYYY'-'MMMM'-'dd HH':'mm':'ss"), lower, upper); // NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
DescriptionLOD.short=Short
|
||||||
|
DescriptionLOD.medium=Medium
|
||||||
|
DescriptionLOD.full=Full
|
||||||
|
EventTypeZoomLevel.rootType=Root Type
|
||||||
|
EventTypeZoomLevel.baseType=Base Type
|
||||||
|
EventTypeZoomLevel.subType=Sub Type
|
||||||
|
ZoomParams.toString=zoom state\: {0}
|
||||||
|
ZoomSettingsPane.backButton.toolTip.text=Back\: {0}
|
||||||
|
ZoomSettingsPane.forwardButton.toolTip.text=Forward\: {0}
|
@ -18,12 +18,16 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.timeline.zooming;
|
package org.sleuthkit.autopsy.timeline.zooming;
|
||||||
|
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum DescriptionLOD {
|
public enum DescriptionLOD {
|
||||||
|
|
||||||
SHORT("Short"), MEDIUM("Medium"), FULL("Full");
|
SHORT(NbBundle.getMessage(DescriptionLOD.class, "DescriptionLOD.short")), MEDIUM(
|
||||||
|
NbBundle.getMessage(DescriptionLOD.class, "DescriptionLOD.medium")), FULL(
|
||||||
|
NbBundle.getMessage(DescriptionLOD.class, "DescriptionLOD.full"));
|
||||||
|
|
||||||
private final String displayName;
|
private final String displayName;
|
||||||
|
|
||||||
|
@ -18,13 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.timeline.zooming;
|
package org.sleuthkit.autopsy.timeline.zooming;
|
||||||
|
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public enum EventTypeZoomLevel {
|
public enum EventTypeZoomLevel {
|
||||||
|
|
||||||
ROOT_TYPE("Root Type"), BASE_TYPE("Base Type"), SUB_TYPE("Sub Type");
|
ROOT_TYPE(NbBundle.getMessage(EventTypeZoomLevel.class, "EventTypeZoomLevel.rootType")), BASE_TYPE(
|
||||||
|
NbBundle.getMessage(EventTypeZoomLevel.class, "EventTypeZoomLevel.baseType")), SUB_TYPE(
|
||||||
|
NbBundle.getMessage(EventTypeZoomLevel.class, "EventTypeZoomLevel.subType"));
|
||||||
|
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return displayName;
|
return displayName;
|
||||||
|
@ -23,6 +23,7 @@ import java.util.EnumSet;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.filters.Filter;
|
import org.sleuthkit.autopsy.timeline.filters.Filter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,7 +158,7 @@ public class ZoomParams {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "zoom state: " + getTimeRange().toString();
|
return NbBundle.getMessage(this.getClass(), "ZoomParams.toString", getTimeRange().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ import javafx.scene.control.Slider;
|
|||||||
import javafx.scene.control.TitledPane;
|
import javafx.scene.control.TitledPane;
|
||||||
import javafx.scene.control.Tooltip;
|
import javafx.scene.control.Tooltip;
|
||||||
import javafx.util.StringConverter;
|
import javafx.util.StringConverter;
|
||||||
|
import org.openide.util.NbBundle;
|
||||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||||
import org.sleuthkit.autopsy.timeline.TimeLineView;
|
import org.sleuthkit.autopsy.timeline.TimeLineView;
|
||||||
@ -87,7 +88,7 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ZoomSettingsPane() {
|
public ZoomSettingsPane() {
|
||||||
FXMLConstructor.construct(this, "ZoomSettingsPane.fxml");
|
FXMLConstructor.construct(this, "ZoomSettingsPane.fxml"); // NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,11 +99,15 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView {
|
|||||||
Back back = new Back(controller);
|
Back back = new Back(controller);
|
||||||
backButton.disableProperty().bind(back.disabledProperty());
|
backButton.disableProperty().bind(back.disabledProperty());
|
||||||
backButton.setOnAction(back);
|
backButton.setOnAction(back);
|
||||||
backButton.setTooltip(new Tooltip("Back: " + back.getAccelerator().getName()));
|
backButton.setTooltip(new Tooltip(
|
||||||
|
NbBundle.getMessage(this.getClass(), "ZoomSettingsPane.backButton.toolTip.text",
|
||||||
|
back.getAccelerator().getName())));
|
||||||
Forward forward = new Forward(controller);
|
Forward forward = new Forward(controller);
|
||||||
forwardButton.disableProperty().bind(forward.disabledProperty());
|
forwardButton.disableProperty().bind(forward.disabledProperty());
|
||||||
forwardButton.setOnAction(forward);
|
forwardButton.setOnAction(forward);
|
||||||
forwardButton.setTooltip(new Tooltip("Forward: " + forward.getAccelerator().getName()));
|
forwardButton.setTooltip(new Tooltip(
|
||||||
|
NbBundle.getMessage(this.getClass(), "ZoomSettingsPane.forwardButton.toolTip.text",
|
||||||
|
forward.getAccelerator().getName())));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user