mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07: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.name=Timeline
|
||||
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();
|
||||
|
||||
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
|
||||
return;
|
||||
}
|
||||
|
@ -133,11 +133,11 @@ public final class TimeLineTopComponent extends TopComponent implements Explorer
|
||||
|
||||
filterTab.setClosable(false);
|
||||
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.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);
|
||||
VBox.setVgrow(tabPane, Priority.ALWAYS);
|
||||
|
@ -24,6 +24,7 @@ import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyCodeCombination;
|
||||
import org.controlsfx.control.action.Action;
|
||||
import org.openide.util.NbBundle;
|
||||
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
|
||||
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;
|
||||
|
||||
public Back(TimeLineController controller) {
|
||||
super("Back");
|
||||
super(NbBundle.getMessage(Back.class, "Back.actions.name.text"));
|
||||
setGraphic(new ImageView(BACK_IMAGE));
|
||||
setAccelerator(new KeyCodeCombination(KeyCode.LEFT, KeyCodeCombination.ALT_DOWN));
|
||||
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.event.ActionEvent;
|
||||
import org.controlsfx.control.action.Action;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
||||
import org.sleuthkit.autopsy.timeline.filters.Filter;
|
||||
@ -35,7 +36,7 @@ public class DefaultFilters extends Action {
|
||||
private FilteredEventsModel eventsModel;
|
||||
|
||||
public DefaultFilters(final TimeLineController controller) {
|
||||
super("apply default filters");
|
||||
super(NbBundle.getMessage(DefaultFilters.class, "DefaultFilters.action.name.text"));
|
||||
this.controller = controller;
|
||||
eventsModel = controller.getEventsModel();
|
||||
disabledProperty().bind(new BooleanBinding() {
|
||||
|
@ -24,6 +24,7 @@ import javafx.scene.image.ImageView;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyCodeCombination;
|
||||
import org.controlsfx.control.action.Action;
|
||||
import org.openide.util.NbBundle;
|
||||
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
|
||||
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;
|
||||
|
||||
public Forward(TimeLineController controller) {
|
||||
super("Forward");
|
||||
super(NbBundle.getMessage(Forward.class, "Forward.action.name.text"));
|
||||
setGraphic(new ImageView(BACK_IMAGE));
|
||||
setAccelerator(new KeyCodeCombination(KeyCode.RIGHT, KeyCodeCombination.ALT_DOWN));
|
||||
this.controller = controller;
|
||||
|
@ -37,6 +37,7 @@ import javafx.stage.DirectoryChooser;
|
||||
import javafx.util.Pair;
|
||||
import javax.imageio.ImageIO;
|
||||
import org.controlsfx.control.action.Action;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
@ -58,7 +59,7 @@ public class SaveSnapshot extends Action {
|
||||
private final WritableImage snapshot;
|
||||
|
||||
public SaveSnapshot(TimeLineController controller, WritableImage snapshot) {
|
||||
super("save snapshot");
|
||||
super(NbBundle.getMessage(SaveSnapshot.class, "SaveSnapshot.action.name.text"));
|
||||
this.controller = controller;
|
||||
this.snapshot = snapshot;
|
||||
setEventHandler(new Consumer<ActionEvent>() {
|
||||
@ -67,8 +68,8 @@ public class SaveSnapshot extends Action {
|
||||
public void accept(ActionEvent t) {
|
||||
//choose location/name
|
||||
DirectoryChooser fileChooser = new DirectoryChooser();
|
||||
fileChooser.setTitle("Save snapshot to");
|
||||
fileChooser.setInitialDirectory(new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Reports"));
|
||||
fileChooser.setTitle(NbBundle.getMessage(this.getClass(), "SaveSnapshot.fileChoose.title.text"));
|
||||
fileChooser.setInitialDirectory(new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Reports")); // NON-NLS
|
||||
File outFolder = fileChooser.showDialog(null);
|
||||
if (outFolder == null) {
|
||||
return;
|
||||
@ -79,57 +80,57 @@ public class SaveSnapshot extends Action {
|
||||
//gather metadata
|
||||
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();
|
||||
reportMetaData.add(new Pair<>("Time Range", get.getTimeRange().toString()));
|
||||
reportMetaData.add(new Pair<>("Description Level of Detail", get.getDescrLOD().getDisplayName()));
|
||||
reportMetaData.add(new Pair<>("Event Type Zoom Level", get.getTypeZoomLevel().getDisplayName()));
|
||||
reportMetaData.add(new Pair<>("Filters", get.getFilter().getHTMLReportString()));
|
||||
reportMetaData.add(new Pair<>("Time Range", get.getTimeRange().toString())); // NON-NLS
|
||||
reportMetaData.add(new Pair<>("Description Level of Detail", get.getDescrLOD().getDisplayName())); // NON-NLS
|
||||
reportMetaData.add(new Pair<>("Event Type Zoom Level", get.getTypeZoomLevel().getDisplayName())); // NON-NLS
|
||||
reportMetaData.add(new Pair<>("Filters", get.getFilter().getHTMLReportString())); // NON-NLS
|
||||
|
||||
//save snapshot as png
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
|
||||
//build html string
|
||||
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("<div id=\"content\">\n<h1>").append(outFolder.getName()).append("</h1>\n");
|
||||
wrapper.append("<img src = \"").append(outFolder.getName()).append(REPORT_IMAGE_EXTENSION + "\" alt = \"snaphot\">");
|
||||
wrapper.append("<table>\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"); // NON-NLS
|
||||
wrapper.append("<img src = \"").append(outFolder.getName()).append(REPORT_IMAGE_EXTENSION + "\" alt = \"snaphot\">"); // NON-NLS
|
||||
wrapper.append("<table>\n"); // NON-NLS
|
||||
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("</div>\n</body>\n</html>");
|
||||
wrapper.append("</table>\n"); // NON-NLS
|
||||
wrapper.append("</div>\n</body>\n</html>"); // NON-NLS
|
||||
|
||||
//write html wrapper
|
||||
try (Writer htmlWriter = new FileWriter(new File(outFolder, name + HTML_EXT))) {
|
||||
htmlWriter.write(wrapper.toString());
|
||||
} 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;
|
||||
} 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;
|
||||
}
|
||||
|
||||
//copy css
|
||||
try (InputStream resource = this.getClass().getResourceAsStream("/org/sleuthkit/autopsy/timeline/index.css")) {
|
||||
Files.copy(resource, Paths.get(outFolder.getPath(), "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")); // NON-NLS
|
||||
} 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
|
||||
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) {
|
||||
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.event.ActionEvent;
|
||||
import org.controlsfx.control.action.Action;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
||||
|
||||
@ -34,7 +35,7 @@ public class ZoomOut extends Action {
|
||||
private final FilteredEventsModel eventsModel;
|
||||
|
||||
public ZoomOut(final TimeLineController controller) {
|
||||
super("apply default filters");
|
||||
super(NbBundle.getMessage(ZoomOut.class, "ZoomOut.action.name.text"));
|
||||
this.controller = controller;
|
||||
eventsModel = controller.getEventsModel();
|
||||
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 {
|
||||
|
||||
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//////////////////////
|
||||
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 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 {
|
||||
//make sure sqlite driver is loaded // possibly redundant
|
||||
try {
|
||||
Class.forName("org.sqlite.JDBC");
|
||||
Class.forName("org.sqlite.JDBC"); // NON-NLS
|
||||
} 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) {
|
||||
try {
|
||||
EventDB eventDB = new EventDB(dbPath + File.separator + "events.db");
|
||||
EventDB eventDB = new EventDB(dbPath + File.separator + "events.db"); // NON-NLS
|
||||
|
||||
return eventDB;
|
||||
} 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;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
@ -156,14 +156,14 @@ public class EventDB {
|
||||
return filter.getSubFilters().stream()
|
||||
.filter(Filter::isActive)
|
||||
.map(EventDB::getSQLWhere)
|
||||
.collect(Collectors.joining(" and ", "( ", ")"));
|
||||
.collect(Collectors.joining(" and ", "( ", ")")); // NON-NLS
|
||||
}
|
||||
|
||||
static String getSQLWhere(UnionFilter filter) {
|
||||
return filter.getSubFilters().stream()
|
||||
.filter(Filter::isActive)
|
||||
.map(EventDB::getSQLWhere)
|
||||
.collect(Collectors.joining(" or ", "( ", ")"));
|
||||
.collect(Collectors.joining(" or ", "( ", ")")); // NON-NLS
|
||||
}
|
||||
|
||||
private static String getSQLWhere(Filter filter) {
|
||||
@ -185,14 +185,14 @@ public class EventDB {
|
||||
} else {
|
||||
return "1";
|
||||
}
|
||||
result = StringUtils.deleteWhitespace(result).equals("(1and1and1)") ? "1" : result;
|
||||
result = StringUtils.deleteWhitespace(result).equals("(1and1and1)") ? "1" : result; // NON-NLS
|
||||
//System.out.println(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static String getSQLWhere(HideKnownFilter filter) {
|
||||
return (filter.isActive())
|
||||
? "(known_state is not '" + TskData.FileKnown.KNOWN.getFileKnownValue() + "')"
|
||||
? "(known_state is not '" + TskData.FileKnown.KNOWN.getFileKnownValue() + "')" // NON-NLS
|
||||
: "1";
|
||||
}
|
||||
|
||||
@ -202,9 +202,9 @@ public class EventDB {
|
||||
return "1";
|
||||
}
|
||||
String strip = StringUtils.strip(filter.getText());
|
||||
return "((" + MED_DESCRIPTION_COLUMN + " like '%" + strip + "%') or ("
|
||||
+ FULL_DESCRIPTION_COLUMN + " like '%" + strip + "%') or ("
|
||||
+ SHORT_DESCRIPTION_COLUMN + " like '%" + strip + "%'))";
|
||||
return "((" + MED_DESCRIPTION_COLUMN + " like '%" + strip + "%') or (" // NON-NLS
|
||||
+ FULL_DESCRIPTION_COLUMN + " like '%" + strip + "%') or (" // NON-NLS
|
||||
+ SHORT_DESCRIPTION_COLUMN + " like '%" + strip + "%'))"; // NON-NLS
|
||||
} else {
|
||||
return "1";
|
||||
}
|
||||
@ -228,7 +228,7 @@ public class EventDB {
|
||||
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;
|
||||
@ -274,13 +274,13 @@ public class EventDB {
|
||||
try (Statement stmt = con.createStatement();
|
||||
//You can't inject multiple values into one ? paramater in prepared statement,
|
||||
//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()) {
|
||||
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) {
|
||||
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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
@ -297,7 +297,7 @@ public class EventDB {
|
||||
closeStatements();
|
||||
con.close();
|
||||
} 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;
|
||||
@ -305,7 +305,7 @@ public class EventDB {
|
||||
|
||||
void commitTransaction(EventTransaction tr, Boolean notify) {
|
||||
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);
|
||||
}
|
||||
@ -314,9 +314,9 @@ public class EventDB {
|
||||
int result = -1;
|
||||
dbReadLock();
|
||||
//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()) {
|
||||
result = rs.getInt("count");
|
||||
result = rs.getInt("count"); // NON-NLS
|
||||
break;
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
@ -374,9 +374,9 @@ public class EventDB {
|
||||
//TODO: use prepared statement - jm
|
||||
dbWriteLock();
|
||||
try (Statement createStatement = con.createStatement()) {
|
||||
createStatement.execute("drop table if exists events");
|
||||
createStatement.execute("drop table if exists events"); // NON-NLS
|
||||
} 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 {
|
||||
dbWriteUnlock();
|
||||
}
|
||||
@ -393,11 +393,11 @@ public class EventDB {
|
||||
|
||||
dbReadLock();
|
||||
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()) {
|
||||
|
||||
long start2 = rs.getLong("start");
|
||||
long end2 = rs.getLong("end");
|
||||
long start2 = rs.getLong("start"); // NON-NLS
|
||||
long end2 = rs.getLong("end"); // NON-NLS
|
||||
|
||||
if (end2 == 0) {
|
||||
end2 = getMaxTime();
|
||||
@ -406,7 +406,7 @@ public class EventDB {
|
||||
return new Interval(start2 * 1000, (end2 + 1) * 1000, TimeLineController.getJodaTimeZone());
|
||||
}
|
||||
} 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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
@ -426,7 +426,7 @@ public class EventDB {
|
||||
}
|
||||
}
|
||||
} 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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
@ -444,7 +444,7 @@ public class EventDB {
|
||||
Set<Long> resultIDs = new HashSet<>();
|
||||
|
||||
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);
|
||||
try (Statement stmt = con.createStatement();
|
||||
ResultSet rs = stmt.executeQuery(query)) {
|
||||
@ -454,7 +454,7 @@ public class EventDB {
|
||||
}
|
||||
|
||||
} 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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
@ -475,10 +475,10 @@ public class EventDB {
|
||||
dbReadLock();
|
||||
try (ResultSet rs = getMaxTimeStmt.executeQuery()) {
|
||||
while (rs.next()) {
|
||||
return rs.getLong("max");
|
||||
return rs.getLong("max"); // NON-NLS
|
||||
}
|
||||
} 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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
@ -490,10 +490,10 @@ public class EventDB {
|
||||
dbReadLock();
|
||||
try (ResultSet rs = getMinTimeStmt.executeQuery()) {
|
||||
while (rs.next()) {
|
||||
return rs.getLong("min");
|
||||
return rs.getLong("min"); // NON-NLS
|
||||
}
|
||||
} 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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
@ -519,49 +519,49 @@ public class EventDB {
|
||||
configureDB();
|
||||
|
||||
} catch (SQLException ex) {
|
||||
LOGGER.log(Level.SEVERE, "problem accessing database", ex);
|
||||
LOGGER.log(Level.SEVERE, "problem accessing database", ex); // NON-NLS
|
||||
}
|
||||
|
||||
dbWriteLock();
|
||||
try {
|
||||
try (Statement stmt = con.createStatement()) {
|
||||
String sql = "CREATE TABLE if not exists db_info "
|
||||
+ " ( key TEXT, "
|
||||
+ " value INTEGER, "
|
||||
+ "PRIMARY KEY (key))";
|
||||
String sql = "CREATE TABLE if not exists db_info " // NON-NLS
|
||||
+ " ( key TEXT, " // NON-NLS
|
||||
+ " value INTEGER, " // NON-NLS
|
||||
+ "PRIMARY KEY (key))"; // NON-NLS
|
||||
stmt.execute(sql);
|
||||
} 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()) {
|
||||
String sql = "CREATE TABLE if not exists events "
|
||||
+ " (event_id INTEGER PRIMARY KEY, "
|
||||
+ " file_id INTEGER, "
|
||||
+ " artifact_id INTEGER, "
|
||||
+ " time INTEGER, "
|
||||
+ " sub_type INTEGER, "
|
||||
+ " base_type INTEGER, "
|
||||
+ " full_description TEXT, "
|
||||
+ " med_description TEXT, "
|
||||
+ " short_description TEXT, "
|
||||
+ " known_state INTEGER)";
|
||||
String sql = "CREATE TABLE if not exists events " // NON-NLS
|
||||
+ " (event_id INTEGER PRIMARY KEY, " // NON-NLS
|
||||
+ " file_id INTEGER, " // NON-NLS
|
||||
+ " artifact_id INTEGER, " // NON-NLS
|
||||
+ " time INTEGER, " // NON-NLS
|
||||
+ " sub_type INTEGER, " // NON-NLS
|
||||
+ " base_type INTEGER, " // NON-NLS
|
||||
+ " full_description TEXT, " // NON-NLS
|
||||
+ " med_description TEXT, " // NON-NLS
|
||||
+ " short_description TEXT, " // NON-NLS
|
||||
+ " known_state INTEGER)"; // NON-NLS
|
||||
stmt.execute(sql);
|
||||
} 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()) {
|
||||
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);
|
||||
} 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()) {
|
||||
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);
|
||||
} 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
|
||||
@ -572,38 +572,38 @@ public class EventDB {
|
||||
// LOGGER.log(Level.SEVERE, "problem creating time_idx", ex);
|
||||
// }
|
||||
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);
|
||||
} 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()) {
|
||||
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);
|
||||
} 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()) {
|
||||
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);
|
||||
} catch (SQLException ex) {
|
||||
LOGGER.log(Level.SEVERE, "problem creating known_idx", ex);
|
||||
LOGGER.log(Level.SEVERE, "problem creating known_idx", ex); // NON-NLS
|
||||
}
|
||||
|
||||
try {
|
||||
insertRowStmt = prepareStatement(
|
||||
"INSERT INTO events (file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state) "
|
||||
+ "VALUES (?,?,?,?,?,?,?,?,?)");
|
||||
"INSERT INTO events (file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state) " // NON-NLS
|
||||
+ "VALUES (?,?,?,?,?,?,?,?,?)"); // NON-NLS
|
||||
|
||||
getMaxTimeStmt = prepareStatement("select Max(time) as max from events");
|
||||
getMinTimeStmt = prepareStatement("select Min(time) as min from events");
|
||||
getEventByIDStmt = prepareStatement("select * from events where event_id = ?");
|
||||
recordDBInfoStmt = prepareStatement("insert or replace into db_info (key, value) values (?, ?)");
|
||||
getDBInfoStmt = prepareStatement("select value from db_info where key = ?");
|
||||
getMaxTimeStmt = prepareStatement("select Max(time) as max from events"); // NON-NLS
|
||||
getMinTimeStmt = prepareStatement("select Min(time) as min from events"); // NON-NLS
|
||||
getEventByIDStmt = prepareStatement("select * from events where event_id = ?"); // NON-NLS
|
||||
recordDBInfoStmt = prepareStatement("insert or replace into db_info (key, value) values (?, ?)"); // NON-NLS
|
||||
getDBInfoStmt = prepareStatement("select value from db_info where key = ?"); // NON-NLS
|
||||
} catch (SQLException sQLException) {
|
||||
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException);
|
||||
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException); // NON-NLS
|
||||
}
|
||||
|
||||
} 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) {
|
||||
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 superTypeNum;
|
||||
@ -667,7 +667,7 @@ public class EventDB {
|
||||
insertRowStmt.executeUpdate();
|
||||
|
||||
} catch (SQLException ex) {
|
||||
LOGGER.log(Level.SEVERE, "failed to insert event", ex);
|
||||
LOGGER.log(Level.SEVERE, "failed to insert event", ex); // NON-NLS
|
||||
} finally {
|
||||
dbWriteUnlock();
|
||||
}
|
||||
@ -683,10 +683,10 @@ public class EventDB {
|
||||
void openDBCon() {
|
||||
try {
|
||||
if (con == null || con.isClosed()) {
|
||||
con = DriverManager.getConnection("jdbc:sqlite:" + dbPath);
|
||||
con = DriverManager.getConnection("jdbc:sqlite:" + dbPath); // NON-NLS
|
||||
}
|
||||
} 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() {
|
||||
//TODO: use prepared statement - jm
|
||||
try (Statement createStatement = con.createStatement();
|
||||
ResultSet executeQuery = createStatement.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='events'")) {
|
||||
if (executeQuery.getString("name").equals("events") == false) {
|
||||
ResultSet executeQuery = createStatement.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='events'")) { // NON-NLS
|
||||
if (executeQuery.getString("name").equals("events") == false) { // NON-NLS
|
||||
return false;
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
@ -730,26 +730,26 @@ public class EventDB {
|
||||
//this should match Sleuthkit db setupt
|
||||
try (Statement statement = con.createStatement()) {
|
||||
//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
|
||||
//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
|
||||
statement.execute("PRAGMA temp_store = MEMORY");
|
||||
statement.execute("PRAGMA temp_store = MEMORY"); // NON-NLS
|
||||
//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...
|
||||
statement.execute("PRAGMA auto_vacuum = 0");
|
||||
statement.execute("PRAGMA auto_vacuum = 0"); // NON-NLS
|
||||
//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 {
|
||||
dbWriteUnlock();
|
||||
}
|
||||
|
||||
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()
|
||||
? "native" : "pure-java"));
|
||||
? "native" : "pure-java")); // NON-NLS
|
||||
} catch (Exception exception) {
|
||||
}
|
||||
}
|
||||
@ -795,9 +795,9 @@ public class EventDB {
|
||||
final boolean useSubTypes = (zoomLevel == EventTypeZoomLevel.SUB_TYPE);
|
||||
|
||||
//get some info about the range of dates requested
|
||||
final String queryString = "select count(*), " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN)
|
||||
+ " from events where time >= " + startTime + " and time < " + endTime + " and " + getSQLWhere(filter)
|
||||
+ " GROUP BY " + (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) // NON-NLS
|
||||
+ " GROUP BY " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN); // NON-NLS
|
||||
|
||||
ResultSet rs = null;
|
||||
dbReadLock();
|
||||
@ -814,11 +814,11 @@ public class EventDB {
|
||||
? RootEventType.allTypes.get(rs.getInt(SUB_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) {
|
||||
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 {
|
||||
try {
|
||||
rs.close();
|
||||
@ -876,10 +876,10 @@ public class EventDB {
|
||||
|
||||
//get all agregate events in this time unit
|
||||
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)
|
||||
+ " from events where time >= " + start + " and time < " + end + " and " + getSQLWhere(filter)
|
||||
+ " group by interval, " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN) + " , " + descriptionColumn
|
||||
+ " order by Min(time)";
|
||||
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) // NON-NLS
|
||||
+ " group by interval, " + (useSubTypes ? SUB_TYPE_COLUMN : BASE_TYPE_COLUMN) + " , " + descriptionColumn // NON-NLS
|
||||
+ " order by Min(time)"; // NON-NLS
|
||||
//System.out.println(query);
|
||||
ResultSet rs = null;
|
||||
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)];
|
||||
|
||||
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,
|
||||
Arrays.asList(rs.getString("event_ids").split(",")),
|
||||
Arrays.asList(rs.getString("event_ids").split(",")), // NON-NLS
|
||||
rs.getString(descriptionColumn), lod);
|
||||
|
||||
//put events in map from type/descrition -> event
|
||||
@ -967,16 +967,16 @@ public class EventDB {
|
||||
try (ResultSet rs = getDBInfoStmt.executeQuery()) {
|
||||
long result = defaultValue;
|
||||
while (rs.next()) {
|
||||
result = rs.getLong("value");
|
||||
result = rs.getLong("value"); // NON-NLS
|
||||
}
|
||||
return result;
|
||||
} 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 {
|
||||
dbReadUnlock();
|
||||
}
|
||||
} 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;
|
||||
@ -997,19 +997,19 @@ public class EventDB {
|
||||
private String getStrfTimeFormat(TimeUnits info) {
|
||||
switch (info) {
|
||||
case DAYS:
|
||||
return "%Y-%m-%dT00:00:00";
|
||||
return "%Y-%m-%dT00:00:00"; // NON-NLS
|
||||
case HOURS:
|
||||
return "%Y-%m-%dT%H:00:00";
|
||||
return "%Y-%m-%dT%H:00:00"; // NON-NLS
|
||||
case MINUTES:
|
||||
return "%Y-%m-%dT%H:%M:00";
|
||||
return "%Y-%m-%dT%H:%M:00"; // NON-NLS
|
||||
case MONTHS:
|
||||
return "%Y-%m-01T00:00:00";
|
||||
return "%Y-%m-01T00:00:00"; // NON-NLS
|
||||
case SECONDS:
|
||||
return "%Y-%m-%dT%H:%M:%S";
|
||||
return "%Y-%m-%dT%H:%M:%S"; // NON-NLS
|
||||
case YEARS:
|
||||
return "%Y-01-01T00:00:00";
|
||||
return "%Y-01-01T00:00:00"; // NON-NLS
|
||||
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.executeUpdate();
|
||||
} 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 {
|
||||
dbWriteUnlock();
|
||||
}
|
||||
@ -1056,7 +1056,7 @@ public class EventDB {
|
||||
con.setAutoCommit(false);
|
||||
|
||||
} 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();
|
||||
|
||||
} 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 {
|
||||
close();
|
||||
}
|
||||
@ -1085,7 +1085,7 @@ public class EventDB {
|
||||
// fireNewEvents(newEvents);
|
||||
}
|
||||
} catch (SQLException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Error commiting events.db.", ex);
|
||||
LOGGER.log(Level.SEVERE, "Error commiting events.db.", ex); // NON-NLS
|
||||
rollback();
|
||||
}
|
||||
}
|
||||
@ -1096,7 +1096,7 @@ public class EventDB {
|
||||
try {
|
||||
con.setAutoCommit(true);
|
||||
} 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 {
|
||||
closed = true;
|
||||
|
||||
@ -1112,10 +1112,10 @@ public class EventDB {
|
||||
|
||||
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() {
|
||||
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 org.apache.commons.lang3.StringUtils;
|
||||
import org.joda.time.Interval;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.timeline.ProgressWindow;
|
||||
@ -126,13 +127,13 @@ public class EventsRepository {
|
||||
|
||||
/** @return min time (in seconds from unix epoch) */
|
||||
public Long getMaxTime() {
|
||||
return maxCache.getUnchecked("max");
|
||||
return maxCache.getUnchecked("max"); // NON-NLS
|
||||
// return eventDB.getMaxTime();
|
||||
}
|
||||
|
||||
/** @return max tie (in seconds from unix epoch) */
|
||||
public Long getMinTime() {
|
||||
return minCache.getUnchecked("min");
|
||||
return minCache.getUnchecked("min"); // NON-NLS
|
||||
// return eventDB.getMinTime();
|
||||
}
|
||||
|
||||
@ -218,7 +219,8 @@ public class EventsRepository {
|
||||
|
||||
@Override
|
||||
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
|
||||
//TODO: can we do more incremental updates? -jm
|
||||
eventDB.dropTable();
|
||||
@ -229,7 +231,8 @@ public class EventsRepository {
|
||||
List<Long> files = skCase.findAllFileIdsWhere(FILES_AND_DIRS_WHERE_CLAUSE);
|
||||
|
||||
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
|
||||
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);
|
||||
}
|
||||
|
||||
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) {
|
||||
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++;
|
||||
@ -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()) {
|
||||
eventDB.rollBackTransaction(trans);
|
||||
} else {
|
||||
@ -315,13 +321,15 @@ public class EventsRepository {
|
||||
get();
|
||||
|
||||
} 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) {
|
||||
LOGGER.log(Level.WARNING, "Exception while populating database.", ex);
|
||||
JOptionPane.showMessageDialog(null, "There was a problem populating the timeline. Not all events may be present or accurate. See the log for details.");
|
||||
LOGGER.log(Level.WARNING, "Exception while populating database.", ex); // NON-NLS
|
||||
JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(),
|
||||
"EventsRepository.msgdlg.problem.text"));
|
||||
} catch (Exception ex) {
|
||||
LOGGER.log(Level.WARNING, "Unexpected exception while populating database.", ex);
|
||||
JOptionPane.showMessageDialog(null, "There was a problem populating the timeline. Not all events may be present or accurate. See the log for details.");
|
||||
LOGGER.log(Level.WARNING, "Unexpected exception while populating database.", ex); // NON-NLS
|
||||
JOptionPane.showMessageDialog(null, NbBundle.getMessage(this.getClass(),
|
||||
"EventsRepository.msgdlg.problem.text"));
|
||||
}
|
||||
r.run(); //execute post db population operation
|
||||
}
|
||||
@ -339,7 +347,10 @@ public class EventsRepository {
|
||||
final ArrayList<BlackboardArtifact> blackboardArtifacts = skCase.getBlackboardArtifacts(type.getArtifactType());
|
||||
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;
|
||||
for (final BlackboardArtifact bbart : blackboardArtifacts) {
|
||||
@ -351,10 +362,13 @@ public class EventsRepository {
|
||||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
//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.List;
|
||||
import javafx.scene.image.Image;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
|
||||
/**
|
||||
@ -28,7 +29,7 @@ import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
*/
|
||||
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
|
||||
public List<? extends EventType> getSubTypes() {
|
||||
@ -40,7 +41,7 @@ public enum BaseTypes implements EventType {
|
||||
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
|
||||
public List<? extends EventType> getSubTypes() {
|
||||
@ -52,7 +53,7 @@ public enum BaseTypes implements EventType {
|
||||
return WebTypes.valueOf(string);
|
||||
}
|
||||
},
|
||||
MISC_TYPES("Misc Types", "block.png") {
|
||||
MISC_TYPES(NbBundle.getMessage(BaseTypes.class, "BaseTypes.miscTypes.name"), "block.png") { // NON-NLS
|
||||
|
||||
@Override
|
||||
public List<? extends EventType> getSubTypes() {
|
||||
@ -93,7 +94,7 @@ public enum BaseTypes implements EventType {
|
||||
private BaseTypes(String displayName, String iconBase) {
|
||||
this.displayName = displayName;
|
||||
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
|
||||
|
@ -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.List;
|
||||
import javafx.scene.image.Image;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
|
||||
/**
|
||||
@ -28,10 +29,10 @@ import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
*/
|
||||
public enum FileSystemTypes implements EventType {
|
||||
|
||||
FILE_MODIFIED("File Modified", "blue-document-attribute-m.png"),
|
||||
FILE_ACCESSED("File Accessed", "blue-document-attribute-a.png"),
|
||||
FILE_CREATED("File Created", "blue-document-attribute-b.png"),
|
||||
FILE_CHANGED("File Changed", "blue-document-attribute-c.png");
|
||||
FILE_MODIFIED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileModified.name"), "blue-document-attribute-m.png"), // NON-NLS
|
||||
FILE_ACCESSED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileAccessed.name"), "blue-document-attribute-a.png"), // NON-NLS
|
||||
FILE_CREATED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileCreated.name"), "blue-document-attribute-b.png"), // NON-NLS
|
||||
FILE_CHANGED(NbBundle.getMessage(FileSystemTypes.class, "FileSystemTypes.fileChanged.name"), "blue-document-attribute-c.png"); // NON-NLS
|
||||
|
||||
private final String iconBase;
|
||||
|
||||
@ -72,7 +73,7 @@ public enum FileSystemTypes implements EventType {
|
||||
private FileSystemTypes(String displayName, String iconBase) {
|
||||
this.displayName = displayName;
|
||||
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
|
||||
|
@ -26,6 +26,7 @@ import java.util.function.BiFunction;
|
||||
import javafx.scene.image.Image;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
@ -36,7 +37,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
*/
|
||||
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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE),
|
||||
@ -50,7 +51,7 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
||||
return StringUtils.join(asList, " ");
|
||||
},
|
||||
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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
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 latEnd = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
||||
(artf, attrMap) -> {
|
||||
final BlackboardAttribute longitude = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE);
|
||||
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) -> ""),
|
||||
CALL_LOG("Calls", "calllog.png",
|
||||
CALL_LOG(NbBundle.getMessage(MiscTypes.class, "MiscTypes.Calls.name"), "calllog.png", // NON-NLS
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER),
|
||||
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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_SENT,
|
||||
(artifact, attrMap) -> {
|
||||
final BlackboardAttribute emailFrom = attrMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_FROM);
|
||||
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_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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
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);
|
||||
}
|
||||
},
|
||||
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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME),
|
||||
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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
|
||||
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();
|
||||
} catch (TskCoreException 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,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DEVICE_MAKE),
|
||||
@ -150,12 +151,12 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
||||
return "";
|
||||
} else {
|
||||
switch (dir.getDisplayString()) {
|
||||
case "Incoming":
|
||||
return "from";
|
||||
case "Outgoing":
|
||||
return "to";
|
||||
case "Incoming": // NON-NLS
|
||||
return "from"; // NON-NLS
|
||||
case "Outgoing": // NON-NLS
|
||||
return "to"; // NON-NLS
|
||||
default:
|
||||
return "";
|
||||
return ""; // NON-NLS
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -233,7 +234,7 @@ public enum MiscTypes implements EventType, ArtifactEventType {
|
||||
this.shortExtractor = shortExtractor;
|
||||
this.medExtractor = medExtractor;
|
||||
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
|
||||
|
@ -23,6 +23,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.paint.Color;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
|
||||
/** A singleton {@link } EventType to represent the root type of all event
|
||||
@ -81,12 +82,12 @@ public class RootEventType implements EventType {
|
||||
|
||||
@Override
|
||||
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
|
||||
public String getDisplayName() {
|
||||
return "Event Types";
|
||||
return NbBundle.getMessage(this.getClass(), "RootEventType.eventTypes.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -24,6 +24,7 @@ import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
import javafx.scene.image.Image;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.zooming.EventTypeZoomLevel;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
@ -33,8 +34,8 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
*/
|
||||
public enum WebTypes implements EventType, ArtifactEventType {
|
||||
|
||||
WEB_DOWNLOADS("Web Downloads",
|
||||
"downloads.png",
|
||||
WEB_DOWNLOADS(NbBundle.getMessage(WebTypes.class, "WebTypes.webDownloads.name"),
|
||||
"downloads.png", // NON-NLS
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||
@ -52,40 +53,40 @@ public enum WebTypes implements EventType, ArtifactEventType {
|
||||
String fileName = StringUtils.substringAfterLast(path, "/");
|
||||
String url = getFullExtractor().apply(artf, attrMap);
|
||||
|
||||
//TODO: review non default descritpion construction
|
||||
String shortDescription = fileName + " from " + domain;
|
||||
String medDescription = fileName + " from " + url;
|
||||
String fullDescription = path + " from " + url;
|
||||
//TODO: review non default description construction
|
||||
String shortDescription = fileName + " from " + domain; // NON-NLS
|
||||
String medDescription = fileName + " from " + url; // NON-NLS
|
||||
String fullDescription = path + " from " + url; // NON-NLS
|
||||
return new AttributeEventDescription(time, shortDescription, medDescription, fullDescription);
|
||||
}
|
||||
},
|
||||
//TODO: review description seperators
|
||||
WEB_COOKIE("Web Cookies",
|
||||
"cookies.png",
|
||||
//TODO: review description separators
|
||||
WEB_COOKIE(NbBundle.getMessage(WebTypes.class, "WebTypes.webCookies.name"),
|
||||
"cookies.png", // NON-NLS
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_VALUE)),
|
||||
//TODO: review description seperators
|
||||
WEB_BOOKMARK("Web Bookmarks",
|
||||
"bookmarks.png",
|
||||
//TODO: review description separators
|
||||
WEB_BOOKMARK(NbBundle.getMessage(WebTypes.class, "WebTypes.webBookmarks.name"),
|
||||
"bookmarks.png", // NON-NLS
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE)),
|
||||
//TODO: review description seperators
|
||||
WEB_HISTORY("Web History",
|
||||
"history.png",
|
||||
//TODO: review description separators
|
||||
WEB_HISTORY(NbBundle.getMessage(WebTypes.class, "WebTypes.webHistory.name"),
|
||||
"history.png", // NON-NLS
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL),
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE)),
|
||||
//TODO: review description seperators
|
||||
WEB_SEARCH("Web Searches",
|
||||
"searchquery.png",
|
||||
//TODO: review description separators
|
||||
WEB_SEARCH(NbBundle.getMessage(WebTypes.class, "WebTypes.webSearch.name"),
|
||||
"searchquery.png", // NON-NLS
|
||||
BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY,
|
||||
BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
|
||||
new AttributeExtractor(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT),
|
||||
@ -160,7 +161,7 @@ public enum WebTypes implements EventType, ArtifactEventType {
|
||||
this.shortExtractor = shortExtractor;
|
||||
this.medExtractor = medExtractor;
|
||||
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
|
||||
|
@ -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) {
|
||||
super(Children.LEAF, Lookups.fixed(eventById, file, artifact));
|
||||
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) {
|
||||
super(Children.LEAF, Lookups.fixed(eventById, file));
|
||||
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
|
||||
@ -67,7 +67,7 @@ class EventNode extends DisplayableItemNode {
|
||||
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) -> {
|
||||
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(new NodeProperty<>("description", "Description", "description", e.getFullDescription()));
|
||||
properties.put(new NodeProperty<>("eventBaseType", "Base Type", "base type", e.getType().getSuperType().getDisplayName()));
|
||||
properties.put(new NodeProperty<>("eventSubType", "Sub Type", "sub type", e.getType().getDisplayName()));
|
||||
properties.put(new NodeProperty<>("Known", "Known", "known", e.getKnown().toString()));
|
||||
properties.put(new NodeProperty<>("description", "Description", "description", e.getFullDescription())); // NON-NLS
|
||||
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())); // NON-NLS
|
||||
properties.put(new NodeProperty<>("Known", "Known", "known", e.getKnown().toString())); // NON-NLS
|
||||
|
||||
return s;
|
||||
}
|
||||
@ -113,7 +113,7 @@ class EventNode extends DisplayableItemNode {
|
||||
|
||||
@Override
|
||||
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> {
|
||||
@ -140,7 +140,7 @@ class EventNode extends DisplayableItemNode {
|
||||
public void setValue(String t) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
|
||||
String oldValue = getValue();
|
||||
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.Children;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel;
|
||||
import org.sleuthkit.autopsy.timeline.events.TimeLineEvent;
|
||||
@ -110,7 +111,7 @@ public class EventRootNode extends DisplayableItemNode {
|
||||
}
|
||||
|
||||
} 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;
|
||||
}
|
||||
} else {
|
||||
@ -123,8 +124,12 @@ public class EventRootNode extends DisplayableItemNode {
|
||||
|
||||
public TooManyNode(int size) {
|
||||
super(Children.LEAF);
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/info-icon-16.png");
|
||||
setDisplayName("Too many events to display. Maximum = " + MAX_EVENTS_TO_DISPLAY + ". But there are " + size + " to display.");
|
||||
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/info-icon-16.png"); // NON-NLS
|
||||
setDisplayName(
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"EventRoodNode.tooManyNode.displayName",
|
||||
MAX_EVENTS_TO_DISPLAY,
|
||||
size));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public abstract class AbstractFilter implements Filter {
|
||||
|
||||
@Override
|
||||
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;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
* Filter to hide known files
|
||||
*/
|
||||
@ -25,7 +27,7 @@ public class HideKnownFilter extends AbstractFilter {
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "Hide Known Files";
|
||||
return NbBundle.getMessage(this.getClass(), "hideKnownFilter.displayName.text");
|
||||
}
|
||||
|
||||
public HideKnownFilter() {
|
||||
@ -43,7 +45,7 @@ public class HideKnownFilter extends AbstractFilter {
|
||||
|
||||
@Override
|
||||
public String getHTMLReportString() {
|
||||
return "hide known" + getStringCheckBox();
|
||||
return "hide known" + getStringCheckBox();// NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,6 +7,7 @@ package org.sleuthkit.autopsy.timeline.filters;
|
||||
import java.util.stream.Collectors;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/** Intersection(And) filter */
|
||||
public class IntersectionFilter extends CompoundFilter {
|
||||
@ -32,14 +33,16 @@ public class IntersectionFilter extends CompoundFilter {
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "Intersection" + getSubFilters().stream()
|
||||
.map(Filter::getDisplayName)
|
||||
.collect(Collectors.joining(",", "[", "]"));
|
||||
return NbBundle.getMessage(this.getClass(),
|
||||
"IntersectionFilter.displayName.text",
|
||||
getSubFilters().stream()
|
||||
.map(Filter::getDisplayName)
|
||||
.collect(Collectors.joining(",", "[", "]")));
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@ -22,6 +22,7 @@ import java.util.Objects;
|
||||
import javafx.beans.property.Property;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/** Filter for text matching */
|
||||
public class TextFilter extends AbstractFilter {
|
||||
@ -41,7 +42,7 @@ public class TextFilter extends AbstractFilter {
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "Text Filter";
|
||||
return NbBundle.getMessage(this.getClass(), "TextFilter.displayName.text");
|
||||
}
|
||||
|
||||
synchronized public String getText() {
|
||||
@ -62,7 +63,7 @@ public class TextFilter extends AbstractFilter {
|
||||
|
||||
@Override
|
||||
public String getHTMLReportString() {
|
||||
return "text like \"" + StringUtils.defaultIfBlank(text.getValue(), "") + "\"" + getStringCheckBox();
|
||||
return "text like \"" + StringUtils.defaultIfBlank(text.getValue(), "") + "\"" + getStringCheckBox(); // NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,6 +23,7 @@ import java.util.stream.Collectors;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.image.Image;
|
||||
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.RootEventType;
|
||||
|
||||
@ -64,7 +65,11 @@ public class TypeFilter extends UnionFilter {
|
||||
|
||||
@Override
|
||||
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 */
|
||||
@ -95,7 +100,7 @@ public class TypeFilter extends UnionFilter {
|
||||
public String getHTMLReportString() {
|
||||
String string = getEventType().getDisplayName() + getStringCheckBox();
|
||||
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;
|
||||
}
|
||||
|
@ -374,9 +374,9 @@ public abstract class AbstractVisualization<X, Y, N extends Node, C extends XYCh
|
||||
label.relocate(labelX, 0);
|
||||
|
||||
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
|
||||
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);
|
||||
|
@ -35,4 +35,10 @@ Timeline.ui.ZoomRanges.threeyears.text=Three Years
|
||||
Timeline.ui.ZoomRanges.fiveyears.text=Five Years
|
||||
Timeline.ui.ZoomRanges.tenyears.text=Ten Years
|
||||
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;
|
||||
|
||||
public StatusBar() {
|
||||
FXMLConstructor.construct(this, "StatusBar.fxml");
|
||||
FXMLConstructor.construct(this, "StatusBar.fxml"); // NON-NLS
|
||||
}
|
||||
|
||||
@FXML
|
||||
void initialize() {
|
||||
assert refreshLabel != null : "fx:id=\"refreshLabel\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
||||
assert progressBar != null : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
||||
assert spacer != null : "fx:id=\"spacer\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
||||
assert taskLabel != null : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'.";
|
||||
assert messageLabel != null : "fx:id=\"messageLabel\" 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'."; // NON-NLS
|
||||
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'."; // NON-NLS
|
||||
assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
|
||||
refreshLabel.setVisible(false);
|
||||
taskLabel.setVisible(false);
|
||||
HBox.setHgrow(spacer, Priority.ALWAYS);
|
||||
|
@ -93,9 +93,13 @@ public class TimeLineResultView implements TimeLineView {
|
||||
private String getSummaryString() {
|
||||
if (controller.getSelectedTimeRange().get() != null) {
|
||||
final DateTimeFormatter zonedFormatter = TimeLineController.getZonedFormatter();
|
||||
return controller.getSelectedTimeRange().get().getStart().withZone(TimeLineController.getJodaTimeZone()).toString(zonedFormatter)
|
||||
+ " to "
|
||||
+ controller.getSelectedTimeRange().get().getEnd().withZone(TimeLineController.getJodaTimeZone()).toString(zonedFormatter);
|
||||
return NbBundle.getMessage(this.getClass(), "TimeLineResultView.startDateToEndDate.text",
|
||||
controller.getSelectedTimeRange().get().getStart()
|
||||
.withZone(TimeLineController.getJodaTimeZone())
|
||||
.toString(zonedFormatter),
|
||||
controller.getSelectedTimeRange().get().getEnd()
|
||||
.withZone(TimeLineController.getJodaTimeZone())
|
||||
.toString(zonedFormatter));
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class TimeZonePanel extends TitledPane {
|
||||
|
||||
static private String getTimeZoneString(final TimeZone timeZone) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -65,6 +65,6 @@ public class TimeZonePanel extends TitledPane {
|
||||
}
|
||||
|
||||
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.DateTimeZone;
|
||||
import org.joda.time.Interval;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||
@ -194,17 +195,17 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
||||
|
||||
public VisualizationPanel(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
|
||||
protected void initialize() {
|
||||
assert endPicker != null : "fx:id=\"endPicker\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
||||
assert histogramBox != null : "fx:id=\"histogramBox\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
||||
assert startPicker != null : "fx:id=\"startPicker\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
||||
assert rangeHistogramStack != null : "fx:id=\"rangeHistogramStack\" was not injected: check your FXML file 'ViewWrapper.fxml'.";
|
||||
assert countsToggle != null : "fx:id=\"countsToggle\" was not injected: check your FXML file 'VisToggle.fxml'.";
|
||||
assert detailsToggle != null : "fx:id=\"eventsToggle\" was not injected: check your FXML file 'VisToggle.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'."; // NON-NLS
|
||||
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'."; // NON-NLS
|
||||
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'."; // NON-NLS
|
||||
|
||||
HBox.setHgrow(leftSeperator, 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
|
||||
* rangeslider track doesn't extend to edge of node,and so the
|
||||
* 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();
|
||||
for (ZoomRanges b : ZoomRanges.values()) {
|
||||
@ -416,12 +417,13 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
||||
histogramTask.cancel(true);
|
||||
}
|
||||
|
||||
histogramTask = new LoggedTask<Void>("Rebuild Histogram", true) {
|
||||
histogramTask = new LoggedTask<Void>(
|
||||
NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.title"), true) {
|
||||
|
||||
@Override
|
||||
protected Void call() throws Exception {
|
||||
|
||||
updateMessage("preparing");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.preparing"));
|
||||
|
||||
long max = 0;
|
||||
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
|
||||
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;
|
||||
|
||||
updateMessage("querying db");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.queryDb"));
|
||||
//query for current range
|
||||
long count = filteredEvents.getEventCounts(interval).values().stream().mapToLong(Long::valueOf).sum();
|
||||
bins.add(count);
|
||||
@ -461,7 +463,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
||||
final double fMax = Math.log(max);
|
||||
final ArrayList<Long> fbins = new ArrayList<>(bins);
|
||||
Platform.runLater(() -> {
|
||||
updateMessage("updating ui");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "VisualizationPanel.histogramTask.updateUI2"));
|
||||
|
||||
histogramBox.getChildren().clear();
|
||||
|
||||
@ -479,7 +481,7 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
||||
Tooltip.install(bar, new Tooltip(bin.toString()));
|
||||
});
|
||||
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);
|
||||
histogramBox.getChildren().add(bar);
|
||||
}
|
||||
@ -555,15 +557,15 @@ public class VisualizationPanel extends BorderPane implements TimeLineView {
|
||||
|
||||
public NoEventsDialog(Runnable closeCallback) {
|
||||
this.closeCallback = closeCallback;
|
||||
FXMLConstructor.construct(this, "NoEventsDialog.fxml");
|
||||
FXMLConstructor.construct(this, "NoEventsDialog.fxml"); // NON-NLS
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
void initialize() {
|
||||
assert resetFiltersButton != null : "fx:id=\"resetFiltersButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'.";
|
||||
assert dismissButton != null : "fx:id=\"dismissButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'.";
|
||||
assert zoomButton != null : "fx:id=\"zoomButton\" 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'."; // NON-NLS
|
||||
assert zoomButton != null : "fx:id=\"zoomButton\" was not injected: check your FXML file 'NoEventsDialog.fxml'."; // NON-NLS
|
||||
|
||||
Action zoomOutAction = new ZoomOut(controller);
|
||||
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.zoomIntoTimeRange=Zoom into Time Range
|
||||
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
|
||||
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
|
||||
protected Boolean call() throws Exception {
|
||||
@ -141,7 +141,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
return null;
|
||||
}
|
||||
updateProgress(-1, 1);
|
||||
updateMessage("preparing update");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.prepUpdate"));
|
||||
Platform.runLater(() -> {
|
||||
setCursor(Cursor.WAIT);
|
||||
});
|
||||
@ -158,7 +158,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
|
||||
//clear old data, and reset ranges and series
|
||||
Platform.runLater(() -> {
|
||||
updateMessage("resetting ui");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.resetUI"));
|
||||
eventTypeMap.clear();
|
||||
dataSets.clear();
|
||||
dateAxis.getCategories().clear();
|
||||
@ -209,15 +209,18 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
xyData.nodeProperty().addListener((Observable o) -> {
|
||||
final Node node = xyData.getNode();
|
||||
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.setOnMouseEntered((MouseEvent event) -> {
|
||||
//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"
|
||||
+ "between " + dateString + "\n"
|
||||
+ "and "
|
||||
+ interval.getEnd().toString(rangeInfo.getTickFormatter()));
|
||||
final Tooltip tooltip = new Tooltip(
|
||||
NbBundle.getMessage(this.getClass(), "CountsViewPane.tooltip.text",
|
||||
count,
|
||||
et.getDisplayName(),
|
||||
dateString,
|
||||
interval.getEnd().toString(
|
||||
rangeInfo.getTickFormatter())));
|
||||
tooltip.setGraphic(new ImageView(et.getFXImage()));
|
||||
Tooltip.install(node, tooltip);
|
||||
node.setEffect(new DropShadow(10, et.getColor()));
|
||||
@ -239,7 +242,8 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
final double fmax = max;
|
||||
|
||||
Platform.runLater(() -> {
|
||||
updateMessage("updating counts");
|
||||
updateMessage(
|
||||
NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.updatingCounts"));
|
||||
getSeries(et).getData().add(xyData);
|
||||
if (scale.get().equals(ScaleType.LINEAR)) {
|
||||
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;
|
||||
|
||||
Platform.runLater(() -> {
|
||||
updateMessage("updating counts");
|
||||
updateMessage(
|
||||
NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.updatingCounts"));
|
||||
updateProgress(fp, rangeInfo.getPeriodsInRange());
|
||||
});
|
||||
}
|
||||
@ -262,7 +267,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
}
|
||||
|
||||
Platform.runLater(() -> {
|
||||
updateMessage("wrapping up");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "CountsViewPane.loggedTask.wrappingUp"));
|
||||
updateProgress(1, 1);
|
||||
layoutDateLabels();
|
||||
setCursor(Cursor.NONE);
|
||||
@ -507,8 +512,8 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
|
||||
@FXML
|
||||
void initialize() {
|
||||
assert logRadio != null : "fx:id=\"logRadio\" was not injected: check your FXML file 'CountsViewSettingsPane.fxml'.";
|
||||
assert linearRadio != null : "fx:id=\"linearRadio\" 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'."; // NON-NLS
|
||||
logRadio.setSelected(true);
|
||||
scaleGroup.selectedToggleProperty().addListener(observable -> {
|
||||
if (scaleGroup.getSelectedToggle() == linearRadio) {
|
||||
@ -521,7 +526,7 @@ public class CountsViewPane extends AbstractVisualization<String, Number, Node,
|
||||
}
|
||||
|
||||
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());
|
||||
//we have defered creating context menu until control is available
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Interval;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.ColorUtilities;
|
||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||
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}. */
|
||||
public class AggregateEventNode extends StackPane {
|
||||
|
||||
private final static Image PLUS = new Image("/org/sleuthkit/autopsy/timeline/images/plus-button.png");
|
||||
private final static Image MINUS = new Image("/org/sleuthkit/autopsy/timeline/images/minus-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"); // NON-NLS
|
||||
|
||||
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));
|
||||
setBackground(new Background(new BackgroundFill(evtColor.deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY)));
|
||||
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);
|
||||
|
||||
//set up mouse hover effect and tooltip
|
||||
@ -228,10 +229,11 @@ public class AggregateEventNode extends StackPane {
|
||||
}
|
||||
|
||||
private void installTooltip() {
|
||||
Tooltip.install(AggregateEventNode.this, new Tooltip(getEvent().getEventIDs().size() + " " + getEvent().getType() + " events\n"
|
||||
+ getEvent().getDescription()
|
||||
+ "\nbetween " + getEvent().getSpan().getStart().toString(TimeLineController.getZonedFormatter())
|
||||
+ "\nand " + getEvent().getSpan().getEnd().toString(TimeLineController.getZonedFormatter())));
|
||||
Tooltip.install(AggregateEventNode.this, new Tooltip(
|
||||
NbBundle.getMessage(this.getClass(), "AggregateEventNode.installTooltip.text",
|
||||
getEvent().getEventIDs().size(), getEvent().getType(), getEvent().getDescription(),
|
||||
getEvent().getSpan().getStart().toString(TimeLineController.getZonedFormatter()),
|
||||
getEvent().getSpan().getEnd().toString(TimeLineController.getZonedFormatter()))));
|
||||
}
|
||||
|
||||
public Pane getSubNodePane() {
|
||||
@ -284,7 +286,7 @@ public class AggregateEventNode extends StackPane {
|
||||
? " ..." + StringUtils.substringAfter(description, parentEventNode.getEvent().getDescription())
|
||||
: description;
|
||||
descrLabel.setText(description);
|
||||
countLabel.setText(((size == 1) ? "" : " (" + size + ")"));
|
||||
countLabel.setText(((size == 1) ? "" : " (" + size + ")")); // NON-NLS
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -310,12 +312,12 @@ public class AggregateEventNode extends StackPane {
|
||||
void applyHighlightEffect(boolean 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));
|
||||
spanRegion.setBackground(spanFill);
|
||||
setBackground(new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .2), CORNER_RADII, Insets.EMPTY)));
|
||||
} 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));
|
||||
spanRegion.setBackground(spanFill);
|
||||
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);
|
||||
|
||||
//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
|
||||
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
|
||||
public String getName() {
|
||||
return "lowerBound";
|
||||
return "lowerBound"; // NON-NLS
|
||||
}
|
||||
};
|
||||
|
||||
@ -105,7 +105,7 @@ final class DateAxis extends Axis<DateTime> {
|
||||
|
||||
@Override
|
||||
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.VBox;
|
||||
import org.joda.time.DateTime;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.coreutils.LoggedTask;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||
@ -287,7 +288,7 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
||||
@Override
|
||||
protected Task<Boolean> getUpdateTask() {
|
||||
|
||||
return new LoggedTask<Boolean>("Update Details", true) {
|
||||
return new LoggedTask<Boolean>(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.name"), true) {
|
||||
|
||||
@Override
|
||||
protected Boolean call() throws Exception {
|
||||
@ -301,13 +302,13 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
||||
});
|
||||
|
||||
updateProgress(-1, 1);
|
||||
updateMessage("preparing");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.preparing"));
|
||||
|
||||
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.timeRange().get());
|
||||
final long lowerBound = rangeInfo.getLowerBound();
|
||||
final long upperBound = rangeInfo.getUpperBound();
|
||||
|
||||
updateMessage("querying db");
|
||||
updateMessage(NbBundle.getMessage(this.getClass(), "DetailViewPane.loggedTask.queryDb"));
|
||||
aggregatedEvents.setAll(filteredEvents.getAggregatedEvents());
|
||||
|
||||
Platform.runLater(() -> {
|
||||
@ -330,7 +331,7 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
||||
break;
|
||||
}
|
||||
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);
|
||||
|
||||
Platform.runLater(() -> {
|
||||
@ -396,15 +397,15 @@ public class DetailViewPane extends AbstractVisualization<DateTime, AggregateEve
|
||||
private Label truncateSliderLabel;
|
||||
|
||||
public DetailViewSettingsPane() {
|
||||
FXMLConstructor.construct(this, "DetailViewSettingsPane.fxml");
|
||||
FXMLConstructor.construct(this, "DetailViewSettingsPane.fxml"); // NON-NLS
|
||||
}
|
||||
|
||||
@FXML
|
||||
void initialize() {
|
||||
assert bandByTypeBox != null : "fx:id=\"bandByTypeBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
||||
assert oneEventPerRowBox != null : "fx:id=\"oneEventPerRowBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
||||
assert truncateAllBox != null : "fx:id=\"truncateAllBox\" was not injected: check your FXML file 'DetailViewSettings.fxml'.";
|
||||
assert truncateWidthSlider != null : "fx:id=\"truncateAllSlider\" 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'."; // NON-NLS
|
||||
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'."; // NON-NLS
|
||||
bandByTypeBox.selectedProperty().bindBidirectional(chart.getBandByType());
|
||||
truncateAllBox.selectedProperty().bindBidirectional(chart.getTruncateAll());
|
||||
oneEventPerRowBox.selectedProperty().bindBidirectional(chart.getOneEventPerRow());
|
||||
|
@ -67,6 +67,7 @@ import org.controlsfx.control.action.ActionGroup;
|
||||
import org.controlsfx.control.action.ActionUtils;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Interval;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
import org.sleuthkit.autopsy.timeline.actions.Back;
|
||||
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()) {
|
||||
|
||||
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) -> {
|
||||
if (guideLine == null) {
|
||||
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))));
|
||||
chartContextMenu.setAutoHide(true);
|
||||
chartContextMenu.show(EventDetailChart.this, clickEvent.getScreenX(), clickEvent.getScreenY());
|
||||
@ -392,7 +396,7 @@ public final class EventDetailChart extends XYChart<DateTime, AggregateEvent> im
|
||||
@Override
|
||||
protected synchronized void dataItemChanged(Data<DateTime, AggregateEvent> data) {
|
||||
//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
|
||||
|
@ -74,7 +74,7 @@ public class NavPanel extends BorderPane implements TimeLineView {
|
||||
|
||||
public NavPanel() {
|
||||
|
||||
FXMLConstructor.construct(this, "NavPanel.fxml");
|
||||
FXMLConstructor.construct(this, "NavPanel.fxml"); // NON-NLS
|
||||
}
|
||||
|
||||
public void setChart(DetailViewPane detailViewPane) {
|
||||
@ -121,7 +121,7 @@ public class NavPanel extends BorderPane implements TimeLineView {
|
||||
|
||||
@FXML
|
||||
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.getSelectionModel().select(TreeComparator.Description);
|
||||
@ -141,7 +141,7 @@ public class NavPanel extends BorderPane implements TimeLineView {
|
||||
protected void updateItem(NavTreeNode item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
if (item != null) {
|
||||
final String text = item.getDescription() + " (" + item.getCount() + ")";
|
||||
final String text = item.getDescription() + " (" + item.getCount() + ")"; // NON-NLS
|
||||
setText(text);
|
||||
setTooltip(new Tooltip(text));
|
||||
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.others=others
|
||||
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
|
||||
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 -> {
|
||||
controller.pushFilters(filterTreeTable.getRoot().getValue().copyOf());
|
||||
});
|
||||
|
||||
//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.
|
||||
filterTreeTable.setRowFactory((TreeTableView<Filter> param) -> {
|
||||
@ -143,8 +143,8 @@ public class FilterSetPanel extends BorderPane implements TimeLineView {
|
||||
}
|
||||
|
||||
public FilterSetPanel() {
|
||||
FXMLConstructor.construct(this, "FilterSetPanel.fxml");
|
||||
expansionMap.put("Event Type Filter", Boolean.TRUE);
|
||||
FXMLConstructor.construct(this, "FilterSetPanel.fxml"); // NON-NLS
|
||||
expansionMap.put(NbBundle.getMessage(this.getClass(), "FilterSetPanel.eventTypeFilter.title"), Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -105,27 +105,27 @@ public class RangeDivisionInfo {
|
||||
timeUnit = DateTimeFieldType.monthOfYear();
|
||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().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)) {
|
||||
timeUnit = DateTimeFieldType.dayOfMonth();
|
||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().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)) {
|
||||
timeUnit = DateTimeFieldType.hourOfDay();
|
||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().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)) {
|
||||
timeUnit = DateTimeFieldType.minuteOfHour();
|
||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().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 {
|
||||
timeUnit = DateTimeFieldType.secondOfMinute();
|
||||
long lower = startWithZone.property(timeUnit).roundFloorCopy().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;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -18,13 +18,17 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.timeline.zooming;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
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() {
|
||||
return displayName;
|
||||
|
@ -23,6 +23,7 @@ import java.util.EnumSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import org.joda.time.Interval;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.filters.Filter;
|
||||
|
||||
/**
|
||||
@ -157,7 +158,7 @@ public class ZoomParams {
|
||||
|
||||
@Override
|
||||
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.Tooltip;
|
||||
import javafx.util.StringConverter;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.timeline.FXMLConstructor;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineController;
|
||||
import org.sleuthkit.autopsy.timeline.TimeLineView;
|
||||
@ -87,7 +88,7 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView {
|
||||
}
|
||||
|
||||
public ZoomSettingsPane() {
|
||||
FXMLConstructor.construct(this, "ZoomSettingsPane.fxml");
|
||||
FXMLConstructor.construct(this, "ZoomSettingsPane.fxml"); // NON-NLS
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -98,11 +99,15 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView {
|
||||
Back back = new Back(controller);
|
||||
backButton.disableProperty().bind(back.disabledProperty());
|
||||
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);
|
||||
forwardButton.disableProperty().bind(forward.disabledProperty());
|
||||
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