You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/02/28 20:44:56 UTC

svn commit: r1784809 - in /jmeter/trunk: src/core/org/apache/jmeter/resources/ src/protocol/http/org/apache/jmeter/protocol/http/proxy/ src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ xdocs/

Author: pmouawad
Date: Tue Feb 28 20:44:56 2017
New Revision: 1784809

URL: http://svn.apache.org/viewvc?rev=1784809&view=rev
Log:
Bug 60790 - HTTP(S) Test Script Recorder : Improve information on certificate expiration and have better UX for Start/Stop
Bugzilla Id: 60790

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1784809&r1=1784808&r2=1784809&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Tue Feb 28 20:44:56 2017
@@ -757,11 +757,13 @@ proxy_daemon_error_not_retrieve=Could no
 proxy_daemon_error_read_args=Could not add read arguments from clipboard\:
 proxy_daemon_msg_check_details=Please check the details below when installing the certificate in the browser
 proxy_daemon_msg_created_in_bin=created in JMeter bin directory
-proxy_daemon_msg_install_as_in_doc=You can install it following instructions in Component Reference documentation (see Installing the JMeter CA certificate for HTTPS recording paragraph)
-proxy_daemon_msg_rootca_cert=Root CA certificate\:
+proxy_daemon_msg_check_expiration=Certificate has a duration validity of {0} days, <br>if the created one (see below) is newer than the last one you installed, <br>ensure you remove the old one and install the new one.
+proxy_daemon_msg_install_as_in_doc=You can install it following instructions in <i>Component Reference</i> documentation <br>See <i>Installing the JMeter CA certificate for HTTPS recording</i> paragraph.
+proxy_daemon_msg_rootca_cert=Root CA certificate
 proxy_domains=HTTPS Domains \:
 proxy_domains_dynamic_mode_tooltip=List of domain names for HTTPS url, ex. jmeter.apache.org or wildcard domain like *.apache.org. Use comma as separator. 
 proxy_domains_dynamic_mode_tooltip_java6=To activate this field, use a Java 7+ runtime environment
+proxy_general_lifecycle=State
 proxy_general_settings=Global Settings
 proxy_headers=Capture HTTP Headers
 proxy_prefix_http_sampler_name=Prefix\:

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1784809&r1=1784808&r2=1784809&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Tue Feb 28 20:44:56 2017
@@ -747,11 +747,13 @@ proxy_daemon_error_not_retrieve=Impossib
 proxy_daemon_error_read_args=Impossible de lire les arguments depuis le presse-papiers \:
 proxy_daemon_msg_check_details=Svp, v\u00E9rifier les d\u00E9tails ci-dessous lors de l'installation du certificat dans le navigateur
 proxy_daemon_msg_created_in_bin=cr\u00E9\u00E9 dans le r\u00E9pertoire bin de JMeter
-proxy_daemon_msg_install_as_in_doc=Vous pouvez l'installer en suivant les instructions de la documentation Component Reference (voir Installing the JMeter CA certificate for HTTPS recording paragraph)
+proxy_daemon_msg_check_expiration=Le certificat a une dur\u00E9e de validit\u00E9 de {0} jours, si celui nouvellement cr\u00E9\u00E9 (voir ci-dessous) <br> est plus r\u00E9cent que le dernier install\u00E9, <br> veuillez installer le nouveau
+proxy_daemon_msg_install_as_in_doc=Vous pouvez l'installer en suivant les instructions de la documentation <i>Component Reference</i> <br> (voir le paragraphe <i>Installing the JMeter CA certificate for HTTPS recording</i>)
 proxy_daemon_msg_rootca_cert=Certificat AC ra\u00E7ine \:
 proxy_domains=Domaines HTTPS \:
 proxy_domains_dynamic_mode_tooltip=Liste de noms de domaine pour les url HTTPS, ex. jmeter.apache.org ou les domaines wildcard comme *.apache.org. Utiliser la virgule comme s\u00E9parateur. 
 proxy_domains_dynamic_mode_tooltip_java6=Pour activer ce champ, utiliser un environnement d'ex\u00E9cution Java 7+
