Skip to content
Snippets Groups Projects
Commit aadf0d47 authored by Brian Carrier's avatar Brian Carrier
Browse files

Merge pull request #297 from millmanorama/e01_st_verification

E01 set verification
parents df8f1abc fd4071d6
No related branches found
No related tags found
No related merge requests found
......@@ -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 @@ private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F
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 @@ public void storeSettings(WizardDescriptor settings) {
* @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 @@
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 @@ private void customizeComponents() {
}
// /**
// * 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 void setCurrentDirText(String dir) {
*/
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 void actionPerformed(java.awt.event.ActionEvent evt) {
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 @@ public void run() {
// 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 @@ private void commitImage(WizardDescriptor settings) throws Exception {
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 @@ protected void done() {
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:
......
#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
#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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment