diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AutoIngestCasePanelInterface.java b/Core/src/org/sleuthkit/autopsy/casemodule/AutoIngestCasePanelInterface.java new file mode 100755 index 0000000000..795b636b35 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AutoIngestCasePanelInterface.java @@ -0,0 +1,29 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2017 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.casemodule; + +import javax.swing.JDialog; + +/** + * Interface for startup window implementations + */ +public interface AutoIngestCasePanelInterface { + + public void addWindowStateListener(JDialog parent); +} diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 8ba843a41c..1fc2209750 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -17,13 +17,7 @@ NewCaseVisualPanel1.jLabel2.text_1=Case data will be stored in the following dir NewCaseVisualPanel1.caseParentDirTextField.text= NewCaseVisualPanel1.caseDirTextField.text_1= CueBannerPanel.autopsyLogo.text= -CueBannerPanel.createNewLabel.text=Create New Case -CueBannerPanel.openLabel.text=Open Existing Case CueBannerPanel.closeButton.text=Close -CueBannerPanel.openRecentLabel.text=Open Recent Case -CueBannerPanel.newCaseButton.text= -CueBannerPanel.openCaseButton.text= -CueBannerPanel.openRecentButton.text= OpenRecentCasePanel.cancelButton.text=Cancel OpenRecentCasePanel.jLabel1.text=Recent Cases NewCaseVisualPanel2.caseNumberTextField.text= @@ -225,3 +219,11 @@ CasePropertiesPanel.lbDbType.text=Case Type: CasePropertiesPanel.examinerLabel.text=Examiner: CasePropertiesPanel.caseNumberLabel.text=Case Number: LocalDiskPanel.changeDatabasePathCheckbox.text=Update case to use VHD file upon completion +CueBannerPanel.openAutoIngestCaseButton.text= +CueBannerPanel.openExistingCaseButton.text= +CueBannerPanel.openRecentCaseButton.text= +CueBannerPanel.createNewCaseButton.text= +CueBannerPanel.createNewCaseLabel.text=Create New Case +CueBannerPanel.openRecentCaseLabel.text=Open Recent Case +CueBannerPanel.openExistingCaseLabel.text=Open Existing Case +CueBannerPanel.openAutoIngestCaseLabel.text=Open Auto Ingest Case diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index 939c901e57..fd00f725e5 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -12,10 +12,7 @@ NewCaseVisualPanel1.caseNameLabel.text_1=\u30b1\u30fc\u30b9\u540d\uff1a NewCaseVisualPanel1.caseDirLabel.text=\u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff1a NewCaseVisualPanel1.caseDirBrowseButton.text=\u95b2\u89a7 NewCaseVisualPanel1.jLabel2.text_1=\u30b1\u30fc\u30b9\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\uff1a -CueBannerPanel.createNewLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210 -CueBannerPanel.openLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f CueBannerPanel.closeButton.text=\u9589\u3058\u308b -CueBannerPanel.openRecentLabel.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u958b\u304f OpenRecentCasePanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb OpenRecentCasePanel.jLabel1.text=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb NewCaseVisualPanel2.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a @@ -196,3 +193,7 @@ CasePropertiesPanel.lbDbName.text=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\uff CasePropertiesPanel.lbDbType.text=\u30b1\u30fc\u30b9\u30bf\u30a4\u30d7\uff1a CasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a CasePropertiesPanel.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a +CueBannerPanel.createNewCaseLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210 +CueBannerPanel.openRecentCaseLabel.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u958b\u304f +CueBannerPanel.openExistingCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f +CueBannerPanel.openAutoIngestCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form index 223b83b7d4..75819e41d0 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form @@ -16,23 +16,27 @@ - - - - - - - - + @@ -159,10 +155,7 @@ - - - - + @@ -203,16 +196,6 @@ - - - - - - - - - - diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java index d64b9954ab..4877ce9d60 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java @@ -210,35 +210,16 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { boolean needsRestart = false; UserPreferences.SelectedMode storedMode = UserPreferences.getMode(); - if (AutoIngestUserPreferences.getJoinAutoModeCluster() != cbJoinAutoIngestCluster.isSelected()) { - needsRestart = true; - } - AutoIngestUserPreferences.setJoinAutoModeCluster(cbJoinAutoIngestCluster.isSelected()); if (!cbJoinAutoIngestCluster.isSelected()) { + if(storedMode == UserPreferences.SelectedMode.AUTOINGEST) { + needsRestart = true; + } + UserPreferences.setMode(UserPreferences.SelectedMode.STANDALONE); - //before return popup the message - if (needsRestart) { - SwingUtilities.invokeLater(() -> { - JOptionPane.showMessageDialog(null, - NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.MustRestart"), - NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.restartRequiredLabel.text"), - JOptionPane.WARNING_MESSAGE); - }); - } - return; } - - if (jRadioButtonAutomated.isSelected()) { - if (storedMode != UserPreferences.SelectedMode.AUTOINGEST) { - needsRestart = true; - } - String thePath = AutoIngestUserPreferences.getAutoModeImageFolder(); - if (thePath != null && 0 != inputPathTextField.getText().compareTo(thePath)) { - needsRestart = true; - } - thePath = AutoIngestUserPreferences.getAutoModeResultsFolder(); - if (thePath != null && 0 != outputPathTextField.getText().compareTo(thePath)) { + else if (jRadioButtonAutomated.isSelected()) { + if (storedMode == UserPreferences.SelectedMode.REVIEW) { needsRestart = true; } @@ -254,11 +235,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { AutoIngestUserPreferences.setSharedConfigMaster(masterNodeCheckBox.isSelected()); } } else if (jRadioButtonReview.isSelected()) { - if (storedMode != UserPreferences.SelectedMode.REVIEW) { - needsRestart = true; - } - String thePath = AutoIngestUserPreferences.getAutoModeResultsFolder(); - if (thePath != null && 0 != outputPathTextField.getText().compareTo(thePath)) { + if (storedMode == UserPreferences.SelectedMode.AUTOINGEST) { needsRestart = true; } @@ -661,7 +638,6 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { nodePanel = new javax.swing.JPanel(); jPanelNodeType = new javax.swing.JPanel(); jLabelSelectMode = new javax.swing.JLabel(); - restartRequiredNodeLabel = new javax.swing.JLabel(); jRadioButtonAutomated = new javax.swing.JRadioButton(); jRadioButtonReview = new javax.swing.JRadioButton(); jLabelSelectInputFolder = new javax.swing.JLabel(); @@ -703,9 +679,6 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(jLabelSelectMode, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.jLabelSelectMode.text")); // NOI18N - restartRequiredNodeLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/experimental/images/warning16.png"))); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(restartRequiredNodeLabel, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.restartRequiredNodeLabel.text")); // NOI18N - modeRadioButtons.add(jRadioButtonAutomated); jRadioButtonAutomated.setSelected(true); org.openide.awt.Mnemonics.setLocalizedText(jRadioButtonAutomated, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.jRadioButtonAutomated.text")); // NOI18N @@ -777,10 +750,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addComponent(browseOutputFolderButton, javax.swing.GroupLayout.Alignment.TRAILING))) .addGroup(jPanelNodeTypeLayout.createSequentialGroup() .addGroup(jPanelNodeTypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanelNodeTypeLayout.createSequentialGroup() - .addComponent(jLabelSelectMode) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(restartRequiredNodeLabel)) + .addComponent(jLabelSelectMode) .addComponent(jRadioButtonReview) .addComponent(jRadioButtonAutomated)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -802,9 +772,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addGroup(jPanelNodeTypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelNodeTypeLayout.createSequentialGroup() .addContainerGap() - .addGroup(jPanelNodeTypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabelSelectMode) - .addComponent(restartRequiredNodeLabel)) + .addComponent(jLabelSelectMode) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jRadioButtonAutomated) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -1407,7 +1375,6 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { jRadioButtonAutomated.setEnabled(enabled); jRadioButtonReview.setEnabled(enabled); outputPathTextField.setEnabled(enabled); - restartRequiredNodeLabel.setEnabled(enabled); } // Variables declaration - do not modify//GEN-BEGIN:variables @@ -1442,7 +1409,6 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { private javax.swing.JScrollPane nodeScrollPane; private javax.swing.JTextField outputPathTextField; private javax.swing.JProgressBar pbTaskInProgress; - private javax.swing.JLabel restartRequiredNodeLabel; private javax.swing.JCheckBox sharedConfigCheckbox; private javax.swing.JTextField sharedSettingsErrorTextField; private javax.swing.JTextField sharedSettingsTextField; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestUserPreferences.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestUserPreferences.java index f98eb1a909..8cd99b89c4 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestUserPreferences.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestUserPreferences.java @@ -59,7 +59,7 @@ public final class AutoIngestUserPreferences { } /** - * Get "Join Automated Ingest Cluster" setting from persistent storage. + * Get "Join auto ingest cluster" setting from persistent storage. * * @return SelectedMode Selected setting. */ @@ -71,7 +71,7 @@ public final class AutoIngestUserPreferences { } /** - * Set "Join Automated Ingest Cluster" setting to persistent storage. + * Set "Join auto ingest cluster" setting to persistent storage. * * @param join boolean value of whether to join auto ingest cluster or not */ diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties index 21da10e84d..66ed50dd20 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/Bundle.properties @@ -25,7 +25,7 @@ AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title=Advanced Settings AutoIngestSettingsPanel.browseGlobalSettingsButton.text=Browse AutoIngestSettingsPanel.browseSharedSettingsButton.text=Browse AutoIngestSettingsPanel.CannotAccess=Cannot access -AutoIngestSettingsPanel.cbJoinAutoIngestCluster.text=Join Automated Ingest Cluster +AutoIngestSettingsPanel.cbJoinAutoIngestCluster.text=Join auto ingest cluster AutoIngestSettingsPanel.CheckPermissions=Check permissions. AutoIngestSettingsPanel.configButtonErrorTextField.text=configButtonErrorTextField AutoIngestSettingsPanel.downloadButton.text=Download Config @@ -89,7 +89,6 @@ OptionsDialog.jLabel1.text=jLabel1 StartupWindow.AutoIngestMode=Automated Ingest Node StartupWindow.CaseImportMode=Single User Case Import StartupWindow.CopyAndImportMode=Utilities -StartupWindow.ReviewMode=Cases StartupWindow.title.text=Welcome AdvancedAutoIngestSettingsPanel.lbInputScanIntervalMinutes.text=minutes AdvancedAutoIngestSettingsPanel.lbTimeoutHours.text=hour(s) @@ -133,10 +132,9 @@ AutoIngestSettingsPanel.inputPathTextField.toolTipText=Input folder for automate AutoIngestSettingsPanel.inputPathTextField.text= AutoIngestSettingsPanel.jLabelSelectInputFolder.text=Select shared images folder: AutoIngestSettingsPanel.jRadioButtonReview.toolTipText=Review cases created in automated processing mode -AutoIngestSettingsPanel.jRadioButtonReview.text=Examiner Node +AutoIngestSettingsPanel.jRadioButtonReview.text=Examiner node AutoIngestSettingsPanel.jRadioButtonAutomated.toolTipText=Automatically detect new data sources and create cases. -AutoIngestSettingsPanel.jRadioButtonAutomated.text=Auto Ingest Node -AutoIngestSettingsPanel.restartRequiredNodeLabel.text=Application restart required +AutoIngestSettingsPanel.jRadioButtonAutomated.text=Auto ingest node (application restart required) AutoIngestSettingsPanel.jLabelSelectMode.text=Select mode: AutoIngestSettingsPanel.jPanelIngestSettings.border.title=Automated Ingest Settings AutoIngestSettingsPanel.bnLogging.text=Node Status Logging diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java index f36fa45f12..35d44dc407 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/StartupWindow.java @@ -18,7 +18,6 @@ */ package org.sleuthkit.autopsy.experimental.configuration; -import java.awt.Cursor; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.ActionEvent; @@ -36,7 +35,6 @@ import org.sleuthkit.autopsy.casemodule.StartupWindowInterface; import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.NetworkUtils; import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestControlPanel; -import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestCasePanel; /** * The default implementation of the Autopsy startup window @@ -48,7 +46,6 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa private static Dimension DIMENSIONS = new Dimension(750, 400); private static CueBannerPanel welcomeWindow; private static final long serialVersionUID = 1L; - private AutoIngestCasePanel caseManagementPanel = null; private static final String LOCAL_HOST_NAME = NetworkUtils.getLocalHostName(); public StartupWindow() { @@ -78,12 +75,6 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa @Override public void open() { - - if (caseManagementPanel != null) { - caseManagementPanel.updateView(); - caseManagementPanel.setCursor(Cursor.getDefaultCursor()); - } - if (welcomeWindow != null) { welcomeWindow.refresh(); } @@ -104,38 +95,27 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa * user. */ private void addPanelForMode() { - UserPreferences.SelectedMode mode = UserPreferences.getMode(); - - switch (mode) { - case AUTOINGEST: - this.setTitle(NbBundle.getMessage(StartupWindow.class, "StartupWindow.AutoIngestMode") + " (" + LOCAL_HOST_NAME + ")"); - setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/experimental/images/frame.gif", false)); //NON-NLS - this.addWindowListener(new WindowAdapter() { - @Override - public void windowClosing(WindowEvent e) { - AutoIngestControlPanel.getInstance().shutdown(); - } - }); - setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); - add(AutoIngestControlPanel.getInstance()); - break; - case REVIEW: - this.setTitle(NbBundle.getMessage(StartupWindow.class, "StartupWindow.ReviewMode") + " (" + LOCAL_HOST_NAME + ")"); - caseManagementPanel = new AutoIngestCasePanel(this); - setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/experimental/images/frame.gif", false)); //NON-NLS - add(caseManagementPanel); - break; - default: - welcomeWindow = new CueBannerPanel(); - // add the command to close the window to the button on the Volume Detail Panel - welcomeWindow.setCloseButtonActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - close(); - } - }); - add(welcomeWindow); - break; + if(UserPreferences.getMode() == UserPreferences.SelectedMode.AUTOINGEST) { + this.setTitle(NbBundle.getMessage(StartupWindow.class, "StartupWindow.AutoIngestMode") + " (" + LOCAL_HOST_NAME + ")"); + setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/experimental/images/frame.gif", false)); //NON-NLS + this.addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + AutoIngestControlPanel.getInstance().shutdown(); + } + }); + setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + add(AutoIngestControlPanel.getInstance()); + } else { + welcomeWindow = new CueBannerPanel(); + // add the command to close the window to the button on the Volume Detail Panel + welcomeWindow.setCloseButtonActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + close(); + } + }); + add(welcomeWindow); } } } \ No newline at end of file