mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Merge pull request #297 from millmanorama/e01_st_verification
E01 set verification
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
/**
|
||||
@@ -106,12 +105,9 @@ public class AddImageErrorsDialog extends javax.swing.JDialog {
|
||||
setVisible(false);
|
||||
}//GEN-LAST:event_closeButtonActionPerformed
|
||||
|
||||
|
||||
public void setErrors(String errors) {
|
||||
errorsText.append(errors +"\n");
|
||||
public void appendErrors(String errors) {
|
||||
errorsText.append(errors + "\n");
|
||||
}
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton closeButton;
|
||||
private javax.swing.JButton copyButton;
|
||||
|
||||
@@ -187,7 +187,7 @@ class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePa
|
||||
* @param errorString the error string to be displayed
|
||||
* @param critical true if this is a critical error
|
||||
*/
|
||||
void setErrors(String errorString, boolean critical) {
|
||||
void addErrors(String errorString, boolean critical) {
|
||||
getComponent().showErrors(errorString, critical);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.openide.WizardDescriptor;
|
||||
public class AddImageWizardAddingProgressVisual extends javax.swing.JPanel {
|
||||
|
||||
private static final String ADDING_DATA_SOURCE_COMPLETE = "Adding Data Source - Complete";
|
||||
private String errorLog;
|
||||
private String errorLog = "";
|
||||
private boolean hasCriticalErrors = false;
|
||||
|
||||
/**
|
||||
@@ -75,15 +75,6 @@ public class AddImageWizardAddingProgressVisual extends javax.swing.JPanel {
|
||||
|
||||
}
|
||||
|
||||
// /**
|
||||
// * reset some of the visual components.
|
||||
// *
|
||||
// * is this ever invoked?
|
||||
// */
|
||||
// void resetInfoPanel() {
|
||||
// viewLogButton.setVisible(false);
|
||||
// progressLabel.setText("");
|
||||
// }
|
||||
public JProgressBar getProgressBar() {
|
||||
return this.progressBar;
|
||||
}
|
||||
@@ -120,16 +111,16 @@ public class AddImageWizardAddingProgressVisual extends javax.swing.JPanel {
|
||||
*/
|
||||
public void showErrors(final String errors, boolean critical) {
|
||||
hasCriticalErrors |= critical;
|
||||
progressBar.setValue(100); //always invoked when process completed
|
||||
|
||||
//progressBar.setValue(100); //always invoked when process completed
|
||||
if (hasCriticalErrors) {
|
||||
statusLabel.setText("*Failed to add image (critical errors encountered). Click below to view the log.");
|
||||
} else {
|
||||
statusLabel.setText("*Data Source added (non-critical errors encountered). Click below to view the log.");
|
||||
}
|
||||
|
||||
errorLog = errors;
|
||||
errorLog += errors + "\n";
|
||||
viewLogButton.setVisible(true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -272,7 +263,7 @@ public class AddImageWizardAddingProgressVisual extends javax.swing.JPanel {
|
||||
private void viewLogButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewLogButtonActionPerformed
|
||||
//show error dialog
|
||||
AddImageErrorsDialog dialog = new AddImageErrorsDialog(null, true);
|
||||
dialog.setErrors(errorLog);
|
||||
dialog.appendErrors(errorLog);
|
||||
dialog.setLocationRelativeTo(null);
|
||||
dialog.setVisible(true);
|
||||
}//GEN-LAST:event_viewLogButtonActionPerformed
|
||||
|
||||
@@ -520,15 +520,6 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
|
||||
// process is over, doesn't need to be dealt with if cancel happens
|
||||
cancelledWhileRunning.disable();
|
||||
|
||||
// //enqueue what would be in done() to EDT thread
|
||||
// EventQueue.invokeLater(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// postProcessImage();
|
||||
// }
|
||||
// });
|
||||
|
||||
/////////////////Done() is already executed in EDT per SwingWorker javadocs -jm
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -563,12 +554,11 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
|
||||
if (imageId != 0) {
|
||||
Image newImage = Case.getCurrentCase().addImage(contentPath, imageId, timezone);
|
||||
|
||||
newImage.getSsize();
|
||||
//while we have the image, verify the size of its contents
|
||||
String verificationErrors = newImage.verifyImageSize();
|
||||
if (verificationErrors.equals("") == false) {
|
||||
//data error (non-critical)
|
||||
// @@@ Aren't we potentially overwriting existing errors...
|
||||
progressPanel.setErrors(verificationErrors, false);
|
||||
progressPanel.addErrors(verificationErrors, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -604,19 +594,16 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
|
||||
revert();
|
||||
if (hasCritError) {
|
||||
//core error
|
||||
progressPanel.setErrors(errorString, true);
|
||||
progressPanel.addErrors(errorString, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (errorString != null) {
|
||||
//data error (non-critical)
|
||||
logger.log(Level.INFO, "Handling non-critical errors that occured in add image process");
|
||||
progressPanel.setErrors(errorString, false);
|
||||
progressPanel.addErrors(errorString, false);
|
||||
}
|
||||
|
||||
errorString = null;
|
||||
|
||||
|
||||
|
||||
try {
|
||||
// When everything happens without an error:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Updated by build script
|
||||
#Fri, 20 Sep 2013 14:57:32 -0400
|
||||
#Wed, 25 Sep 2013 12:13:40 -0400
|
||||
LBL_splash_window_title=Starting Autopsy
|
||||
SPLASH_HEIGHT=288
|
||||
SPLASH_WIDTH=538
|
||||
@@ -8,4 +8,4 @@ SplashRunningTextBounds=5,266,530,17
|
||||
SplashRunningTextColor=0x0
|
||||
SplashRunningTextFontSize=18
|
||||
|
||||
currentVersion=Autopsy 20130920
|
||||
currentVersion=Autopsy 20130925
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Updated by build script
|
||||
#Fri, 20 Sep 2013 14:57:32 -0400
|
||||
#Wed, 25 Sep 2013 12:13:40 -0400
|
||||
|
||||
CTL_MainWindow_Title=Autopsy 20130920
|
||||
CTL_MainWindow_Title_No_Project=Autopsy 20130920
|
||||
CTL_MainWindow_Title=Autopsy 20130925
|
||||
CTL_MainWindow_Title_No_Project=Autopsy 20130925
|
||||
|
||||
Reference in New Issue
Block a user