+proxy_general_lifecycle=Etat
 proxy_general_settings=Param\u00E8tres g\u00E9n\u00E9raux
 proxy_headers=Capturer les ent\u00EAtes HTTP
 proxy_prefix_http_sampler_name=Pr\u00E9fixe \:

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1784809&r1=1784808&r2=1784809&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java Tue Feb 28 20:44:56 2017
@@ -226,7 +226,7 @@ public class ProxyControl extends Generi
     // The alias to be used if dynamic host names are not possible
     static final String JMETER_SERVER_ALIAS = ":jmeter:"; // $NON-NLS-1$
 
-    static final int CERT_VALIDITY = JMeterUtils.getPropDefault("proxy.cert.validity", 7); // $NON-NLS-1$
+    public static final int CERT_VALIDITY = JMeterUtils.getPropDefault("proxy.cert.validity", 7); // $NON-NLS-1$
 
     // If this is defined, it is assumed to be the alias of a user-supplied certificate; overrides dynamic mode
     static final String CERT_ALIAS = JMeterUtils.getProperty("proxy.cert.alias"); // $NON-NLS-1$

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1784809&r1=1784808&r2=1784809&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java Tue Feb 28 20:44:56 2017
@@ -32,6 +32,7 @@ import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
 import java.io.IOException;
 import java.net.BindException;
+import java.text.MessageFormat;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.LinkedList;
@@ -40,6 +41,7 @@ import java.util.List;
 import javax.swing.BorderFactory;
 import javax.swing.Box;
 import javax.swing.DefaultComboBoxModel;
+import javax.swing.ImageIcon;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
@@ -77,8 +79,8 @@ import org.apache.jmeter.util.JMeterUtil
 import org.apache.jorphan.exec.KeyToolUtils;
 import org.apache.jorphan.gui.GuiUtils;
 import org.apache.jorphan.gui.JLabeledTextField;
