mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
2934 changes to Central Repo Options panel and config dialog
This commit is contained in:
parent
2ec2c4a929
commit
c6c5acba0f
@ -13,7 +13,7 @@ EamSqliteSettingsDialog.bnCancel.text=Cancel
|
||||
EamSqliteSettingsDialog.lbTestDatabase.text=
|
||||
EamSqliteSettingsDialog.bnTestDatabase.text=Test Connection
|
||||
EamSqliteSettingsDialog.lbTestDatabaseWarning.text=
|
||||
EamSqliteSettingsDialog.bnDatabasePathFileOpen.text=Open...
|
||||
EamSqliteSettingsDialog.bnDatabasePathFileOpen.text=Browse...
|
||||
EamSqliteSettingsDialog.tfDatabasePath.toolTipText=Filename and path to store SQLite db file
|
||||
EamSqliteSettingsDialog.tfDatabasePath.text=
|
||||
EamSqliteSettingsDialog.lbDatabasePath.text=Database Path :
|
||||
@ -52,24 +52,16 @@ ManageTagsDialog.cancelButton.text=Cancel
|
||||
ManageArtifactTypesDialog.taInstructionsMsg.text=Enable one or more correlation properties to use for correlation during ingest. Note, these properties are global and impact all users of the central repository.
|
||||
EamSqliteSettingsDialog.bnOk.text=OK
|
||||
EamPostgresSettingsDialog.bnSave.text=Save
|
||||
EamDbSettingsDialog.pnDatabaseConnectionSettings.border.title=Database Settings
|
||||
EamDbSettingsDialog.rdioBnPostgreSQL.text=PostgreSQL
|
||||
EamDbSettingsDialog.rdioBnSQLite.text=SQLite
|
||||
EamDbSettingsDialog.bnDatabasePathFileOpen.text=Open...
|
||||
EamDbSettingsDialog.bnDatabasePathFileOpen.text=Browse...
|
||||
EamDbSettingsDialog.tfDatabasePath.toolTipText=Filename and path to store SQLite db file
|
||||
EamDbSettingsDialog.tfDatabasePath.text=
|
||||
EamDbSettingsDialog.lbDatabasePath.text=Database Path :
|
||||
EamDbSettingsDialog.rdioBnDisabled.text=Disabled
|
||||
EamDbSettingsDialog.bnCancel.text=Cancel
|
||||
EamDbSettingsDialog.bnOk.text=OK
|
||||
EamDbSettingsDialog.bnTest.text=Test
|
||||
EamDbSettingsDialog.lbHostName.text=Host Name / IP :
|
||||
EamDbSettingsDialog.lbDatabaseName.text=Database name :
|
||||
EamDbSettingsDialog.lbUserPassword.text=User Password :
|
||||
EamDbSettingsDialog.lbUserName.text=User Name :
|
||||
EamDbSettingsDialog.lbPort.text=Port :
|
||||
EamDbSettingsDialog.bnCreateDb.text=Create
|
||||
EamDbSettingsDialog.pnSetupGuidance.border.title=Setup Guidance
|
||||
GlobalSettingsPanel.pnDatabaseConfiguration.title=Database Configuration
|
||||
GlobalSettingsPanel.lbDbPlatformTypeLabel.text=Type:
|
||||
GlobalSettingsPanel.lbDbNameLabel.text=Name:
|
||||
@ -82,3 +74,6 @@ GlobalSettingsPanel.bnManageProperties.text=Manage Correlation Properties
|
||||
ImportHashDatabaseDialog.lbInstructions.text=Choose an .idx file to import into the central repository.
|
||||
ImportHashDatabaseDialog.lbFilePath.text=File Path:
|
||||
ImportHashDatabaseDialog.tfFilePath.text=
|
||||
EamDbSettingsDialog.jLabel1.text=SQLite should only be used by one examiner at a time.
|
||||
EamDbSettingsDialog.jLabel2.text=Database type:
|
||||
GlobalSettingsPanel.jCheckBox1.text=Use a Central Repository
|
||||
|
@ -29,12 +29,11 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="pnSetupGuidance" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConnectionSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnButtons" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pnButtons" max="32767" attributes="0"/>
|
||||
<Component id="pnSQLiteSettings" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -43,303 +42,22 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnSetupGuidance" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
<Component id="pnSQLiteSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConnectionSettings" min="-2" pref="348" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnButtons" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnDatabaseConnectionSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Database Settings">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.pnDatabaseConnectionSettings.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="rdioBnPostgreSQL" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="rdioBnSQLite" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="rdioBnDisabled" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="pnSQLiteSettings" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="pnPostgreSQLSettings" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="rdioBnDisabled" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
|
||||
<Component id="rdioBnSQLite" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnSQLiteSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="rdioBnPostgreSQL" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnPostgreSQLSettings" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="329" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="pnSQLiteSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbDatabasePath" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="tfDatabasePath" min="-2" pref="343" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="tfDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbDatabasePath">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tfDatabasePath">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tfDatabasePathFocusLost"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDatabasePathFileOpen">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnDatabasePathFileOpen.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDatabasePathFileOpenActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnPostgreSQLSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbHostName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbDatabaseName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserPassword" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbUsername" alignment="0" pref="439" max="32767" attributes="0"/>
|
||||
<Component id="tbDbName" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbDbPort" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbDbHostname" max="32767" attributes="0"/>
|
||||
<Component id="jpDbPassword" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="tbDbHostname" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbHostName" alignment="1" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbPort" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbName" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbDatabaseName" alignment="0" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="tbDbUsername" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbUserPassword" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="jpDbPassword" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="19" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lbHostName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbHostName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbPort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbPort.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserPassword">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbDatabaseName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabaseName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbHostname">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbPort">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbName">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbUsername">
|
||||
</Component>
|
||||
<Component class="javax.swing.JPasswordField" name="jpDbPassword">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JRadioButton" name="rdioBnSQLite">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.rdioBnSQLite.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdioBnSQLiteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="rdioBnPostgreSQL">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.rdioBnPostgreSQL.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdioBnPostgreSQLActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="rdioBnDisabled">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.rdioBnDisabled.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rdioBnDisabledActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnButtons">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnTest" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbTestIcon" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="bnCreateDb" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbCreateIcon" min="-2" pref="21" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="bnOk" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
@ -352,20 +70,11 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbCreateIcon" max="32767" attributes="0"/>
|
||||
<Component id="lbTestIcon" alignment="1" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="bnOk" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnTest" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnCreateDb" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="bnOk" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnCancel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -391,40 +100,13 @@
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnOkActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnTest">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnTest.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnTestActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnCreateDb">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnCreateDb.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnCreateDbActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbTestIcon">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbCreateIcon">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnSetupGuidance">
|
||||
<Container class="javax.swing.JPanel" name="pnSQLiteSettings">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
|
||||
<TitledBorder title="Setup Guidance">
|
||||
<ResourceString PropertyName="titleX" bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.pnSetupGuidance.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<Font PropertyName="font" name="Tahoma" size="12" style="0"/>
|
||||
</TitledBorder>
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
|
||||
<EtchetBorder/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
@ -434,55 +116,186 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbHostName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="0" min="-2" pref="82" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserPassword" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="14" pref="14" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jComboBox1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" pref="467" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="9" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="tfDatabasePath" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="tbDbHostname" max="32767" attributes="0"/>
|
||||
<Component id="jpDbPassword" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="tbDbUsername" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="tbDbPort" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabel2" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="tfDatabasePath" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="bnDatabasePathFileOpen" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="tbDbHostname" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbHostName" alignment="3" min="-2" pref="22" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="tbDbPort" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbPort" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="tbDbUsername" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbUserName" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbUserPassword" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="jpDbPassword" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Component class="javax.swing.JLabel" name="lbDatabasePath">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTextArea" name="taSetupGuidance">
|
||||
<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" red="f0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="columns" type="int" value="20"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Monospaced" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="3"/>
|
||||
<Property name="tabSize" type="int" value="4"/>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="autoscrolls" type="boolean" value="false"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
<Property name="verifyInputWhenFocusTarget" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tfDatabasePath">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="tfDatabasePathFocusLost"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDatabasePathFileOpen">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnDatabasePathFileOpen.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDatabasePathFileOpenActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbHostName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbHostName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbHostname">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbPort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbPort.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbPort">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserName">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbDbUsername">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbUserPassword">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JPasswordField" name="jpDbPassword">
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jComboBox1">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="new javax.swing.DefaultComboBoxModel<>(new EamDbPlatformEnum[]{EamDbPlatformEnum.POSTGRESQL, EamDbPlatformEnum.SQLITE})" type="code"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jComboBox1ActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<EamDbPlatformEnum>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
@ -25,6 +25,7 @@ import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
import org.netbeans.spi.options.OptionsPanelController;
|
||||
import org.openide.util.ImageUtilities;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
@ -32,6 +33,7 @@ import org.sleuthkit.autopsy.corecomponents.TextPrompt;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum.SQLITE;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings;
|
||||
|
||||
@ -40,7 +42,10 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings;
|
||||
* @author nick
|
||||
*/
|
||||
public class EamDbSettingsDialog extends JDialog {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(EamDbSettingsDialog.class.getName());
|
||||
private static final String CENTRAL_REPO_DB_NAME = "central_repository";
|
||||
private static final String CENTRAL_REPO_SQLITE_EXT = ".db";
|
||||
private final Collection<JTextField> textBoxes;
|
||||
private final TextBoxChangedListener textBoxChangedListener;
|
||||
private final ImageIcon goodIcon;
|
||||
@ -57,22 +62,29 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
@Messages({"EamDbSettingsDialog.title.text=Central Repository Database Configuration"})
|
||||
public EamDbSettingsDialog() {
|
||||
super((JFrame) WindowManager.getDefault().getMainWindow(),
|
||||
Bundle.EamDbSettingsDialog_title_text(),
|
||||
true); // NON-NLS
|
||||
Bundle.EamDbSettingsDialog_title_text(),
|
||||
true); // NON-NLS
|
||||
|
||||
textBoxes = new ArrayList<>();
|
||||
textBoxChangedListener = new TextBoxChangedListener();
|
||||
goodIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/good.png", false)); // NON-NLS
|
||||
badIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/bad.png", false)); // NON-NLS
|
||||
|
||||
dbSettingsPostgres = new PostgresEamDbSettings();
|
||||
dbSettingsSqlite = new SqliteEamDbSettings();
|
||||
selectedPlatform = EamDbPlatformEnum.getSelectedPlatform();
|
||||
if (selectedPlatform == null || selectedPlatform.equals(EamDbPlatformEnum.DISABLED)) {
|
||||
selectedPlatform = EamDbPlatformEnum.POSTGRESQL;
|
||||
} else {
|
||||
System.out.println("selectedPlatform = " + selectedPlatform);
|
||||
}
|
||||
|
||||
initComponents();
|
||||
fcDatabasePath.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
|
||||
jComboBox1.setSelectedItem(selectedPlatform);
|
||||
customizeComponents();
|
||||
valid();
|
||||
display();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,40 +98,61 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
|
||||
bnGrpDatabasePlatforms = new javax.swing.ButtonGroup();
|
||||
fcDatabasePath = new javax.swing.JFileChooser();
|
||||
pnDatabaseConnectionSettings = new javax.swing.JPanel();
|
||||
pnButtons = new javax.swing.JPanel();
|
||||
bnCancel = new javax.swing.JButton();
|
||||
bnOk = new javax.swing.JButton();
|
||||
pnSQLiteSettings = new javax.swing.JPanel();
|
||||
lbDatabasePath = new javax.swing.JLabel();
|
||||
tfDatabasePath = new javax.swing.JTextField();
|
||||
bnDatabasePathFileOpen = new javax.swing.JButton();
|
||||
pnPostgreSQLSettings = new javax.swing.JPanel();
|
||||
lbHostName = new javax.swing.JLabel();
|
||||
lbPort = new javax.swing.JLabel();
|
||||
lbUserName = new javax.swing.JLabel();
|
||||
lbUserPassword = new javax.swing.JLabel();
|
||||
lbDatabaseName = new javax.swing.JLabel();
|
||||
tbDbHostname = new javax.swing.JTextField();
|
||||
lbPort = new javax.swing.JLabel();
|
||||
tbDbPort = new javax.swing.JTextField();
|
||||
tbDbName = new javax.swing.JTextField();
|
||||
lbUserName = new javax.swing.JLabel();
|
||||
tbDbUsername = new javax.swing.JTextField();
|
||||
lbUserPassword = new javax.swing.JLabel();
|
||||
jpDbPassword = new javax.swing.JPasswordField();
|
||||
rdioBnSQLite = new javax.swing.JRadioButton();
|
||||
rdioBnPostgreSQL = new javax.swing.JRadioButton();
|
||||
rdioBnDisabled = new javax.swing.JRadioButton();
|
||||
pnButtons = new javax.swing.JPanel();
|
||||
bnCancel = new javax.swing.JButton();
|
||||
bnOk = new javax.swing.JButton();
|
||||
bnTest = new javax.swing.JButton();
|
||||
bnCreateDb = new javax.swing.JButton();
|
||||
lbTestIcon = new javax.swing.JLabel();
|
||||
lbCreateIcon = new javax.swing.JLabel();
|
||||
pnSetupGuidance = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
taSetupGuidance = new javax.swing.JTextArea();
|
||||
jComboBox1 = new javax.swing.JComboBox<>();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
|
||||
pnDatabaseConnectionSettings.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.pnDatabaseConnectionSettings.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
|
||||
pnDatabaseConnectionSettings.setName(""); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnCancel, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnCancel.text")); // NOI18N
|
||||
bnCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnOk, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnOk.text")); // NOI18N
|
||||
bnOk.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnOkActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout pnButtonsLayout = new javax.swing.GroupLayout(pnButtons);
|
||||
pnButtons.setLayout(pnButtonsLayout);
|
||||
pnButtonsLayout.setHorizontalGroup(
|
||||
pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnButtonsLayout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(bnOk)
|
||||
.addGap(11, 11, 11)
|
||||
.addComponent(bnCancel)
|
||||
.addContainerGap())
|
||||
);
|
||||
pnButtonsLayout.setVerticalGroup(
|
||||
pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnButtonsLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(bnOk)
|
||||
.addComponent(bnCancel))
|
||||
.addGap(0, 0, 0))
|
||||
);
|
||||
|
||||
pnSQLiteSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
@ -140,32 +173,6 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout pnSQLiteSettingsLayout = new javax.swing.GroupLayout(pnSQLiteSettings);
|
||||
pnSQLiteSettings.setLayout(pnSQLiteSettingsLayout);
|
||||
pnSQLiteSettingsLayout.setHorizontalGroup(
|
||||
pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(lbDatabasePath)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(bnDatabasePathFileOpen)
|
||||
.addContainerGap())
|
||||
);
|
||||
pnSQLiteSettingsLayout.setVerticalGroup(
|
||||
pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lbDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(bnDatabasePathFileOpen))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
pnPostgreSQLSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbHostName, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbHostName.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbPort, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbPort.text")); // NOI18N
|
||||
@ -174,265 +181,130 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbUserPassword, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbUserPassword.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(lbDatabaseName, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabaseName.text")); // NOI18N
|
||||
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new EamDbPlatformEnum[]{EamDbPlatformEnum.POSTGRESQL, EamDbPlatformEnum.SQLITE}));
|
||||
jComboBox1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jComboBox1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout pnPostgreSQLSettingsLayout = new javax.swing.GroupLayout(pnPostgreSQLSettings);
|
||||
pnPostgreSQLSettings.setLayout(pnPostgreSQLSettingsLayout);
|
||||
pnPostgreSQLSettingsLayout.setHorizontalGroup(
|
||||
pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createSequentialGroup()
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.jLabel1.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.jLabel2.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout pnSQLiteSettingsLayout = new javax.swing.GroupLayout(pnSQLiteSettings);
|
||||
pnSQLiteSettings.setLayout(pnSQLiteSettingsLayout);
|
||||
pnSQLiteSettingsLayout.setHorizontalGroup(
|
||||
pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbHostName)
|
||||
.addComponent(lbPort)
|
||||
.addComponent(lbDatabaseName)
|
||||
.addComponent(lbUserName)
|
||||
.addComponent(lbUserPassword))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(tbDbUsername, javax.swing.GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE)
|
||||
.addComponent(tbDbName)
|
||||
.addComponent(tbDbPort)
|
||||
.addComponent(tbDbHostname)
|
||||
.addComponent(jpDbPassword))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbHostName)
|
||||
.addComponent(lbPort)
|
||||
.addComponent(lbUserName)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(10, 10, 10))
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbDatabasePath)
|
||||
.addComponent(lbUserPassword, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addGap(14, 14, 14)))
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
|
||||
.addGap(9, 9, 9))
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addComponent(tfDatabasePath)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(bnDatabasePathFileOpen)
|
||||
.addGap(11, 11, 11))
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(tbDbHostname)
|
||||
.addComponent(jpDbPassword)
|
||||
.addComponent(tbDbUsername, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(tbDbPort))
|
||||
.addGap(10, 10, 10))))
|
||||
);
|
||||
pnPostgreSQLSettingsLayout.setVerticalGroup(
|
||||
pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
pnSQLiteSettingsLayout.setVerticalGroup(
|
||||
pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel1))
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lbDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(bnDatabasePathFileOpen))
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(tbDbHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbHostName, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(tbDbPort)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(tbDbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbPort, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(tbDbName)
|
||||
.addComponent(lbDatabaseName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(tbDbUsername)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(tbDbUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lbUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(pnPostgreSQLSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lbUserPassword, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jpDbPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(19, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rdioBnSQLite, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.rdioBnSQLite.text")); // NOI18N
|
||||
rdioBnSQLite.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
rdioBnSQLiteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rdioBnPostgreSQL, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.rdioBnPostgreSQL.text")); // NOI18N
|
||||
rdioBnPostgreSQL.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
rdioBnPostgreSQLActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rdioBnDisabled, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.rdioBnDisabled.text")); // NOI18N
|
||||
rdioBnDisabled.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
rdioBnDisabledActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout pnDatabaseConnectionSettingsLayout = new javax.swing.GroupLayout(pnDatabaseConnectionSettings);
|
||||
pnDatabaseConnectionSettings.setLayout(pnDatabaseConnectionSettingsLayout);
|
||||
pnDatabaseConnectionSettingsLayout.setHorizontalGroup(
|
||||
pnDatabaseConnectionSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnDatabaseConnectionSettingsLayout.createSequentialGroup()
|
||||
.addComponent(rdioBnPostgreSQL)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(pnDatabaseConnectionSettingsLayout.createSequentialGroup()
|
||||
.addGroup(pnDatabaseConnectionSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(rdioBnSQLite)
|
||||
.addComponent(rdioBnDisabled))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(pnDatabaseConnectionSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(pnDatabaseConnectionSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnPostgreSQLSettings, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
);
|
||||
pnDatabaseConnectionSettingsLayout.setVerticalGroup(
|
||||
pnDatabaseConnectionSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseConnectionSettingsLayout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(rdioBnDisabled)
|
||||
.addGap(13, 13, 13)
|
||||
.addComponent(rdioBnSQLite)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnSQLiteSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(12, 12, 12)
|
||||
.addComponent(rdioBnPostgreSQL)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnPostgreSQLSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(329, 329, 329))
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnCancel, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnCancel.text")); // NOI18N
|
||||
bnCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnOk, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnOk.text")); // NOI18N
|
||||
bnOk.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnOkActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnTest, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnTest.text")); // NOI18N
|
||||
bnTest.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnTestActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnCreateDb, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnCreateDb.text")); // NOI18N
|
||||
bnCreateDb.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnCreateDbActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout pnButtonsLayout = new javax.swing.GroupLayout(pnButtons);
|
||||
pnButtons.setLayout(pnButtonsLayout);
|
||||
pnButtonsLayout.setHorizontalGroup(
|
||||
pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnButtonsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(bnTest)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lbTestIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(bnCreateDb)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(lbCreateIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(bnOk)
|
||||
.addGap(11, 11, 11)
|
||||
.addComponent(bnCancel)
|
||||
.addContainerGap())
|
||||
);
|
||||
pnButtonsLayout.setVerticalGroup(
|
||||
pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnButtonsLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lbCreateIcon, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(lbTestIcon, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(pnButtonsLayout.createSequentialGroup()
|
||||
.addGroup(pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(bnOk)
|
||||
.addComponent(bnCancel)
|
||||
.addComponent(bnTest)
|
||||
.addComponent(bnCreateDb))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
pnSetupGuidance.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.pnSetupGuidance.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N
|
||||
|
||||
jScrollPane1.setBorder(null);
|
||||
|
||||
taSetupGuidance.setEditable(false);
|
||||
taSetupGuidance.setBackground(new java.awt.Color(240, 240, 240));
|
||||
taSetupGuidance.setColumns(20);
|
||||
taSetupGuidance.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
|
||||
taSetupGuidance.setLineWrap(true);
|
||||
taSetupGuidance.setRows(3);
|
||||
taSetupGuidance.setTabSize(4);
|
||||
taSetupGuidance.setWrapStyleWord(true);
|
||||
taSetupGuidance.setAutoscrolls(false);
|
||||
taSetupGuidance.setBorder(null);
|
||||
taSetupGuidance.setRequestFocusEnabled(false);
|
||||
taSetupGuidance.setVerifyInputWhenFocusTarget(false);
|
||||
jScrollPane1.setViewportView(taSetupGuidance);
|
||||
|
||||
javax.swing.GroupLayout pnSetupGuidanceLayout = new javax.swing.GroupLayout(pnSetupGuidance);
|
||||
pnSetupGuidance.setLayout(pnSetupGuidanceLayout);
|
||||
pnSetupGuidanceLayout.setHorizontalGroup(
|
||||
pnSetupGuidanceLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSetupGuidanceLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jScrollPane1)
|
||||
.addContainerGap())
|
||||
);
|
||||
pnSetupGuidanceLayout.setVerticalGroup(
|
||||
pnSetupGuidanceLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(pnSetupGuidanceLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(10, 10, 10))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(pnSetupGuidance, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnDatabaseConnectionSettings, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pnButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(pnSetupGuidance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(pnSQLiteSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(pnDatabaseConnectionSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 348, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0))
|
||||
.addGap(10, 10, 10))
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void customizeComponents() {
|
||||
bnGrpDatabasePlatforms.add(rdioBnDisabled);
|
||||
bnGrpDatabasePlatforms.add(rdioBnPostgreSQL);
|
||||
bnGrpDatabasePlatforms.add(rdioBnSQLite);
|
||||
|
||||
setTextPrompts();
|
||||
setTextBoxListeners();
|
||||
switch (selectedPlatform) {
|
||||
case POSTGRESQL:
|
||||
rdioBnPostgreSQL.setSelected(true);
|
||||
testingStatus = DatabaseTestResult.UNTESTED;
|
||||
updatePostgresFields(true);
|
||||
updateSqliteFields(false);
|
||||
break;
|
||||
case SQLITE:
|
||||
rdioBnSQLite.setSelected(true);
|
||||
testingStatus = DatabaseTestResult.UNTESTED;
|
||||
updatePostgresFields(false);
|
||||
updateSqliteFields(true);
|
||||
break;
|
||||
default:
|
||||
rdioBnDisabled.setSelected(true);
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
updatePostgresFields(false);
|
||||
POSTGRESQL:
|
||||
testingStatus = DatabaseTestResult.UNTESTED;
|
||||
updatePostgresFields(true);
|
||||
updateSqliteFields(false);
|
||||
break;
|
||||
}
|
||||
|
||||
setTextPrompts();
|
||||
setTextBoxListeners();
|
||||
lbTestIcon.setIcon(null);
|
||||
}
|
||||
displayDatabaseSettings(selectedPlatform.equals(EamDbPlatformEnum.POSTGRESQL));
|
||||
}
|
||||
|
||||
private void display() {
|
||||
@ -440,18 +312,18 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
setLocation((screenDimension.width - getSize().width) / 2, (screenDimension.height - getSize().height) / 2);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
private void setGuidanceMessage(String message, boolean isError) {
|
||||
taSetupGuidance.setText(message);
|
||||
|
||||
if (isError) {
|
||||
taSetupGuidance.setForeground(new Color(255, 102, 102)); // light red color
|
||||
|
||||
} else {
|
||||
taSetupGuidance.setForeground(new Color(0, 0, 0)); // black color
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void clearIcons() {
|
||||
lbTestIcon.setIcon(null);
|
||||
lbCreateIcon.setIcon(null);
|
||||
|
||||
}
|
||||
|
||||
@Messages({"EamDbSettingsDialog.chooserPath.failedToGetDbPathMsg=Selected database path is invalid. Try again."})
|
||||
@ -461,11 +333,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
if (fcDatabasePath.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||
File databaseFile = fcDatabasePath.getSelectedFile();
|
||||
try {
|
||||
String fullPath = databaseFile.getCanonicalPath();
|
||||
if (!fullPath.endsWith(".db")) {
|
||||
fullPath = fullPath + ".db"; // NON-NLS
|
||||
}
|
||||
tfDatabasePath.setText(fullPath);
|
||||
tfDatabasePath.setText(databaseFile.getCanonicalPath());
|
||||
valid();
|
||||
} catch (IOException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to get path of selected database file", ex); // NON-NLS
|
||||
@ -474,9 +342,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
}
|
||||
}//GEN-LAST:event_bnDatabasePathFileOpenActionPerformed
|
||||
|
||||
private void bnTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnTestActionPerformed
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
|
||||
private void testDbSettings() {
|
||||
switch (selectedPlatform) {
|
||||
case POSTGRESQL:
|
||||
if (dbSettingsPostgres.verifyConnection()) {
|
||||
@ -484,7 +350,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
&& dbSettingsPostgres.verifyDatabaseSchema()) {
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
} else {
|
||||
testingStatus = DatabaseTestResult.SCHEMA_INVALID;
|
||||
testingStatus = DatabaseTestResult.SCHEMA_INVALID;
|
||||
}
|
||||
} else {
|
||||
testingStatus = DatabaseTestResult.CONNECTION_FAILED;
|
||||
@ -494,9 +360,9 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
if (dbSettingsSqlite.dbDirectoryExists()
|
||||
&& dbSettingsSqlite.verifyConnection()) {
|
||||
if (dbSettingsSqlite.verifyDatabaseSchema()) {
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
} else {
|
||||
testingStatus = DatabaseTestResult.SCHEMA_INVALID;
|
||||
testingStatus = DatabaseTestResult.SCHEMA_INVALID;
|
||||
}
|
||||
} else {
|
||||
testingStatus = DatabaseTestResult.SCHEMA_INVALID;
|
||||
@ -504,19 +370,10 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
break;
|
||||
}
|
||||
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
if (testingStatus == DatabaseTestResult.TESTEDOK) {
|
||||
lbTestIcon.setIcon(goodIcon);
|
||||
} else {
|
||||
lbTestIcon.setIcon(badIcon);
|
||||
}
|
||||
valid();
|
||||
}//GEN-LAST:event_bnTestActionPerformed
|
||||
}
|
||||
|
||||
@Messages({"EamDbSettingsDialog.creation.failed=Database initialization failed."})
|
||||
private void bnCreateDbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnCreateDbActionPerformed
|
||||
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
private void createDb() {
|
||||
clearIcons();
|
||||
boolean result = false;
|
||||
switch (selectedPlatform) {
|
||||
@ -536,21 +393,40 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
&& dbSettingsSqlite.insertDefaultDatabaseContent();
|
||||
break;
|
||||
}
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
|
||||
if (false == result) {
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_creation_failed(), true);
|
||||
lbCreateIcon.setIcon(badIcon);
|
||||
} else {
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
lbCreateIcon.setIcon(goodIcon);
|
||||
valid();
|
||||
}
|
||||
}//GEN-LAST:event_bnCreateDbActionPerformed
|
||||
}
|
||||
|
||||
@Messages({"EamDbSettingsDialog.okButton.errorTitle.text=Restart Required.",
|
||||
"EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform.",
|
||||
"EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to Central Repository database."})
|
||||
private void bnOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOkActionPerformed
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
testDbSettings();
|
||||
if (testingStatus == DatabaseTestResult.CONNECTION_FAILED) {
|
||||
JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(),
|
||||
"Connection to database failed, check your settings",
|
||||
"Connection failed",
|
||||
JOptionPane.OK_OPTION);
|
||||
} else if (testingStatus == DatabaseTestResult.SCHEMA_INVALID) {
|
||||
//database doesn't exist do you want to create
|
||||
if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(),
|
||||
"DO YOU WANT TO CREATE DB",
|
||||
"DB DOESNT EXIST",
|
||||
JOptionPane.YES_NO_OPTION)) {
|
||||
createDb();
|
||||
}
|
||||
}
|
||||
|
||||
if (testingStatus != DatabaseTestResult.TESTEDOK) {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* We have to shutdown the previous platform's connection pool first;
|
||||
* assuming it wasn't DISABLED. This will close any existing idle
|
||||
@ -592,6 +468,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database.", ex);
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_okButton_connectionErrorMsg_text(), true);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -606,6 +483,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
} catch (EamDbException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Failed to connect to Central Repository database.", ex);
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_okButton_connectionErrorMsg_text(), true);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -613,6 +491,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
break;
|
||||
}
|
||||
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
dispose();
|
||||
}//GEN-LAST:event_bnOkActionPerformed
|
||||
|
||||
@ -620,31 +499,6 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
dispose();
|
||||
}//GEN-LAST:event_bnCancelActionPerformed
|
||||
|
||||
private void rdioBnDisabledActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdioBnDisabledActionPerformed
|
||||
selectedPlatform = EamDbPlatformEnum.DISABLED;
|
||||
testingStatus = DatabaseTestResult.TESTEDOK;
|
||||
|
||||
updateSqliteFields(false);
|
||||
updatePostgresFields(false);
|
||||
}//GEN-LAST:event_rdioBnDisabledActionPerformed
|
||||
|
||||
|
||||
private void rdioBnPostgreSQLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdioBnPostgreSQLActionPerformed
|
||||
selectedPlatform = EamDbPlatformEnum.POSTGRESQL;
|
||||
testingStatus = DatabaseTestResult.UNTESTED;
|
||||
|
||||
updateSqliteFields(false);
|
||||
updatePostgresFields(true);
|
||||
}//GEN-LAST:event_rdioBnPostgreSQLActionPerformed
|
||||
|
||||
private void rdioBnSQLiteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdioBnSQLiteActionPerformed
|
||||
selectedPlatform = EamDbPlatformEnum.SQLITE;
|
||||
testingStatus = DatabaseTestResult.UNTESTED;
|
||||
|
||||
updateSqliteFields(true);
|
||||
updatePostgresFields(false);
|
||||
|
||||
}//GEN-LAST:event_rdioBnSQLiteActionPerformed
|
||||
|
||||
private void tfDatabasePathFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfDatabasePathFocusLost
|
||||
String fullPath = tfDatabasePath.getText();
|
||||
@ -654,35 +508,33 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
tfDatabasePath.setText(fullPath);
|
||||
}//GEN-LAST:event_tfDatabasePathFocusLost
|
||||
|
||||
/**
|
||||
* Update the fields for the Postgres platform depending on whether the
|
||||
* Postgres radioButton is enabled.
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
private void updatePostgresFields(boolean enabled) {
|
||||
tbDbHostname.setText(enabled ? dbSettingsPostgres.getHost() : "");
|
||||
tbDbHostname.setEnabled(enabled);
|
||||
tbDbPort.setText(enabled ? Integer.toString(dbSettingsPostgres.getPort()) : "");
|
||||
tbDbPort.setEnabled(enabled);
|
||||
tbDbName.setText(enabled ? dbSettingsPostgres.getDbName() : "");
|
||||
tbDbName.setEnabled(enabled);
|
||||
tbDbUsername.setText(enabled ? dbSettingsPostgres.getUserName() : "");
|
||||
tbDbUsername.setEnabled(enabled);
|
||||
jpDbPassword.setText(enabled ? dbSettingsPostgres.getPassword() : "");
|
||||
jpDbPassword.setEnabled(enabled);
|
||||
}
|
||||
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
|
||||
selectedPlatform = (EamDbPlatformEnum) jComboBox1.getSelectedItem();
|
||||
customizeComponents();
|
||||
//displayDatabaseSettings(selectedPlatform.equals(EamDbPlatformEnum.POSTGRESQL));
|
||||
// toggleWaitCursor(jComboBox1.getSelectedItem().equals(EamDbPlatformEnum.POSTGRESQL));
|
||||
}//GEN-LAST:event_jComboBox1ActionPerformed
|
||||
|
||||
/**
|
||||
* Update the fields for the SQLite platform depending on whether the
|
||||
* SQLite radioButton is enabled.
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
private void updateSqliteFields(boolean enabled) {
|
||||
tfDatabasePath.setText(enabled ? dbSettingsSqlite.getFileNameWithPath() : "");
|
||||
tfDatabasePath.setEnabled(enabled);
|
||||
bnDatabasePathFileOpen.setEnabled(enabled);
|
||||
// private void toggleWaitCursor(boolean off) {
|
||||
// if (!off) {
|
||||
// setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
// } else {
|
||||
// setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
// }
|
||||
// }
|
||||
private void displayDatabaseSettings(boolean isPostgres) {
|
||||
lbDatabasePath.setVisible(!isPostgres);
|
||||
tfDatabasePath.setVisible(!isPostgres);
|
||||
jLabel1.setVisible(!isPostgres);
|
||||
bnDatabasePathFileOpen.setVisible(!isPostgres);
|
||||
lbHostName.setVisible(isPostgres);
|
||||
tbDbHostname.setVisible(isPostgres);
|
||||
lbPort.setVisible(isPostgres);
|
||||
tbDbPort.setVisible(isPostgres);
|
||||
lbUserName.setVisible(isPostgres);
|
||||
tbDbUsername.setVisible(isPostgres);
|
||||
lbUserPassword.setVisible(isPostgres);
|
||||
jpDbPassword.setVisible(isPostgres);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -697,11 +549,36 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
Collection<TextPrompt> textPrompts = new ArrayList<>();
|
||||
textPrompts.add(new TextPrompt(Bundle.EamDbSettingsDialog_textPrompt_hostnameOrIP(), tbDbHostname));
|
||||
textPrompts.add(new TextPrompt(Bundle.EamDbSettingsDialog_textPrompt_port(), tbDbPort));
|
||||
textPrompts.add(new TextPrompt(Bundle.EamDbSettingsDialog_textPrompt_dbName(), tbDbName));
|
||||
// textPrompts.add(new TextPrompt(Bundle.EamDbSettingsDialog_textPrompt_dbName(), tbDbName));
|
||||
textPrompts.add(new TextPrompt(Bundle.EamDbSettingsDialog_textPrompt_user(), tbDbUsername));
|
||||
configureTextPrompts(textPrompts);
|
||||
}
|
||||
|
||||
private void updatePostgresFields(boolean enabled) {
|
||||
tbDbHostname.setText(enabled ? dbSettingsPostgres.getHost() : "");
|
||||
tbDbHostname.setEnabled(enabled);
|
||||
tbDbPort.setText(enabled ? Integer.toString(dbSettingsPostgres.getPort()) : "");
|
||||
tbDbPort.setEnabled(enabled);
|
||||
// tbDbName.setText(enabled ? dbSettingsPostgres.getDbName() : "");
|
||||
// tbDbName.setEnabled(enabled);
|
||||
tbDbUsername.setText(enabled ? dbSettingsPostgres.getUserName() : "");
|
||||
tbDbUsername.setEnabled(enabled);
|
||||
jpDbPassword.setText(enabled ? dbSettingsPostgres.getPassword() : "");
|
||||
jpDbPassword.setEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the fields for the SQLite platform depending on whether the SQLite
|
||||
* radioButton is enabled.
|
||||
*
|
||||
* @param enabled
|
||||
*/
|
||||
private void updateSqliteFields(boolean enabled) {
|
||||
tfDatabasePath.setText(enabled ? dbSettingsSqlite.getFileNameWithPath() : "");
|
||||
tfDatabasePath.setEnabled(enabled);
|
||||
bnDatabasePathFileOpen.setEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register for notifications when the text boxes get updated.
|
||||
*/
|
||||
@ -709,7 +586,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
textBoxes.add(tfDatabasePath);
|
||||
textBoxes.add(tbDbHostname);
|
||||
textBoxes.add(tbDbPort);
|
||||
textBoxes.add(tbDbName);
|
||||
// textBoxes.add(tbDbName);
|
||||
textBoxes.add(tbDbUsername);
|
||||
textBoxes.add(jpDbPassword);
|
||||
addDocumentListeners(textBoxes, textBoxChangedListener);
|
||||
@ -754,7 +631,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
case POSTGRESQL:
|
||||
result = !tbDbHostname.getText().trim().isEmpty()
|
||||
&& !tbDbPort.getText().trim().isEmpty()
|
||||
&& !tbDbName.getText().trim().isEmpty()
|
||||
// && !tbDbName.getText().trim().isEmpty()
|
||||
&& !tbDbUsername.getText().trim().isEmpty()
|
||||
&& 0 < jpDbPassword.getPassword().length;
|
||||
|
||||
@ -808,7 +685,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
}
|
||||
|
||||
try {
|
||||
dbSettingsPostgres.setDbName(tbDbName.getText().trim());
|
||||
dbSettingsPostgres.setDbName(CENTRAL_REPO_DB_NAME);
|
||||
} catch (EamDbException ex) {
|
||||
guidanceText.append(ex.getMessage());
|
||||
result = false;
|
||||
@ -831,7 +708,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
case SQLITE:
|
||||
try {
|
||||
File databasePath = new File(tfDatabasePath.getText());
|
||||
dbSettingsSqlite.setDbName(databasePath.getName());
|
||||
dbSettingsSqlite.setDbName(CENTRAL_REPO_DB_NAME + CENTRAL_REPO_SQLITE_EXT);
|
||||
dbSettingsSqlite.setDbDirectory(databasePath.getParent());
|
||||
} catch (EamDbException ex) {
|
||||
guidanceText.append(ex.getMessage());
|
||||
@ -850,63 +727,25 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
* @return true if it's okay, false otherwise.
|
||||
*/
|
||||
private boolean valid() {
|
||||
taSetupGuidance.setText("");
|
||||
return enableTestButton(checkFields())
|
||||
&& enableCreateButton()
|
||||
&& enableOkButton();
|
||||
return enableOkButton(checkFields());
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the "Test" button once all fields are valid.
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
@Messages({"EamDbSettingsDialog.validation.mustTest=Once you are statisfied with the database settings, click the Test button to test the database connection, settings, and schema. SQLite should only be used by one examiner at a time.",
|
||||
"EamDbSettingsDialog.validation.failedConnection=The connection to the database failed. Update the settings and try the Test again."})
|
||||
private boolean enableTestButton(boolean isValidInput) {
|
||||
if (selectedPlatform != EamDbPlatformEnum.DISABLED && isValidInput) {
|
||||
bnTest.setEnabled(true);
|
||||
if (testingStatus == DatabaseTestResult.UNTESTED) {
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_validation_mustTest(), false);
|
||||
} else if (testingStatus == DatabaseTestResult.CONNECTION_FAILED) {
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_validation_failedConnection(), true);
|
||||
}
|
||||
} else {
|
||||
bnTest.setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the "Create" button if the db is not created.
|
||||
*
|
||||
* @return true if db is created, else false
|
||||
*/
|
||||
@Messages({"EamDbSettingsDialog.validation.dbNotCreated=The database does not exist. Click the Create button to create and initialize the database."})
|
||||
private boolean enableCreateButton() {
|
||||
if (testingStatus == DatabaseTestResult.SCHEMA_INVALID) {
|
||||
bnCreateDb.setEnabled(true);
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_validation_dbNotCreated(), false);
|
||||
} else {
|
||||
bnCreateDb.setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the "OK" button if the db test passed. Disabled defaults to db test passed.
|
||||
* Enable the "OK" button if the db test passed. Disabled defaults to db
|
||||
* test passed.
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
@Messages({"EamDbSettingsDialog.validation.finished=Click OK to save your database settings and return to the Options. Or select a different database type."})
|
||||
private boolean enableOkButton() {
|
||||
if (testingStatus == DatabaseTestResult.TESTEDOK || selectedPlatform == EamDbPlatformEnum.DISABLED) {
|
||||
private boolean enableOkButton(boolean isValidInput) {
|
||||
if (isValidInput) {
|
||||
bnOk.setEnabled(true);
|
||||
setGuidanceMessage(Bundle.EamDbSettingsDialog_validation_finished(), false);
|
||||
} else {
|
||||
bnOk.setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -937,6 +776,7 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
clearIcons();
|
||||
testingStatus = DatabaseTestResult.UNTESTED;
|
||||
valid();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -949,33 +789,22 @@ public class EamDbSettingsDialog extends JDialog {
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton bnCancel;
|
||||
private javax.swing.JButton bnCreateDb;
|
||||
private javax.swing.JButton bnDatabasePathFileOpen;
|
||||
private javax.swing.ButtonGroup bnGrpDatabasePlatforms;
|
||||
private javax.swing.JButton bnOk;
|
||||
private javax.swing.JButton bnTest;
|
||||
private javax.swing.JFileChooser fcDatabasePath;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JComboBox<EamDbPlatformEnum> jComboBox1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JPasswordField jpDbPassword;
|
||||
private javax.swing.JLabel lbCreateIcon;
|
||||
private javax.swing.JLabel lbDatabaseName;
|
||||
private javax.swing.JLabel lbDatabasePath;
|
||||
private javax.swing.JLabel lbHostName;
|
||||
private javax.swing.JLabel lbPort;
|
||||
private javax.swing.JLabel lbTestIcon;
|
||||
private javax.swing.JLabel lbUserName;
|
||||
private javax.swing.JLabel lbUserPassword;
|
||||
private javax.swing.JPanel pnButtons;
|
||||
private javax.swing.JPanel pnDatabaseConnectionSettings;
|
||||
private javax.swing.JPanel pnPostgreSQLSettings;
|
||||
private javax.swing.JPanel pnSQLiteSettings;
|
||||
private javax.swing.JPanel pnSetupGuidance;
|
||||
private javax.swing.JRadioButton rdioBnDisabled;
|
||||
private javax.swing.JRadioButton rdioBnPostgreSQL;
|
||||
private javax.swing.JRadioButton rdioBnSQLite;
|
||||
private javax.swing.JTextArea taSetupGuidance;
|
||||
private javax.swing.JTextField tbDbHostname;
|
||||
private javax.swing.JTextField tbDbName;
|
||||
private javax.swing.JTextField tbDbPort;
|
||||
private javax.swing.JTextField tbDbUsername;
|
||||
private javax.swing.JTextField tfDatabasePath;
|
||||
|
@ -25,6 +25,10 @@
|
||||
<Component id="pnDatabaseContentButtons" max="32767" attributes="0"/>
|
||||
<Component id="tbOops" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jCheckBox1" min="-2" pref="186" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@ -33,13 +37,14 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jCheckBox1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseConfiguration" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="tbOops" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnDatabaseContentButtons" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="18" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -240,5 +245,15 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="jCheckBox1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="GlobalSettingsPanel.jCheckBox1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBox1ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -29,6 +29,7 @@ import org.sleuthkit.autopsy.events.AutopsyEvent;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum;
|
||||
import static org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum.DISABLED;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings;
|
||||
|
||||
@ -85,6 +86,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
bnManageTags = new javax.swing.JButton();
|
||||
bnManageTypes = new javax.swing.JButton();
|
||||
tbOops = new javax.swing.JTextField();
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
|
||||
setName(""); // NOI18N
|
||||
|
||||
@ -198,6 +200,13 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
tbOops.setText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.tbOops.text")); // NOI18N
|
||||
tbOops.setBorder(null);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.jCheckBox1.text")); // NOI18N
|
||||
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jCheckBox1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@ -207,19 +216,23 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(pnDatabaseContentButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jCheckBox1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(pnDatabaseContentButtons, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 18, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -243,6 +256,12 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
load(); // reload db settings content and update buttons
|
||||
}//GEN-LAST:event_bnDbConfigureActionPerformed
|
||||
|
||||
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
|
||||
//if saved setting is disabled checkbox should be disabled already
|
||||
enableDatabaseConfigureButton(jCheckBox1.isSelected());
|
||||
enableButtonSubComponents(jCheckBox1.isSelected() && !EamDbPlatformEnum.getSelectedPlatform().equals(DISABLED));
|
||||
}//GEN-LAST:event_jCheckBox1ActionPerformed
|
||||
|
||||
@Override
|
||||
@Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."})
|
||||
public void load() {
|
||||
@ -270,7 +289,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
lbDbPlatformValue.setText(EamDbPlatformEnum.DISABLED.toString());
|
||||
lbDbNameValue.setText("");
|
||||
lbDbLocationValue.setText("");
|
||||
enableDatabaseConfigureButton(true);
|
||||
enableDatabaseConfigureButton(jCheckBox1.isSelected());
|
||||
tbOops.setText(Bundle.GlobalSettingsPanel_validationerrMsg_mustConfigure());
|
||||
break;
|
||||
}
|
||||
@ -347,8 +366,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
* @return True
|
||||
*/
|
||||
private boolean enableAllSubComponents(Boolean enable) {
|
||||
enableDatabaseConfigureButton(enable);
|
||||
enableButtonSubComponents(enable);
|
||||
enableDatabaseConfigureButton(jCheckBox1.isSelected() && enable);
|
||||
enableButtonSubComponents(jCheckBox1.isSelected() && enable);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -359,9 +378,17 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
*
|
||||
* @return True
|
||||
*/
|
||||
private boolean enableDatabaseConfigureButton(Boolean enable) {
|
||||
private void enableDatabaseConfigureButton(Boolean enable) {
|
||||
pnDatabaseConfiguration.setEnabled(enable);
|
||||
pnDatabaseContentButtons.setEnabled(enable);
|
||||
bnDbConfigure.setEnabled(enable);
|
||||
return true;
|
||||
lbDbLocationLabel.setEnabled(enable);
|
||||
lbDbLocationValue.setEnabled(enable);
|
||||
lbDbNameLabel.setEnabled(enable);
|
||||
lbDbNameValue.setEnabled(enable);
|
||||
lbDbPlatformTypeLabel.setEnabled(enable);
|
||||
lbDbPlatformValue.setEnabled(enable);
|
||||
tbOops.setEnabled(enable);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -384,6 +411,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
private javax.swing.JButton bnImportDatabase;
|
||||
private javax.swing.JButton bnManageTags;
|
||||
private javax.swing.JButton bnManageTypes;
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JLabel lbDbLocationLabel;
|
||||
private javax.swing.JLabel lbDbLocationValue;
|
||||
private javax.swing.JLabel lbDbNameLabel;
|
||||
|
Loading…
x
Reference in New Issue
Block a user