jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1340091 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/ src/core/org/apache/jmeter/gui/action/ src/core/org/apache/jmeter/resources/ xdocs/
Date Fri, 18 May 2012 13:45:33 GMT
Author: pmouawad
Date: Fri May 18 13:45:32 2012
New Revision: 1340091

URL: http://svn.apache.org/viewvc?rev=1340091&view=rev
Log:
Bug 53261 - Make "Error/fatal" counter added in Bug 42784 open Log Viewer panel when Warn
Indicator is clicked

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoggerPanelEnableDisable.java
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java?rev=1340091&r1=1340090&r2=1340091&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java Fri May 18 13:45:32 2012
@@ -93,7 +93,7 @@ import org.apache.log.Priority;
  * JMeter component GUIs.
  *
  */
-public class MainFrame extends JFrame implements TestListener, Remoteable, DropTargetListener,
Clearable {
+public class MainFrame extends JFrame implements TestListener, Remoteable, DropTargetListener,
Clearable, ActionListener {
 
     private static final long serialVersionUID = 240L;
 
@@ -166,7 +166,7 @@ public class MainFrame extends JFrame im
     /**
      * Indicator for Log errors and Fatals
      */
-    private JLabel warnIndicator;
+    private JButton warnIndicator;
     /**
      * Counter
      */
@@ -198,8 +198,11 @@ public class MainFrame extends JFrame im
         totalThreads = new JLabel("0"); // $NON-NLS-1$
         activeThreads = new JLabel("0"); // $NON-NLS-1$
 
-        warnIndicator = new JLabel(warningIcon);
+        warnIndicator = new JButton(warningIcon);
+        warnIndicator.setMargin(new Insets(0, 0, 0, 0));
+        warnIndicator.setBorder(BorderFactory.createEmptyBorder());
         warnIndicator.setToolTipText(JMeterUtils.getResString("error_indicator_tooltip"));
// $NON-NLS-1$
+        warnIndicator.addActionListener(this);
         errorsOrFatalsLabel = new JLabel("0"); // $NON-NLS-1$
         errorsOrFatalsLabel.setToolTipText(JMeterUtils.getResString("error_indicator_tooltip"));
// $NON-NLS-1$
 
@@ -760,4 +763,13 @@ public class MainFrame extends JFrame im
             errorsAndFatalsCounterLogTarget.clearData();
         }
     }
-}
+
+    /**
+     * Handles click on warnIndicator
+     */
+    public void actionPerformed(ActionEvent event) {
+        if(event.getSource()==warnIndicator) {
+            ActionRouter.getInstance().doActionNow(new ActionEvent(event.getSource(), event.getID(),
ActionNames.LOGGER_PANEL_ENABLE_DISABLE));
+        }
+    }
+}
\ No newline at end of file

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoggerPanelEnableDisable.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoggerPanelEnableDisable.java?rev=1340091&r1=1340090&r2=1340091&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoggerPanelEnableDisable.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoggerPanelEnableDisable.java Fri May
18 13:45:32 2012
@@ -64,14 +64,16 @@ public class LoggerPanelEnableDisable im
         GuiPackage guiInstance = GuiPackage.getInstance();
         JSplitPane splitPane = ((JSplitPane)guiInstance.getLoggerPanel().getParent());
         if (ActionNames.LOGGER_PANEL_ENABLE_DISABLE.equals(e.getActionCommand())) {
-            if (guiInstance.getMenuItemLoggerPanel().getModel().isSelected()) {
+            if (!guiInstance.getLoggerPanel().isVisible()) {
                 splitPane.setDividerSize(UIManager.getInt("SplitPane.dividerSize"));
                 guiInstance.getLoggerPanel().setVisible(true);
                 splitPane.setDividerLocation(0.8);
+                guiInstance.getMenuItemLoggerPanel().getModel().setSelected(true);
             } else {
                 guiInstance.getLoggerPanel().clear();
                 guiInstance.getLoggerPanel().setVisible(false);
                 splitPane.setDividerSize(0);
+                guiInstance.getMenuItemLoggerPanel().getModel().setSelected(false);
             }
         }
     }

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=1340091&r1=1340090&r2=1340091&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Fri May 18 13:45:32
2012
@@ -245,7 +245,7 @@ endtime=End Time  
 entry_dn=Entry DN
 entrydn=Entry DN
 environment_panel_title=Environment Variables
-error_indicator_tooltip=Show the number of errors in log
+error_indicator_tooltip=Show the number of errors in log, click to open Log Viewer panel
 error_loading_help=Error loading help page
 error_occurred=Error Occurred
 error_title=Error

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=1340091&r1=1340090&r2=1340091&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 Fri May 18 13:45:32
2012
@@ -239,7 +239,7 @@ endtime=Date et heure de fin \:
 entry_dn=Entr\u00E9e DN \:
 entrydn=Entr\u00E9e DN
 environment_panel_title=Variables d'environnement
-error_indicator_tooltip=Affiche le nombre d'erreurs dans le journal
+error_indicator_tooltip=Affiche le nombre d'erreurs dans le journal(log), cliquer pour afficher
la console.
 error_loading_help=Erreur au chargement de la page d'aide
 error_occurred=Une erreur est survenue
 error_title=Erreur

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1340091&r1=1340090&r2=1340091&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri May 18 13:45:32 2012
@@ -294,6 +294,7 @@ When calling "Clear All" command, if Log
 <li>Bug 52771 - Documentation : Added RSS feed on JMeter Home page under link "Subscribe
to What's New"</li>
 <li>Bug 42784 - Show the number of errors logged in the GUI</li>
 <li>Bug 53256 - Make Clear All command clean LogViewer content</li>
+<li>Bug 53261 - Make "Error/fatal" counter added in Bug 42784 open Log Viewer panel
when Warn Indicator is clicked</li>
 </ul>
 
 <h2>Non-functional changes</h2>



Mime
View raw message