geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecr...@apache.org
Subject svn commit: r603683 - in /geronimo/sandbox/monitoring/client/client-war/src/main: java/org/apache/geronimo/plugins/monitoring/client/ webapp/ webapp/WEB-INF/view/
Date Wed, 12 Dec 2007 17:45:04 GMT
Author: ecraig
Date: Wed Dec 12 09:45:02 2007
New Revision: 603683

URL: http://svn.apache.org/viewvc?rev=603683&view=rev
Log:
GERONIMO-3702

monitoring client to display a graph when the graph name is clicked on

Patch by Viet Nguyen

Added:
    geronimo/sandbox/monitoring/client/client-war/src/main/webapp/monitoringPopUpGraph.jsp
Modified:
    geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java
    geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
    geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
    geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java?rev=603683&r1=603682&r2=603683&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java (original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MonitoringPortlet.java Wed Dec 12 09:45:02 2007
@@ -38,43 +38,42 @@
 /**
  * STATS
  */
-public class MonitoringPortlet extends GenericPortlet
-{
+public class MonitoringPortlet extends GenericPortlet {
 
-    private static final String      NORMALVIEW_JSP     = "/WEB-INF/view/monitoringNormal.jsp";
-    
-    private static final String      VIEWVIEWS_JSP     = "/WEB-INF/view/monitoringViews.jsp";
-    
-    private static final String      VIEWSERVERS_JSP     = "/WEB-INF/view/monitoringServers.jsp";
-    
-    private static final String      VIEWGRAPHS_JSP     = "/WEB-INF/view/monitoringGraphs.jsp";
+    private static final String NORMALVIEW_JSP = "/WEB-INF/view/monitoringNormal.jsp";
 
-    private static final String      PAGEVIEW_JSP       = "/WEB-INF/view/monitoringPage.jsp";
+    private static final String VIEWVIEWS_JSP = "/WEB-INF/view/monitoringViews.jsp";
 
-    private static final String      EDITVIEW_JSP       = "/WEB-INF/view/monitoringEditView.jsp";
+    private static final String VIEWSERVERS_JSP = "/WEB-INF/view/monitoringServers.jsp";
 
-    private static final String      ADDVIEW_JSP        = "/WEB-INF/view/monitoringAddView.jsp";
+    private static final String VIEWGRAPHS_JSP = "/WEB-INF/view/monitoringGraphs.jsp";
 
-    private static final String      ADDGRAPH_JSP       = "/WEB-INF/view/monitoringAddGraph.jsp";
+    private static final String PAGEVIEW_JSP = "/WEB-INF/view/monitoringPage.jsp";
 
-    private static final String      EDITGRAPH_JSP      = "/WEB-INF/view/monitoringEditGraph.jsp";
+    private static final String EDITVIEW_JSP = "/WEB-INF/view/monitoringEditView.jsp";
 
-    private static final String      VIEWSERVER_JSP     = "/WEB-INF/view/monitoringViewServer.jsp";
+    private static final String ADDVIEW_JSP = "/WEB-INF/view/monitoringAddView.jsp";
 
-    private static final String      EDITSERVER_JSP     = "/WEB-INF/view/monitoringEditServer.jsp";
+    private static final String ADDGRAPH_JSP = "/WEB-INF/view/monitoringAddGraph.jsp";
 
-    private static final String      ADDSERVER_JSP      = "/WEB-INF/view/monitoringAddServer.jsp";
+    private static final String EDITGRAPH_JSP = "/WEB-INF/view/monitoringEditGraph.jsp";
 
-    private static final String      HELPVIEW_JSP       = "/WEB-INF/view/monitoringHelp.jsp";
+    private static final String VIEWSERVER_JSP = "/WEB-INF/view/monitoringViewServer.jsp";
 
-    private static final String      EDITNORMALVIEW_JSP = "/WEB-INF/view/monitoringEdit.jsp";
+    private static final String EDITSERVER_JSP = "/WEB-INF/view/monitoringEditServer.jsp";
+
+    private static final String ADDSERVER_JSP = "/WEB-INF/view/monitoringAddServer.jsp";
+
+    private static final String HELPVIEW_JSP = "/WEB-INF/view/monitoringHelp.jsp";
+
+    private static final String EDITNORMALVIEW_JSP = "/WEB-INF/view/monitoringEdit.jsp";
 
     private PortletRequestDispatcher normalView;
-    
+
     private PortletRequestDispatcher viewViews;
-    
+
     private PortletRequestDispatcher viewServers;
-    
+
     private PortletRequestDispatcher viewGraphs;
 
     private PortletRequestDispatcher pageView;
@@ -99,46 +98,28 @@
 
     @Override
     public void processAction(ActionRequest actionRequest,
-            ActionResponse actionResponse) throws PortletException, IOException
-    {
+            ActionResponse actionResponse) throws PortletException, IOException {
         String action = actionRequest.getParameter("action");
         actionResponse.setRenderParameter("action", action);
-        if (action.equals("showView"))
-        {
+        if (action.equals("showView")) {
             String view_id = actionRequest.getParameter("view_id");
             actionResponse.setRenderParameter("view_id", view_id);
-        }
-        else if (action.equals("showAllViews"))
-        {
+        } else if (action.equals("showAllViews")) {
             // no parameters needed to be redirected to doView()
-        }
-        else if (action.equals("showAllServers"))
-        {
+        } else if (action.equals("showAllServers")) {
             // no parameters needed to be redirected to doView()
-        }
-        else if (action.equals("showAllGraphs"))
-        {
+        } else if (action.equals("showAllGraphs")) {
             // no parameters needed to be redirected to doView()
-        }
-        else if (action.equals("showEditView"))
-        {
+        } else if (action.equals("showEditView")) {
             String view_id = actionRequest.getParameter("view_id");
             actionResponse.setRenderParameter("view_id", view_id);
-        }
-        else if (action.equals("saveEditView"))
-        {
+        } else if (action.equals("saveEditView")) {
             updateView(actionRequest, actionResponse);
-        }
-        else if (action.equals("showAddView"))
-        {
+        } else if (action.equals("showAddView")) {
             // no parameters needed to be redirected to doView()
-        }
-        else if (action.equals("saveAddView"))
-        {
+        } else if (action.equals("saveAddView")) {
             addView(actionRequest, actionResponse);
-        }
-        else if (action.equals("showAddGraph"))
-        {
+        } else if (action.equals("showAddGraph")) {
             String server_id = actionRequest.getParameter("server_id");
             if (server_id != null)
                 actionResponse.setRenderParameter("server_id", server_id);
@@ -150,100 +131,72 @@
             String dataname = actionRequest.getParameter("dataname");
             if (dataname != null)
                 actionResponse.setRenderParameter("dataname", dataname);
-        }
-        else if (action.equals("saveAddGraph"))
-        {
+        } else if (action.equals("saveAddGraph")) {
             addGraph(actionRequest, actionResponse);
-        }
-        else if (action.equals("showEditGraph"))
-        {
+        } else if (action.equals("showEditGraph")) {
             String graph_id = actionRequest.getParameter("graph_id");
             actionResponse.setRenderParameter("graph_id", graph_id);
-        }
-        else if (action.equals("saveEditGraph"))
-        {
+        } else if (action.equals("saveEditGraph")) {
             updateGraph(actionRequest, actionResponse);
-        }
-        else if (action.equals("deleteGraph"))
-        {
+        } else if (action.equals("deleteGraph")) {
             deleteGraph(actionRequest, actionResponse);
-        }
-        else if (action.equals("deleteView"))
-        {
+        } else if (action.equals("deleteView")) {
             deleteView(actionRequest, actionResponse);
-        }
-        else if (action.equals("showServer"))
-        {
+        } else if (action.equals("showServer")) {
             String server_id = actionRequest.getParameter("server_id");
             actionResponse.setRenderParameter("server_id", server_id);
-        }
-        else if (action.equals("showEditServer"))
-        {
+        } else if (action.equals("showEditServer")) {
             String server_id = actionRequest.getParameter("server_id");
             actionResponse.setRenderParameter("server_id", server_id);
-        }
-        else if (action.equals("saveEditServer"))
-        {
+        } else if (action.equals("saveEditServer")) {
             updateServer(actionRequest, actionResponse);
-        }
-        else if (action.equals("showAddServer"))
-        {
+        } else if (action.equals("showAddServer")) {
             // no parameters needed to be redirected to doView()
-        }
-        else if (action.equals("deleteServer"))
-        {
+        } else if (action.equals("deleteServer")) {
             deleteServer(actionRequest, actionResponse);
-        }
-        else if (action.equals("saveAddServer"))
-        {
+        } else if (action.equals("saveAddServer")) {
             addServer(actionRequest, actionResponse);
-        }
-        else if (action.equals("startTrackingMbean"))
-        {
+        } else if (action.equals("startTrackingMbean")) {
             String server_id = actionRequest.getParameter("server_id");
             actionResponse.setRenderParameter("server_id", server_id);
             String mbean = actionRequest.getParameter("mbean");
             actionResponse.setRenderParameter("mbean", mbean);
-        }
-        else if (action.equals("stopTrackingMbean"))
-        {
+        } else if (action.equals("stopTrackingMbean")) {
             String server_id = actionRequest.getParameter("server_id");
             actionResponse.setRenderParameter("server_id", server_id);
             String mbean = actionRequest.getParameter("mbean");
             actionResponse.setRenderParameter("mbean", mbean);
-        }
-        else if (action.equals("stopThread") || action.equals("disableServerViewQuery"))
-        {
+        } else if (action.equals("stopThread")
+                || action.equals("disableServerViewQuery")) {
             String server_id = actionRequest.getParameter("server_id");
             String message = stopThread(server_id);
             actionResponse.setRenderParameter("server_id", server_id);
             actionResponse.setRenderParameter("message", message);
-        }
-        else if (action.equals("startThread") || action.equals("enableServerViewQuery"))
-        {
+        } else if (action.equals("startThread")
+                || action.equals("enableServerViewQuery")) {
             String server_id = actionRequest.getParameter("server_id");
-            String snapshotDuration = actionRequest.getParameter("snapshotDuration");
+            String snapshotDuration = actionRequest
+                    .getParameter("snapshotDuration");
             String message = startThread(server_id, new Long(snapshotDuration));
             actionResponse.setRenderParameter("message", message);
             actionResponse.setRenderParameter("server_id", server_id);
-            actionResponse.setRenderParameter("snapshotDuration", snapshotDuration);
-        }
-        else if (action.equals("disableServer") || action.equals("disableEditServer"))
-        {
+            actionResponse.setRenderParameter("snapshotDuration",
+                    snapshotDuration);
+        } else if (action.equals("disableServer")
+                || action.equals("disableEditServer")) {
             String server_id = actionRequest.getParameter("server_id");
-            actionResponse.setRenderParameter("server_id", server_id);;
+            actionResponse.setRenderParameter("server_id", server_id);
+            ;
             actionResponse.setRenderParameter("message", alterServerState(
                     server_id, false));
-        }
-        else if (action.equals("enableServer") || action.equals("enableEditServer"))
-        {
+        } else if (action.equals("enableServer")
+                || action.equals("enableEditServer")) {
             String server_id = actionRequest.getParameter("server_id");
             actionResponse.setRenderParameter("message", alterServerState(
                     server_id, true));
-            actionResponse.setRenderParameter("server_id", server_id);;
-        }
-        else if (action.equals("testAddServerConnection"))
-        {
+            actionResponse.setRenderParameter("server_id", server_id);
+            ;
+        } else if (action.equals("testAddServerConnection")) {
             String name = actionRequest.getParameter("name");
             String ip = actionRequest.getParameter("ip");
             String username = actionRequest.getParameter("username");
@@ -259,9 +212,7 @@
             actionResponse.setRenderParameter("password", password);
             actionResponse.setRenderParameter("password2", password2);
             actionResponse.setRenderParameter("port", "" + port);
-        }
-        else if (action.equals("testEditServerConnection"))
-        {
+        } else if (action.equals("testEditServerConnection")) {
             String name = actionRequest.getParameter("name");
             String ip = actionRequest.getParameter("ip");
             String username = actionRequest.getParameter("username");
@@ -287,63 +238,51 @@
     }
 
     private String testConnection(String name, String ip, String username,
-            String password, int port)
-    {
-        try
-        {
+            String password, int port) {
+        try {
             MRCConnector mrc = new MRCConnector(ip, username, password, port);
             return "<font color=\"green\"><strong><li>Connection was successfully established.</li></strong></font>";
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             return "<font color=\"red\"><strong><li>Failed to create a connection to server.</li></strong></font>";
         }
     }
 
-    private String alterServerState(String server_id, boolean b)
-    {
+    private String alterServerState(String server_id, boolean b) {
         Connection conn = (new DBManager()).getConnection();
         String message = "";
         String name = "";
-        try
-        {
+        try {
             PreparedStatement pStmt = conn
                     .prepareStatement("SELECT * FROM servers WHERE server_id="
                             + server_id);
             ResultSet rs = pStmt.executeQuery();
-            if (rs.next())
-            {
+            if (rs.next()) {
                 name = rs.getString("name");
             }
             rs.close();
             conn.close();
             conn = (new DBManager()).getConnection();
             Statement stmt = conn.createStatement();
-            if (!b)
-            {
+            if (!b) {
                 stmt
                         .executeUpdate("UPDATE SERVERS SET ENABLED = 0 WHERE SERVER_ID="
                                 + server_id);
                 stmt
-                .executeUpdate("UPDATE GRAPHS SET ENABLED = 0 WHERE SERVER_ID="
-                        + server_id);
+                        .executeUpdate("UPDATE GRAPHS SET ENABLED = 0 WHERE SERVER_ID="
+                                + server_id);
                 message = "<font color=\"green\"><strong><li>Server " + name
                         + " was successfully disabled.</li></strong></font>";
-            }
-            else
-            {
+            } else {
                 stmt
                         .executeUpdate("UPDATE SERVERS SET ENABLED = 1 WHERE SERVER_ID="
                                 + server_id);
                 stmt
-                .executeUpdate("UPDATE GRAPHS SET ENABLED = 1 WHERE SERVER_ID="
-                        + server_id);
+                        .executeUpdate("UPDATE GRAPHS SET ENABLED = 1 WHERE SERVER_ID="
+                                + server_id);
                 message = "<font color=\"green\"><strong><li>Server " + name
                         + " was successfully enabled.</li></strong></font>";
             }
-        }
-        catch (SQLException e)
-        {
+        } catch (SQLException e) {
             if (!b)
                 message = "<font color=\"red\"><strong><li>[ERROR] Server with server_id = "
                         + server_id
@@ -352,17 +291,11 @@
                 message = "<font color=\"red\"><strong><li>[ERROR] Server with server_id = "
                         + server_id
                         + " could not be enabled.</li></strong></font>";
-        }
-        finally
-        {
-            if (conn != null)
-            {
-                try
-                {
+        } finally {
+            if (conn != null) {
+                try {
                     conn.close();
-                }
-                catch (Exception e)
-                {
+                } catch (Exception e) {
 
                 }
             }
@@ -372,40 +305,28 @@
 
     @Override
     public void doView(RenderRequest request, RenderResponse response)
-            throws PortletException, IOException
-    {
+            throws PortletException, IOException {
         String action = request.getParameter("action");
         if (action == null)
             action = "showNormal";
-        if (action.equals("showView"))
-        {
+        if (action.equals("showView")) {
             String view_id = request.getParameter("view_id");
             request.setAttribute("view_id", view_id);
             pageView.include(request, response);
-        }
-        else if (action.equals("showAllViews"))
-        {
-        	request.setAttribute("message", "");
+        } else if (action.equals("showAllViews")) {
+            request.setAttribute("message", "");
             viewViews.include(request, response);
-        }
-        else if (action.equals("showAllServers"))
-        {
-        	request.setAttribute("message", "");
+        } else if (action.equals("showAllServers")) {
+            request.setAttribute("message", "");
             viewServers.include(request, response);
-        }
-        else if (action.equals("showAllGraphs"))
-        {
-        	request.setAttribute("message", "");
+        } else if (action.equals("showAllGraphs")) {
+            request.setAttribute("message", "");
             viewGraphs.include(request, response);
-        }
-        else if (action.equals("showServer"))
-        {
+        } else if (action.equals("showServer")) {
             String server_id = request.getParameter("server_id");
             request.setAttribute("server_id", server_id);
             viewServer.include(request, response);
-        }
-        else if (action.equals("startTrackingMbean"))
-        {
+        } else if (action.equals("startTrackingMbean")) {
             String server_id = request.getParameter("server_id");
             request.setAttribute("server_id", server_id);
             String mbean = request.getParameter("mbean");
@@ -413,9 +334,7 @@
             String message = startTrackingMbean(server_id, mbean);
             request.setAttribute("message", message);
             viewServer.include(request, response);
-        }
-        else if (action.equals("stopTrackingMbean"))
-        {
+        } else if (action.equals("stopTrackingMbean")) {
             String server_id = request.getParameter("server_id");
             request.setAttribute("server_id", server_id);
             String mbean = request.getParameter("mbean");
@@ -423,79 +342,57 @@
             String message = stopTrackingMbean(server_id, mbean);
             request.setAttribute("message", message);
             viewServer.include(request, response);
-        }
-        else if (action.equals("stopThread"))
-        {
+        } else if (action.equals("stopThread")) {
             String server_id = request.getParameter("server_id");
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-
-        }
-        else if (action.equals("startThread"))
-        {
+        } else if (action.equals("startThread")) {
             String server_id = request.getParameter("server_id");
-            Long snapshotDuration = java.lang.Long.parseLong(request
-                    .getParameter("snapshotDuration"));
+            Long snapshotDuration = java.lang.Long.parseLong(
+                    request.getParameter("snapshotDuration"));
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-
-        }
-        else if (action.equals("disableServerViewQuery") || action.equals("enableServerViewQuery"))
-        {
+        } else if (action.equals("disableServerViewQuery") || action.equals("enableServerViewQuery")) {
             String server_id = request.getParameter("server_id");
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             request.setAttribute("server_id", server_id);
             viewServer.include(request, response);
-        }
-        else
-        {
+        } else {
             request.setAttribute("message", request.getParameter("message"));
             normalView.include(request, response);
         }
-
     }
 
     @Override
     protected void doHelp(RenderRequest renderRequest,
-            RenderResponse renderResponse) throws PortletException, IOException
-    {
+            RenderResponse renderResponse) throws PortletException, IOException {
         helpView.include(renderRequest, renderResponse);
     }
 
     @Override
     protected void doEdit(RenderRequest request, RenderResponse response)
-            throws PortletException, IOException
-    {
+            throws PortletException, IOException {
         String action = request.getParameter("action");
-        if (action.equals("showEditView"))
-        {
+        if (action.equals("showEditView")) {
             String view_id = request.getParameter("view_id");
             request.setAttribute("view_id", view_id);
             editView.include(request, response);
-        }
-        else if (action.equals("saveEditView"))
-        {
+        } else if (action.equals("saveEditView")) {
             String view_id = request.getParameter("view_id");
             request.setAttribute("view_id", view_id);
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             editView.include(request, response);
-        }
-        else if (action.equals("showAddView"))
-        {
+        } else if (action.equals("showAddView")) {
             addView.include(request, response);
-        }
-        else if (action.equals("saveAddView"))
-        {
+        } else if (action.equals("saveAddView")) {
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-        }
-        else if (action.equals("showAddGraph"))
-        {
+        } else if (action.equals("showAddGraph")) {
             String server_id = request.getParameter("server_id");
             request.setAttribute("server_id", server_id);
             String mbean = request.getParameter("mbean");
@@ -503,71 +400,49 @@
             String dataname = request.getParameter("dataname");
             request.setAttribute("dataname", dataname);
             addGraph.include(request, response);
-        }
-        else if (action.equals("saveAddGraph"))
-        {
+        } else if (action.equals("saveAddGraph")) {
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-        }
-        else if (action.equals("showEditGraph"))
-        {
+        } else if (action.equals("showEditGraph")) {
             String graph_id = request.getParameter("graph_id");
             request.setAttribute("graph_id", graph_id);
             editGraph.include(request, response);
-        }
-        else if (action.equals("saveEditGraph"))
-        {
+        } else if (action.equals("saveEditGraph")) {
             String graph_id = request.getParameter("graph_id");
             request.setAttribute("graph_id", graph_id);
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             editGraph.include(request, response);
-        }
-        else if (action.equals("deleteGraph"))
-        {
+        } else if (action.equals("deleteGraph")) {
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-        }
-        else if (action.equals("deleteView"))
-        {
+        } else if (action.equals("deleteView")) {
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-        }
-        else if (action.equals("showEditServer"))
-        {
+        } else if (action.equals("showEditServer")) {
             String server_id = request.getParameter("server_id");
             request.setAttribute("server_id", server_id);
             editServer.include(request, response);
-        }
-        else if (action.equals("saveEditServer"))
-        {
+        } else if (action.equals("saveEditServer")) {
             String server_id = request.getParameter("server_id");
             request.setAttribute("server_id", server_id);
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             editServer.include(request, response);
-        }
-        else if (action.equals("showAddServer"))
-        {
+        } else if (action.equals("showAddServer")) {
             addServer.include(request, response);
-        }
-        else if (action.equals("saveAddServer"))
-        {
+        } else if (action.equals("saveAddServer")) {
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-        }
-        else if (action.equals("deleteServer"))
-        {
+        } else if (action.equals("deleteServer")) {
             String message = request.getParameter("message");
             request.setAttribute("message", message);
             normalView.include(request, response);
-        }
-        else if (action.equals("testAddServerConnection"))
-        {
+        } else if (action.equals("testAddServerConnection")) {
             request.setAttribute("name", request.getParameter("name"));
             request.setAttribute("ip", request.getParameter("ip"));
             request.setAttribute("username", request.getParameter("username"));
@@ -578,9 +453,7 @@
             request.setAttribute("message", request.getParameter("message"));
             request.setAttribute("port", request.getParameter("port"));
             addServer.include(request, response);
-        }
-        else if (action.equals("testEditServerConnection"))
-        {
+        } else if (action.equals("testEditServerConnection")) {
             request.setAttribute("name", request.getParameter("name"));
             request.setAttribute("ip", request.getParameter("ip"));
             request.setAttribute("port", request.getParameter("port"));
@@ -594,30 +467,31 @@
                     .setAttribute("server_id", request
                             .getParameter("server_id"));
             request.setAttribute("snapshot", request.getParameter("snapshot"));
-            request.setAttribute("retention", request.getParameter("retention"));
+            request
+                    .setAttribute("retention", request
+                            .getParameter("retention"));
             editServer.include(request, response);
-        }
-        else if(action.equals("disableEditServer") || action.equals("enableEditServer"))
-        {
+        } else if (action.equals("disableEditServer")
+                || action.equals("enableEditServer")) {
             request.setAttribute("message", request.getParameter("message"));
-            request.setAttribute("server_id", request.getParameter("server_id"));
+            request
+                    .setAttribute("server_id", request
+                            .getParameter("server_id"));
             editServer.include(request, response);
-        }
-        else if(action.equals("disableServer") || action.equals("enableServer"))
-        {
+        } else if (action.equals("disableServer")
+                || action.equals("enableServer")) {
             request.setAttribute("message", request.getParameter("message"));
-            request.setAttribute("server_id", request.getParameter("server_id"));
+            request
+                    .setAttribute("server_id", request
+                            .getParameter("server_id"));
             normalView.include(request, response);
-        }
-        else
-        {
+        } else {
             editNormalView.include(request, response);
         }
     }
 
     private void updateView(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         String view_id = actionRequest.getParameter("view_id");
         actionResponse.setRenderParameter("view_id", view_id);
         DBManager DBase = new DBManager();
@@ -625,11 +499,10 @@
         String name = actionRequest.getParameter("name");
         String description = actionRequest.getParameter("description");
         String[] graphsArray = actionRequest.getParameterValues("graph_ids");
-        if(graphsArray == null) {
+        if (graphsArray == null) {
             graphsArray = new String[0];
         }
-        try
-        {
+        try {
             PreparedStatement pStmt = con
                     .prepareStatement("UPDATE views SET name='" + name
                             + "', description='" + description
@@ -642,8 +515,7 @@
                             + view_id);
             pStmt.executeUpdate();
             if (graphsArray != null)
-                for (int i = 0; i < graphsArray.length; i++)
-                {
+                for (int i = 0; i < graphsArray.length; i++) {
                     pStmt = con
                             .prepareStatement("INSERT INTO views_graphs VALUES("
                                     + view_id + "," + graphsArray[i] + ")");
@@ -655,9 +527,7 @@
                             + " has been updated</li></strong></font>");
             return;
 
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             actionResponse.setRenderParameter("message",
                     "<font color=\"red\"><strong><li>Error updating View "
                             + name + "</li></strong></font>" + e.getMessage());
@@ -666,14 +536,13 @@
     }
 
     private void addView(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
         String name = actionRequest.getParameter("name");
         String description = actionRequest.getParameter("description");
         String[] graphsArray = actionRequest.getParameterValues("graph_ids");
-        if(graphsArray == null) {
+        if (graphsArray == null) {
             graphsArray = new String[0];
         }
         try {
@@ -692,7 +561,8 @@
             if (rs.next()) {
                 Integer view_id = rs.getInt("view_id");
                 for (int i = 0; i < graphsArray.length; i++) {
-                    pStmt = con.prepareStatement("INSERT INTO views_graphs VALUES("
+                    pStmt = con
+                            .prepareStatement("INSERT INTO views_graphs VALUES("
                                     + view_id + "," + graphsArray[i] + ")");
                     pStmt.executeUpdate();
                 }
@@ -708,15 +578,14 @@
         } finally {
             try {
                 con.close();
-            } catch(Exception e) {
-                
+            } catch (Exception e) {
+
             }
         }
     }
 
     private void updateServer(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         String server_id = actionRequest.getParameter("server_id");
         actionResponse.setRenderParameter("server_id", server_id);
         DBManager DBase = new DBManager();
@@ -730,7 +599,7 @@
         String strPort = actionRequest.getParameter("port");
         int port = Integer.parseInt(strPort);
         // encrypt the password
-        if(password != null && !password.equals("")) {
+        if (password != null && !password.equals("")) {
             password = EncryptionManager.encrypt(password);
         }
 
@@ -745,19 +614,24 @@
                                 + "', username='"
                                 + username
                                 + "', modified=CURRENT_TIMESTAMP, last_seen=CURRENT_TIMESTAMP, "
-                                + "port=" + port 
-                                + " WHERE server_id="
+                                + "port=" + port + " WHERE server_id="
                                 + server_id);
                 pStmt.executeUpdate();
-                // when user did not specify the password, just grab it from the db
-                pStmt = con.prepareStatement("SELECT password FROM servers WHERE server_id=" + server_id);
+                // when user did not specify the password, just grab it from the
+                // db
+                pStmt = con
+                        .prepareStatement("SELECT password FROM servers WHERE server_id="
+                                + server_id);
                 ResultSet s = pStmt.executeQuery();
-                if(s.next()) {
+                if (s.next()) {
                     password = s.getString("password");
                 } else {
-                    actionResponse.setRenderParameter("message",
-                            "<font color=\"red\"><strong><li>Error updating server</li></strong></font>"
-                                    + "Password was not found in the database for server_id=" + server_id);
+                    actionResponse
+                            .setRenderParameter(
+                                    "message",
+                                    "<font color=\"red\"><strong><li>Error updating server</li></strong></font>"
+                                            + "Password was not found in the database for server_id="
+                                            + server_id);
                     con.close();
                     return;
                 }
@@ -777,14 +651,17 @@
             }
             con.close();
             // update the server side db
-            if(snapshot == null || retention == null) {
+            if (snapshot == null || retention == null) {
                 // do not update if we do not know
             } else {
-                (new MRCConnector(ip, username, password, port)).setSnapshotDuration(Long.parseLong(snapshot) * 1000 * 60);
-                (new MRCConnector(ip, username, password, port)).setSnapshotRetention(Integer.parseInt(retention));
+                (new MRCConnector(ip, username, password, port))
+                        .setSnapshotDuration(Long.parseLong(snapshot) * 1000 * 60);
+                (new MRCConnector(ip, username, password, port))
+                        .setSnapshotRetention(Integer.parseInt(retention));
             }
             // set success message
-            actionResponse.setRenderParameter(
+            actionResponse
+                    .setRenderParameter(
                             "message",
                             "<font color=\"green\"><strong><li>Server has been updated</li></strong></font>");
         } catch (Exception e) {
@@ -795,8 +672,7 @@
     }
 
     private void addServer(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
         String name = actionRequest.getParameter("name");
@@ -805,11 +681,10 @@
         String password = actionRequest.getParameter("password");
         String username = actionRequest.getParameter("username");
         // encrypt the password
-        if(password != null && !password.equals("")) {
+        if (password != null && !password.equals("")) {
             password = EncryptionManager.encrypt(password);
         }
-        try
-        {
+        try {
             PreparedStatement pStmt = con
                     .prepareStatement("INSERT INTO servers (name, ip, username, password, modified, last_seen, added, port) VALUES ('"
                             + name
@@ -819,7 +694,8 @@
                             + username
                             + "','"
                             + password
-                            + "',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP," + port + ")");
+                            + "',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,"
+                            + port + ")");
             pStmt.executeUpdate();
             actionResponse.setRenderParameter("message",
                     "<font color=\"green\"><strong><li>Server " + name + " at "
@@ -832,22 +708,20 @@
         } finally {
             try {
                 con.close();
-            } catch(Exception e) {
-                
+            } catch (Exception e) {
+
             }
         }
     }
 
     private void deleteServer(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         String server_id = actionRequest.getParameter("server_id");
         actionResponse.setRenderParameter("server_id", server_id);
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
 
-        try
-        {
+        try {
             PreparedStatement pStmt = con
                     .prepareStatement("DELETE FROM graphs WHERE server_id="
                             + server_id);
@@ -863,9 +737,7 @@
                             "<font color=\"green\"><strong><li>Server and associated graphs have been deleted</li></strong></font>");
             return;
 
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             actionResponse.setRenderParameter("message",
                     "<font color=\"red\"><strong><li>Error deleting server</li></strong></font>"
                             + e.getMessage());
@@ -874,15 +746,13 @@
     }
 
     private void deleteView(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         String view_id = actionRequest.getParameter("view_id");
         actionResponse.setRenderParameter("view_id", view_id);
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
 
-        try
-        {
+        try {
             PreparedStatement pStmt = con
                     .prepareStatement("DELETE FROM views WHERE view_id="
                             + view_id);
@@ -897,9 +767,7 @@
                             "<font color=\"green\"><strong><li>View has been deleted</li></strong></font>");
             return;
 
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             actionResponse.setRenderParameter("message",
                     "<font color=\"red\"><strong><li>Error deleting view</li></strong></font>"
                             + e.getMessage());
@@ -908,8 +776,7 @@
     }
 
     private void addGraph(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
         String name = actionRequest.getParameter("name");
@@ -923,20 +790,19 @@
         String data1operation = actionRequest.getParameter("data1operation");
         String operation = actionRequest.getParameter("operation");
         int showArchive = 0;
-        if(actionRequest.getParameter("showArchive") != null && actionRequest.getParameter("showArchive").equals("on")) {
+        if (actionRequest.getParameter("showArchive") != null
+                && actionRequest.getParameter("showArchive").equals("on")) {
             showArchive = 1;
         }
 
-        if (operation.equals("other"))
-        {
+        if (operation.equals("other")) {
             operation = actionRequest.getParameter("othermath");
         }
         String dataname2 = actionRequest.getParameter("dataname2");
         String data2operation = actionRequest.getParameter("data2operation");
         if (data2operation == null)
             data2operation = "A";
-        try
-        {
+        try {
             PreparedStatement pStmt = con
                     .prepareStatement("INSERT INTO graphs (server_id, name, description, timeframe, mbean, dataname1, xlabel, ylabel, data1operation, operation, data2operation, dataname2, warninglevel1, warninglevel2, added, modified, last_seen, archive) VALUES ("
                             + server_id
@@ -962,7 +828,8 @@
                             + data2operation
                             + "','"
                             + dataname2
-                            + "',0,0,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP," + showArchive + ")" );
+                            + "',0,0,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,"
+                            + showArchive + ")");
             pStmt.executeUpdate();
             con.close();
             actionResponse.setRenderParameter("message",
@@ -970,9 +837,7 @@
                             + " has been added.</li></strong></font>");
             return;
 
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             actionResponse.setRenderParameter("message",
                     "<font color=\"red\"><strong><li>Error adding graph</li></strong></font>"
                             + e.getMessage());
@@ -981,8 +846,7 @@
     }
 
     private void updateGraph(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
         String graph_id = actionRequest.getParameter("graph_id");
@@ -999,20 +863,19 @@
         String data1operation = actionRequest.getParameter("data1operation");
         String operation = actionRequest.getParameter("operation");
         int archive = 0;
-        if(actionRequest.getParameter("showArchive") != null && actionRequest.getParameter("showArchive").equals("on")) {
+        if (actionRequest.getParameter("showArchive") != null
+                && actionRequest.getParameter("showArchive").equals("on")) {
             archive = 1;
         }
 
-        if (operation.equals("other"))
-        {
+        if (operation.equals("other")) {
             operation = actionRequest.getParameter("othermath");
         }
         String dataname2 = actionRequest.getParameter("dataname2");
         String data2operation = actionRequest.getParameter("data2operation");
         if (data2operation == null)
             data2operation = "A";
-        try
-        {
+        try {
             PreparedStatement pStmt = con
                     .prepareStatement("UPDATE graphs SET server_id="
                             + server_id
@@ -1038,8 +901,8 @@
                             + data2operation
                             + "', dataname2='"
                             + dataname2
-                            + "', warninglevel1=0, warninglevel2=0, modified=CURRENT_TIMESTAMP, archive=" + archive + " WHERE graph_id="
-                            + graph_id);
+                            + "', warninglevel1=0, warninglevel2=0, modified=CURRENT_TIMESTAMP, archive="
+                            + archive + " WHERE graph_id=" + graph_id);
             pStmt.executeUpdate();
             con.close();
             actionResponse.setRenderParameter("message",
@@ -1047,9 +910,7 @@
                             + " has been updated.</li></strong></font>");
             return;
 
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             actionResponse.setRenderParameter("message",
                     "<font color=\"red\"><strong><li>Error editing graph</li></strong></font>"
                             + e.getMessage());
@@ -1058,30 +919,34 @@
     }
 
     private void deleteGraph(ActionRequest actionRequest,
-            ActionResponse actionResponse)
-    {
+            ActionResponse actionResponse) {
         String graph_id = actionRequest.getParameter("graph_id");
         actionResponse.setRenderParameter("graph_id", graph_id);
         DBManager DBase = new DBManager();
         Connection con = DBase.getConnection();
 
-        try
-        {
+        try {
             // remove the graph
-            PreparedStatement pStmt = con.prepareStatement("DELETE FROM graphs WHERE graph_id=" + graph_id);
+            PreparedStatement pStmt = con
+                    .prepareStatement("DELETE FROM graphs WHERE graph_id="
+                            + graph_id);
             pStmt.executeUpdate();
             // fetch all views associated with this graph
-            pStmt = con.prepareStatement("SELECT view_id FROM views_graphs WHERE graph_id=" + graph_id);
+            pStmt = con
+                    .prepareStatement("SELECT view_id FROM views_graphs WHERE graph_id="
+                            + graph_id);
             ResultSet view_ids = pStmt.executeQuery();
             // reduce the graph_count from all views associated with the graph
-            while(view_ids.next()) {
-                pStmt = con.prepareStatement(
-                        "UPDATE views SET graph_count=graph_count-1 WHERE view_id=" 
-                        + view_ids.getString("view_id"));
+            while (view_ids.next()) {
+                pStmt = con
+                        .prepareStatement("UPDATE views SET graph_count=graph_count-1 WHERE view_id="
+                                + view_ids.getString("view_id"));
                 pStmt.executeUpdate();
             }
             // remove the relationship between graphs and views
-            pStmt = con.prepareStatement("DELETE FROM views_graphs WHERE graph_id=" + graph_id);
+            pStmt = con
+                    .prepareStatement("DELETE FROM views_graphs WHERE graph_id="
+                            + graph_id);
             pStmt.executeUpdate();
             con.close();
             actionResponse
@@ -1089,9 +954,7 @@
                             "<font color=\"green\"><strong><li>Graph has been deleted</li></strong></font>");
             return;
 
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             actionResponse.setRenderParameter("message",
                     "<font color=\"red\"><strong><li>Error deleting graph</li></strong></font>"
                             + e.getMessage());
@@ -1111,7 +974,9 @@
         int port = -1;
         // fetch server information
         try {
-            pStmt = con.prepareStatement("SELECT * FROM servers WHERE server_id=" + server_id);
+            pStmt = con
+                    .prepareStatement("SELECT * FROM servers WHERE server_id="
+                            + server_id);
             rs = pStmt.executeQuery();
             if (!rs.next()) {
                 return "<font color=\"red\"><strong><li>DATABASE ERROR: Server id "
@@ -1137,7 +1002,7 @@
                     + e.getMessage()
                     + "</li></strong></font>";
         }
-        
+
         // tell the mrc server to start tracking an mbean
         try {
             if (mrc.startTrackingMbean(mbean)) {
@@ -1220,8 +1085,7 @@
         }
     }
 
-    private String stopThread(String server_id)
-    {
+    private String stopThread(String server_id) {
         PreparedStatement pStmt = null;
         ResultSet rs = null;
         MRCConnector mrc = null;
@@ -1339,8 +1203,7 @@
     }
 
     @Override
-    public void init(PortletConfig portletConfig) throws PortletException
-    {
+    public void init(PortletConfig portletConfig) throws PortletException {
         super.init(portletConfig);
         normalView = portletConfig.getPortletContext().getRequestDispatcher(
                 NORMALVIEW_JSP);
@@ -1373,8 +1236,7 @@
     }
 
     @Override
-    public void destroy()
-    {
+    public void destroy() {
         normalView = null;
         viewViews = null;
         viewServers = null;

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp?rev=603683&r1=603682&r2=603683&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp (original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp Wed Dec 12 09:45:02 2007
@@ -161,7 +161,9 @@
       %>     
             <tr>
             <td align="left" width="5%"><input type="checkbox" name="graph_ids" value="<%=rs.getString("graph_id")%>" <%if (graphsList.contains(rs.getInt("graph_id"))){%> checked<%}%>></td>
-            <td align="left"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showGraph" /><portlet:param name="graph_id" value="<%=rs.getString("graph_id")%>" /></portlet:actionURL>"><%=rs.getString("name")%></a></td>
+            <td align="left">
+                <a href="/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=rs.getString("graph_id")%>" target="window.open('','','width=670,height=220,resizable=1')"><%=name %></a>
+            </td>
             <td align="left"><%=rs.getString("timeframe")%> min.</td>
             <td align="left"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=rs.getString("server_id")%>" /></portlet:actionURL>"><%=rs2.getString("name")%></a></td>
             <td align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditGraph" /><portlet:param name="graph_id" value="<%=rs.getString("graph_id")%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png"></a></td>

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp?rev=603683&r1=603682&r2=603683&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp (original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp Wed Dec 12 09:45:02 2007
@@ -19,17 +19,17 @@
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <%@ page import="java.util.ArrayList" %>
 <%@ page import="java.sql.Connection" %>
-<%@ page import="java.sql.DatabaseMetaData" %>
 <%@ page import="java.sql.PreparedStatement" %>
 <%@ page import="java.sql.ResultSet" %>
-<%@ page import="java.sql.SQLException" %>
 <%@ page import="org.apache.geronimo.plugins.monitoring.client.util.*" %>
-<%@ page import="org.apache.geronimo.console.util.PortletManager" %>
+<%@page import="org.apache.geronimo.plugins.monitoring.client.GraphsBuilder"%>
+<%@page import="org.apache.geronimo.plugins.monitoring.client.StatsGraph"%>
 <portlet:defineObjects/>
+<script language="JavaScript" type="text/javascript">
+</script>
 <%
     String message = (String) request.getAttribute("message"); 
-    if (message != null)
-    {
+    if (message != null) {
 %>
         <p><%= message %></p>
 <%  }  %>
@@ -47,7 +47,7 @@
   <th class="DarkBackground" width="20%">Data Series</th>
   <th class="DarkBackground" width="15%">Actions</th>
  </tr>
- <%
+ <% 
  DBManager DBase = new DBManager();
  Connection con = DBase.getConnection();
  
@@ -115,7 +115,9 @@
  if (enabled)
  {
  	%>
-  	<td class="${backgroundClass}" width="30%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showGraph" /><portlet:param name="graph_id" value="<%=graph_id%>" /></portlet:actionURL>"><%=name%></a></td>
+  	<td class="${backgroundClass}" width="30%" align="center">
+  	    <a href="/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=graph_id%>" target="window.open('','','width=670,height=220,resizable=1')"><%=name %></a>
+    </td>
   	<td class="${backgroundClass}" width="20%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><%=server_name%></a></td>
   	<td class="${backgroundClass}" width="15%" align="center"><%=timeframe%></td>
   	<td class="${backgroundClass}" width="20%" align="center"><%=dataname1%><%if (operation != null && !operation.equals("null")){%><%=operation%><%}%><%if (dataname2 != null && !dataname2.equals("null")){%><%=dataname2%><%}%></td>
@@ -128,7 +130,8 @@
   	<td class="${backgroundClass}" width="20%" align="center"><%=server_name%></td>
   	<td class="${backgroundClass}" width="15%" align="center"><%=timeframe%></td>
   	<td class="${backgroundClass}" width="20%" align="center"><%=dataname1%><%if (operation != null && !operation.equals("null")){%><%=operation%><%}%><%if (dataname2 != null && !dataname2.equals("null")){%><%=dataname2%><%}%></td>
-  	<td class="${backgroundClass}" width="15%" align="center"><img border=0 src="/monitoring/images/edit-b.png">Edit</td>
+  	<td class="${backgroundClass}" width="15%" align="center"><img
+					border=0 src="/monitoring/images/edit-b.png">Edit</td>
 	<%
 }%>
  </tr>

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp?rev=603683&r1=603682&r2=603683&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp (original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp Wed Dec 12 09:45:02 2007
@@ -310,7 +310,9 @@
  if (enabled)
  {
  	%>
-  	<td class="${backgroundClass}" width="30%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showGraph" /><portlet:param name="graph_id" value="<%=graph_id%>" /></portlet:actionURL>"><%=name%></a></td>
+  	<td class="${backgroundClass}" width="30%" align="center">
+  	    <a href="/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=graph_id%>" target="window.open('','','width=670,height=220,resizable=1')"><%=name %></a>
+  	</td>
   	<td class="${backgroundClass}" width="20%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><%=server_name%></a></td>
   	<td class="${backgroundClass}" width="15%" align="center"><%=timeframe%></td>
   	<td class="${backgroundClass}" width="20%" align="center"><%=dataname1%><%if (operation != null && !operation.equals("null")){%><%=operation%><%}%><%if (dataname2 != null && !dataname2.equals("null")){%><%=dataname2%><%}%></td>

Added: geronimo/sandbox/monitoring/client/client-war/src/main/webapp/monitoringPopUpGraph.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/webapp/monitoringPopUpGraph.jsp?rev=603683&view=auto
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/webapp/monitoringPopUpGraph.jsp (added)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/webapp/monitoringPopUpGraph.jsp Wed Dec 12 09:45:02 2007
@@ -0,0 +1,52 @@
+<%--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+--%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.sql.Connection" %>
+<%@ page import="java.sql.PreparedStatement" %>
+<%@ page import="java.sql.ResultSet" %>
+<%@ page import="org.apache.geronimo.plugins.monitoring.client.util.*" %>
+<%@page import="org.apache.geronimo.plugins.monitoring.client.GraphsBuilder"%>
+<%@page import="org.apache.geronimo.plugins.monitoring.client.StatsGraph"%>
+<portlet:defineObjects/>
+<script language="JavaScript" type="text/javascript">
+</script>
+
+<%
+Connection con = (new DBManager()).getConnection();
+GraphsBuilder graphBuilder = new GraphsBuilder(con);
+String graph_id = request.getParameter("graph_id");
+StatsGraph graph = graphBuilder.buildOneDB(Integer.parseInt(graph_id));
+String graphString = graph.getJS();
+String divImplString = graph.getDivImplement();
+String divNameString = graph.getName();
+%>
+
+<style type="text/css">
+    #graph0Container { margin: 0px; width: 670px; height: 240px; }
+</style>
+<script type='text/javascript' src='/dojo/dojo.js'></script>
+<script type='text/javascript'>
+    var dojoConfig = { isDebug:true };
+    dojo.require("dojo.collections.Store")
+    dojo.require("dojo.charting.Chart")
+    dojo.require("dojo.json")
+    <%=graphString%>
+</script>
+<div id="<%=divNameString%>Head" "style="background-color: #f2f2f2; border-top: 1px solid #2581c7; margin: 0px; width: 670px; height: 16px;"><div align="left" style="background-color: #f2f2f2; float:left; text-align:left; width:500px;"><%=divNameString%></div><div align=right style="background-color: #f2f2f2; float:left; width:170px; text-align:right;"><a href="#" onClick="hide(\'<%=divNameString%>\')"><img border=0 src="/monitoring/images/min-b.png"></a>&nbsp;<a href="#" onClick="show(\'<%=divNameString%>\')"><img border=0 src="/monitoring/images/max-b.png"></a>&nbsp;<a href="#" onClick="hide(\'<%=divNameString%>\');hide(\'<%=divNameString%>Head\');"><img border=0 src="/monitoring/images/close-b.png"> </a></div></div>
+<%=divImplString %>
\ No newline at end of file



Mime
View raw message