mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Merge pull request #512 from mrtizmo/timeline
Pulled static strings into Bundle - Timeline module
This commit is contained in:
commit
88db2f7014
@ -4,6 +4,29 @@ OpenIDE-Module-Long-Description=\
|
||||
Events for a selected day are viewable in the built-in result and content viewers.
|
||||
OpenIDE-Module-Name=Timeline
|
||||
CTL_MakeTimeline="Make Timeline (Beta)"
|
||||
CTL_TimelineView=Generate Timeline
|
||||
OpenIDE-Module-Short-Description=Displays user activity timeline
|
||||
TimelineProgressDialog.jLabel1.text=Creating timeline . . .
|
||||
TimelineFrame.title=Timeline
|
||||
Timeline.frameName.text={0} - Autopsy Timeline (Beta)
|
||||
Timeline.resultsPanel.title=Timeline Results
|
||||
Timeline.getName=Make Timeline (Beta)
|
||||
Timeline.runJavaFxThread.progress.creating=Creating timeline . . .
|
||||
Timeline.runJavaFxThread.progress.genBodyFile=Generating Bodyfile
|
||||
Timeline.runJavaFxThread.progress.genMacTime=Generating Mactime
|
||||
Timeline.runJavaFxThread.progress.parseMacTime=Parsing Mactime
|
||||
Timeline.zoomOutButton.text=Zoom Out
|
||||
Timeline.goToButton.text=Go To\:
|
||||
Timeline.yearBarChart.x.years=Years
|
||||
Timeline.yearBarChart.y.numEvents=Number of Events
|
||||
Timeline.MonthsBarChart.x.monthYY=Month ({0})
|
||||
Timeline.MonthsBarChart.y.numEvents=Number of Events
|
||||
Timeline.eventsByMoBarChart.x.dayOfMo=Day of Month
|
||||
Timeline.eventsByMoBarChart.y.numEvents=Number of Events
|
||||
Timeline.node.emptyRoot=Empty Root
|
||||
Timeline.resultPanel.loading=Loading...
|
||||
Timeline.node.root=Root
|
||||
Timeline.propChg.confDlg.timelineOOD.msg=Timeline is out of date. Would you like to regenerate it?
|
||||
Timeline.propChg.confDlg.timelineOOD.details=Select an option
|
||||
Timeline.initTimeline.confDlg.genBeforeIngest.msg=You are trying to generate a timeline before ingest has been completed. The timeline may be incomplete. Do you want to continue?
|
||||
Timeline.initTimeline.confDlg.genBeforeIngest.deails=Timeline
|
||||
|
@ -108,7 +108,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
||||
@ActionRegistration(displayName = "#CTL_MakeTimeline", lazy = false)
|
||||
@ActionReferences(value = {
|
||||
@ActionReference(path = "Menu/Tools", position = 100)})
|
||||
@NbBundle.Messages(value = "CTL_TimelineView=Generate Timeline")
|
||||
//@NbBundle.Messages(value = "CTL_TimelineView=Generate Timeline")
|
||||
/**
|
||||
* The Timeline Action entry point. Collects data and pushes data to javafx
|
||||
* widgets
|
||||
@ -180,7 +180,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
//Making the main frame *
|
||||
|
||||
mainFrame = new TimelineFrame();
|
||||
mainFrame.setFrameName(Case.getCurrentCase().getName() + " - Autopsy Timeline (Beta)");
|
||||
mainFrame.setFrameName(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.frameName.text", Case.getCurrentCase().getName()));
|
||||
|
||||
//use the same icon on jframe as main application
|
||||
mainFrame.setIconImage(WindowManager.getDefault().getMainWindow().getIconImage());
|
||||
@ -191,7 +192,9 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
//dataContentPanel.setAlignmentX(Component.RIGHT_ALIGNMENT);
|
||||
//dataContentPanel.setPreferredSize(new Dimension(FRAME_WIDTH, (int) (FRAME_HEIGHT * 0.4)));
|
||||
|
||||
dataResultPanel = DataResultPanel.createInstance("Timeline Results", "", Node.EMPTY, 0, dataContentPanel);
|
||||
dataResultPanel = DataResultPanel.createInstance(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.resultsPanel.title"),
|
||||
"", Node.EMPTY, 0, dataContentPanel);
|
||||
dataResultPanel.setContentViewer(dataContentPanel);
|
||||
//dataResultPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
//dataResultPanel.setPreferredSize(new Dimension((int)(FRAME_WIDTH * 0.5), (int) (FRAME_HEIGHT * 0.5)));
|
||||
@ -216,7 +219,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
public void run() {
|
||||
try {
|
||||
// start the progress bar
|
||||
progress = ProgressHandleFactory.createHandle("Creating timeline . . .");
|
||||
progress = ProgressHandleFactory.createHandle(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.runJavaFxThread.progress.creating"));
|
||||
progress.start();
|
||||
|
||||
fxChartEvents = null; //important to reset old data
|
||||
@ -244,11 +248,13 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
if (!mactimeFile.exists()) {
|
||||
progressDialog.setProgressTotal(3); //total 3 units
|
||||
logger.log(Level.INFO, "Creating body file");
|
||||
progressDialog.updateProgressBar("Generating Bodyfile");
|
||||
progressDialog.updateProgressBar(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.runJavaFxThread.progress.genBodyFile"));
|
||||
String bodyFilePath = makeBodyFile();
|
||||
progressDialog.updateProgressBar(++currentProgress);
|
||||
logger.log(Level.INFO, "Creating mactime file: " + mactimeFile.getAbsolutePath());
|
||||
progressDialog.updateProgressBar("Generating Mactime");
|
||||
progressDialog.updateProgressBar(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.runJavaFxThread.progress.genMacTime"));
|
||||
makeMacTime(bodyFilePath);
|
||||
progressDialog.updateProgressBar(++currentProgress);
|
||||
data = null;
|
||||
@ -258,7 +264,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
}
|
||||
|
||||
|
||||
progressDialog.updateProgressBar("Parsing Mactime");
|
||||
progressDialog.updateProgressBar(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.runJavaFxThread.progress.parseMacTime"));
|
||||
if (data == null) {
|
||||
logger.log(Level.INFO, "Parsing mactime file: " + mactimeFile.getAbsolutePath());
|
||||
data = parseMacTime(mactimeFile); //The sum total of the mactime parsing. YearEpochs contain everything you need to make a timeline.
|
||||
@ -274,7 +281,7 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
fxDropdownSelectYears = new ComboBox<String>(listSelect);
|
||||
|
||||
//Buttons for navigating up and down the timeline
|
||||
fxZoomOutButton = new Button("Zoom Out");
|
||||
fxZoomOutButton = new Button(NbBundle.getMessage(this.getClass(), "Timeline.zoomOutButton.text"));
|
||||
fxZoomOutButton.setOnAction(new EventHandler<ActionEvent>() {
|
||||
@Override
|
||||
public void handle(ActionEvent e) {
|
||||
@ -306,7 +313,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
|
||||
//Adding things to the V and H boxes.
|
||||
//hBox_Charts stores the pseudo menu bar at the top of the timeline. |Zoom Out|View Year: [Select Year]|►|
|
||||
fxHBoxCharts.getChildren().addAll(fxZoomOutButton, new Label("Go To:"), fxDropdownSelectYears);
|
||||
fxHBoxCharts.getChildren().addAll(fxZoomOutButton, new Label(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.goToButton.text")), fxDropdownSelectYears);
|
||||
fxVBox.getChildren().addAll(fxHBoxCharts, fxScrollEvents); //FxBox_V holds things in a visual stack.
|
||||
fxGroupCharts.getChildren().add(fxVBox); //Adding the FxBox to the group. Groups make things easier to manipulate without having to update a hundred things every change.
|
||||
fxPanelCharts.setScene(fxSceneCharts);
|
||||
@ -351,8 +359,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
final Label l = new Label("");
|
||||
l.setStyle("-fx-font: 24 arial;");
|
||||
l.setTextFill(Color.AZURE);
|
||||
xAxis.setLabel("Years");
|
||||
yAxis.setLabel("Number of Events");
|
||||
xAxis.setLabel(NbBundle.getMessage(this.getClass(), "Timeline.yearBarChart.x.years"));
|
||||
yAxis.setLabel(NbBundle.getMessage(this.getClass(), "Timeline.yearBarChart.y.numEvents"));
|
||||
//Charts are made up of individual pieces of Chart.Data. In this case, a piece of barData is a single bar on the graph.
|
||||
//Data is packaged into a series, which can be assigned custom colors or styling
|
||||
//After the series are created, 1 or more series are packaged into a single chart.
|
||||
@ -417,8 +425,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
private BarChart<String, Number> createMonthsWithDrill(final YearEpoch ye) {
|
||||
final CategoryAxis xAxis = new CategoryAxis();
|
||||
final NumberAxis yAxis = new NumberAxis();
|
||||
xAxis.setLabel("Month (" + ye.year + ")");
|
||||
yAxis.setLabel("Number of Events");
|
||||
xAxis.setLabel(NbBundle.getMessage(this.getClass(), "Timeline.MonthsBarChart.x.monthYY", ye.year));
|
||||
yAxis.setLabel(NbBundle.getMessage(this.getClass(), "Timeline.MonthsBarChart.y.numEvents"));
|
||||
ObservableList<BarChart.Series<String, Number>> bcData = FXCollections.observableArrayList();
|
||||
|
||||
BarChart.Series<String, Number> se = new BarChart.Series<String, Number>();
|
||||
@ -481,8 +489,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
private BarChart<String, Number> createEventsByMonth(final MonthEpoch me, final YearEpoch ye) {
|
||||
final CategoryAxis xAxis = new CategoryAxis();
|
||||
final NumberAxis yAxis = new NumberAxis();
|
||||
xAxis.setLabel("Day of Month");
|
||||
yAxis.setLabel("Number of Events");
|
||||
xAxis.setLabel(NbBundle.getMessage(this.getClass(), "Timeline.eventsByMoBarChart.x.dayOfMo"));
|
||||
yAxis.setLabel(NbBundle.getMessage(this.getClass(), "Timeline.eventsByMoBarChart.y.numEvents"));
|
||||
ObservableList<BarChart.Data<String, Number>> bcData = makeObservableListByMonthAllDays(me, ye.getYear());
|
||||
BarChart.Series<String, Number> series = new BarChart.Series<String, Number>(bcData);
|
||||
series.setName(me.getMonthName() + " " + ye.getYear());
|
||||
@ -511,9 +519,10 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
@Override
|
||||
public void run() {
|
||||
//reset the view and free the current nodes before loading new ones
|
||||
final FileRootNode d = new FileRootNode("Empty Root", new ArrayList<Long>());
|
||||
final FileRootNode d = new FileRootNode(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.node.emptyRoot"), new ArrayList<Long>());
|
||||
dataResultPanel.setNode(d);
|
||||
dataResultPanel.setPath("Loading...");
|
||||
dataResultPanel.setPath(NbBundle.getMessage(this.getClass(), "Timeline.resultPanel.loading"));
|
||||
}
|
||||
});
|
||||
final int day = (Integer.valueOf((barData.getXValue()).split("-")[1]));
|
||||
@ -529,7 +538,8 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final FileRootNode d = new FileRootNode("Root", afs);
|
||||
final FileRootNode d = new FileRootNode(
|
||||
NbBundle.getMessage(this.getClass(), "Timeline.node.root"), afs);
|
||||
dataResultPanel.setNode(d);
|
||||
//set result viewer title path with the current date
|
||||
String dateString = ye.getYear() + "-" + (1 + me.getMonthInt()) + "-" + +de.dayNum;
|
||||
@ -630,7 +640,12 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
return;
|
||||
}
|
||||
|
||||
int answer = JOptionPane.showConfirmDialog(mainFrame, "Timeline is out of date. Would you like to regenerate it?", "Select an option", JOptionPane.YES_NO_OPTION);
|
||||
int answer = JOptionPane.showConfirmDialog(mainFrame,
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"Timeline.propChg.confDlg.timelineOOD.msg"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"Timeline.propChg.confDlg.timelineOOD.details"),
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
if (answer != JOptionPane.YES_OPTION) {
|
||||
return;
|
||||
}
|
||||
@ -1150,9 +1165,10 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
|
||||
if (IngestManager.getDefault().isIngestRunning()) {
|
||||
int answer = JOptionPane.showConfirmDialog(new JFrame(),
|
||||
"You are trying to generate a timeline before "
|
||||
+ "ingest has been completed. The timeline may be "
|
||||
+ "incomplete. Do you want to continue?", "Timeline",
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"Timeline.initTimeline.confDlg.genBeforeIngest.msg"),
|
||||
NbBundle.getMessage(this.getClass(),
|
||||
"Timeline.initTimeline.confDlg.genBeforeIngest.deails"),
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
if (answer != JOptionPane.YES_OPTION) {
|
||||
return;
|
||||
@ -1204,7 +1220,7 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar,
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Make Timeline (Beta)";
|
||||
return NbBundle.getMessage(this.getClass(), "Timeline.getName");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user