-import org.slf4j.LoggerFactory;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ProxyControlGui extends LogicControllerGui implements JMeterGUIComponent, ActionListener, ItemListener,
         KeyListener, UnsharedComponent {
@@ -542,15 +544,22 @@ public class ProxyControlGui extends Log
             if (ProxyControl.isDynamicMode()) {
                 String[] details = model.getCertificateDetails();
                 StringBuilder sb = new StringBuilder();
+                sb.append("<html>");
                 sb.append(JMeterUtils.getResString("proxy_daemon_msg_rootca_cert"))  // $NON-NLS-1$
-                        .append(SPACE).append(KeyToolUtils.ROOT_CACERT_CRT_PFX)
-                        .append(SPACE).append(JMeterUtils.getResString("proxy_daemon_msg_created_in_bin"));
-                sb.append(NEW_LINE).append(JMeterUtils.getResString("proxy_daemon_msg_install_as_in_doc")); // $NON-NLS-1$
-                sb.append(NEW_LINE).append(JMeterUtils.getResString("proxy_daemon_msg_check_details")) // $NON-NLS-1$
-                    .append(NEW_LINE).append(NEW_LINE);
+                        .append("&nbsp;<b>").append(KeyToolUtils.ROOT_CACERT_CRT_PFX)
+                        .append("</b>&nbsp;").append(JMeterUtils.getResString("proxy_daemon_msg_created_in_bin"));
+                sb.append("<br>").append(JMeterUtils.getResString("proxy_daemon_msg_install_as_in_doc")); // $NON-NLS-1$
+                sb.append("<br><b>").append(MessageFormat.format(
+                        JMeterUtils.getResString("proxy_daemon_msg_check_expiration"),
+                        new Object[] {ProxyControl.CERT_VALIDITY})) // $NON-NLS-1$
+                    .append("</b><br>");
+                sb.append("<br>").append(JMeterUtils.getResString("proxy_daemon_msg_check_details"))
+                    .append("<ul>"); // $NON-NLS-1$
                 for(String detail : details) {
-                    sb.append(detail).append(NEW_LINE);
+                    sb.append("<li>").append(detail).append("</li>");
                 }
+                sb.append("</ul>").append("</html>");
+                
                 JOptionPane.showMessageDialog(this,
                     sb.toString(),
                     JMeterUtils.getResString("proxy_daemon_msg_rootca_cert") + SPACE // $NON-NLS-1$
@@ -628,6 +637,7 @@ public class ProxyControlGui extends Log
         add(makeTitlePanel(), BorderLayout.NORTH);
 
         JPanel mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(createControls(), BorderLayout.NORTH);
 
         Box myBox = Box.createVerticalBox();
         myBox.add(createPortPanel());
@@ -638,38 +648,45 @@ public class ProxyControlGui extends Log
         myBox.add(Box.createVerticalStrut(5));
         myBox.add(createContentTypePanel());
         myBox.add(Box.createVerticalStrut(5));
-        mainPanel.add(myBox, BorderLayout.NORTH);
+        mainPanel.add(myBox, BorderLayout.CENTER);
 
         Box includeExcludePanel = Box.createVerticalBox();
         includeExcludePanel.add(createIncludePanel());
         includeExcludePanel.add(createExcludePanel());
         includeExcludePanel.add(createNotifyListenersPanel());
-        mainPanel.add(includeExcludePanel, BorderLayout.CENTER);
-
-        mainPanel.add(createControls(), BorderLayout.SOUTH);
-
+        mainPanel.add(includeExcludePanel, BorderLayout.SOUTH);
         add(mainPanel, BorderLayout.CENTER);
     }
 
     private JPanel createControls() {
         start = new JButton(JMeterUtils.getResString("start")); // $NON-NLS-1$
+        ImageIcon startImage = JMeterUtils.getImage("toolbar/32x32/arrow-right-3.png");
+        start.setIcon(startImage);
         start.addActionListener(this);
         start.setActionCommand(START);
         start.setEnabled(true);
-
+        
         stop = new JButton(JMeterUtils.getResString("stop")); // $NON-NLS-1$
+        ImageIcon stopImage = JMeterUtils.getImage("toolbar/32x32/process-stop-4.png");
+        stop.setIcon(stopImage);
         stop.addActionListener(this);
         stop.setActionCommand(STOP);
         stop.setEnabled(false);
 
+        ImageIcon restartImage = JMeterUtils.getImage("toolbar/32x32/edit-redo-7.png");
         restart = new JButton(JMeterUtils.getResString("restart")); // $NON-NLS-1$
+        restart.setIcon(restartImage);
         restart.addActionListener(this);
         restart.setActionCommand(RESTART);
         restart.setEnabled(false);
 
         JPanel panel = new JPanel();
+        panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
+                JMeterUtils.getResString("proxy_general_lifecycle"))); // $NON-NLS-1$
         panel.add(start);
+        panel.add(Box.createHorizontalStrut(10));
         panel.add(stop);
+        panel.add(Box.createHorizontalStrut(10));
         panel.add(restart);
         return panel;
     }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1784809&r1=1784808&r2=1784809&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Tue Feb 28 20:44:56 2017
@@ -136,6 +136,7 @@ JMeter now requires Java 8. Ensure you u
     <li><bug>60548</bug>HTTP Request : Allow Upper Panel to be collapsed</li>
     <li><bug>57242</bug>HTTP Authorization is not pre-emptively set with HttpClient4</li>
     <li><bug>60727</bug>Drop commons-httpclient-3.1 and related elements. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
+    <li><bug>60790</bug>HTTP(S) Test Script Recorder : Improve information on certificate expiration and have better UX for Start/Stop</li>
 </ul>
 
 <h3>Other samplers</h3>