mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
7751 modify status message to support multi-line status
This commit is contained in:
parent
abe3ee4131
commit
21d73bf628
@ -4,7 +4,6 @@ ReportBranding.defaultReportTitle.text=Autopsy Forensic Report
|
|||||||
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
ReportBranding.defaultReportFooter.text=Powered by Autopsy Open Source Digital Forensics Platform - www.sleuthkit.org
|
||||||
ReportProgressPanel.pathLabel.text=pathLabel
|
ReportProgressPanel.pathLabel.text=pathLabel
|
||||||
ReportProgressPanel.reportLabel.text=reportLabel
|
ReportProgressPanel.reportLabel.text=reportLabel
|
||||||
ReportProgressPanel.statusMessageLabel.text=processingLabel
|
|
||||||
ReportProgressPanel.separationLabel.text=:
|
ReportProgressPanel.separationLabel.text=:
|
||||||
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
||||||
ReportProgressPanel.start.cancelButton.text=Cancel
|
ReportProgressPanel.start.cancelButton.text=Cancel
|
||||||
|
@ -9,7 +9,6 @@ ReportProgressPanel.progress.error=Error
|
|||||||
ReportProgressPanel.progress.queuing=Queuing...
|
ReportProgressPanel.progress.queuing=Queuing...
|
||||||
ReportProgressPanel.progress.running=Running...
|
ReportProgressPanel.progress.running=Running...
|
||||||
ReportProgressPanel.reportLabel.text=reportLabel
|
ReportProgressPanel.reportLabel.text=reportLabel
|
||||||
ReportProgressPanel.statusMessageLabel.text=processingLabel
|
|
||||||
ReportProgressPanel.separationLabel.text=:
|
ReportProgressPanel.separationLabel.text=:
|
||||||
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
ReportProgressPanel.initPathLabel.noFile=<html><u>No report file</u></html>
|
||||||
ReportProgressPanel.start.cancelButton.text=Cancel
|
ReportProgressPanel.start.cancelButton.text=Cancel
|
||||||
|
@ -75,7 +75,6 @@ ReportGenerationPanel.closeButton.text=\u9589\u3058\u308b
|
|||||||
ReportProgressPanel.reportLabel.text=reportLabel
|
ReportProgressPanel.reportLabel.text=reportLabel
|
||||||
ReportProgressPanel.pathLabel.text=pathLabel
|
ReportProgressPanel.pathLabel.text=pathLabel
|
||||||
ReportProgressPanel.separationLabel.text=:
|
ReportProgressPanel.separationLabel.text=:
|
||||||
ReportProgressPanel.statusMessageLabel.text=processingLabel
|
|
||||||
ReportGenerationPanel.titleLabel.text=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u9032\u6357\u72b6\u6cc1
|
ReportGenerationPanel.titleLabel.text=\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u9032\u6357\u72b6\u6cc1
|
||||||
ReportVisualPanel2.taggedResultsRadioButton.text=\u30bf\u30b0\u4ed8\u304d\u7d50\u679c
|
ReportVisualPanel2.taggedResultsRadioButton.text=\u30bf\u30b0\u4ed8\u304d\u7d50\u679c
|
||||||
ReportVisualPanel2.allResultsRadioButton.text=\u3059\u3079\u3066\u306e\u7d50\u679c
|
ReportVisualPanel2.allResultsRadioButton.text=\u3059\u3079\u3066\u306e\u7d50\u679c
|
||||||
|
@ -21,10 +21,9 @@
|
|||||||
<Layout>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="statusMessageLabel" max="32767" attributes="0"/>
|
|
||||||
<Component id="reportProgressBar" alignment="0" max="32767" attributes="0"/>
|
<Component id="reportProgressBar" alignment="0" max="32767" attributes="0"/>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="reportLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="reportLabel" min="-2" max="-2" attributes="0"/>
|
||||||
@ -33,6 +32,7 @@
|
|||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="pathLabel" pref="548" max="32767" attributes="0"/>
|
<Component id="pathLabel" pref="548" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
|
<Component id="statusScrollPane" alignment="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<Component id="separationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
<Component id="separationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="statusMessageLabel" min="-2" max="-2" attributes="0"/>
|
<Component id="statusScrollPane" pref="26" max="32767" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
@ -86,12 +86,32 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="statusMessageLabel">
|
<Container class="javax.swing.JScrollPane" name="statusScrollPane">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/report/Bundle.properties" key="ReportProgressPanel.statusMessageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<Border info="null"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
|
</AuxValues>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JTextArea" name="statusMessageTextArea">
|
||||||
|
<Properties>
|
||||||
|
<Property name="editable" type="boolean" value="false"/>
|
||||||
|
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
|
<Color blue="f0" green="f0" id="Menu" palette="2" red="f0" type="palette"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="columns" type="int" value="20"/>
|
||||||
|
<Property name="lineWrap" type="boolean" value="true"/>
|
||||||
|
<Property name="rows" type="int" value="5"/>
|
||||||
|
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||||
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2012-2019 Basis Technology Corp.
|
* Copyright 2012-2021 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -83,7 +83,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
initComponents();
|
initComponents();
|
||||||
reportProgressBar.setIndeterminate(true);
|
reportProgressBar.setIndeterminate(true);
|
||||||
reportProgressBar.setMaximum(100);
|
reportProgressBar.setMaximum(100);
|
||||||
statusMessageLabel.setText(Bundle.ReportProgressPanel_progress_queuing());
|
statusMessageTextArea.setText(Bundle.ReportProgressPanel_progress_queuing());
|
||||||
status = ReportStatus.QUEUING;
|
status = ReportStatus.QUEUING;
|
||||||
reportLabel.setText("");
|
reportLabel.setText("");
|
||||||
pathLabel.setText(""); //NON-NLS
|
pathLabel.setText(""); //NON-NLS
|
||||||
@ -174,7 +174,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
*/
|
*/
|
||||||
public void start() {
|
public void start() {
|
||||||
EventQueue.invokeLater(() -> {
|
EventQueue.invokeLater(() -> {
|
||||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.start.progress.text"));
|
statusMessageTextArea.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.start.progress.text"));
|
||||||
status = ReportStatus.RUNNING;
|
status = ReportStatus.RUNNING;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
public void updateStatusLabel(String statusMessage) {
|
public void updateStatusLabel(String statusMessage) {
|
||||||
EventQueue.invokeLater(() -> {
|
EventQueue.invokeLater(() -> {
|
||||||
if (status != ReportStatus.CANCELED) {
|
if (status != ReportStatus.CANCELED) {
|
||||||
statusMessageLabel.setText(statusMessage);
|
statusMessageTextArea.setText(statusMessage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -283,8 +283,8 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
case COMPLETE: {
|
case COMPLETE: {
|
||||||
ReportStatus oldValue = status;
|
ReportStatus oldValue = status;
|
||||||
status = ReportStatus.COMPLETE;
|
status = ReportStatus.COMPLETE;
|
||||||
statusMessageLabel.setForeground(Color.BLACK);
|
statusMessageTextArea.setForeground(Color.BLACK);
|
||||||
statusMessageLabel.setText(statusMessage);
|
statusMessageTextArea.setText(statusMessage);
|
||||||
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
||||||
reportProgressBar.setStringPainted(true);
|
reportProgressBar.setStringPainted(true);
|
||||||
reportProgressBar.setForeground(GREEN);
|
reportProgressBar.setForeground(GREEN);
|
||||||
@ -295,8 +295,8 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
case ERROR: {
|
case ERROR: {
|
||||||
ReportStatus oldValue = status;
|
ReportStatus oldValue = status;
|
||||||
status = ReportStatus.ERROR;
|
status = ReportStatus.ERROR;
|
||||||
statusMessageLabel.setForeground(RED);
|
statusMessageTextArea.setForeground(RED);
|
||||||
statusMessageLabel.setText(statusMessage);
|
statusMessageTextArea.setText(statusMessage);
|
||||||
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
reportProgressBar.setValue(reportProgressBar.getMaximum());
|
||||||
reportProgressBar.setStringPainted(true);
|
reportProgressBar.setStringPainted(true);
|
||||||
reportProgressBar.setForeground(RED);
|
reportProgressBar.setForeground(RED);
|
||||||
@ -333,8 +333,8 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
reportProgressBar.setForeground(RED); // Red
|
reportProgressBar.setForeground(RED); // Red
|
||||||
reportProgressBar.setString(ReportStatus.CANCELED.getDisplayName());
|
reportProgressBar.setString(ReportStatus.CANCELED.getDisplayName());
|
||||||
firePropertyChange(ReportStatus.CANCELED.toString(), oldValue, status);
|
firePropertyChange(ReportStatus.CANCELED.toString(), oldValue, status);
|
||||||
statusMessageLabel.setForeground(RED);
|
statusMessageTextArea.setForeground(RED);
|
||||||
statusMessageLabel.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.cancel.procLbl.text"));
|
statusMessageTextArea.setText(NbBundle.getMessage(this.getClass(), "ReportProgressPanel.cancel.procLbl.text"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -368,7 +368,8 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
reportLabel = new javax.swing.JLabel();
|
reportLabel = new javax.swing.JLabel();
|
||||||
pathLabel = new javax.swing.JLabel();
|
pathLabel = new javax.swing.JLabel();
|
||||||
separationLabel = new javax.swing.JLabel();
|
separationLabel = new javax.swing.JLabel();
|
||||||
statusMessageLabel = new javax.swing.JLabel();
|
javax.swing.JScrollPane statusScrollPane = new javax.swing.JScrollPane();
|
||||||
|
statusMessageTextArea = new javax.swing.JTextArea();
|
||||||
|
|
||||||
setMinimumSize(new java.awt.Dimension(486, 68));
|
setMinimumSize(new java.awt.Dimension(486, 68));
|
||||||
|
|
||||||
@ -380,7 +381,15 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(separationLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.separationLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(separationLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.separationLabel.text")); // NOI18N
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(statusMessageLabel, org.openide.util.NbBundle.getMessage(ReportProgressPanel.class, "ReportProgressPanel.statusMessageLabel.text")); // NOI18N
|
statusScrollPane.setBorder(null);
|
||||||
|
|
||||||
|
statusMessageTextArea.setEditable(false);
|
||||||
|
statusMessageTextArea.setBackground(java.awt.SystemColor.menu);
|
||||||
|
statusMessageTextArea.setColumns(20);
|
||||||
|
statusMessageTextArea.setLineWrap(true);
|
||||||
|
statusMessageTextArea.setRows(5);
|
||||||
|
statusMessageTextArea.setWrapStyleWord(true);
|
||||||
|
statusScrollPane.setViewportView(statusMessageTextArea);
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
@ -389,14 +398,14 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(statusMessageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
||||||
.addComponent(reportProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(reportProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(reportLabel)
|
.addComponent(reportLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(separationLabel)
|
.addComponent(separationLabel)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)))
|
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE))
|
||||||
|
.addComponent(statusScrollPane))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
@ -410,7 +419,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
.addComponent(pathLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addComponent(separationLabel))
|
.addComponent(separationLabel))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(statusMessageLabel)
|
.addComponent(statusScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE)
|
||||||
.addGap(13, 13, 13))
|
.addGap(13, 13, 13))
|
||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
@ -421,7 +430,7 @@ public class ReportProgressPanel extends javax.swing.JPanel {
|
|||||||
private javax.swing.JLabel reportLabel;
|
private javax.swing.JLabel reportLabel;
|
||||||
private javax.swing.JProgressBar reportProgressBar;
|
private javax.swing.JProgressBar reportProgressBar;
|
||||||
private javax.swing.JLabel separationLabel;
|
private javax.swing.JLabel separationLabel;
|
||||||
private javax.swing.JLabel statusMessageLabel;
|
private javax.swing.JTextArea statusMessageTextArea;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,8 +5,8 @@ ReportHTML.getName.text=HTML Report
|
|||||||
ReportHTML.getDesc.text=A report about results and tagged items in HTML format.
|
ReportHTML.getDesc.text=A report about results and tagged items in HTML format.
|
||||||
ReportHTML.writeIndex.title=for case {0}
|
ReportHTML.writeIndex.title=for case {0}
|
||||||
ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup.
|
ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup.
|
||||||
ReportHTML.writeIndex.noFrames.seeNav=Please see <a href="content\nav.html">the navigation page</a> for artifact links,
|
ReportHTML.writeIndex.noFrames.seeNav=Please see <a href\="content\nav.html">the navigation page</a> for artifact links,
|
||||||
ReportHTML.writeIndex.seeSum=and <a href="contentsummary.html">the summary page</a> for a case summary.
|
ReportHTML.writeIndex.seeSum=and <a href\="content\summary.html">the summary page</a> for a case summary.
|
||||||
ReportHTML.writeNav.title=Report Navigation
|
ReportHTML.writeNav.title=Report Navigation
|
||||||
ReportHTML.writeNav.h1=Report Navigation
|
ReportHTML.writeNav.h1=Report Navigation
|
||||||
ReportHTML.writeNav.summary=Case Summary
|
ReportHTML.writeNav.summary=Case Summary
|
||||||
@ -16,7 +16,7 @@ ReportHTML.writeSum.caseNumber=Case Number:
|
|||||||
ReportHTML.writeSum.caseNumImages=Number of data sources in case:
|
ReportHTML.writeSum.caseNumImages=Number of data sources in case:
|
||||||
ReportHTML.writeSum.examiner=Examiner:
|
ReportHTML.writeSum.examiner=Examiner:
|
||||||
ReportHTML.writeSum.title=Case Summary
|
ReportHTML.writeSum.title=Case Summary
|
||||||
ReportHTML.writeSum.warningMsg=<span>Warning, this report was run before ingest services completed!</span>
|
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,
|
# autopsy/test/scripts/regression.py._html_report_diff() uses reportGenOn.text, caseName, caseNum,
|
||||||
# examiner as a regex signature to skip report.html and summary.html
|
# examiner as a regex signature to skip report.html and summary.html
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2020 Basis Technology Corp.
|
* Copyright 2011-2021 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -23,6 +23,7 @@ import java.util.List;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.openide.util.lookup.ServiceProvider;
|
import org.openide.util.lookup.ServiceProvider;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
@ -155,13 +156,18 @@ public class SaveTaggedHashesToHashDb implements GeneralReportModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
progressPanel.updateStatusLabel("Adding " + tagName.getDisplayName() + " hashes to " + hashSet.getHashSetName() + " hash set...");
|
progressPanel.updateStatusLabel("Adding " + tagName.getDisplayName() + " hashes to " + hashSet.getHashSetName() + " hash set...");
|
||||||
|
List<ContentTag> tags = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
List<ContentTag> tags = tagsManager.getContentTagsByTagName(tagName);
|
tags.addAll(tagsManager.getContentTagsByTagName(tagName));
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
Logger.getLogger(SaveTaggedHashesToHashDb.class.getName()).log(Level.SEVERE, "Error adding to hash set", ex);
|
||||||
|
progressPanel.updateStatusLabel("Error getting selected tags for case.");
|
||||||
|
}
|
||||||
for (ContentTag tag : tags) {
|
for (ContentTag tag : tags) {
|
||||||
// TODO: Currently only AbstractFiles have md5 hashes. Here only files matter.
|
// TODO: Currently only AbstractFiles have md5 hashes. Here only files matter.
|
||||||
Content content = tag.getContent();
|
Content content = tag.getContent();
|
||||||
if (content instanceof AbstractFile) {
|
if (content instanceof AbstractFile) {
|
||||||
if (null != ((AbstractFile) content).getMd5Hash()) {
|
if (!StringUtils.isBlank(((AbstractFile) content).getMd5Hash())) {
|
||||||
try {
|
try {
|
||||||
hashSet.addHashes(tag.getContent(), openCase.getDisplayName());
|
hashSet.addHashes(tag.getContent(), openCase.getDisplayName());
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
@ -170,32 +176,28 @@ public class SaveTaggedHashesToHashDb implements GeneralReportModule {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
progressPanel.updateStatusLabel("Unable to add the " + (tags.size() > 1 ? "files" : "file") + " to the hash set. Hashes have not been calculated. Please configure and run an appropriate ingest module.");
|
progressPanel.updateStatusLabel("Unable to add the " + (tags.size() > 1 ? "files" : "file") + " to the hash set. Hashes have not been calculated. Please configure and run an appropriate ingest module.");
|
||||||
break;
|
failedExports.add(tag.getContent().getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
|
||||||
Logger.getLogger(SaveTaggedHashesToHashDb.class.getName()).log(Level.SEVERE, "Error adding to hash set", ex);
|
|
||||||
progressPanel.updateStatusLabel("Error getting selected tags for case.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
progressPanel.setIndeterminate(false);
|
||||||
if (!failedExports.isEmpty()) {
|
if (!failedExports.isEmpty()) {
|
||||||
StringBuilder errorMessage = new StringBuilder("Failed to export hashes for the following files: ");
|
StringBuilder errorMessage = new StringBuilder("<html>Failed to export hashes for the following files: ");
|
||||||
for (int i = 0; i < failedExports.size(); ++i) {
|
for (int i = 0; i < failedExports.size(); ++i) {
|
||||||
errorMessage.append(failedExports.get(i));
|
errorMessage.append(failedExports.get(i));
|
||||||
if (failedExports.size() > 1 && i < failedExports.size() - 1) {
|
if (failedExports.size() > 1 && i < failedExports.size() - 1) {
|
||||||
errorMessage.append(",");
|
errorMessage.append(",<br>");
|
||||||
}
|
}
|
||||||
if (i == failedExports.size() - 1) {
|
if (i == failedExports.size() - 1) {
|
||||||
errorMessage.append(".");
|
errorMessage.append(".</html>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
progressPanel.updateStatusLabel(errorMessage.toString());
|
progressPanel.complete(ReportProgressPanel.ReportStatus.ERROR, errorMessage.toString());
|
||||||
}
|
} else {
|
||||||
|
|
||||||
progressPanel.setIndeterminate(false);
|
|
||||||
progressPanel.complete(ReportProgressPanel.ReportStatus.COMPLETE);
|
progressPanel.complete(ReportProgressPanel.ReportStatus.COMPLETE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JPanel getConfigurationPanel() {
|
public JPanel getConfigurationPanel() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user