mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge branch 'AUT-2480_UI-CTLicense' of github.com:gdicristofaro/autopsy into 25_01_17_outstandingPrs
This commit is contained in:
commit
df9112ed33
@ -32,7 +32,7 @@ public class CTCloudException extends Exception{
|
|||||||
|
|
||||||
public enum ErrorCode {
|
public enum ErrorCode {
|
||||||
BAD_REQUEST("CT-400", "Unknown or Bad request. Please contact Basis support at " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for help diagnosing the problem."),
|
BAD_REQUEST("CT-400", "Unknown or Bad request. Please contact Basis support at " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for help diagnosing the problem."),
|
||||||
INVALID_KEY("CT-401", "An invalid license ID was used to access CyberTriage Cloud Service. Please contact Basis support " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for help diagnosing the problem."),
|
INVALID_KEY("CT-401", "An invalid license ID was used to access CyberTriage Cloud Service. Please remove the license from the Cyber Triage options panel."),
|
||||||
GATEWAY_TIMEOUT("CT-504", "Request to CyberTriage Cloud Service timed out. Please retry after some time. If issue persists, please contact Basis support at " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for assistance."),
|
GATEWAY_TIMEOUT("CT-504", "Request to CyberTriage Cloud Service timed out. Please retry after some time. If issue persists, please contact Basis support at " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for assistance."),
|
||||||
UN_AUTHORIZED("CT-403", "An authorization error occurred. Please contact Basis support " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for help diagnosing the problem."),
|
UN_AUTHORIZED("CT-403", "An authorization error occurred. Please contact Basis support " + Constants.SUPPORT_AT_CYBERTRIAGE_DOT_COM + " for help diagnosing the problem."),
|
||||||
PROXY_UNAUTHORIZED("CT-407", "Proxy authentication failed. Please validate the connection settings from the Options panel Proxy Settings."),
|
PROXY_UNAUTHORIZED("CT-407", "Proxy authentication failed. Please validate the connection settings from the Options panel Proxy Settings."),
|
||||||
|
@ -39,7 +39,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel;
|
|||||||
*/
|
*/
|
||||||
public class CTOptionsPanel extends IngestModuleGlobalSettingsPanel {
|
public class CTOptionsPanel extends IngestModuleGlobalSettingsPanel {
|
||||||
|
|
||||||
private static final int MAX_SUBPANEL_WIDTH = 650;
|
private static final int MAX_SUBPANEL_WIDTH = 700;
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(CTOptionsPanel.class.getName());
|
private static final Logger logger = Logger.getLogger(CTOptionsPanel.class.getName());
|
||||||
|
|
||||||
@ -70,14 +70,14 @@ public class CTOptionsPanel extends IngestModuleGlobalSettingsPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addSubOptionsPanels(List<CTOptionsSubPanel> subPanels) {
|
private void addSubOptionsPanels(List<CTOptionsSubPanel> subPanels) {
|
||||||
GridBagConstraints disclaimerConstraints = new GridBagConstraints();
|
GridBagConstraints disclaimerConstraints = new GridBagConstraints();
|
||||||
disclaimerConstraints.gridx = 0;
|
disclaimerConstraints.gridx = 0;
|
||||||
disclaimerConstraints.gridy = 0;
|
disclaimerConstraints.gridy = 0;
|
||||||
disclaimerConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
disclaimerConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
disclaimerConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
disclaimerConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
disclaimerConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
disclaimerConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
disclaimerConstraints.weighty = 0;
|
disclaimerConstraints.weighty = 0;
|
||||||
disclaimerConstraints.weightx = 0;
|
disclaimerConstraints.weightx = 0;
|
||||||
|
|
||||||
for (int i = 0; i < subPanels.size(); i++) {
|
for (int i = 0; i < subPanels.size(); i++) {
|
||||||
CTOptionsSubPanel subPanel = subPanels.get(i);
|
CTOptionsSubPanel subPanel = subPanels.get(i);
|
||||||
|
@ -23,6 +23,8 @@ EULADialog.cancelButton.text=Cancel
|
|||||||
EULADialog.acceptButton.text=Accept
|
EULADialog.acceptButton.text=Accept
|
||||||
EULADialog.title=Cyber Triage End User License Agreement
|
EULADialog.title=Cyber Triage End User License Agreement
|
||||||
CTMalwareScannerOptionsPanel.licenseInfoMessageLabel.text=
|
CTMalwareScannerOptionsPanel.licenseInfoMessageLabel.text=
|
||||||
CTMalwareScannerOptionsPanel.disclaimer.text=<html>The Cyber Triage Malware Scanner module uses 40+ malware scanning engines to identify if Windows executables are malicious. It requires a paid subscription to use.</html>
|
|
||||||
CTMalwareScannerOptionsPanel.purchaseFromLabel.text=For licensing information, visit
|
CTMalwareScannerOptionsPanel.purchaseFromLabel.text=For licensing information, visit
|
||||||
CTLicenseDialog.licenseNumberTextField.toolTipText=AUT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
CTLicenseDialog.licenseNumberTextField.toolTipText=AUT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||||
|
CTMalwareScannerOptionsPanel.licenseErrorLabel.text=
|
||||||
|
CTMalwareScannerOptionsPanel.licenseInfoRemoveButton.text=Remove License
|
||||||
|
CTMalwareScannerOptionsPanel.text=<html>The Cyber Triage Malware Scanner module uses 40+ malware scanning engines to identify if Windows executables are malicious. It requires a paid subscription to use.</html>
|
||||||
|
@ -28,7 +28,7 @@ CTMalwareScannerOptionsPanel_licenseAddDialog_desc=License Number:
|
|||||||
CTMalwareScannerOptionsPanel_licenseAddDialog_title=Add a License...
|
CTMalwareScannerOptionsPanel_licenseAddDialog_title=Add a License...
|
||||||
CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc=The license number has already been entered
|
CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc=The license number has already been entered
|
||||||
CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title=License Number Already Entered
|
CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title=License Number Already Entered
|
||||||
CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_desc=Please verify that license number is of format 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
|
CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_desc=Please verify that license number is of format 'AUT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
|
||||||
CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_title=Invalid License Number
|
CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_title=Invalid License Number
|
||||||
CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title=Server Error
|
CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title=Server Error
|
||||||
# {0} - licenseCode
|
# {0} - licenseCode
|
||||||
@ -63,6 +63,9 @@ EULADialog.cancelButton.text=Cancel
|
|||||||
EULADialog.acceptButton.text=Accept
|
EULADialog.acceptButton.text=Accept
|
||||||
EULADialog.title=Cyber Triage End User License Agreement
|
EULADialog.title=Cyber Triage End User License Agreement
|
||||||
CTMalwareScannerOptionsPanel.licenseInfoMessageLabel.text=
|
CTMalwareScannerOptionsPanel.licenseInfoMessageLabel.text=
|
||||||
CTMalwareScannerOptionsPanel.disclaimer.text=<html>The Cyber Triage Malware Scanner module uses 40+ malware scanning engines to identify if Windows executables are malicious. It requires a paid subscription to use.</html>
|
|
||||||
CTMalwareScannerOptionsPanel.purchaseFromLabel.text=For licensing information, visit
|
CTMalwareScannerOptionsPanel.purchaseFromLabel.text=For licensing information, visit
|
||||||
CTLicenseDialog.licenseNumberTextField.toolTipText=AUT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
CTLicenseDialog.licenseNumberTextField.toolTipText=AUT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||||
|
CTMalwareScannerOptionsPanel.licenseErrorLabel.text=
|
||||||
|
CTMalwareScannerOptionsPanel.licenseInfoRemoveButton.text=Remove License
|
||||||
|
CTMalwareScannerOptionsPanel.text=<html>The Cyber Triage Malware Scanner module uses 40+ malware scanning engines to identify if Windows executables are malicious. It requires a paid subscription to use.</html>
|
||||||
|
Installer_LicenseCheck_cloudExceptionTitle=Cyber Triage Error
|
||||||
|
@ -50,6 +50,15 @@ public class CTLicensePersistence {
|
|||||||
public static CTLicensePersistence getInstance() {
|
public static CTLicensePersistence getInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized boolean deleteLicenseResponse() {
|
||||||
|
File licenseFile = getCTLicenseFile();
|
||||||
|
if (licenseFile.exists()) {
|
||||||
|
return licenseFile.delete();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized boolean saveLicenseResponse(LicenseResponse licenseResponse) {
|
public synchronized boolean saveLicenseResponse(LicenseResponse licenseResponse) {
|
||||||
if (licenseResponse != null) {
|
if (licenseResponse != null) {
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
<Form version="1.8" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||||
|
<Properties>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 32767]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||||
@ -11,7 +16,7 @@
|
|||||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,90,0,0,1,-29"/>
|
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,90,0,0,2,6"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||||
@ -25,10 +30,13 @@
|
|||||||
</TitledBorder>
|
</TitledBorder>
|
||||||
</Border>
|
</Border>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 2147483647]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
|
|
||||||
@ -37,9 +45,16 @@
|
|||||||
<Component class="javax.swing.JLabel" name="disclaimer">
|
<Component class="javax.swing.JLabel" name="disclaimer">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.disclaimer.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="verticalAlignment" type="int" value="1"/>
|
<Property name="verticalAlignment" type="int" value="1"/>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 32]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="name" type="java.lang.String" value="" noResource="true"/>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 32]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
@ -72,10 +87,79 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="0" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Container class="javax.swing.JPanel" name="buttonSpacer">
|
||||||
|
<Properties>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[32767, 0]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[5, 0]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[5, 0]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
|
</AuxValues>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="0" gridY="2" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||||
|
</Container>
|
||||||
|
<Container class="javax.swing.JPanel" name="buttonPanel">
|
||||||
|
<AuxValues>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
|
</AuxValues>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="7" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="11" weightX="0.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
|
||||||
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||||
|
<SubComponents>
|
||||||
|
<Component class="javax.swing.JButton" name="licenseInfoAddButton">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.licenseInfoAddButton.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="licenseInfoAddButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="12" weightX="0.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="licenseInfoRemoveButton">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.licenseInfoRemoveButton.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="licenseInfoRemoveButtonActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="12" weightX="0.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
</SubComponents>
|
||||||
|
</Container>
|
||||||
<Component class="javax.swing.JLabel" name="licenseInfoExpiresLabel">
|
<Component class="javax.swing.JLabel" name="licenseInfoExpiresLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
@ -84,7 +168,7 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -96,7 +180,7 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -108,58 +192,7 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="4" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JButton" name="licenseInfoAddButton">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.licenseInfoAddButton.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="licenseInfoAddButtonActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
|
||||||
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="12" weightX="1.0" weightY="0.0"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="maxFileUploadsLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.maxFileUploadsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
|
||||||
<GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="maxHashLookupsLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.maxHashLookupsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
|
||||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
|
||||||
</Constraint>
|
|
||||||
</Constraints>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.JLabel" name="hashLookupsRemainingLabel">
|
|
||||||
<Properties>
|
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.hashLookupsRemainingLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<Constraints>
|
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
|
||||||
<GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -171,19 +204,43 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="5" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="countersResetLabel">
|
<Component class="javax.swing.JLabel" name="maxHashLookupsLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.countersResetLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.maxHashLookupsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="hashLookupsRemainingLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.hashLookupsRemainingLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="1" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="maxFileUploadsLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.maxFileUploadsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -195,7 +252,34 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="1" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="1" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="countersResetLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.countersResetLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="0" gridY="8" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
|
</Constraint>
|
||||||
|
</Constraints>
|
||||||
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="licenseErrorLabel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
|
<Connection code="java.awt.Color.RED" type="code"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/ctoptions/ctcloud/Bundle.properties" key="CTMalwareScannerOptionsPanel.licenseErrorLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
<Constraints>
|
||||||
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
|
<GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -208,7 +292,7 @@
|
|||||||
</AuxValues>
|
</AuxValues>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import java.util.Optional;
|
|||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.SwingWorker;
|
import javax.swing.SwingWorker;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -81,6 +80,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
private volatile AuthTokenResponse authTokenResponse = null;
|
private volatile AuthTokenResponse authTokenResponse = null;
|
||||||
private volatile String authTokenMessage = null;
|
private volatile String authTokenMessage = null;
|
||||||
private volatile AuthTokenFetcher authTokenFetcher = null;
|
private volatile AuthTokenFetcher authTokenFetcher = null;
|
||||||
|
private volatile String authTokenError = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main constructor.
|
* Main constructor.
|
||||||
@ -118,7 +118,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void saveSettings() {
|
public synchronized void saveSettings() {
|
||||||
ctPersistence.saveLicenseResponse(getLicenseInfo());
|
LicenseResponse licenseResponse = getLicenseInfo();
|
||||||
|
if (licenseResponse == null) {
|
||||||
|
this.ctPersistence.deleteLicenseResponse();
|
||||||
|
} else {
|
||||||
|
ctPersistence.saveLicenseResponse(licenseResponse);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -131,14 +136,14 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
Optional<LicenseInfo> licenseInfoOpt = ctPersistence.loadLicenseInfo();
|
Optional<LicenseInfo> licenseInfoOpt = ctPersistence.loadLicenseInfo();
|
||||||
LicenseInfo licenseInfo = licenseInfoOpt.orElse(null);
|
LicenseInfo licenseInfo = licenseInfoOpt.orElse(null);
|
||||||
setLicenseDisplay(licenseInfo, null);
|
setLicenseDisplay(licenseInfo, null);
|
||||||
setMalwareScansDisplay(null, null);
|
setMalwareScansDisplay(null, null, null);
|
||||||
if (licenseInfo != null) {
|
if (licenseInfo != null) {
|
||||||
loadMalwareScansInfo(licenseInfo);
|
loadMalwareScansInfo(licenseInfo);
|
||||||
this.purchaseFromLabel.setVisible(false);
|
this.purchaseFromLabel.setVisible(false);
|
||||||
this.purchaseLink.setVisible(false);
|
this.purchaseLink.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
this.purchaseFromLabel.setVisible(true);
|
this.purchaseFromLabel.setVisible(true);
|
||||||
this.purchaseLink.setVisible(true);
|
this.purchaseLink.setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +165,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
|
|
||||||
private synchronized LicenseResponse getLicenseInfo() {
|
private synchronized LicenseResponse getLicenseInfo() {
|
||||||
return this.licenseInfo == null ? null : this.licenseInfo.getLicenseResponse();
|
return this.licenseInfo == null ? null : this.licenseInfo.getLicenseResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void setLicenseDisplay(LicenseInfo licenseInfo, String licenseMessage) {
|
private synchronized void setLicenseDisplay(LicenseInfo licenseInfo, String licenseMessage) {
|
||||||
this.licenseInfo = licenseInfo;
|
this.licenseInfo = licenseInfo;
|
||||||
@ -168,9 +173,10 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
renderLicenseState();
|
renderLicenseState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void setMalwareScansDisplay(AuthTokenResponse authTokenResponse, String authTokenMessage) {
|
private synchronized void setMalwareScansDisplay(AuthTokenResponse authTokenResponse, String authTokenMessage, String authTokenError) {
|
||||||
this.authTokenResponse = authTokenResponse;
|
this.authTokenResponse = authTokenResponse;
|
||||||
this.authTokenMessage = authTokenMessage;
|
this.authTokenMessage = authTokenMessage;
|
||||||
|
this.authTokenError = authTokenError;
|
||||||
renderLicenseState();
|
renderLicenseState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +202,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
this.licenseFetcher.cancel(true);
|
this.licenseFetcher.cancel(true);
|
||||||
}
|
}
|
||||||
setLicenseDisplay(null, Bundle.CTOPtionsPanel_loadLicenseInfo_loading());
|
setLicenseDisplay(null, Bundle.CTOPtionsPanel_loadLicenseInfo_loading());
|
||||||
setMalwareScansDisplay(null, null);
|
setMalwareScansDisplay(null, null, null);
|
||||||
this.licenseFetcher = new LicenseFetcher(licenseNumber);
|
this.licenseFetcher = new LicenseFetcher(licenseNumber);
|
||||||
this.licenseFetcher.execute();
|
this.licenseFetcher.execute();
|
||||||
}
|
}
|
||||||
@ -210,16 +216,22 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (licenseInfo == null || licenseInfo.getDecryptedLicense() == null) {
|
if (licenseInfo == null || licenseInfo.getDecryptedLicense() == null) {
|
||||||
setMalwareScansDisplay(null, null);
|
setMalwareScansDisplay(null, null, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setMalwareScansDisplay(null, Bundle.CTOPtionsPanel_loadMalwareScansInfo_loading());
|
setMalwareScansDisplay(null, Bundle.CTOPtionsPanel_loadMalwareScansInfo_loading(), null);
|
||||||
|
|
||||||
this.authTokenFetcher = new AuthTokenFetcher(licenseInfo.getDecryptedLicense());
|
this.authTokenFetcher = new AuthTokenFetcher(licenseInfo.getDecryptedLicense());
|
||||||
this.authTokenFetcher.execute();
|
this.authTokenFetcher.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String htmlWrap(String msg) {
|
||||||
|
return msg == null
|
||||||
|
? null
|
||||||
|
: "<html>" + msg + "</html>";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called from within the constructor to initialize the form.
|
* This method is called from within the constructor to initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is always
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
@ -234,27 +246,36 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
javax.swing.JLabel disclaimer = new javax.swing.JLabel();
|
javax.swing.JLabel disclaimer = new javax.swing.JLabel();
|
||||||
javax.swing.JPanel licenseInfoPanel = new javax.swing.JPanel();
|
javax.swing.JPanel licenseInfoPanel = new javax.swing.JPanel();
|
||||||
licenseInfoMessageLabel = new javax.swing.JLabel();
|
licenseInfoMessageLabel = new javax.swing.JLabel();
|
||||||
|
javax.swing.JPanel buttonSpacer = new javax.swing.JPanel();
|
||||||
|
javax.swing.JPanel buttonPanel = new javax.swing.JPanel();
|
||||||
|
licenseInfoAddButton = new javax.swing.JButton();
|
||||||
|
licenseInfoRemoveButton = new javax.swing.JButton();
|
||||||
licenseInfoExpiresLabel = new javax.swing.JLabel();
|
licenseInfoExpiresLabel = new javax.swing.JLabel();
|
||||||
licenseInfoIdLabel = new javax.swing.JLabel();
|
licenseInfoIdLabel = new javax.swing.JLabel();
|
||||||
licenseInfoUserLabel = new javax.swing.JLabel();
|
licenseInfoUserLabel = new javax.swing.JLabel();
|
||||||
licenseInfoAddButton = new javax.swing.JButton();
|
malwareScansMessageLabel = new javax.swing.JLabel();
|
||||||
maxFileUploadsLabel = new javax.swing.JLabel();
|
|
||||||
maxHashLookupsLabel = new javax.swing.JLabel();
|
maxHashLookupsLabel = new javax.swing.JLabel();
|
||||||
hashLookupsRemainingLabel = new javax.swing.JLabel();
|
hashLookupsRemainingLabel = new javax.swing.JLabel();
|
||||||
malwareScansMessageLabel = new javax.swing.JLabel();
|
maxFileUploadsLabel = new javax.swing.JLabel();
|
||||||
countersResetLabel = new javax.swing.JLabel();
|
|
||||||
fileUploadsRemainingLabel = new javax.swing.JLabel();
|
fileUploadsRemainingLabel = new javax.swing.JLabel();
|
||||||
|
countersResetLabel = new javax.swing.JLabel();
|
||||||
|
licenseErrorLabel = new javax.swing.JLabel();
|
||||||
javax.swing.JPanel purchasePanel = new javax.swing.JPanel();
|
javax.swing.JPanel purchasePanel = new javax.swing.JPanel();
|
||||||
purchaseFromLabel = new javax.swing.JLabel();
|
purchaseFromLabel = new javax.swing.JLabel();
|
||||||
purchaseLink = new javax.swing.JLabel();
|
purchaseLink = new javax.swing.JLabel();
|
||||||
|
|
||||||
|
setMaximumSize(new java.awt.Dimension(650, 32767));
|
||||||
setLayout(new java.awt.GridBagLayout());
|
setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
malwareScansPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.malwareScansPanel.border.title"))); // NOI18N
|
malwareScansPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.malwareScansPanel.border.title"))); // NOI18N
|
||||||
|
malwareScansPanel.setMaximumSize(new java.awt.Dimension(650, 2147483647));
|
||||||
malwareScansPanel.setLayout(new java.awt.GridBagLayout());
|
malwareScansPanel.setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(disclaimer, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.disclaimer.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(disclaimer, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.text")); // NOI18N
|
||||||
disclaimer.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
disclaimer.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||||
|
disclaimer.setMaximumSize(new java.awt.Dimension(650, 32));
|
||||||
|
disclaimer.setName(""); // NOI18N
|
||||||
|
disclaimer.setPreferredSize(new java.awt.Dimension(650, 32));
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
@ -270,38 +291,25 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
|
gridBagConstraints.gridwidth = 3;
|
||||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
licenseInfoPanel.add(licenseInfoMessageLabel, gridBagConstraints);
|
licenseInfoPanel.add(licenseInfoMessageLabel, gridBagConstraints);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoExpiresLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoExpiresLabel.text")); // NOI18N
|
buttonSpacer.setMaximumSize(new java.awt.Dimension(32767, 0));
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
buttonSpacer.setMinimumSize(new java.awt.Dimension(5, 0));
|
||||||
gridBagConstraints.gridx = 0;
|
buttonSpacer.setPreferredSize(new java.awt.Dimension(5, 0));
|
||||||
gridBagConstraints.gridy = 1;
|
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
|
||||||
gridBagConstraints.weightx = 1.0;
|
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
|
||||||
licenseInfoPanel.add(licenseInfoExpiresLabel, gridBagConstraints);
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoIdLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoIdLabel.text")); // NOI18N
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
|
||||||
gridBagConstraints.gridx = 1;
|
|
||||||
gridBagConstraints.gridy = 1;
|
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
|
||||||
gridBagConstraints.weightx = 1.0;
|
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
|
||||||
licenseInfoPanel.add(licenseInfoIdLabel, gridBagConstraints);
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoUserLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoUserLabel.text")); // NOI18N
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 2;
|
gridBagConstraints.gridy = 2;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.gridwidth = 2;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
licenseInfoPanel.add(buttonSpacer, gridBagConstraints);
|
||||||
licenseInfoPanel.add(licenseInfoUserLabel, gridBagConstraints);
|
|
||||||
|
buttonPanel.setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoAddButton, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoAddButton.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoAddButton, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoAddButton.text")); // NOI18N
|
||||||
licenseInfoAddButton.addActionListener(new java.awt.event.ActionListener() {
|
licenseInfoAddButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
@ -309,27 +317,77 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
licenseInfoAddButtonActionPerformed(evt);
|
licenseInfoAddButtonActionPerformed(evt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
|
gridBagConstraints.gridx = 0;
|
||||||
|
gridBagConstraints.gridy = 0;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
|
buttonPanel.add(licenseInfoAddButton, gridBagConstraints);
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoRemoveButton, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoRemoveButton.text")); // NOI18N
|
||||||
|
licenseInfoRemoveButton.addActionListener(new java.awt.event.ActionListener() {
|
||||||
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
licenseInfoRemoveButtonActionPerformed(evt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
|
gridBagConstraints.gridx = 0;
|
||||||
|
gridBagConstraints.gridy = 1;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||||
|
buttonPanel.add(licenseInfoRemoveButton, gridBagConstraints);
|
||||||
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 2;
|
gridBagConstraints.gridx = 2;
|
||||||
gridBagConstraints.gridy = 2;
|
gridBagConstraints.gridy = 2;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
|
gridBagConstraints.gridheight = 7;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
licenseInfoPanel.add(buttonPanel, gridBagConstraints);
|
||||||
licenseInfoPanel.add(licenseInfoAddButton, gridBagConstraints);
|
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(maxFileUploadsLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.maxFileUploadsLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoExpiresLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoExpiresLabel.text")); // NOI18N
|
||||||
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
|
gridBagConstraints.gridx = 0;
|
||||||
|
gridBagConstraints.gridy = 3;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
|
licenseInfoPanel.add(licenseInfoExpiresLabel, gridBagConstraints);
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoIdLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoIdLabel.text")); // NOI18N
|
||||||
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
|
gridBagConstraints.gridx = 1;
|
||||||
|
gridBagConstraints.gridy = 3;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
|
licenseInfoPanel.add(licenseInfoIdLabel, gridBagConstraints);
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoUserLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoUserLabel.text")); // NOI18N
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 4;
|
gridBagConstraints.gridy = 4;
|
||||||
|
gridBagConstraints.gridwidth = 2;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
licenseInfoPanel.add(maxFileUploadsLabel, gridBagConstraints);
|
licenseInfoPanel.add(licenseInfoUserLabel, gridBagConstraints);
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(malwareScansMessageLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.malwareScansMessageLabel.text")); // NOI18N
|
||||||
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
|
gridBagConstraints.gridx = 0;
|
||||||
|
gridBagConstraints.gridy = 5;
|
||||||
|
gridBagConstraints.gridwidth = 2;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
|
licenseInfoPanel.add(malwareScansMessageLabel, gridBagConstraints);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(maxHashLookupsLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.maxHashLookupsLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(maxHashLookupsLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.maxHashLookupsLabel.text")); // NOI18N
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 3;
|
gridBagConstraints.gridy = 6;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
@ -338,39 +396,51 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
org.openide.awt.Mnemonics.setLocalizedText(hashLookupsRemainingLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.hashLookupsRemainingLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(hashLookupsRemainingLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.hashLookupsRemainingLabel.text")); // NOI18N
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 1;
|
gridBagConstraints.gridx = 1;
|
||||||
gridBagConstraints.gridy = 3;
|
gridBagConstraints.gridy = 6;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
licenseInfoPanel.add(hashLookupsRemainingLabel, gridBagConstraints);
|
licenseInfoPanel.add(hashLookupsRemainingLabel, gridBagConstraints);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(malwareScansMessageLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.malwareScansMessageLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(maxFileUploadsLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.maxFileUploadsLabel.text")); // NOI18N
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 3;
|
gridBagConstraints.gridy = 7;
|
||||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||||
licenseInfoPanel.add(malwareScansMessageLabel, gridBagConstraints);
|
licenseInfoPanel.add(maxFileUploadsLabel, gridBagConstraints);
|
||||||
|
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(fileUploadsRemainingLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.fileUploadsRemainingLabel.text")); // NOI18N
|
||||||
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
|
gridBagConstraints.gridx = 1;
|
||||||
|
gridBagConstraints.gridy = 7;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||||
|
licenseInfoPanel.add(fileUploadsRemainingLabel, gridBagConstraints);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(countersResetLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.countersResetLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(countersResetLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.countersResetLabel.text")); // NOI18N
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 5;
|
gridBagConstraints.gridy = 8;
|
||||||
|
gridBagConstraints.gridwidth = 2;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||||
licenseInfoPanel.add(countersResetLabel, gridBagConstraints);
|
licenseInfoPanel.add(countersResetLabel, gridBagConstraints);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(fileUploadsRemainingLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.fileUploadsRemainingLabel.text")); // NOI18N
|
licenseErrorLabel.setForeground(java.awt.Color.RED);
|
||||||
|
org.openide.awt.Mnemonics.setLocalizedText(licenseErrorLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseErrorLabel.text")); // NOI18N
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 1;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 4;
|
gridBagConstraints.gridy = 1;
|
||||||
|
gridBagConstraints.gridwidth = 3;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
licenseInfoPanel.add(fileUploadsRemainingLabel, gridBagConstraints);
|
licenseInfoPanel.add(licenseErrorLabel, gridBagConstraints);
|
||||||
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
@ -406,7 +476,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 3;
|
gridBagConstraints.gridy = 2;
|
||||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
@ -414,10 +484,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
malwareScansPanel.add(purchasePanel, gridBagConstraints);
|
malwareScansPanel.add(purchasePanel, gridBagConstraints);
|
||||||
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
|
||||||
gridBagConstraints.gridy = 2;
|
|
||||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
|
||||||
gridBagConstraints.weightx = 1.0;
|
gridBagConstraints.weightx = 1.0;
|
||||||
add(malwareScansPanel, gridBagConstraints);
|
add(malwareScansPanel, gridBagConstraints);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
@ -428,7 +495,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
"CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title=License Number Already Entered",
|
"CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title=License Number Already Entered",
|
||||||
"CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc=The license number has already been entered",
|
"CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc=The license number has already been entered",
|
||||||
"CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_title=Invalid License Number",
|
"CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_title=Invalid License Number",
|
||||||
"CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_desc=Please verify that license number is of format 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'"})
|
"CTMalwareScannerOptionsPanel_licenseAddDialogPatternErr_desc=Please verify that license number is of format 'AUT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'"})
|
||||||
private void licenseInfoAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_licenseInfoAddButtonActionPerformed
|
private void licenseInfoAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_licenseInfoAddButtonActionPerformed
|
||||||
CTLicenseDialog licenseDialog = new CTLicenseDialog(WindowManager.getDefault().getMainWindow(), true);
|
CTLicenseDialog licenseDialog = new CTLicenseDialog(WindowManager.getDefault().getMainWindow(), true);
|
||||||
licenseDialog.setLocationRelativeTo(this);
|
licenseDialog.setLocationRelativeTo(this);
|
||||||
@ -442,11 +509,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JOptionPane.showMessageDialog(
|
setMalwareScansDisplay(null, null, htmlWrap(Bundle.CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc()));
|
||||||
this,
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title(),
|
|
||||||
JOptionPane.INFORMATION_MESSAGE);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}//GEN-LAST:event_licenseInfoAddButtonActionPerformed
|
}//GEN-LAST:event_licenseInfoAddButtonActionPerformed
|
||||||
@ -455,6 +518,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
gotoLink(PURCHASE_URL);
|
gotoLink(PURCHASE_URL);
|
||||||
}//GEN-LAST:event_purchaseLinkMouseClicked
|
}//GEN-LAST:event_purchaseLinkMouseClicked
|
||||||
|
|
||||||
|
private void licenseInfoRemoveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_licenseInfoRemoveButtonActionPerformed
|
||||||
|
setLicenseDisplay(null, null);
|
||||||
|
setMalwareScansDisplay(null, null, null);
|
||||||
|
this.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
|
}//GEN-LAST:event_licenseInfoRemoveButtonActionPerformed
|
||||||
|
|
||||||
@NbBundle.Messages({
|
@NbBundle.Messages({
|
||||||
"# {0} - userName",
|
"# {0} - userName",
|
||||||
"# {1} - email",
|
"# {1} - email",
|
||||||
@ -477,19 +546,23 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
"CTMalwareScannerOptionsPanel_malwareScans_fileUploadsRemaining=File uploads remaining: {0}"})
|
"CTMalwareScannerOptionsPanel_malwareScans_fileUploadsRemaining=File uploads remaining: {0}"})
|
||||||
private synchronized void renderLicenseState() {
|
private synchronized void renderLicenseState() {
|
||||||
this.licenseInfoAddButton.setEnabled(!isLicenseAddRunning());
|
this.licenseInfoAddButton.setEnabled(!isLicenseAddRunning());
|
||||||
|
this.licenseInfoRemoveButton.setEnabled(this.licenseInfo != null && !isLicenseAddRunning());
|
||||||
|
|
||||||
this.licenseInfoMessageLabel.setVisible(StringUtils.isNotBlank(this.licenseInfoMessage));
|
this.licenseInfoMessageLabel.setVisible(StringUtils.isNotBlank(this.licenseInfoMessage));
|
||||||
this.licenseInfoMessageLabel.setText(this.licenseInfoMessage);
|
this.licenseInfoMessageLabel.setText(this.licenseInfoMessage);
|
||||||
|
|
||||||
|
this.licenseErrorLabel.setVisible(StringUtils.isNotBlank(this.authTokenError));
|
||||||
|
this.licenseErrorLabel.setText(this.authTokenError);
|
||||||
|
|
||||||
if (licenseInfo == null) {
|
if (licenseInfo == null) {
|
||||||
this.licenseInfoExpiresLabel.setVisible(false);
|
this.licenseInfoExpiresLabel.setVisible(false);
|
||||||
this.licenseInfoIdLabel.setVisible(false);
|
this.licenseInfoIdLabel.setVisible(false);
|
||||||
this.licenseInfoUserLabel.setVisible(false);
|
this.licenseInfoUserLabel.setVisible(false);
|
||||||
this.purchaseFromLabel.setVisible(true);
|
this.purchaseFromLabel.setVisible(true);
|
||||||
this.purchaseLink.setVisible(true);
|
this.purchaseLink.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
this.purchaseFromLabel.setVisible(false);
|
this.purchaseFromLabel.setVisible(false);
|
||||||
this.purchaseLink.setVisible(false);
|
this.purchaseLink.setVisible(false);
|
||||||
|
|
||||||
this.licenseInfoExpiresLabel.setVisible(true);
|
this.licenseInfoExpiresLabel.setVisible(true);
|
||||||
this.licenseInfoExpiresLabel.setText(Bundle.CTMalwareScannerOptionsPanel_licenseInfo_expires(
|
this.licenseInfoExpiresLabel.setText(Bundle.CTMalwareScannerOptionsPanel_licenseInfo_expires(
|
||||||
@ -592,16 +665,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
this.licenseInfo = LicenseDecryptorUtil.getInstance().createLicenseInfo(licenseResponse);
|
this.licenseInfo = LicenseDecryptorUtil.getInstance().createLicenseInfo(licenseResponse);
|
||||||
this.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
this.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
}
|
}
|
||||||
} catch (IOException | InvalidLicenseException ex) {
|
|
||||||
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
|
||||||
JOptionPane.showMessageDialog(
|
|
||||||
CTMalwareScannerOptionsPanel.this,
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_desc(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
} finally {
|
|
||||||
setLicenseDisplay(this.licenseInfo, null);
|
setLicenseDisplay(this.licenseInfo, null);
|
||||||
loadMalwareScansInfo(this.licenseInfo);
|
loadMalwareScansInfo(this.licenseInfo);
|
||||||
|
} catch (IOException | InvalidLicenseException ex) {
|
||||||
|
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
||||||
|
setLicenseDisplay(this.licenseInfo, null);
|
||||||
|
setMalwareScansDisplay(null, null, htmlWrap(Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_desc()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,16 +703,11 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
// if no result, show unauthorized
|
// if no result, show unauthorized
|
||||||
if (licenseResponse == null) {
|
if (licenseResponse == null) {
|
||||||
logger.log(Level.WARNING, "An API error occurred while fetching license information. License fetch returned no result.");
|
logger.log(Level.WARNING, "An API error occurred while fetching license information. License fetch returned no result.");
|
||||||
JOptionPane.showMessageDialog(
|
setLicenseDisplay(null, null);
|
||||||
CTMalwareScannerOptionsPanel.this,
|
setMalwareScansDisplay(null, null, htmlWrap(CTCloudException.ErrorCode.UN_AUTHORIZED.getDescription()));
|
||||||
CTCloudException.ErrorCode.UN_AUTHORIZED.getDescription(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
setLicenseDisplay(licenseInfo, null);
|
|
||||||
loadMalwareScansInfo(licenseInfo);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if not successful response
|
// if not successful response
|
||||||
if (!Boolean.TRUE.equals(licenseResponse.isSuccess())) {
|
if (!Boolean.TRUE.equals(licenseResponse.isSuccess())) {
|
||||||
logger.log(Level.WARNING, "An API error occurred while fetching license information. License fetch was not successful");
|
logger.log(Level.WARNING, "An API error occurred while fetching license information. License fetch was not successful");
|
||||||
@ -652,41 +716,29 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
if (!StringUtils.isBlank(licenseResponse.getErrorMsg())) {
|
if (!StringUtils.isBlank(licenseResponse.getErrorMsg())) {
|
||||||
message = licenseResponse.getErrorMsg();
|
message = licenseResponse.getErrorMsg();
|
||||||
}
|
}
|
||||||
JOptionPane.showMessageDialog(
|
setLicenseDisplay(null, null);
|
||||||
CTMalwareScannerOptionsPanel.this,
|
setMalwareScansDisplay(null, null, htmlWrap(message));
|
||||||
message,
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
setLicenseDisplay(licenseInfo, null);
|
|
||||||
loadMalwareScansInfo(licenseInfo);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, load
|
// otherwise, load
|
||||||
SwingUtilities.invokeLater(() -> acceptEula(licenseResponse));
|
SwingUtilities.invokeLater(() -> acceptEula(licenseResponse));
|
||||||
|
|
||||||
} catch (InterruptedException | CancellationException ex) {
|
} catch (InterruptedException | CancellationException ex) {
|
||||||
// ignore cancellation; just load current license
|
// ignore cancellation; just load current license
|
||||||
setLicenseDisplay(licenseInfo, null);
|
setLicenseDisplay(licenseInfo, null);
|
||||||
loadMalwareScansInfo(licenseInfo);
|
loadMalwareScansInfo(licenseInfo);
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
|
String errMessage;
|
||||||
if (ex.getCause() != null && ex.getCause() instanceof CTCloudException cloudEx) {
|
if (ex.getCause() != null && ex.getCause() instanceof CTCloudException cloudEx) {
|
||||||
logger.log(Level.WARNING, "An API error occurred while fetching license information", cloudEx);
|
logger.log(Level.WARNING, "An API error occurred while fetching license information", cloudEx);
|
||||||
JOptionPane.showMessageDialog(
|
errMessage = cloudEx.getErrorDetails();
|
||||||
CTMalwareScannerOptionsPanel.this,
|
|
||||||
cloudEx.getErrorCode().getDescription(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
} else {
|
} else {
|
||||||
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
||||||
JOptionPane.showMessageDialog(
|
errMessage = Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_desc();
|
||||||
CTMalwareScannerOptionsPanel.this,
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_desc(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
}
|
}
|
||||||
setLicenseDisplay(licenseInfo, null);
|
setLicenseDisplay(null, null);
|
||||||
loadMalwareScansInfo(licenseInfo);
|
setMalwareScansDisplay(null, null, htmlWrap(errMessage));
|
||||||
} finally {
|
} finally {
|
||||||
synchronized (CTMalwareScannerOptionsPanel.this) {
|
synchronized (CTMalwareScannerOptionsPanel.this) {
|
||||||
CTMalwareScannerOptionsPanel.this.licenseFetcher = null;
|
CTMalwareScannerOptionsPanel.this.licenseFetcher = null;
|
||||||
@ -712,13 +764,14 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
if (this.isCancelled()) {
|
if (this.isCancelled()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctApiDAO.getAuthToken(decryptedLicense);
|
return ctApiDAO.getAuthToken(decryptedLicense);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void done() {
|
protected void done() {
|
||||||
AuthTokenResponse authTokenResponse = null;
|
AuthTokenResponse authTokenResponse = null;
|
||||||
|
String authTokenError = null;
|
||||||
try {
|
try {
|
||||||
authTokenResponse = get();
|
authTokenResponse = get();
|
||||||
} catch (InterruptedException | CancellationException ex) {
|
} catch (InterruptedException | CancellationException ex) {
|
||||||
@ -726,24 +779,16 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() != null && ex.getCause() instanceof CTCloudException cloudEx) {
|
if (ex.getCause() != null && ex.getCause() instanceof CTCloudException cloudEx) {
|
||||||
logger.log(Level.WARNING, "An API error occurred while fetching malware scans information for license", cloudEx);
|
logger.log(Level.WARNING, "An API error occurred while fetching malware scans information for license", cloudEx);
|
||||||
JOptionPane.showMessageDialog(
|
authTokenError = cloudEx.getErrorDetails();
|
||||||
CTMalwareScannerOptionsPanel.this,
|
|
||||||
cloudEx.getErrorDetails(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_MalwareScansFetcher_apiErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
} else {
|
} else {
|
||||||
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
||||||
JOptionPane.showMessageDialog(
|
authTokenError = Bundle.CTMalwareScannerOptionsPanel_MalwareScansFetcher_localErr_desc();
|
||||||
CTMalwareScannerOptionsPanel.this,
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_MalwareScansFetcher_localErr_desc(),
|
|
||||||
Bundle.CTMalwareScannerOptionsPanel_MalwareScansFetcher_localErr_title(),
|
|
||||||
JOptionPane.ERROR_MESSAGE);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
synchronized (CTMalwareScannerOptionsPanel.this) {
|
synchronized (CTMalwareScannerOptionsPanel.this) {
|
||||||
CTMalwareScannerOptionsPanel.this.authTokenFetcher = null;
|
CTMalwareScannerOptionsPanel.this.authTokenFetcher = null;
|
||||||
if (!this.isCancelled()) {
|
if (!this.isCancelled()) {
|
||||||
setMalwareScansDisplay(authTokenResponse, null);
|
setMalwareScansDisplay(authTokenResponse, null, htmlWrap(authTokenError));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -755,10 +800,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
|||||||
private javax.swing.JLabel countersResetLabel;
|
private javax.swing.JLabel countersResetLabel;
|
||||||
private javax.swing.JLabel fileUploadsRemainingLabel;
|
private javax.swing.JLabel fileUploadsRemainingLabel;
|
||||||
private javax.swing.JLabel hashLookupsRemainingLabel;
|
private javax.swing.JLabel hashLookupsRemainingLabel;
|
||||||
|
private javax.swing.JLabel licenseErrorLabel;
|
||||||
private javax.swing.JButton licenseInfoAddButton;
|
private javax.swing.JButton licenseInfoAddButton;
|
||||||
private javax.swing.JLabel licenseInfoExpiresLabel;
|
private javax.swing.JLabel licenseInfoExpiresLabel;
|
||||||
private javax.swing.JLabel licenseInfoIdLabel;
|
private javax.swing.JLabel licenseInfoIdLabel;
|
||||||
private javax.swing.JLabel licenseInfoMessageLabel;
|
private javax.swing.JLabel licenseInfoMessageLabel;
|
||||||
|
private javax.swing.JButton licenseInfoRemoveButton;
|
||||||
private javax.swing.JLabel licenseInfoUserLabel;
|
private javax.swing.JLabel licenseInfoUserLabel;
|
||||||
private javax.swing.JLabel malwareScansMessageLabel;
|
private javax.swing.JLabel malwareScansMessageLabel;
|
||||||
private javax.swing.JPanel malwareScansPanel;
|
private javax.swing.JPanel malwareScansPanel;
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Autopsy Forensic Browser
|
||||||
|
*
|
||||||
|
* Copyright 2023 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.basistech.df.cybertriage.autopsy.ctoptions.ctcloud;
|
||||||
|
|
||||||
|
import com.basistech.df.cybertriage.autopsy.ctapi.CTApiDAO;
|
||||||
|
import com.basistech.df.cybertriage.autopsy.ctapi.CTCloudException;
|
||||||
|
import com.basistech.df.cybertriage.autopsy.ctapi.json.AuthTokenResponse;
|
||||||
|
import com.basistech.df.cybertriage.autopsy.ctapi.json.LicenseInfo;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import org.openide.modules.ModuleInstall;
|
||||||
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installer to check for a functional license at startup.
|
||||||
|
*/
|
||||||
|
public class Installer extends ModuleInstall {
|
||||||
|
private final static Logger LOGGER = Logger.getLogger(Installer.class.getName());
|
||||||
|
|
||||||
|
private final static Installer INSTANCE = new Installer();
|
||||||
|
|
||||||
|
public static Installer getDefault() {
|
||||||
|
return INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Installer() {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restored() {
|
||||||
|
new Thread(new LicenseCheck()).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Messages({
|
||||||
|
"Installer_LicenseCheck_cloudExceptionTitle=Cyber Triage Error"
|
||||||
|
})
|
||||||
|
private static class LicenseCheck implements Runnable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
Optional<LicenseInfo> licenseInfoOpt = CTLicensePersistence.getInstance().loadLicenseInfo();
|
||||||
|
if (licenseInfoOpt.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LicenseInfo licenseInfo = licenseInfoOpt.get();
|
||||||
|
AuthTokenResponse authTokenResp = CTApiDAO.getInstance().getAuthToken(licenseInfo.getDecryptedLicense());
|
||||||
|
// if we got this far, then it was a successful request
|
||||||
|
} catch (CTCloudException cloudEx) {
|
||||||
|
LOGGER.log(Level.WARNING, "A cloud exception occurred while fetching an auth token", cloudEx);
|
||||||
|
MessageNotifyUtil.Notify.warn(Bundle.Installer_LicenseCheck_cloudExceptionTitle(), cloudEx.getErrorDetails());
|
||||||
|
} catch (Throwable t) {
|
||||||
|
LOGGER.log(Level.WARNING, "An error occurred while fetching license info", t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,13 +3,13 @@
|
|||||||
# Click nbfs://nbhost/SystemFileSystem/Templates/Other/properties.properties to edit this template
|
# Click nbfs://nbhost/SystemFileSystem/Templates/Other/properties.properties to edit this template
|
||||||
|
|
||||||
CTIncidentImportOptionsPanel.border.title=Local Settings
|
CTIncidentImportOptionsPanel.border.title=Local Settings
|
||||||
CTIncidentImportOptionsPanel.fileRepoPathLabel.text=Update the Cyber Triage Data Folder if you are not using the default location:
|
CTIncidentImportOptionsPanel.fileRepoPathLabel.text=<html>Update the Cyber Triage Data Folder if you are not using the default location:</html>
|
||||||
CTIncidentImportOptionsPanel.fileRepoPathField.text=
|
CTIncidentImportOptionsPanel.fileRepoPathField.text=
|
||||||
CTIncidentImportOptionsPanel.fileRepoBrowseButton.text=Browse
|
CTIncidentImportOptionsPanel.fileRepoBrowseButton.text=Browse
|
||||||
CTIncidentImportOptionsPanel.caseOpenWarningLabel.text=Some settings cannot be modified while a case is open.
|
CTIncidentImportOptionsPanel.caseOpenWarningLabel.text=Some settings cannot be modified while a case is open.
|
||||||
CTIncidentImportOptionsPanel.fileRepoFileChooser.title=Cyber Triage Data Folder
|
CTIncidentImportOptionsPanel.fileRepoFileChooser.title=Cyber Triage Data Folder
|
||||||
CTIncidentImportOptionsPanel.border.title_1=Incident Importer
|
CTIncidentImportOptionsPanel.border.title_1=Incident Importer
|
||||||
CTIncidentImportOptionsPanel.incidentTextLabel.text=The Cyber Triage Incident Import module allows you to open data collected by Cyber Triage in Autopsy. To use this feature you must install the Cyber Triage Import Module.
|
CTIncidentImportOptionsPanel.incidentTextLabel.text=<html>The Cyber Triage Incident Import module allows you to open data collected by Cyber Triage in Autopsy. To use this feature you must install the Cyber Triage Import Module.</html>
|
||||||
CTincidentImportOptionsPanel.instructionsTextLabel.text=
|
CTincidentImportOptionsPanel.instructionsTextLabel.text=
|
||||||
CTIncidentImportOptionsPanel.instructionsTextLabel.text=For instructions on obtaining the module refer to:
|
CTIncidentImportOptionsPanel.instructionsTextLabel.text=For instructions on obtaining the module refer to:
|
||||||
CTIncidentImportOptionsPanel.importModule.text=Cyber Triage Import Module:
|
CTIncidentImportOptionsPanel.importModule.text=Cyber Triage Import Module:
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
# Click nbfs://nbhost/SystemFileSystem/Templates/Other/properties.properties to edit this template
|
# Click nbfs://nbhost/SystemFileSystem/Templates/Other/properties.properties to edit this template
|
||||||
|
|
||||||
CTIncidentImportOptionsPanel.border.title=Local Settings
|
CTIncidentImportOptionsPanel.border.title=Local Settings
|
||||||
CTIncidentImportOptionsPanel.fileRepoPathLabel.text=Update the Cyber Triage Data Folder if you are not using the default location:
|
CTIncidentImportOptionsPanel.fileRepoPathLabel.text=<html>Update the Cyber Triage Data Folder if you are not using the default location:</html>
|
||||||
CTIncidentImportOptionsPanel.fileRepoPathField.text=
|
CTIncidentImportOptionsPanel.fileRepoPathField.text=
|
||||||
CTIncidentImportOptionsPanel.fileRepoBrowseButton.text=Browse
|
CTIncidentImportOptionsPanel.fileRepoBrowseButton.text=Browse
|
||||||
CTIncidentImportOptionsPanel.caseOpenWarningLabel.text=Some settings cannot be modified while a case is open.
|
CTIncidentImportOptionsPanel.caseOpenWarningLabel.text=Some settings cannot be modified while a case is open.
|
||||||
CTIncidentImportOptionsPanel.fileRepoFileChooser.title=Cyber Triage Data Folder
|
CTIncidentImportOptionsPanel.fileRepoFileChooser.title=Cyber Triage Data Folder
|
||||||
CTIncidentImportOptionsPanel.border.title_1=Incident Importer
|
CTIncidentImportOptionsPanel.border.title_1=Incident Importer
|
||||||
CTIncidentImportOptionsPanel.incidentTextLabel.text=The Cyber Triage Incident Import module allows you to open data collected by Cyber Triage in Autopsy. To use this feature you must install the Cyber Triage Import Module.
|
CTIncidentImportOptionsPanel.incidentTextLabel.text=<html>The Cyber Triage Incident Import module allows you to open data collected by Cyber Triage in Autopsy. To use this feature you must install the Cyber Triage Import Module.</html>
|
||||||
CTincidentImportOptionsPanel.instructionsTextLabel.text=
|
CTincidentImportOptionsPanel.instructionsTextLabel.text=
|
||||||
CTIncidentImportOptionsPanel.instructionsTextLabel.text=For instructions on obtaining the module refer to:
|
CTIncidentImportOptionsPanel.instructionsTextLabel.text=For instructions on obtaining the module refer to:
|
||||||
CTIncidentImportOptionsPanel.importModule.text=Cyber Triage Import Module:
|
CTIncidentImportOptionsPanel.importModule.text=Cyber Triage Import Module:
|
||||||
|
@ -9,6 +9,15 @@
|
|||||||
</TitledBorder>
|
</TitledBorder>
|
||||||
</Border>
|
</Border>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 2147483647]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 206]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 206]"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||||
@ -20,7 +29,7 @@
|
|||||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-50,0,0,1,-17"/>
|
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-54,0,0,2,36"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||||
@ -28,7 +37,7 @@
|
|||||||
<Container class="javax.swing.JPanel" name="incidentTextPanel">
|
<Container class="javax.swing.JPanel" name="incidentTextPanel">
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
|
|
||||||
@ -39,10 +48,16 @@
|
|||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.incidentTextLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.incidentTextLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[600, 32]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="null"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -51,6 +66,9 @@
|
|||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.importModule.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.importModule.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="null"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
@ -58,7 +76,7 @@
|
|||||||
</AuxValues>
|
</AuxValues>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="3" anchor="10" weightX="0.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="3" anchor="18" weightX="0.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
@ -79,7 +97,7 @@
|
|||||||
<Container class="javax.swing.JPanel" name="instructionsPanel">
|
<Container class="javax.swing.JPanel" name="instructionsPanel">
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
|
|
||||||
@ -90,6 +108,9 @@
|
|||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.instructionsTextLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.instructionsTextLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="null"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AccessibilityProperties>
|
<AccessibilityProperties>
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="For instructions on obtaining the module refer to:"/>
|
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="For instructions on obtaining the module refer to:"/>
|
||||||
@ -108,22 +129,33 @@
|
|||||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||||
<Color id="Hand Cursor"/>
|
<Color id="Hand Cursor"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="null"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Events>
|
<Events>
|
||||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="instructionsLinkLabelMouseClicked"/>
|
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="instructionsLinkLabelMouseClicked"/>
|
||||||
</Events>
|
</Events>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/>
|
<GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="2" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Container>
|
</Container>
|
||||||
<Container class="javax.swing.JPanel" name="repoPanel">
|
<Container class="javax.swing.JPanel" name="repoPanel">
|
||||||
|
<Properties>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 2147483647]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[650, 75]"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
|
|
||||||
@ -134,6 +166,12 @@
|
|||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.fileRepoPathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.fileRepoPathLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="[600, 16]"/>
|
||||||
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="null"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
@ -150,6 +188,9 @@
|
|||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.fileRepoPathField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="com/basistech/df/cybertriage/autopsy/incidentoptions/Bundle.properties" key="CTIncidentImportOptionsPanel.fileRepoPathField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
|
<Dimension value="null"/>
|
||||||
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AccessibilityProperties>
|
<AccessibilityProperties>
|
||||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||||
@ -189,7 +230,7 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||||
<GridBagConstraints gridX="0" gridY="2" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="17" weightX="0.0" weightY="0.0"/>
|
<GridBagConstraints gridX="0" gridY="2" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="17" weightX="1.0" weightY="0.0"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
|
@ -161,24 +161,31 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
|||||||
caseOpenWarningLabel = new javax.swing.JLabel();
|
caseOpenWarningLabel = new javax.swing.JLabel();
|
||||||
|
|
||||||
setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.border.title_1"))); // NOI18N
|
setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.border.title_1"))); // NOI18N
|
||||||
|
setMaximumSize(new java.awt.Dimension(650, 2147483647));
|
||||||
|
setMinimumSize(new java.awt.Dimension(650, 206));
|
||||||
|
setPreferredSize(new java.awt.Dimension(650, 206));
|
||||||
setLayout(new java.awt.GridBagLayout());
|
setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
incidentTextPanel.setLayout(new java.awt.GridBagLayout());
|
incidentTextPanel.setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(incidentTextLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.incidentTextLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(incidentTextLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.incidentTextLabel.text")); // NOI18N
|
||||||
|
incidentTextLabel.setMaximumSize(new java.awt.Dimension(600, 32));
|
||||||
|
incidentTextLabel.setPreferredSize(null);
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
gridBagConstraints.gridwidth = 2;
|
gridBagConstraints.gridwidth = 2;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.weightx = 1.0;
|
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||||
incidentTextPanel.add(incidentTextLabel, gridBagConstraints);
|
incidentTextPanel.add(incidentTextLabel, gridBagConstraints);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(importModule, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.importModule.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(importModule, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.importModule.text")); // NOI18N
|
||||||
|
importModule.setPreferredSize(null);
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 1;
|
gridBagConstraints.gridy = 1;
|
||||||
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 3);
|
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 3);
|
||||||
incidentTextPanel.add(importModule, gridBagConstraints);
|
incidentTextPanel.add(importModule, gridBagConstraints);
|
||||||
|
|
||||||
@ -194,11 +201,14 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
|||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
add(incidentTextPanel, gridBagConstraints);
|
add(incidentTextPanel, gridBagConstraints);
|
||||||
|
|
||||||
instructionsPanel.setLayout(new java.awt.GridBagLayout());
|
instructionsPanel.setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(instructionsTextLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.instructionsTextLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(instructionsTextLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.instructionsTextLabel.text")); // NOI18N
|
||||||
|
instructionsTextLabel.setPreferredSize(null);
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
@ -209,6 +219,7 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
|||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(instructionsLinkLabel, getHtmlLink(CT_IMPORTER_DOC_LINK));
|
org.openide.awt.Mnemonics.setLocalizedText(instructionsLinkLabel, getHtmlLink(CT_IMPORTER_DOC_LINK));
|
||||||
instructionsLinkLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
|
instructionsLinkLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
|
||||||
|
instructionsLinkLabel.setPreferredSize(null);
|
||||||
instructionsLinkLabel.addMouseListener(new java.awt.event.MouseAdapter() {
|
instructionsLinkLabel.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||||
instructionsLinkLabelMouseClicked(evt);
|
instructionsLinkLabelMouseClicked(evt);
|
||||||
@ -218,18 +229,25 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
|||||||
gridBagConstraints.gridx = 1;
|
gridBagConstraints.gridx = 1;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
gridBagConstraints.weightx = 1.0;
|
||||||
|
gridBagConstraints.insets = new java.awt.Insets(5, 2, 5, 5);
|
||||||
instructionsPanel.add(instructionsLinkLabel, gridBagConstraints);
|
instructionsPanel.add(instructionsLinkLabel, gridBagConstraints);
|
||||||
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 1;
|
gridBagConstraints.gridy = 1;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
add(instructionsPanel, gridBagConstraints);
|
add(instructionsPanel, gridBagConstraints);
|
||||||
|
|
||||||
|
repoPanel.setMaximumSize(new java.awt.Dimension(650, 2147483647));
|
||||||
|
repoPanel.setPreferredSize(new java.awt.Dimension(650, 75));
|
||||||
repoPanel.setLayout(new java.awt.GridBagLayout());
|
repoPanel.setLayout(new java.awt.GridBagLayout());
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(fileRepoPathLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.fileRepoPathLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(fileRepoPathLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.fileRepoPathLabel.text")); // NOI18N
|
||||||
|
fileRepoPathLabel.setMaximumSize(new java.awt.Dimension(600, 16));
|
||||||
|
fileRepoPathLabel.setPreferredSize(null);
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 0;
|
gridBagConstraints.gridy = 0;
|
||||||
@ -239,6 +257,7 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
|||||||
repoPanel.add(fileRepoPathLabel, gridBagConstraints);
|
repoPanel.add(fileRepoPathLabel, gridBagConstraints);
|
||||||
|
|
||||||
fileRepoPathField.setText(org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.fileRepoPathField.text")); // NOI18N
|
fileRepoPathField.setText(org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.fileRepoPathField.text")); // NOI18N
|
||||||
|
fileRepoPathField.setPreferredSize(null);
|
||||||
fileRepoPathField.addActionListener(new java.awt.event.ActionListener() {
|
fileRepoPathField.addActionListener(new java.awt.event.ActionListener() {
|
||||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
fileRepoPathFieldActionPerformed(evt);
|
fileRepoPathFieldActionPerformed(evt);
|
||||||
@ -274,13 +293,16 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
|||||||
gridBagConstraints.gridy = 2;
|
gridBagConstraints.gridy = 2;
|
||||||
gridBagConstraints.gridwidth = 2;
|
gridBagConstraints.gridwidth = 2;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||||
repoPanel.add(caseOpenWarningLabel, gridBagConstraints);
|
repoPanel.add(caseOpenWarningLabel, gridBagConstraints);
|
||||||
|
|
||||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||||
gridBagConstraints.gridx = 0;
|
gridBagConstraints.gridx = 0;
|
||||||
gridBagConstraints.gridy = 2;
|
gridBagConstraints.gridy = 2;
|
||||||
|
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||||
|
gridBagConstraints.weightx = 1.0;
|
||||||
add(repoPanel, gridBagConstraints);
|
add(repoPanel, gridBagConstraints);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
private void fileRepoBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileRepoBrowseButtonActionPerformed
|
private void fileRepoBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileRepoBrowseButtonActionPerformed
|
||||||
|
@ -33,6 +33,9 @@ MalwareScanIngestModule_ShareProcessing_noLookupsRemaining_desc=There are no mor
|
|||||||
MalwareScanIngestModule_ShareProcessing_noLookupsRemaining_title=No remaining lookups
|
MalwareScanIngestModule_ShareProcessing_noLookupsRemaining_title=No remaining lookups
|
||||||
MalwareScanIngestModule_ShareProcessing_noUploadsRemaining_desc=There are no more remaining file uploads for this license at this time. File uploading will be disabled.
|
MalwareScanIngestModule_ShareProcessing_noUploadsRemaining_desc=There are no more remaining file uploads for this license at this time. File uploading will be disabled.
|
||||||
MalwareScanIngestModule_ShareProcessing_noUploadsRemaining_title=No remaining file uploads
|
MalwareScanIngestModule_ShareProcessing_noUploadsRemaining_title=No remaining file uploads
|
||||||
|
MalwareScanIngestModule_ShareProcessing_startup_generalException_desc=An exception occurred on MalwareScanIngestModule startup. See the log for more information.
|
||||||
|
MalwareScanIngestModule_ShareProcessing_startup_invalidLicenseWarning_desc=The current Cyber Triage license is no longer valid. Please remove the license from the Cyber Triage options panel.
|
||||||
|
MalwareScanIngestModule_ShareProcessing_startup_invalidLicenseWarning_title=Invalid License
|
||||||
MalwareScanIngestModule_uploadFile_noRemainingFileUploads_desc=There are no more file uploads on this license at this time. File uploads will be disabled for remaining uploads.
|
MalwareScanIngestModule_uploadFile_noRemainingFileUploads_desc=There are no more file uploads on this license at this time. File uploads will be disabled for remaining uploads.
|
||||||
MalwareScanIngestModule_uploadFile_noRemainingFileUploads_title=No Remaining File Uploads
|
MalwareScanIngestModule_uploadFile_noRemainingFileUploads_title=No Remaining File Uploads
|
||||||
# {0} - objectId
|
# {0} - objectId
|
||||||
|
@ -161,7 +161,10 @@ class MalwareScanIngestModule implements FileIngestModule {
|
|||||||
"MalwareScanIngestModule_ShareProcessing_noUploadsRemaining_desc=There are no more remaining file uploads for this license at this time. File uploading will be disabled.",
|
"MalwareScanIngestModule_ShareProcessing_noUploadsRemaining_desc=There are no more remaining file uploads for this license at this time. File uploading will be disabled.",
|
||||||
"MalwareScanIngestModule_ShareProcessing_lowUploadsLimitWarning_title=File Uploads Limit Low",
|
"MalwareScanIngestModule_ShareProcessing_lowUploadsLimitWarning_title=File Uploads Limit Low",
|
||||||
"# {0} - remainingUploads",
|
"# {0} - remainingUploads",
|
||||||
"MalwareScanIngestModule_ShareProcessing_lowUploadsLimitWarning_desc=This license only has {0} file uploads remaining.",})
|
"MalwareScanIngestModule_ShareProcessing_lowUploadsLimitWarning_desc=This license only has {0} file uploads remaining.",
|
||||||
|
"MalwareScanIngestModule_ShareProcessing_startup_generalException_desc=An exception occurred on MalwareScanIngestModule startup. See the log for more information.",
|
||||||
|
"MalwareScanIngestModule_ShareProcessing_startup_invalidLicenseWarning_title=Invalid License",
|
||||||
|
"MalwareScanIngestModule_ShareProcessing_startup_invalidLicenseWarning_desc=The current Cyber Triage license is no longer valid. Please remove the license from the Cyber Triage options panel."})
|
||||||
synchronized void startUp(IngestJobContext context, boolean uploadFiles) throws IngestModuleException {
|
synchronized void startUp(IngestJobContext context, boolean uploadFiles) throws IngestModuleException {
|
||||||
// only run this code once per startup
|
// only run this code once per startup
|
||||||
if (ingestJobState != null) {
|
if (ingestJobState != null) {
|
||||||
@ -170,9 +173,18 @@ class MalwareScanIngestModule implements FileIngestModule {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
ingestJobState = getNewJobState(context, uploadFiles);
|
ingestJobState = getNewJobState(context, uploadFiles);
|
||||||
|
} catch (CTCloudException cloudEx) {
|
||||||
|
ingestJobState = IngestJobState.DISABLED;
|
||||||
|
logger.log(Level.WARNING, "An error occurred while starting the MalwareScanIngestModule.", cloudEx);
|
||||||
|
throw new IngestModuleException(cloudEx.getErrorDetails(), cloudEx);
|
||||||
|
} catch (IllegalStateException stateEx) {
|
||||||
|
ingestJobState = IngestJobState.DISABLED;
|
||||||
|
logger.log(Level.WARNING, "An error occurred while starting the MalwareScanIngestModule.", stateEx);
|
||||||
|
throw new IngestModuleException(stateEx.getMessage(), stateEx);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ingestJobState = IngestJobState.DISABLED;
|
ingestJobState = IngestJobState.DISABLED;
|
||||||
throw new IngestModuleException("An exception occurred on MalwareScanIngestModule startup", ex);
|
logger.log(Level.WARNING, "An error occurred while starting the MalwareScanIngestModule.", ex);
|
||||||
|
throw new IngestModuleException(Bundle.MalwareScanIngestModule_ShareProcessing_startup_generalException_desc(), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,12 +200,7 @@ class MalwareScanIngestModule implements FileIngestModule {
|
|||||||
// get saved license
|
// get saved license
|
||||||
Optional<LicenseInfo> licenseInfoOpt = ctSettingsPersistence.loadLicenseInfo();
|
Optional<LicenseInfo> licenseInfoOpt = ctSettingsPersistence.loadLicenseInfo();
|
||||||
if (licenseInfoOpt.isEmpty() || licenseInfoOpt.get().getDecryptedLicense() == null) {
|
if (licenseInfoOpt.isEmpty() || licenseInfoOpt.get().getDecryptedLicense() == null) {
|
||||||
notifyWarning(
|
throw new IllegalStateException(Bundle.MalwareScanIngestModule_ShareProcessing_noLicense_desc());
|
||||||
Bundle.MalwareScanIngestModule_ShareProcessing_noLicense_title(),
|
|
||||||
Bundle.MalwareScanIngestModule_ShareProcessing_noLicense_desc(),
|
|
||||||
null);
|
|
||||||
|
|
||||||
return IngestJobState.DISABLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthTokenResponse authTokenResponse = ctApiDAO.getAuthToken(licenseInfoOpt.get().getDecryptedLicense());
|
AuthTokenResponse authTokenResponse = ctApiDAO.getAuthToken(licenseInfoOpt.get().getDecryptedLicense());
|
||||||
|
@ -246,6 +246,7 @@ public class Installer extends ModuleInstall {
|
|||||||
packageInstallers.add(org.sleuthkit.autopsy.casemodule.Installer.getDefault());
|
packageInstallers.add(org.sleuthkit.autopsy.casemodule.Installer.getDefault());
|
||||||
packageInstallers.add(org.sleuthkit.autopsy.modules.hashdatabase.infrastructure.Installer.getDefault());
|
packageInstallers.add(org.sleuthkit.autopsy.modules.hashdatabase.infrastructure.Installer.getDefault());
|
||||||
packageInstallers.add(org.sleuthkit.autopsy.report.infrastructure.Installer.getDefault());
|
packageInstallers.add(org.sleuthkit.autopsy.report.infrastructure.Installer.getDefault());
|
||||||
|
packageInstallers.add(com.basistech.df.cybertriage.autopsy.ctoptions.ctcloud.Installer.getDefault());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a temporary workaround for the following bug in Tika that
|
* This is a temporary workaround for the following bug in Tika that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user