mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
internationalize SaveSnapshotAsReport.java and SnapShotReportWriter.java
revert unwanted changes
This commit is contained in:
parent
5ddd5dc26f
commit
a0569da249
@ -902,9 +902,7 @@ public class TimeLineController {
|
|||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
switch (Case.Events.valueOf(evt.getPropertyName())) {
|
switch (Case.Events.valueOf(evt.getPropertyName())) {
|
||||||
case BLACKBOARD_ARTIFACT_TAG_ADDED:
|
case BLACKBOARD_ARTIFACT_TAG_ADDED:
|
||||||
executor.submit(() -> {
|
executor.submit(() -> filteredEvents.handleArtifactTagAdded((BlackBoardArtifactTagAddedEvent) evt));
|
||||||
return filteredEvents.handleArtifactTagAdded((BlackBoardArtifactTagAddedEvent) evt);
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case BLACKBOARD_ARTIFACT_TAG_DELETED:
|
case BLACKBOARD_ARTIFACT_TAG_DELETED:
|
||||||
executor.submit(() -> filteredEvents.handleArtifactTagDeleted((BlackBoardArtifactTagDeletedEvent) evt));
|
executor.submit(() -> filteredEvents.handleArtifactTagDeleted((BlackBoardArtifactTagDeletedEvent) evt));
|
||||||
|
@ -1,246 +0,0 @@
|
|||||||
OpenIDE-Module-Name=Report
|
|
||||||
CTL_ReportWizardAction=Run Report
|
|
||||||
ArtifactSelectionDialog.titleLabel.text=Select which artifacts you would like to report on:
|
|
||||||
ArtifactSelectionDialog.okButton.text=OK
|
|
||||||
ReportVisualPanel1.reportModulesLabel.text=Report Modules:
|
|
||||||
ReportVisualPanel1.invalidModuleWarning=Encountered an invalid Report Module ({0})
|
|
||||||
DefaultReportConfigurationPanel.infoLabel.text=This report will be configured on the next screen.
|
|
||||||
ReportVisualPanel2.dataLabel.text=Select which data to report on:
|
|
||||||
ReportVisualPanel2.deselectAllButton.text=Deselect All
|
|
||||||
ReportVisualPanel2.selectAllButton.text=Select All
|
|
||||||
ReportVisualPanel2.advancedButton.text=Data Types
|
|
||||||
ArtifactSelectionDialog.deselectAllButton.text=Deselect All
|
|
||||||
ArtifactSelectionDialog.selectAllButton.text=Select All
|
|
||||||
ReportGenerationPanel.closeButton.text=Close
|
|
||||||
ReportProgressPanel.reportLabel.text=reportLabel
|
|
||||||
ReportProgressPanel.pathLabel.text=pathLabel
|
|
||||||
ReportProgressPanel.separationLabel.text=:
|
|
||||||
ReportProgressPanel.statusMessageLabel.text=processingLabel
|
|
||||||
ReportGenerationPanel.titleLabel.text=Report Generation Progress
|
|
||||||
ReportVisualPanel2.taggedResultsRadioButton.text=Tagged Results
|
|
||||||
ReportVisualPanel2.allResultsRadioButton.text=All Results
|
|
||||||
ReportWizardFileOptionsVisualPanel.selectAllButton.text=Select All
|
|
||||||
ReportWizardFileOptionsVisualPanel.deselectAllButton.text=Deselect All
|
|
||||||
ReportWizardFileOptionsVisualPanel.jLabel1.text=Select items to include in File Report:
|
|
||||||
ArtifactSelectionDialog.dlgTitle.text=Advanced Artifact Selection
|
|
||||||
FileReportDataTypes.filename.text=Name
|
|
||||||
FileReportDataTypes.fileExt.text=File Extension
|
|
||||||
FileReportDataTypes.fileType.text=File Type
|
|
||||||
FileReportDataTypes.isDel.text=Is Deleted
|
|
||||||
FileReportDataTypes.aTime.text=Last Accessed
|
|
||||||
FileReportDataTypes.crTime.text=File Created
|
|
||||||
FileReportDataTypes.mTime.text=Last Modified
|
|
||||||
FileReportDataTypes.size.text=Size
|
|
||||||
FileReportDataTypes.address.text=Address
|
|
||||||
FileReportDataTypes.hash.text=Hash Value
|
|
||||||
FileReportDataTypes.knownStatus.text=Known Status
|
|
||||||
FileReportDataTypes.perms.text=Permissions
|
|
||||||
FileReportDataTypes.path.text=Full Path
|
|
||||||
FileReportText.getName.text=Files - Text
|
|
||||||
FileReportText.getDesc.text=A tab delimited text file containing information about individual files in the case.
|
|
||||||
ReportBodyFile.progress.querying=Querying files...
|
|
||||||
ReportBodyFile.ingestWarning.text=Warning, this report was run before ingest services completed\!
|
|
||||||
ReportBodyFile.progress.loading=Loading files...
|
|
||||||
ReportBodyFile.progress.processing=Now processing {0}...
|
|
||||||
ReportBodyFile.getName.text=TSK Body File
|
|
||||||
ReportBodyFile.getDesc.text=Body file format report with MAC times for every file. This format can be used for a timeline view.
|
|
||||||
ReportBodyFile.getFilePath.text=BodyFile.txt
|
|
||||||
ReportKML.progress.querying=Querying files...
|
|
||||||
ReportKML.progress.loading=Loading files...
|
|
||||||
ReportKML.getName.text=Google Earth/KML
|
|
||||||
ReportKML.getDesc.text=KML format report with coordinates for relevant files. This format can be used for google earth views.
|
|
||||||
ReportKML.getFilePath.text=ReportKML.kml
|
|
||||||
ReportBranding.defaultReportTitle.text=Autopsy Forensic Report
|
|
||||||
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
|
||||||
ReportExcel.numAartifacts.text=Number of artifacts\:
|
|
||||||
ReportExcel.getName.text=Results - Excel
|
|
||||||
ReportExcel.getDesc.text=A report about results and tagged items in Excel (XLS) format.
|
|
||||||
ReportExcel.sheetName.text=Summary
|
|
||||||
ReportExcel.cellVal.summary=Summary
|
|
||||||
ReportExcel.cellVal.caseName=Case Name\:
|
|
||||||
ReportExcel.cellVal.caseNum=Case Number\:
|
|
||||||
ReportExcel.cellVal.examiner=Examiner\:
|
|
||||||
ReportExcel.cellVal.numImages=Number of Images\:
|
|
||||||
ReportGenerationPanel.confDlg.sureToClose.msg=Are you sure you'd like to close the dialog?\nAll reports will be canceled.
|
|
||||||
ReportGenerationPanel.confDlg.title.closing=Closing
|
|
||||||
ReportGenerationPanel.confDlg.cancelReport.msg=Are you sure you'd like to cancel the report?
|
|
||||||
ReportGenerator.displayProgress.title.text=Report Generation Progress...
|
|
||||||
ReportGenerator.progress.queryingDb.text=Querying database...
|
|
||||||
ReportGenerator.progress.processingFile.text=Now processing {0}
|
|
||||||
ReportGenerator.artifactTable.taggedResults.text=Contains results that were tagged with one of the following\:
|
|
||||||
ReportGenerator.progress.processing=Now processing {0}...
|
|
||||||
ReportGenerator.msgShow.skippingArtType.title=Skipping artifact type {0} in reports
|
|
||||||
ReportGenerator.msgShow.skippingArtType.msg=Unknown columns to report on
|
|
||||||
ReportGenerator.makeContTagTab.taggedFiles.msg=Contains files that were tagged with one of the following\:
|
|
||||||
ReportGenerator.makeBbArtTagTab.taggedRes.msg=This report only includes results tagged with\:
|
|
||||||
ReportGenerator.tagTable.header.resultType=Result Type
|
|
||||||
ReportGenerator.tagTable.header.tag=Tag
|
|
||||||
ReportGenerator.tagTable.header.comment=Comment
|
|
||||||
ReportGenerator.tagTable.header.srcFile=Source File
|
|
||||||
ReportGenerator.progress.createdThumb.text=Creating thumbnails...
|
|
||||||
ReportGenerator.htmlOutput.header.file=File
|
|
||||||
ReportGenerator.htmlOutput.header.tag=Tag
|
|
||||||
ReportGenerator.htmlOutput.header.comment=Comment
|
|
||||||
ReportGenerator.htmlOutput.header.timeModified=Modified Time
|
|
||||||
ReportGenerator.htmlOutput.header.timeChanged=Changed Time
|
|
||||||
ReportGenerator.htmlOutput.header.timeAccessed=Accessed Time
|
|
||||||
ReportGenerator.htmlOutput.header.timeCreated=Created Time
|
|
||||||
ReportGenerator.htmlOutput.header.size=Size (Bytes)
|
|
||||||
ReportGenerator.htmlOutput.header.hash=Hash
|
|
||||||
ReportGenerator.thumbnailTable.name=Thumbnails
|
|
||||||
ReportGenerator.thumbnailTable.desc=Contains thumbnails of images that are associated with tagged files and results.
|
|
||||||
ReportGenerator.writeKwHits.userSrchs=User Searches
|
|
||||||
ReportGenerator.progress.processingList=Now processing {0} ({1})...
|
|
||||||
ReportGenerator.artTableColHdr.url=URL
|
|
||||||
ReportGenerator.artTableColHdr.title=Title
|
|
||||||
ReportGenerator.artTableColHdr.dateCreated=Date Created
|
|
||||||
ReportGenerator.artTableColHdr.program=Program
|
|
||||||
ReportGenerator.artTableColHdr.urlDomainDecoded=URL Domain
|
|
||||||
ReportGenerator.artTableColHdr.srcFile=Source File
|
|
||||||
ReportGenerator.artTableColHdr.dateTime=Date/Time
|
|
||||||
ReportGenerator.artTableColHdr.name=Name
|
|
||||||
ReportGenerator.artTableColHdr.value=Value
|
|
||||||
ReportGenerator.artTableColHdr.dateAccessed=Date Accessed
|
|
||||||
ReportGenerator.artTableColHdr.referrer=Referrer
|
|
||||||
ReportGenerator.artTableColHdr.dest=Destination
|
|
||||||
ReportGenerator.artTableColHdr.sourceUrl=Source URL
|
|
||||||
ReportGenerator.artTableColHdr.path=Path
|
|
||||||
ReportGenerator.artTableColHdr.progName=Program Name
|
|
||||||
ReportGenerator.artTableColHdr.instDateTime=Install Date/Time
|
|
||||||
ReportGenerator.artTableColHdr.preview=Preview
|
|
||||||
ReportGenerator.artTableColHdr.file=File
|
|
||||||
ReportGenerator.artTableColHdr.size=Size
|
|
||||||
ReportGenerator.artTableColHdr.deviceId=Device ID
|
|
||||||
ReportGenerator.artTableColHdr.text=Text
|
|
||||||
ReportGenerator.artTableColHdr.domain=Domain
|
|
||||||
ReportGenerator.artTableColHdr.dateTaken=Date Taken
|
|
||||||
ReportGenerator.artTableColHdr.devManufacturer=Device Manufacturer
|
|
||||||
ReportGenerator.artTableColHdr.devMake=Device Make
|
|
||||||
ReportGenerator.artTableColHdr.devModel=Device Model
|
|
||||||
ReportGenerator.artTableColHdr.latitude=Latitude
|
|
||||||
ReportGenerator.artTableColHdr.longitude=Longitude
|
|
||||||
ReportGenerator.artTableColHdr.latitudeStart=Starting Latitude
|
|
||||||
ReportGenerator.artTableColHdr.longitudeStart=Starting Longitude
|
|
||||||
ReportGenerator.artTableColHdr.latitudeEnd=Ending Latitude
|
|
||||||
ReportGenerator.artTableColHdr.longitudeEnd=Ending Longitude
|
|
||||||
ReportGenerator.artTableColHdr.associatedArtifact=Associated Artifact
|
|
||||||
ReportGenerator.artTableColHdr.count=Count
|
|
||||||
ReportGenerator.artTableColHdr.personName=Person Name
|
|
||||||
ReportGenerator.artTableColHdr.phoneNumber=Phone Number
|
|
||||||
ReportGenerator.artTableColHdr.phoneNumHome=Phone Number (Home)
|
|
||||||
ReportGenerator.artTableColHdr.phoneNumOffice=Phone Number (Office)
|
|
||||||
ReportGenerator.artTableColHdr.phoneNumMobile=Phone Number (Mobile)
|
|
||||||
ReportGenerator.artTableColHdr.email=Email
|
|
||||||
ReportGenerator.artTableColHdr.msgType=Message Type
|
|
||||||
ReportGenerator.artTableColHdr.direction=Direction
|
|
||||||
ReportGenerator.artTableColHdr.readStatus=Read Status
|
|
||||||
ReportGenerator.artTableColHdr.fromPhoneNum=From Phone Number
|
|
||||||
ReportGenerator.artTableColHdr.fromEmail=From Email
|
|
||||||
ReportGenerator.artTableColHdr.toPhoneNum=To Phone Number
|
|
||||||
ReportGenerator.artTableColHdr.toEmail=To Email
|
|
||||||
ReportGenerator.artTableColHdr.subject=Subject
|
|
||||||
ReportGenerator.artTableColHdr.tskEmailTo=E-Mail To
|
|
||||||
ReportGenerator.artTableColHdr.tskEmailCc=E-Mail CC
|
|
||||||
ReportGenerator.artTableColHdr.tskEmailBcc=E-Mail BCC
|
|
||||||
ReportGenerator.artTableColHdr.tskEmailFrom=E-Mail From
|
|
||||||
ReportGenerator.artTableColHdr.tskMsgId=Message ID
|
|
||||||
ReportGenerator.artTableColHdr.tskDateTimeRcvd=Date Received
|
|
||||||
ReportGenerator.artTableColHdr.tskDateTimeSent=Date Sent
|
|
||||||
ReportGenerator.artTableColHdr.tskSubject=Subject
|
|
||||||
ReportGenerator.artTableColHdr.tskSetName=Set Name
|
|
||||||
ReportGenerator.artTableColHdr.tskInterestingFilesCategory=Rule
|
|
||||||
ReportGenerator.artTableColHdr.tskGpsRouteCategory=Category
|
|
||||||
ReportGenerator.artTableColHdr.tskPath=Path
|
|
||||||
ReportGenerator.artTableColHdr.calendarEntryType=Calendar Entry Type
|
|
||||||
ReportGenerator.artTableColHdr.description=Description
|
|
||||||
ReportGenerator.artTableColHdr.startDateTime=Start Date/Time
|
|
||||||
ReportGenerator.artTableColHdr.endDateTime=End Date/Time
|
|
||||||
ReportGenerator.artTableColHdr.location=Location
|
|
||||||
ReportGenerator.artTableColHdr.shortCut=Short Cut
|
|
||||||
ReportGenerator.artTableColHdr.deviceName=Device Name
|
|
||||||
ReportGenerator.artTableColHdr.deviceAddress=Device Address
|
|
||||||
ReportGenerator.artTableColHdr.altitude=Altitude
|
|
||||||
ReportGenerator.artTableColHdr.locationAddress=Location Address
|
|
||||||
ReportGenerator.artTableColHdr.category=Category
|
|
||||||
ReportGenerator.artTableColHdr.userId=User ID
|
|
||||||
ReportGenerator.artTableColHdr.userName=User Name
|
|
||||||
ReportGenerator.artTableColHdr.password=Password
|
|
||||||
ReportGenerator.artTableColHdr.appName=App Name
|
|
||||||
ReportGenerator.artTableColHdr.appPath=App Path
|
|
||||||
ReportGenerator.artTableColHdr.replytoAddress=ReplyTo Address
|
|
||||||
ReportGenerator.artTableColHdr.mailServer=Mail Server
|
|
||||||
ReportGenerator.artTableColHdr.tags=Tags
|
|
||||||
ReportGenerator.artTableColHdr.localPath=Local path
|
|
||||||
ReportGenerator.artTableColHdr.remotePath=Remote path
|
|
||||||
ReportGenerator.errors.reportErrorTitle=Error generating report
|
|
||||||
ReportGenerator.errors.reportErrorText=Error generating report:
|
|
||||||
ReportHTML.addThumbRows.dataType.title=Tagged Images - {0}
|
|
||||||
ReportHTML.addThumbRows.dataType.msg=Tagged Results and Contents that contain images.
|
|
||||||
ReportHTML.thumbLink.tags=Tags\:
|
|
||||||
ReportHTML.getName.text=Results - HTML
|
|
||||||
ReportHTML.getDesc.text=A report about results and tagged items in HTML format.
|
|
||||||
ReportHTML.writeIndex.title=Autopsy Report for case {0}
|
|
||||||
ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup.
|
|
||||||
ReportHTML.writeIndex.noFrames.seeNav=Please see <a href\="nav.html">the navigation page</a> for artifact links,
|
|
||||||
ReportHTML.writeIndex.seeSum=and <a href\="summary.html">the summary page</a> for a case summary.
|
|
||||||
ReportHTML.writeNav.title=Report Navigation
|
|
||||||
ReportHTML.writeNav.h1=Report Navigation
|
|
||||||
ReportHTML.writeNav.summary=Case Summary
|
|
||||||
ReportHTML.writeSum.title=Case Summary
|
|
||||||
ReportHTML.writeSum.warningMsg=<span>Warning, this report was run before ingest services completed\!</span>
|
|
||||||
#
|
|
||||||
# autopsy/test/scripts/regression.py._html_report_diff() uses reportGenOn.text, caseName, caseNum,
|
|
||||||
# examiner as a regex signature to skip index.html and summary.html
|
|
||||||
#
|
|
||||||
ReportHTML.writeSum.reportGenOn.text=HTML Report Generated on {0}
|
|
||||||
|
|
||||||
|
|
||||||
ReportHTML.writeSum.numImageSum.imageInfoHeading=<h2>Image Information\:</h2>
|
|
||||||
|
|
||||||
ReportProgressPanel.progress.queuing=Queuing...
|
|
||||||
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
|
||||||
ReportProgressPanel.start.cancelButton.text=Cancel
|
|
||||||
ReportProgressPanel.start.progress.text=Starting report...
|
|
||||||
ReportProgressPanel.complete.processLbl.text=Complete
|
|
||||||
ReportProgressPanel.complete.processLb2.text=Completed with error
|
|
||||||
ReportProgressPanel.complete.cancelButton.text=Complete
|
|
||||||
ReportProgressPanel.cancel.cancelButton.toolTipText=Canceled
|
|
||||||
ReportProgressPanel.cancel.procLbl.text=Canceled
|
|
||||||
ReportVisualPanel1.getName.text=Select and Configure Report Modules
|
|
||||||
ReportVisualPanel2.getName.text=Configure Artifact Reports
|
|
||||||
ReportWizardAction.actionName.text=Generate Report
|
|
||||||
ReportWizardAction.reportWiz.title=Generate Report
|
|
||||||
ReportWizardAction.toolBarButton.text=Generate Report
|
|
||||||
ReportWizardFileOptionsPanel.finishButton.text=Finish
|
|
||||||
ReportWizardFileOptionsVisualPanel.getName.text=Configure File Report
|
|
||||||
ReportWizardPanel1.nextButton.text=Next >
|
|
||||||
ReportWizardPanel1.finishButton.text=Finish
|
|
||||||
ReportWizardPanel2.finishButton.text=Finish
|
|
||||||
ReportWizardPanel2.nextButton.text=Next >
|
|
||||||
ReportBodyFile.generateReport.srcModuleName.text=TSK Body File
|
|
||||||
ReportExcel.endReport.srcModuleName.text=Excel Report
|
|
||||||
ReportHTML.writeIndex.srcModuleName.text=HTML Report
|
|
||||||
ReportKML.genReport.srcModuleName.text=KML Report
|
|
||||||
ReportGenerator.artTableColHdr.extension.text=Extension
|
|
||||||
ReportGenerator.artTableColHdr.mimeType.text=MIME Type
|
|
||||||
ReportGenerator.artTableColHdr.processorArchitecture.text=Processor Architecture
|
|
||||||
ReportGenerator.artTableColHdr.osName.text=Operating System Name
|
|
||||||
ReportGenerator.artTableColHdr.osInstallDate.text=Install Date
|
|
||||||
ReportGenerator.errList.failedMakeRptFolder=Failed to make report folder, may be unable to generate reports.
|
|
||||||
ReportGenerator.notifyErr.errsDuringRptGen=Errors during report generation\:
|
|
||||||
ReportGenerator.errList.failedGetContentTags=Failed to get content tags.
|
|
||||||
ReportGenerator.errList.failedGetBBArtifactTags=Failed to get blackboard artifact tags.
|
|
||||||
ReportGenerator.errList.errGetContentFromBBArtifact=Error while getting content from a blackboard artifact to report on.
|
|
||||||
ReportGenerator.errList.failedGetBBAttribs=Failed to get Blackboard Attributes when generating report.
|
|
||||||
ReportGenerator.errList.failedGetBBArtifacts=Failed to get Blackboard Artifacts when generating report.
|
|
||||||
ReportGenerator.errList.failedQueryKWLists=Failed to query keyword lists.
|
|
||||||
ReportGenerator.errList.failedGetAbstractFileByID=Failed to get Abstract File by ID.
|
|
||||||
ReportGenerator.errList.failedQueryKWs=Failed to query keywords.
|
|
||||||
ReportGenerator.errList.failedQueryHashsetLists=Failed to query hashset lists.
|
|
||||||
ReportGenerator.errList.failedGetAbstractFileFromID=Failed to get Abstract File from ID.
|
|
||||||
ReportGenerator.errList.failedQueryHashsetHits=Failed to query hashsets hits.
|
|
||||||
ReportGenerator.errList.coreExceptionWhileGenRptRow=Core exception while generating row data for artifact report.
|
|
||||||
ReportKML.latLongStartPoint={0};{1};;{2} (Start)\n
|
|
||||||
ReportKML.latLongEndPoint={0};{1};;{2} (End)\n
|
|
||||||
ReportGenerationPanel.cancelButton.actionCommand=Cancel
|
|
||||||
ReportGenerationPanel.cancelButton.text=Cancel
|
|
@ -25,7 +25,6 @@ import java.nio.file.Path;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.function.Supplier;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javafx.embed.swing.SwingFXUtils;
|
import javafx.embed.swing.SwingFXUtils;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
@ -54,7 +53,7 @@ import org.sleuthkit.datamodel.TskCoreException;
|
|||||||
public class SaveSnapshotAsReport extends Action {
|
public class SaveSnapshotAsReport extends Action {
|
||||||
|
|
||||||
private static final Logger LOGGER = Logger.getLogger(SaveSnapshotAsReport.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(SaveSnapshotAsReport.class.getName());
|
||||||
private static final Image SNAP_SHOT = new Image("org/sleuthkit/autopsy/timeline/images/image.png", 16, 16, true, true);
|
private static final Image SNAP_SHOT = new Image("org/sleuthkit/autopsy/timeline/images/image.png", 16, 16, true, true); //NON_NLS
|
||||||
private static final ButtonType OPEN = new ButtonType(Bundle.OpenReportAction_DisplayName(), ButtonBar.ButtonData.NO);
|
private static final ButtonType OPEN = new ButtonType(Bundle.OpenReportAction_DisplayName(), ButtonBar.ButtonData.NO);
|
||||||
private static final ButtonType OK = new ButtonType(ButtonType.OK.getText(), ButtonBar.ButtonData.CANCEL_CLOSE);
|
private static final ButtonType OK = new ButtonType(ButtonType.OK.getText(), ButtonBar.ButtonData.CANCEL_CLOSE);
|
||||||
|
|
||||||
@ -68,20 +67,23 @@ public class SaveSnapshotAsReport extends Action {
|
|||||||
* @param nodeSupplier The Supplier of the node to snapshot.
|
* @param nodeSupplier The Supplier of the node to snapshot.
|
||||||
*/
|
*/
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"SaveSnapshot.action.name.text=Snapshot Report",
|
"Timeline.ModuleName=Timeline",
|
||||||
"SaveSnapshot.action.longText=Save a screen capture of the visualization as a report.",
|
"SaveSnapShotAsReport.action.dialogs.title=Timeline",
|
||||||
"SaveSnapshot.fileChoose.title.text=Save snapshot to",
|
"SaveSnapShotAsReport.action.name.text=Snapshot Report",
|
||||||
|
"SaveSnapShotAsReport.action.longText=Save a screen capture of the visualization as a report.",
|
||||||
"# {0} - report file path",
|
"# {0} - report file path",
|
||||||
"SaveSnapShotAsReport.ReportSavedAt=Report saved at [{0}]",
|
"SaveSnapShotAsReport.ReportSavedAt=Report saved at [{0}]",
|
||||||
"Timeline.ModuleName=Timeline", "SaveSnapShotAsReport.Success=Success",
|
"SaveSnapShotAsReport.Success=Success",
|
||||||
"# {0} - uniqueness identifier, local date time at report creation time",
|
|
||||||
"SaveSnapsHotAsReport.ReportName=timeline-report-{0}",
|
|
||||||
"SaveSnapShotAsReport.FailedToAddReport=Failed to add snaphot to case as a report.",
|
"SaveSnapShotAsReport.FailedToAddReport=Failed to add snaphot to case as a report.",
|
||||||
"# {0} - report name",
|
"# {0} - report path",
|
||||||
"SaveSnapShotAsReport.ErrorWritingReport=Error writing report {0} to disk.",})
|
"SaveSnapShotAsReport.ErrorWritingReport=Error writing report to disk at {0}.",
|
||||||
public SaveSnapshotAsReport(TimeLineController controller, Supplier<Node> nodeSupplier) {
|
"# {0} - generated default report name",
|
||||||
super(Bundle.SaveSnapshot_action_name_text());
|
"SaveSnapShotAsReport.reportName.prompt=leave empty for default report name: {0}.",
|
||||||
setLongText(Bundle.SaveSnapshot_action_longText());
|
"SaveSnapShotAsReport.reportName.header=Enter a report name for the Timeline Snapshot Report."
|
||||||
|
})
|
||||||
|
public SaveSnapshotAsReport(TimeLineController controller, Node node) {
|
||||||
|
super(Bundle.SaveSnapShotAsReport_action_name_text());
|
||||||
|
setLongText(Bundle.SaveSnapShotAsReport_action_longText());
|
||||||
setGraphic(new ImageView(SNAP_SHOT));
|
setGraphic(new ImageView(SNAP_SHOT));
|
||||||
|
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
@ -90,21 +92,22 @@ public class SaveSnapshotAsReport extends Action {
|
|||||||
setEventHandler(actionEvent -> {
|
setEventHandler(actionEvent -> {
|
||||||
//capture generation date and use to make default report name
|
//capture generation date and use to make default report name
|
||||||
Date generationDate = new Date();
|
Date generationDate = new Date();
|
||||||
final String defaultReportName = FileUtil.escapeFileName(currentCase.getName() + " " + new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss").format(generationDate));
|
final String defaultReportName = FileUtil.escapeFileName(currentCase.getName() + " " + new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss").format(generationDate)); //NON_NLS
|
||||||
|
|
||||||
BufferedImage snapshot = SwingFXUtils.fromFXImage(nodeSupplier.get().snapshot(null, null), null);
|
BufferedImage snapshot = SwingFXUtils.fromFXImage(node.snapshot(null, null), null);
|
||||||
|
|
||||||
//prompt user to pick report name
|
//prompt user to pick report name
|
||||||
TextInputDialog textInputDialog = new TextInputDialog();
|
TextInputDialog textInputDialog = new TextInputDialog();
|
||||||
textInputDialog.setTitle("Timeline");
|
textInputDialog.setTitle(Bundle.SaveSnapShotAsReport_action_dialogs_title());
|
||||||
textInputDialog.getEditor().setPromptText("leave empty for default report name: " + defaultReportName);
|
textInputDialog.getEditor().setPromptText(Bundle.SaveSnapShotAsReport_reportName_prompt(defaultReportName));
|
||||||
textInputDialog.getEditor().setStyle("-fx-prompt-text-fill: derive(-fx-control-inner-background, -30%);");
|
//keep prompt even if text field has focus, until user starts typing.
|
||||||
textInputDialog.setHeaderText("Enter a report name for the Timeline Snapshot Report.");
|
textInputDialog.getEditor().setStyle("-fx-prompt-text-fill: derive(-fx-control-inner-background, -30%);");//NON_NLS
|
||||||
|
textInputDialog.setHeaderText(Bundle.SaveSnapShotAsReport_reportName_header());
|
||||||
|
|
||||||
textInputDialog.showAndWait().ifPresent(enteredReportName -> {
|
textInputDialog.showAndWait().ifPresent(enteredReportName -> {
|
||||||
//reportName defaults to case name + timestamp if left blank
|
//reportName defaults to case name + timestamp if left blank
|
||||||
String reportName = StringUtils.defaultIfBlank(enteredReportName, defaultReportName);
|
String reportName = StringUtils.defaultIfBlank(enteredReportName, defaultReportName);
|
||||||
Path reportFolderPath = Paths.get(currentCase.getReportDirectory(), reportName, "Timeline Snapshot");
|
Path reportFolderPath = Paths.get(currentCase.getReportDirectory(), reportName, "Timeline Snapshot"); //NON_NLS
|
||||||
Path reportMainFilePath;
|
Path reportMainFilePath;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -115,7 +118,7 @@ public class SaveSnapshotAsReport extends Action {
|
|||||||
controller.getEventsModel().getZoomParamaters(),
|
controller.getEventsModel().getZoomParamaters(),
|
||||||
generationDate, snapshot).writeReport();
|
generationDate, snapshot).writeReport();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error writing report to disk at " + reportFolderPath, ex);
|
LOGGER.log(Level.SEVERE, "Error writing report to disk at " + reportFolderPath, ex); //NON_NLS
|
||||||
new Alert(Alert.AlertType.ERROR, Bundle.SaveSnapShotAsReport_ErrorWritingReport(reportFolderPath)).show();
|
new Alert(Alert.AlertType.ERROR, Bundle.SaveSnapShotAsReport_ErrorWritingReport(reportFolderPath)).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -124,14 +127,14 @@ public class SaveSnapshotAsReport extends Action {
|
|||||||
//add main file as report to case
|
//add main file as report to case
|
||||||
Case.getCurrentCase().addReport(reportMainFilePath.toString(), Bundle.Timeline_ModuleName(), reportName);
|
Case.getCurrentCase().addReport(reportMainFilePath.toString(), Bundle.Timeline_ModuleName(), reportName);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.WARNING, "Failed to add " + reportMainFilePath.toString() + " to case as a report", ex); //
|
LOGGER.log(Level.WARNING, "Failed to add " + reportMainFilePath.toString() + " to case as a report", ex); //NON_NLS
|
||||||
new Alert(Alert.AlertType.ERROR, Bundle.SaveSnapShotAsReport_FailedToAddReport()).show();
|
new Alert(Alert.AlertType.ERROR, Bundle.SaveSnapShotAsReport_FailedToAddReport()).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//notify user of report location
|
//notify user of report location
|
||||||
final Alert alert = new Alert(Alert.AlertType.INFORMATION, null, OPEN, OK);
|
final Alert alert = new Alert(Alert.AlertType.INFORMATION, null, OPEN, OK);
|
||||||
alert.setTitle(Bundle.SaveSnapshot_action_name_text());
|
alert.setTitle(Bundle.SaveSnapShotAsReport_action_dialogs_title());
|
||||||
alert.setHeaderText(Bundle.SaveSnapShotAsReport_Success());
|
alert.setHeaderText(Bundle.SaveSnapShotAsReport_Success());
|
||||||
|
|
||||||
//make action to open report, and hyperlinklable to invoke action
|
//make action to open report, and hyperlinklable to invoke action
|
||||||
|
@ -98,7 +98,7 @@ public class SnapShotReportWriter {
|
|||||||
Files.createDirectories(reportFolderPath);
|
Files.createDirectories(reportFolderPath);
|
||||||
|
|
||||||
//save the snapshot in the report directory
|
//save the snapshot in the report directory
|
||||||
ImageIO.write(image, "png", reportFolderPath.resolve("snapshot.png").toFile());
|
ImageIO.write(image, "png", reportFolderPath.resolve("snapshot.png").toFile()); //NON-NLS
|
||||||
|
|
||||||
copyResources();
|
copyResources();
|
||||||
|
|
||||||
@ -116,12 +116,12 @@ public class SnapShotReportWriter {
|
|||||||
private void writeSnapShotHTMLFile() throws IOException {
|
private void writeSnapShotHTMLFile() throws IOException {
|
||||||
//make a map of context objects to resolve template paramaters against
|
//make a map of context objects to resolve template paramaters against
|
||||||
HashMap<String, Object> snapShotContext = new HashMap<>();
|
HashMap<String, Object> snapShotContext = new HashMap<>();
|
||||||
snapShotContext.put("reportTitle", reportName);
|
snapShotContext.put("reportTitle", reportName); //NON-NLS
|
||||||
snapShotContext.put("startTime", zoomParams.getTimeRange().getStart().toString(DateTimeFormat.fullDateTime()));
|
snapShotContext.put("startTime", zoomParams.getTimeRange().getStart().toString(DateTimeFormat.fullDateTime())); //NON-NLS
|
||||||
snapShotContext.put("endTime", zoomParams.getTimeRange().getEnd().toString(DateTimeFormat.fullDateTime()));
|
snapShotContext.put("endTime", zoomParams.getTimeRange().getEnd().toString(DateTimeFormat.fullDateTime())); //NON-NLS
|
||||||
snapShotContext.put("zoomParams", zoomParams);
|
snapShotContext.put("zoomParams", zoomParams); //NON-NLS
|
||||||
|
|
||||||
fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/snapshot_template.html", "Snapshot", snapShotContext, reportFolderPath.resolve("snapshot.html"));
|
fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/snapshot_template.html", "Snapshot", snapShotContext, reportFolderPath.resolve("snapshot.html")); //NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -135,10 +135,10 @@ public class SnapShotReportWriter {
|
|||||||
private Path writeIndexHTML() throws IOException {
|
private Path writeIndexHTML() throws IOException {
|
||||||
//make a map of context objects to resolve template paramaters against
|
//make a map of context objects to resolve template paramaters against
|
||||||
HashMap<String, Object> indexContext = new HashMap<>();
|
HashMap<String, Object> indexContext = new HashMap<>();
|
||||||
indexContext.put("currentCase", currentCase);
|
indexContext.put("currentCase", currentCase); //NON-NLS
|
||||||
Path reportIndexFile = reportFolderPath.resolve("index.html");
|
Path reportIndexFile = reportFolderPath.resolve("index.html"); //NON-NLS
|
||||||
|
|
||||||
fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/index_template.html", "Index", indexContext, reportIndexFile);
|
fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/index_template.html", "Index", indexContext, reportIndexFile); //NON-NLS
|
||||||
return reportIndexFile;
|
return reportIndexFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,13 +150,13 @@ public class SnapShotReportWriter {
|
|||||||
private void writeSummaryHTML() throws IOException {
|
private void writeSummaryHTML() throws IOException {
|
||||||
//make a map of context objects to resolve template paramaters against
|
//make a map of context objects to resolve template paramaters against
|
||||||
HashMap<String, Object> summaryContext = new HashMap<>();
|
HashMap<String, Object> summaryContext = new HashMap<>();
|
||||||
summaryContext.put("reportName", reportName);
|
summaryContext.put("reportName", reportName); //NON-NLS
|
||||||
summaryContext.put("reportBranding", reportBranding);
|
summaryContext.put("reportBranding", reportBranding); //NON-NLS
|
||||||
summaryContext.put("generationDateTime", new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(generationDate));
|
summaryContext.put("generationDateTime", new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(generationDate)); //NON-NLS
|
||||||
summaryContext.put("ingestRunning", IngestManager.getInstance().isIngestRunning());
|
summaryContext.put("ingestRunning", IngestManager.getInstance().isIngestRunning()); //NON-NLS
|
||||||
summaryContext.put("currentCase", currentCase);
|
summaryContext.put("currentCase", currentCase); //NON-NLS
|
||||||
|
|
||||||
fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/summary_template.html", "Summary", summaryContext, reportFolderPath.resolve("summary.html"));
|
fillTemplateAndWrite("/org/sleuthkit/autopsy/timeline/snapshot/summary_template.html", "Summary", summaryContext, reportFolderPath.resolve("summary.html")); //NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -178,7 +178,7 @@ public class SnapShotReportWriter {
|
|||||||
private void fillTemplateAndWrite(final String templateLocation, final String templateName, Object context, final Path outPutFile) throws IOException {
|
private void fillTemplateAndWrite(final String templateLocation, final String templateName, Object context, final Path outPutFile) throws IOException {
|
||||||
|
|
||||||
Mustache summaryMustache = mf.compile(new InputStreamReader(SnapShotReportWriter.class.getResourceAsStream(templateLocation)), templateName);
|
Mustache summaryMustache = mf.compile(new InputStreamReader(SnapShotReportWriter.class.getResourceAsStream(templateLocation)), templateName);
|
||||||
try (Writer writer = Files.newBufferedWriter(outPutFile, Charset.forName("UTF-8"))) {
|
try (Writer writer = Files.newBufferedWriter(outPutFile, Charset.forName("UTF-8"))) { //NON-NLS
|
||||||
summaryMustache.execute(writer, context);
|
summaryMustache.execute(writer, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,36 +194,36 @@ public class SnapShotReportWriter {
|
|||||||
//pull generator and agency logos from branding
|
//pull generator and agency logos from branding
|
||||||
String generatorLogoPath = reportBranding.getGeneratorLogoPath();
|
String generatorLogoPath = reportBranding.getGeneratorLogoPath();
|
||||||
if (StringUtils.isNotBlank(generatorLogoPath)) {
|
if (StringUtils.isNotBlank(generatorLogoPath)) {
|
||||||
Files.copy(Files.newInputStream(Paths.get(generatorLogoPath)), reportFolderPath.resolve("generator_logo.png"));
|
Files.copy(Files.newInputStream(Paths.get(generatorLogoPath)), reportFolderPath.resolve("generator_logo.png")); //NON-NLS
|
||||||
}
|
}
|
||||||
String agencyLogoPath = reportBranding.getAgencyLogoPath();
|
String agencyLogoPath = reportBranding.getAgencyLogoPath();
|
||||||
if (StringUtils.isNotBlank(agencyLogoPath)) {
|
if (StringUtils.isNotBlank(agencyLogoPath)) {
|
||||||
Files.copy(Files.newInputStream(Paths.get(agencyLogoPath)), reportFolderPath.resolve("agency_logo.png"));
|
Files.copy(Files.newInputStream(Paths.get(agencyLogoPath)), reportFolderPath.resolve("agency_logo.png")); //NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy navigation html
|
//copy navigation html
|
||||||
try (InputStream navStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/snapshot/navigation.html")) {
|
try (InputStream navStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/snapshot/navigation.html")) { //NON-NLS
|
||||||
Files.copy(navStream, reportFolderPath.resolve("nav.html"));
|
Files.copy(navStream, reportFolderPath.resolve("nav.html")); //NON-NLS
|
||||||
}
|
}
|
||||||
//copy favicon
|
//copy favicon
|
||||||
try (InputStream faviconStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/favicon.ico")) {
|
try (InputStream faviconStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/favicon.ico")) { //NON-NLS
|
||||||
Files.copy(faviconStream, reportFolderPath.resolve("favicon.ico"));
|
Files.copy(faviconStream, reportFolderPath.resolve("favicon.ico")); //NON-NLS
|
||||||
}
|
}
|
||||||
//copy report summary icon
|
//copy report summary icon
|
||||||
try (InputStream summaryStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/summary.png")) {
|
try (InputStream summaryStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/report/images/summary.png")) { //NON-NLS
|
||||||
Files.copy(summaryStream, reportFolderPath.resolve("summary.png"));
|
Files.copy(summaryStream, reportFolderPath.resolve("summary.png")); //NON-NLS
|
||||||
}
|
}
|
||||||
//copy snapshot icon
|
//copy snapshot icon
|
||||||
try (InputStream snapshotIconStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/images/image.png")) {
|
try (InputStream snapshotIconStream = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/images/image.png")) { //NON-NLS
|
||||||
Files.copy(snapshotIconStream, reportFolderPath.resolve("snapshot_icon.png"));
|
Files.copy(snapshotIconStream, reportFolderPath.resolve("snapshot_icon.png")); //NON-NLS
|
||||||
}
|
}
|
||||||
//copy main report css
|
//copy main report css
|
||||||
try (InputStream resource = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/snapshot/index.css")) { //
|
try (InputStream resource = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/snapshot/index.css")) { //NON-NLS
|
||||||
Files.copy(resource, reportFolderPath.resolve("index.css")); //
|
Files.copy(resource, reportFolderPath.resolve("index.css")); //NON-NLS
|
||||||
}
|
}
|
||||||
//copy summary css
|
//copy summary css
|
||||||
try (InputStream resource = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/snapshot/summary.css")) { //
|
try (InputStream resource = SnapShotReportWriter.class.getResourceAsStream("/org/sleuthkit/autopsy/timeline/snapshot/summary.css")) { //NON-NLS
|
||||||
Files.copy(resource, reportFolderPath.resolve("summary.css")); //
|
Files.copy(resource, reportFolderPath.resolve("summary.css")); //NON-NLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ final public class VisualizationPanel extends BorderPane {
|
|||||||
setViewMode(controller.viewModeProperty().get());
|
setViewMode(controller.viewModeProperty().get());
|
||||||
|
|
||||||
//configure snapshor button / action
|
//configure snapshor button / action
|
||||||
ActionUtils.configureButton(new SaveSnapshotAsReport(controller, () -> VisualizationPanel.this), snapShotButton);
|
ActionUtils.configureButton(new SaveSnapshotAsReport(controller, VisualizationPanel.this), snapShotButton);
|
||||||
|
|
||||||
/////configure start and end pickers
|
/////configure start and end pickers
|
||||||
startLabel.setText(Bundle.VisualizationPanel_startLabel_text());
|
startLabel.setText(Bundle.VisualizationPanel_startLabel_text());
|
||||||
@ -427,54 +427,54 @@ final public class VisualizationPanel extends BorderPane {
|
|||||||
|
|
||||||
histogramTask = new LoggedTask<Void>(
|
histogramTask = new LoggedTask<Void>(
|
||||||
NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.title"), true) { // NON-NLS
|
NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.title"), true) { // NON-NLS
|
||||||
private final Lighting lighting = new Lighting();
|
private final Lighting lighting = new Lighting();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void call() throws Exception {
|
protected Void call() throws Exception {
|
||||||
|
|
||||||
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.preparing")); // NON-NLS
|
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.preparing")); // NON-NLS
|
||||||
|
|
||||||
long max = 0;
|
long max = 0;
|
||||||
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.getSpanningInterval());
|
final RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.getSpanningInterval());
|
||||||
final long lowerBound = rangeInfo.getLowerBound();
|
final long lowerBound = rangeInfo.getLowerBound();
|
||||||
final long upperBound = rangeInfo.getUpperBound();
|
final long upperBound = rangeInfo.getUpperBound();
|
||||||
Interval timeRange = new Interval(new DateTime(lowerBound, TimeLineController.getJodaTimeZone()), new DateTime(upperBound, TimeLineController.getJodaTimeZone()));
|
Interval timeRange = new Interval(new DateTime(lowerBound, TimeLineController.getJodaTimeZone()), new DateTime(upperBound, TimeLineController.getJodaTimeZone()));
|
||||||
|
|
||||||
//extend range to block bounderies (ie day, month, year)
|
//extend range to block bounderies (ie day, month, year)
|
||||||
int p = 0; // progress counter
|
int p = 0; // progress counter
|
||||||
|
|
||||||
//clear old data, and reset ranges and series
|
//clear old data, and reset ranges and series
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.resetUI")); // NON-NLS
|
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.resetUI")); // NON-NLS
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ArrayList<Long> bins = new ArrayList<>();
|
ArrayList<Long> bins = new ArrayList<>();
|
||||||
|
|
||||||
DateTime start = timeRange.getStart();
|
DateTime start = timeRange.getStart();
|
||||||
while (timeRange.contains(start)) {
|
while (timeRange.contains(start)) {
|
||||||
if (isCancelled()) {
|
if (isCancelled()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
DateTime end = start.plus(rangeInfo.getPeriodSize().getPeriod());
|
DateTime end = start.plus(rangeInfo.getPeriodSize().getPeriod());
|
||||||
final Interval interval = new Interval(start, end);
|
final Interval interval = new Interval(start, end);
|
||||||
//increment for next iteration
|
//increment for next iteration
|
||||||
|
|
||||||
start = end;
|
start = end;
|
||||||
|
|
||||||
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.queryDb")); // NON-NLS
|
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.queryDb")); // NON-NLS
|
||||||
//query for current range
|
//query for current range
|
||||||
long count = filteredEvents.getEventCounts(interval).values().stream().mapToLong(Long::valueOf).sum();
|
long count = filteredEvents.getEventCounts(interval).values().stream().mapToLong(Long::valueOf).sum();
|
||||||
bins.add(count);
|
bins.add(count);
|
||||||
|
|
||||||
max = Math.max(count, max);
|
max = Math.max(count, max);
|
||||||
|
|
||||||
final double fMax = Math.log(max);
|
final double fMax = Math.log(max);
|
||||||
final ArrayList<Long> fbins = new ArrayList<>(bins);
|
final ArrayList<Long> fbins = new ArrayList<>(bins);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.updateUI2")); // NON-NLS
|
updateMessage(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.histogramTask.updateUI2")); // NON-NLS
|
||||||
|
|
||||||
histogramBox.getChildren().clear();
|
histogramBox.getChildren().clear();
|
||||||
|
|
||||||
for (Long bin : fbins) {
|
for (Long bin : fbins) {
|
||||||
if (isCancelled()) {
|
if (isCancelled()) {
|
||||||
@ -499,7 +499,7 @@ final public class VisualizationPanel extends BorderPane {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
new Thread(histogramTask).start();
|
new Thread(histogramTask).start();
|
||||||
controller.monitorTask(histogramTask);
|
controller.monitorTask(histogramTask);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user