mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
updates
This commit is contained in:
parent
5a6a17380e
commit
f57eefed15
@ -28,7 +28,7 @@ CTMalwareScannerOptionsPanel_licenseAddDialog_desc=License Number:
|
||||
CTMalwareScannerOptionsPanel_licenseAddDialog_title=Add a License...
|
||||
CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc=The license number has already been 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_LicenseFetcher_apiErr_title=Server Error
|
||||
# {0} - licenseCode
|
||||
|
@ -109,7 +109,7 @@
|
||||
</AuxValues>
|
||||
<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="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"/>
|
||||
<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>
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="2" gridY="1" 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"/>
|
||||
<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>
|
||||
|
||||
@ -168,7 +168,7 @@
|
||||
</Properties>
|
||||
<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="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>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -180,7 +180,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" 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="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>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -192,7 +192,7 @@
|
||||
</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="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="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>
|
||||
@ -204,7 +204,7 @@
|
||||
</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="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="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>
|
||||
</Constraints>
|
||||
</Component>
|
||||
@ -216,7 +216,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<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="5" 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>
|
||||
@ -228,7 +228,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="5" 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="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>
|
||||
@ -240,7 +240,7 @@
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="0" gridY="6" 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="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>
|
||||
@ -252,7 +252,7 @@
|
||||
</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="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>
|
||||
@ -264,7 +264,7 @@
|
||||
</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="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"/>
|
||||
<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>
|
||||
@ -279,7 +279,7 @@
|
||||
</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="3" 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="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>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
@ -40,7 +40,6 @@ import java.util.Optional;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -139,7 +138,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
this.purchaseLink.setVisible(false);
|
||||
} else {
|
||||
this.purchaseFromLabel.setVisible(true);
|
||||
this.purchaseLink.setVisible(true);
|
||||
this.purchaseLink.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,7 +160,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
|
||||
private synchronized LicenseResponse getLicenseInfo() {
|
||||
return this.licenseInfo == null ? null : this.licenseInfo.getLicenseResponse();
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void setLicenseDisplay(LicenseInfo licenseInfo, String licenseMessage) {
|
||||
this.licenseInfo = licenseInfo;
|
||||
@ -222,6 +221,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
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.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@ -293,7 +298,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
buttonSpacer.setPreferredSize(new java.awt.Dimension(5, 0));
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
@ -331,7 +336,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 2;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.gridy = 2;
|
||||
gridBagConstraints.gridheight = 7;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
|
||||
licenseInfoPanel.add(buttonPanel, gridBagConstraints);
|
||||
@ -339,7 +344,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
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 = 2;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
@ -348,7 +353,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
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 = 2;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
@ -357,7 +362,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(licenseInfoUserLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseInfoUserLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 3;
|
||||
gridBagConstraints.gridy = 4;
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
@ -367,7 +372,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
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 = 4;
|
||||
gridBagConstraints.gridy = 5;
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
@ -377,7 +382,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(maxHashLookupsLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.maxHashLookupsLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 5;
|
||||
gridBagConstraints.gridy = 6;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
@ -386,7 +391,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(hashLookupsRemainingLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.hashLookupsRemainingLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 5;
|
||||
gridBagConstraints.gridy = 6;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
@ -395,7 +400,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(maxFileUploadsLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.maxFileUploadsLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 6;
|
||||
gridBagConstraints.gridy = 7;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||
@ -404,7 +409,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
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 = 6;
|
||||
gridBagConstraints.gridy = 7;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
|
||||
@ -413,7 +418,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(countersResetLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.countersResetLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 7;
|
||||
gridBagConstraints.gridy = 8;
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
@ -424,11 +429,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
org.openide.awt.Mnemonics.setLocalizedText(licenseErrorLabel, org.openide.util.NbBundle.getMessage(CTMalwareScannerOptionsPanel.class, "CTMalwareScannerOptionsPanel.licenseErrorLabel.text")); // NOI18N
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 8;
|
||||
gridBagConstraints.gridy = 1;
|
||||
gridBagConstraints.gridwidth = 3;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
|
||||
licenseInfoPanel.add(licenseErrorLabel, gridBagConstraints);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
@ -484,7 +490,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
"CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title=License Number Already Entered",
|
||||
"CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc=The license number has already been entered",
|
||||
"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
|
||||
CTLicenseDialog licenseDialog = new CTLicenseDialog(WindowManager.getDefault().getMainWindow(), true);
|
||||
licenseDialog.setLocationRelativeTo(this);
|
||||
@ -498,11 +504,7 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
}
|
||||
}
|
||||
|
||||
JOptionPane.showMessageDialog(
|
||||
this,
|
||||
Bundle.CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc(),
|
||||
Bundle.CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_title(),
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
setMalwareScansDisplay(null, null, htmlWrap(Bundle.CTMalwareScannerOptionsPanel_licenseAddDialogEnteredErr_desc()));
|
||||
|
||||
}
|
||||
}//GEN-LAST:event_licenseInfoAddButtonActionPerformed
|
||||
@ -540,22 +542,22 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
private synchronized void renderLicenseState() {
|
||||
this.licenseInfoAddButton.setEnabled(!isLicenseAddRunning());
|
||||
this.licenseInfoRemoveButton.setEnabled(this.licenseInfo != null && !isLicenseAddRunning());
|
||||
|
||||
|
||||
this.licenseInfoMessageLabel.setVisible(StringUtils.isNotBlank(this.licenseInfoMessage));
|
||||
this.licenseInfoMessageLabel.setText(this.licenseInfoMessage);
|
||||
|
||||
this.licenseErrorLabel.setVisible(StringUtils.isNotBlank(this.authTokenError));
|
||||
this.licenseErrorLabel.setText(this.authTokenError);
|
||||
|
||||
|
||||
if (licenseInfo == null) {
|
||||
this.licenseInfoExpiresLabel.setVisible(false);
|
||||
this.licenseInfoIdLabel.setVisible(false);
|
||||
this.licenseInfoUserLabel.setVisible(false);
|
||||
this.purchaseFromLabel.setVisible(true);
|
||||
this.purchaseLink.setVisible(true);
|
||||
this.purchaseLink.setVisible(true);
|
||||
} else {
|
||||
this.purchaseFromLabel.setVisible(false);
|
||||
this.purchaseLink.setVisible(false);
|
||||
this.purchaseLink.setVisible(false);
|
||||
|
||||
this.licenseInfoExpiresLabel.setVisible(true);
|
||||
this.licenseInfoExpiresLabel.setText(Bundle.CTMalwareScannerOptionsPanel_licenseInfo_expires(
|
||||
@ -658,16 +660,12 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
this.licenseInfo = LicenseDecryptorUtil.getInstance().createLicenseInfo(licenseResponse);
|
||||
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);
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -700,16 +698,11 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
// if no result, show unauthorized
|
||||
if (licenseResponse == null) {
|
||||
logger.log(Level.WARNING, "An API error occurred while fetching license information. License fetch returned no result.");
|
||||
JOptionPane.showMessageDialog(
|
||||
CTMalwareScannerOptionsPanel.this,
|
||||
CTCloudException.ErrorCode.UN_AUTHORIZED.getDescription(),
|
||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
setLicenseDisplay(licenseInfo, null);
|
||||
loadMalwareScansInfo(licenseInfo);
|
||||
setLicenseDisplay(null, null);
|
||||
setMalwareScansDisplay(null, null, htmlWrap(CTCloudException.ErrorCode.UN_AUTHORIZED.getDescription()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// if not successful response
|
||||
if (!Boolean.TRUE.equals(licenseResponse.isSuccess())) {
|
||||
logger.log(Level.WARNING, "An API error occurred while fetching license information. License fetch was not successful");
|
||||
@ -718,41 +711,29 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
if (!StringUtils.isBlank(licenseResponse.getErrorMsg())) {
|
||||
message = licenseResponse.getErrorMsg();
|
||||
}
|
||||
JOptionPane.showMessageDialog(
|
||||
CTMalwareScannerOptionsPanel.this,
|
||||
message,
|
||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
setLicenseDisplay(licenseInfo, null);
|
||||
loadMalwareScansInfo(licenseInfo);
|
||||
setLicenseDisplay(null, null);
|
||||
setMalwareScansDisplay(null, null, htmlWrap(message));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// otherwise, load
|
||||
SwingUtilities.invokeLater(() -> acceptEula(licenseResponse));
|
||||
|
||||
|
||||
} catch (InterruptedException | CancellationException ex) {
|
||||
// ignore cancellation; just load current license
|
||||
setLicenseDisplay(licenseInfo, null);
|
||||
loadMalwareScansInfo(licenseInfo);
|
||||
} catch (ExecutionException ex) {
|
||||
String errMessage;
|
||||
if (ex.getCause() != null && ex.getCause() instanceof CTCloudException cloudEx) {
|
||||
logger.log(Level.WARNING, "An API error occurred while fetching license information", cloudEx);
|
||||
JOptionPane.showMessageDialog(
|
||||
CTMalwareScannerOptionsPanel.this,
|
||||
cloudEx.getErrorCode().getDescription(),
|
||||
Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_apiErr_title(),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
errMessage = cloudEx.getErrorCode().getDescription();
|
||||
} else {
|
||||
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);
|
||||
errMessage = Bundle.CTMalwareScannerOptionsPanel_LicenseFetcher_localErr_desc();
|
||||
}
|
||||
setLicenseDisplay(licenseInfo, null);
|
||||
loadMalwareScansInfo(licenseInfo);
|
||||
setLicenseDisplay(null, null);
|
||||
setMalwareScansDisplay(null, null, htmlWrap(errMessage));
|
||||
} finally {
|
||||
synchronized (CTMalwareScannerOptionsPanel.this) {
|
||||
CTMalwareScannerOptionsPanel.this.licenseFetcher = null;
|
||||
@ -778,8 +759,8 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
if (this.isCancelled()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ctApiDAO.getAuthToken(decryptedLicense);
|
||||
|
||||
return ctApiDAO.getAuthToken(decryptedLicense);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -793,16 +774,16 @@ public class CTMalwareScannerOptionsPanel extends CTOptionsSubPanel {
|
||||
} catch (ExecutionException ex) {
|
||||
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);
|
||||
authTokenError = "<html>" + cloudEx.getErrorDetails() + "</html>";
|
||||
authTokenError = cloudEx.getErrorDetails();
|
||||
} else {
|
||||
logger.log(Level.WARNING, "An error occurred while fetching data", ex);
|
||||
authTokenError = "<html>" + Bundle.CTMalwareScannerOptionsPanel_MalwareScansFetcher_localErr_desc() + "</html>";
|
||||
authTokenError = Bundle.CTMalwareScannerOptionsPanel_MalwareScansFetcher_localErr_desc();
|
||||
}
|
||||
} finally {
|
||||
synchronized (CTMalwareScannerOptionsPanel.this) {
|
||||
CTMalwareScannerOptionsPanel.this.authTokenFetcher = null;
|
||||
if (!this.isCancelled()) {
|
||||
setMalwareScansDisplay(authTokenResponse, null, authTokenError);
|
||||
setMalwareScansDisplay(authTokenResponse, null, htmlWrap(authTokenError));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,11 @@
|
||||
<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, 176]"/>
|
||||
<Dimension value="[650, 206]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
@ -26,7 +29,7 @@
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<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,2,36"/>
|
||||
<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>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
@ -142,6 +145,14 @@
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<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>
|
||||
<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"/>
|
||||
|
@ -162,7 +162,8 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
||||
|
||||
setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.border.title_1"))); // NOI18N
|
||||
setMaximumSize(new java.awt.Dimension(650, 2147483647));
|
||||
setPreferredSize(new java.awt.Dimension(650, 176));
|
||||
setMinimumSize(new java.awt.Dimension(650, 206));
|
||||
setPreferredSize(new java.awt.Dimension(650, 206));
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
incidentTextPanel.setLayout(new java.awt.GridBagLayout());
|
||||
@ -240,6 +241,8 @@ public class CTIncidentImportOptionsPanel extends CTOptionsSubPanel {
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
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());
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(fileRepoPathLabel, org.openide.util.NbBundle.getMessage(CTIncidentImportOptionsPanel.class, "CTIncidentImportOptionsPanel.fileRepoPathLabel.text")); // NOI18N
|
||||
|
@ -175,15 +175,12 @@ class MalwareScanIngestModule implements FileIngestModule {
|
||||
ingestJobState = getNewJobState(context, uploadFiles);
|
||||
} catch (CTCloudException cloudEx) {
|
||||
ingestJobState = IngestJobState.DISABLED;
|
||||
if (cloudEx.getErrorCode() == CTCloudException.ErrorCode.INVALID_KEY) {
|
||||
notifyWarning(
|
||||
Bundle.MalwareScanIngestModule_ShareProcessing_startup_invalidLicenseWarning_title(),
|
||||
Bundle.MalwareScanIngestModule_ShareProcessing_startup_invalidLicenseWarning_desc(),
|
||||
cloudEx);
|
||||
} else {
|
||||
logger.log(Level.WARNING, "An error occurred while starting the MalwareScanIngestModule.", cloudEx);
|
||||
}
|
||||
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) {
|
||||
ingestJobState = IngestJobState.DISABLED;
|
||||
logger.log(Level.WARNING, "An error occurred while starting the MalwareScanIngestModule.", ex);
|
||||
@ -203,12 +200,7 @@ class MalwareScanIngestModule implements FileIngestModule {
|
||||
// get saved license
|
||||
Optional<LicenseInfo> licenseInfoOpt = ctSettingsPersistence.loadLicenseInfo();
|
||||
if (licenseInfoOpt.isEmpty() || licenseInfoOpt.get().getDecryptedLicense() == null) {
|
||||
notifyWarning(
|
||||
Bundle.MalwareScanIngestModule_ShareProcessing_noLicense_title(),
|
||||
Bundle.MalwareScanIngestModule_ShareProcessing_noLicense_desc(),
|
||||
null);
|
||||
|
||||
return IngestJobState.DISABLED;
|
||||
throw new IllegalStateException(Bundle.MalwareScanIngestModule_ShareProcessing_noLicense_desc());
|
||||
}
|
||||
|
||||
AuthTokenResponse authTokenResponse = ctApiDAO.getAuthToken(licenseInfoOpt.get().getDecryptedLicense());
|
||||
|
Loading…
x
Reference in New Issue
Block a user