geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r718393 [2/2] - in /geronimo/server/trunk/plugins/monitoring: ./ agent-car-jmx/ agent-car-jmx/src/main/history/ agent-car-jmx/src/main/plan/ agent-ds/ agent-ds/src/main/plan/ agent-ejb/src/main/java/org/apache/geronimo/monitoring/ agent-ejb...
Date Mon, 17 Nov 2008 21:37:31 GMT
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
Mon Nov 17 13:37:30 2008
@@ -21,62 +21,57 @@
 import java.util.ArrayList;
 import java.util.Date;
 
+import org.apache.geronimo.monitoring.console.data.Graph;
+
 public class StatsGraph {
+
+    private Graph graph;
+
     private String GraphName;
-    private String DivName;
-    private String Description;
-    private String DivDefine;
-    private String DivImplement;
-    private String XAxisLabel;
-    private String YAxisLabel;
     private int SnapshotDuration;
-    private int TimeFrame;
     private int PointCount;
-    private String HexColor;
     private String GraphJS;
 
-    public StatsGraph(Integer graph_id, String graphName, String description,
-            String xAxisLabel, String yAxisLabel, char data1operation,
-            ArrayList<Object> dataSet1, String operation, char data2operation,
-            ArrayList<Object> dataSet2, ArrayList<Object> snapshotTimes,
-            int snapshotDuration, int timeFrame, String hexColor,
-            float warninglevel1, float warninglevel2) {
+    public StatsGraph(Graph graph,
+                      String graphName,
+                      ArrayList<Long> dataSet1,
+                      ArrayList<Long> dataSet2,
+                      ArrayList<Long> snapshotTimes,
+                      int snapshotDuration
+    ) {
+        this.graph = graph;
 
-        DivName = "graph" + graph_id + "Container";
         GraphName = graphName;
-        Description = description;
-        XAxisLabel = xAxisLabel;
-        YAxisLabel = yAxisLabel;
         SnapshotDuration = snapshotDuration;
-        TimeFrame = timeFrame;
         PointCount = dataSet1.size();
-        HexColor = hexColor;
 
-        DivImplement = "<div id=\"" + DivName
-                + "\" style=\"height: 220px;\"></div><br><div id='" + DivName
-                + "Sub' style='text-align: center;'>" + yAxisLabel + " vs. "
-                + xAxisLabel + "</div>" + "\n";
-
-        GraphJS = "var " + "graph" + graph_id
-                + " = new dojox.charting.Chart2D(\"" + DivName + "\");\n"
-                + "graph" + graph_id
+        String dataDisplay = displayData(graph.getData1operation(), dataSet1, graph.getOperation(),
graph.getData2operation(), dataSet2);
+
+        this.GraphJS = buildJavaScript(dataSet1, snapshotTimes, dataDisplay);
+    }
+
+    private String buildJavaScript(ArrayList<Long> dataSet1, ArrayList<Long>
snapshotTimes, String dataDisplay) {
+        String GraphJS = "var " + "graph" + graph.getId()
+                + " = new dojox.charting.Chart2D(\"" + getDivName() + "\");\n"
+                + "graph" + graph.getId()
                 + ".addPlot(\"default\", {type: \"Areas\", tension:3});\n" + "graph"
-                + graph_id + ".setTheme(dojox.charting.themes.PlotKit.blue);\n";
+//                + ".addPlot(\"default\", {type: \"Areas\"});\n" + "graph"
+                + graph.getId() + ".setTheme(dojox.charting.themes.PlotKit.blue);\n";
 
         // Setup the x tick marks on the chart
-        Format formatter = new SimpleDateFormat("HH:mm");
-        if ((timeFrame / 1440) > 7)
+        Format formatter;
+        if ((graph.getTimeFrame() / 1440) > 7)
             formatter = new SimpleDateFormat("M/d");
         else {
-            if ((timeFrame / 60) > 24)
+            if ((graph.getTimeFrame() / 60) > 24)
                 formatter = new SimpleDateFormat("E a");
             else {
                 formatter = new SimpleDateFormat("HH:mm");
             }
         }
-        GraphJS += "graph" + graph_id + ".addAxis(\"x\", {labels: [";
+        GraphJS += "graph" + graph.getId() + ".addAxis(\"x\", {labels: [";
         for (int i = 1; i < dataSet1.size(); i++) {
-            Date date = new Date((Long) snapshotTimes.get(i));
+            Date date = new Date(snapshotTimes.get(i));
             GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date);
             if ((i+1) != dataSet1.size())
                 GraphJS += "' }, \n";
@@ -84,129 +79,97 @@
             	GraphJS += "' } \n";
         }
         GraphJS += "]});\n";
-        GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
+        GraphJS += "graph" + graph.getId() + ".addAxis(\"y\", {vertical: true});\n";
 
-        GraphJS += "graph" + graph_id + ".addSeries(\"Series" + graph_id
+        GraphJS += "graph" + graph.getId() + ".addSeries(\"Series" + graph.getId()
                 + "\", [";
+        GraphJS = GraphJS + dataDisplay;
+
+        GraphJS = GraphJS + "]);\n";
+
+        GraphJS = GraphJS + "graph" + graph.getId() + ".render();\n";
+        return GraphJS;
+    }
+
+    private String displayData(char data1operation, ArrayList<Long> dataSet1, String
operation, char data2operation, ArrayList<Long> dataSet2) {
+        String graphJS = "";
         if (data1operation == 'D' && data2operation == 'D') {
             for (int i = 1; i < dataSet1.size(); i++) {
-                if (((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1)) < 0)
+                if ((dataSet1.get(i) - dataSet1.get(i - 1)) < 0)
                     dataSet1.set(i - 1, dataSet1.get(i));
-                GraphJS = GraphJS
-                        + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1));
+                graphJS = graphJS
+                        + (dataSet1.get(i) - dataSet1.get(i - 1));
                 // ensure there is not a division by 0
-                GraphJS += appendOperation(operation, (Long) dataSet2.get(i)
-                        - (Long) dataSet2.get(i - 1));
+                graphJS += appendOperation(operation, dataSet2.get(i)
+                        - dataSet2.get(i - 1));
                 if ((i+1) != dataSet1.size())
-                    GraphJS += ",";
+                    graphJS += ",";
             }
         }
         if (data1operation == 'D' && data2operation != 'D') {
             for (int i = 1; i < dataSet1.size(); i++) {
-                GraphJS = GraphJS
-                        + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1));
+                graphJS = graphJS
+                        + (dataSet1.get(i) - dataSet1.get(i - 1));
                 // ensure there is not a division by 0
-                GraphJS += appendOperation(operation, (Long) dataSet2.get(i));
+                graphJS += appendOperation(operation, dataSet2.get(i));
                 if ((i+1) != dataSet1.size())
-                    GraphJS += ",";
+                    graphJS += ",\n";
             }
         }
         if (data1operation != 'D' && data2operation == 'D') {
             for (int i = 1; i < dataSet1.size(); i++) {
-                GraphJS = GraphJS + dataSet1.get(i);
+                graphJS = graphJS + dataSet1.get(i);
                 // ensure there is not a division by 0
-                GraphJS += appendOperation(operation, (Long) dataSet2.get(i)
-                        - (Long) dataSet2.get(i - 1));
+                graphJS += appendOperation(operation, dataSet2.get(i)
+                        - dataSet2.get(i - 1));
                 if ((i+1) != dataSet1.size())
-                    GraphJS += ",";
+                    graphJS += ",\n";
             }
         }
         if (data1operation != 'D' && data2operation != 'D') {
             for (int i = 1; i < dataSet1.size(); i++) {
-                GraphJS = GraphJS + dataSet1.get(i);
+                graphJS = graphJS + dataSet1.get(i);
                 // ensure there is not a division by 0
-                GraphJS += appendOperation(operation, (Long) dataSet2.get(i));
+                graphJS += appendOperation(operation, dataSet2.get(i));
                 if ((i+1) != dataSet1.size())
-                    GraphJS += ",";
+                    graphJS += ",";
             }
         }
-
-        GraphJS = GraphJS + "]);\n";
-
-        GraphJS = GraphJS + "graph" + graph_id + ".render();\n";
-
+        return graphJS;
     }
 
-    public StatsGraph(Integer graph_id, String graphName, String description,
-            String xAxisLabel, String yAxisLabel, char data1operation,
-            ArrayList<Object> dataSet1, String operation,
-            ArrayList<Object> snapshotTimes, int snapshotDuration,
-            int timeFrame, String hexColor, float warninglevel1,
-            float warninglevel2) {
+    public StatsGraph(Graph graph,
+                      String graphName,
+                      ArrayList<Long> dataSet1,
+                      ArrayList<Long> snapshotTimes, int snapshotDuration
+    ) {
+
+        this.graph = graph;
 
-        DivName = "graph" + graph_id + "Container";
         GraphName = graphName;
-        Description = description;
-        XAxisLabel = xAxisLabel;
-        YAxisLabel = yAxisLabel;
         SnapshotDuration = snapshotDuration;
-        TimeFrame = timeFrame;
         PointCount = dataSet1.size();
-        HexColor = hexColor;
-
-        DivImplement = "<div id=\"" + DivName
-                + "\" style=\"height: 220px;\"></div><br><div id='" + DivName
-                + "Sub' style='text-align: center;'>" + yAxisLabel + " vs. "
-                + xAxisLabel + "</div>" + "\n";
-
-        GraphJS = "var " + "graph" + graph_id
-                + " = new dojox.charting.Chart2D(\"" + DivName + "\");\n"
-                + "graph" + graph_id
-                + ".addPlot(\"default\", {type: \"Areas\", tension:3});\n" + "graph"
-                + graph_id + ".setTheme(dojox.charting.themes.PlotKit.blue);\n";
+        String dataDisplay = displayData(graph.getData1operation(), dataSet1, graph.getOperation());
 
-        // Setup the x tick marks on the chart
-        Format formatter = new SimpleDateFormat("HH:mm");
-        if ((timeFrame / 1440) > 7)
-            formatter = new SimpleDateFormat("M/d");
-        else {
-            if ((timeFrame / 60) > 24)
-                formatter = new SimpleDateFormat("E a");
-            else {
-                formatter = new SimpleDateFormat("HH:mm");
-            }
-        }
-        GraphJS += "graph" + graph_id + ".addAxis(\"x\", {labels: [";
-        for (int i = 1; i < dataSet1.size(); i++) {
-            Date date = new Date((Long) snapshotTimes.get(i));
-            GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date);
-            if ((i+1) != dataSet1.size())
-                GraphJS += "' }, \n";
-            else
-            	GraphJS += "' } \n";
-        }
-        GraphJS += "]});\n";
-        GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
+        this.GraphJS = buildJavaScript(dataSet1, snapshotTimes, dataDisplay);
+    }
 
-        GraphJS += "graph" + graph_id + ".addSeries(\"Series" + graph_id
-                + "\", [";
+    private String displayData(char data1operation, ArrayList<Long> dataSet1, String
operation) {
+        String graphJS = "";
         if (data1operation == 'D')
             for (int i = 1; i < dataSet1.size(); i++) {
-                GraphJS = GraphJS
-                        + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1)) + operation;
+                graphJS = graphJS
+                        + (dataSet1.get(i) - dataSet1.get(i - 1)) + operation;
                 if ((i+1) != dataSet1.size())
-                    GraphJS += ",\n";
+                    graphJS += ",\n";
             }
         if (data1operation != 'D')
             for (int i = 1; i < dataSet1.size(); i++) {
-                GraphJS = GraphJS + dataSet1.get(i) + operation;
+                graphJS = graphJS + dataSet1.get(i) + operation;
                 if ((i+1) != dataSet1.size())
-                    GraphJS += ",\n";
+                    graphJS += ",\n";
             }
-
-        GraphJS = GraphJS + "]);\n";
-
-        GraphJS = GraphJS + "graph" + graph_id + ".render();\n";
+        return graphJS;
     }
 
     private String appendOperation(String operation, Long number) {
@@ -232,24 +195,23 @@
         return GraphJS;
     }
 
-    public String getDiv() {
-        return DivDefine;
-    }
-
     public String getDivImplement() {
-        return DivImplement;
+        return "<div id=\"" + getDivName()
+                + "\" style=\"height: 220px;\"></div><br><div id='" + getDivName()
+                + "Sub' style='text-align: center;'>" + graph.getYlabel() + " vs. "
+                + graph.getXlabel() + "</div>" + "\n";
     }
 
     public String getDivName() {
-        return DivName;
+        return "graph" + graph.getId() + "Container";
     }
 
     public String getXAxis() {
-        return XAxisLabel;
+        return graph.getXlabel();
     }
 
     public String getYAxis() {
-        return YAxisLabel;
+        return graph.getYlabel();
     }
 
     public String getName() {
@@ -257,7 +219,7 @@
     }
 
     public String getDescription() {
-        return Description;
+        return graph.getDescription();
     }
 
     public int getSnapshotDuration() {
@@ -265,7 +227,7 @@
     }
 
     public int getTimeFrame() {
-        return TimeFrame;
+        return graph.getTimeFrame();
     }
 
     public int getPointCount() {
@@ -273,6 +235,6 @@
     }
 
     public String getColor() {
-        return HexColor;
+        return graph.getColor();
     }
 }

Added: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java?rev=718393&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
(added)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
Mon Nov 17 13:37:30 2008
@@ -0,0 +1,232 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.geronimo.monitoring.console.data;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.NamedQuery;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+@Entity(name="graph")
+@NamedQuery(name="graphById", query="SELECT a FROM graph a WHERE a.id = :id")
+public class Graph {
+
+    @Id
+    private int id;
+//    private String name;
+//    private String description;
+//    private int timeFrame;
+//    private String divDefine;
+//    private String divImplement;
+//    private String xAxisLabel;
+//    private String yAxisLabel;
+//    private int snapshotDuration;
+//    private int pointCount;
+//    private String hexColor;
+//    private boolean enabled = true;
+//    private boolean archive = false;
+//
+//    private int server_id;
+//    private String mbeanName;
+//    private char data1operation;
+
+    private String mBeanName;
+    private String dataName1;
+    private String dataName2;
+    private String graphName1;
+    private String graphName2;
+    private int timeFrame;
+    private String server_id;
+    private String xlabel;
+    private String ylabel;
+    private char data1operation = 'A';
+    private char data2operation = 'A';
+    private String operation;
+    private String color;
+    private float warninglevel1;
+    private String description;
+    private boolean showArchive;
+
+
+    /**
+                                  + "graph_id    INTEGER PRIMARY KEY NOT NULL GENERATED ALWAYS
AS IDENTITY (START WITH 0, INCREMENT BY 1),"
+                            + "enabled     SMALLINT NOT NULL DEFAULT 1,"
+                            + "server_id   INTEGER NOT NULL DEFAULT 0,"
+                            + "name        VARCHAR(128) UNIQUE NOT NULL,"
+                            + "description LONG VARCHAR DEFAULT NULL,"
+                            + "timeframe   INTEGER NOT NULL DEFAULT 60,"
+                            + "mbean       VARCHAR(512) NOT NULL,"
+                            + "data1operation  CHAR DEFAULT NULL,"
+                            + "dataname1   VARCHAR(128) NOT NULL,"
+                            + "operation   VARCHAR(128) DEFAULT NULL,"
+                            + "data2operation  CHAR DEFAULT NULL,"
+                            + "dataname2   VARCHAR(128) DEFAULT NULL,"
+                            + "xlabel      VARCHAR(128) DEFAULT NULL,"
+                            + "ylabel      VARCHAR(128) DEFAULT NULL,"
+                            + "warninglevel1   FLOAT DEFAULT NULL,"
+                            + "warninglevel2   FLOAT DEFAULT NULL,"
+                            + "color       VARCHAR(6) NOT NULL DEFAULT '1176c2',"
+                            + "last_js     LONG VARCHAR DEFAULT NULL,"
+                            + "added       TIMESTAMP NOT NULL,"
+                            + "modified    TIMESTAMP NOT NULL,"
+                            + "archive     SMALLINT NOT NULL DEFAULT 0,"
+                            + "last_seen   TIMESTAMP NOT NULL" + ")");
+
+     */
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getMBeanName() {
+        return mBeanName;
+    }
+
+    public void setMBeanName(String mBeanName) {
+        this.mBeanName = mBeanName;
+    }
+
+    public String getDataName1() {
+        return dataName1;
+    }
+
+    public void setDataName1(String dataName1) {
+        this.dataName1 = dataName1;
+    }
+
+    public String getDataName2() {
+        return dataName2;
+    }
+
+    public void setDataName2(String dataName2) {
+        this.dataName2 = dataName2;
+    }
+
+    public String getGraphName1() {
+        return graphName1;
+    }
+
+    public void setGraphName1(String graphName1) {
+        this.graphName1 = graphName1;
+    }
+
+    public String getGraphName2() {
+        return graphName2;
+    }
+
+    public void setGraphName2(String graphName2) {
+        this.graphName2 = graphName2;
+    }
+
+    public int getTimeFrame() {
+        return timeFrame;
+    }
+
+    public void setTimeFrame(int timeFrame) {
+        this.timeFrame = timeFrame;
+    }
+
+    public String getServer_id() {
+        return server_id;
+    }
+
+    public void setServer_id(String server_id) {
+        this.server_id = server_id;
+    }
+
+    public String getXlabel() {
+        return xlabel;
+    }
+
+    public void setXlabel(String xlabel) {
+        this.xlabel = xlabel;
+    }
+
+    public String getYlabel() {
+        return ylabel;
+    }
+
+    public void setYlabel(String ylabel) {
+        this.ylabel = ylabel;
+    }
+
+    public char getData1operation() {
+        return data1operation;
+    }
+
+    public void setData1operation(char data1operation) {
+        this.data1operation = data1operation;
+    }
+
+    public char getData2operation() {
+        return data2operation;
+    }
+
+    public void setData2operation(char data2operation) {
+        this.data2operation = data2operation;
+    }
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public String getColor() {
+        return color;
+    }
+
+    public void setColor(String color) {
+        this.color = color;
+    }
+
+    public float getWarninglevel1() {
+        return warninglevel1;
+    }
+
+    public void setWarninglevel1(float warninglevel1) {
+        this.warninglevel1 = warninglevel1;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public boolean isShowArchive() {
+        return showArchive;
+    }
+
+    public void setShowArchive(boolean showArchive) {
+        this.showArchive = showArchive;
+    }
+}

Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/data/Graph.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddGraph.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddGraph.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddGraph.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddGraph.jsp
Mon Nov 17 13:37:30 2008
@@ -16,20 +16,15 @@
 --%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
-<%@ page import="org.apache.geronimo.monitoring.console.StatsGraph"%>
-<%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder"%>
 <%@ page import="java.util.Set"%>
 <%@ page import="java.util.Iterator"%>
-<%@ page import="java.util.HashMap"%>
 <%@ page import="java.util.TreeMap"%>
 <%@ page import="java.util.ArrayList"%>
 <%@ page import="java.lang.String"%>
 <%@ 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.monitoring.console.util.*"%>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager"%>
 <%@ page import="org.apache.geronimo.monitoring.console.MRCConnector"%>
 <portlet:defineObjects />
 

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
Mon Nov 17 13:37:30 2008
@@ -16,19 +16,8 @@
 --%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
-<%@ page import="org.apache.geronimo.monitoring.console.StatsGraph" %>
-<%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder" %>
-<%@ page import="java.util.Set" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.HashMap" %>
-<%@ page import="java.util.TreeMap" %>
 <%@ page import="java.lang.String" %>
-<%@ 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.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.Constants" %>
 <portlet:defineObjects/>
 
 <%
@@ -68,7 +57,7 @@
 
     <style type='text/css'>
     </style>
-    <script type='text/javascript' src='/dojo/dojo.js'>
+    <script type='text/javascript' src='<%=Constants.DOJO_JS%>'>
     </script>
         <script type = "text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp
Mon Nov 17 13:37:30 2008
@@ -29,7 +29,8 @@
 <%@ page import="java.sql.PreparedStatement" %>
 <%@ page import="java.sql.ResultSet" %>
 <%@ page import="java.sql.SQLException" %>
-<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
+<%@ page import="org.apache.geronimo.monitoring.console.Constants" %>
 <portlet:defineObjects/>
 
 <%
@@ -42,7 +43,7 @@
 
 %>
 <!-- <head> -->
-    <script type='text/javascript' src='/dojo/dojo.js'>
+    <script type='text/javascript' src='<%=Constants.DOJO_JS%>'>
     </script>
         <script type = "text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditGraph.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditGraph.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditGraph.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditGraph.jsp
Mon Nov 17 13:37:30 2008
@@ -16,20 +16,15 @@
 --%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
-<%@ page import="org.apache.geronimo.monitoring.console.StatsGraph" %>
-<%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder" %>
 <%@ page import="java.util.Set" %>
 <%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.HashMap" %>
 <%@ page import="java.util.TreeMap" %>
 <%@ page import="java.util.ArrayList" %>
 <%@ page import="java.lang.String" %>
 <%@ 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.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
 <portlet:defineObjects/>
 

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
Mon Nov 17 13:37:30 2008
@@ -18,21 +18,14 @@
 --%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
-<%@ page import="org.apache.geronimo.monitoring.console.StatsGraph" %>
-<%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder" %>
-<%@ page import="java.util.Set" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.HashMap" %>
-<%@ page import="java.util.TreeMap" %>
 <%@ page import="java.lang.String" %>
 <%@ 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.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
 <%@ page import="org.apache.geronimo.crypto.EncryptionManager" %>
+<%@ page import="org.apache.geronimo.monitoring.console.Constants" %>
 
 <portlet:defineObjects/>
 
@@ -125,7 +118,7 @@
 
     <style type='text/css'>
     </style>
-    <script type='text/javascript' src='/dojo/dojo.js'>
+    <script type='text/javascript' src='<%=Constants.DOJO_JS%>'>
     </script>
         <script type = "text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
Mon Nov 17 13:37:30 2008
@@ -16,20 +16,13 @@
 --%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
-<%@ page import="org.apache.geronimo.monitoring.console.StatsGraph" %>
-<%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder" %>
-<%@ page import="java.util.Set" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.HashMap" %>
-<%@ page import="java.util.TreeMap" %>
 <%@ page import="java.util.ArrayList" %>
 <%@ page import="java.lang.String" %>
 <%@ 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.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
+<%@ page import="org.apache.geronimo.monitoring.console.Constants" %>
 <portlet:defineObjects/>
 
 <%
@@ -59,7 +52,7 @@
 %>
 <!-- <head> -->
 
-    <script type='text/javascript' src='/dojo/dojo.js'>
+    <script type='text/javascript' src='<%=Constants.DOJO_JS%>'>
     </script>
         <script type = "text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
Mon Nov 17 13:37:30 2008
@@ -21,9 +21,7 @@
 <%@ page import="java.sql.Connection" %>
 <%@ page import="java.sql.PreparedStatement" %>
 <%@ page import="java.sql.ResultSet" %>
-<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
-<%@page import="org.apache.geronimo.monitoring.console.GraphsBuilder"%>
-<%@page import="org.apache.geronimo.monitoring.console.StatsGraph"%>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <portlet:defineObjects/>
 <script language="JavaScript" type="text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
Mon Nov 17 13:37:30 2008
@@ -24,7 +24,7 @@
 <%@ page import="java.sql.ResultSet" %>
 <%@ page import="java.sql.SQLException" %>
 <%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
-<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <portlet:defineObjects/>
 <script type = "text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp
Mon Nov 17 13:37:30 2008
@@ -19,13 +19,11 @@
 <%@ page import="org.apache.geronimo.monitoring.console.StatsGraph" %>
 <%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder" %>
 <%@ page import="java.util.ArrayList" %>
-<%@ page import="java.util.Set" %>
 <%@ 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.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
+<%@ page import="org.apache.geronimo.monitoring.console.Constants" %>
 <portlet:defineObjects/>
 
 <%
@@ -37,8 +35,8 @@
 
 PreparedStatement pStmt = con.prepareStatement("SELECT view_id, name, description, graph_count,
added, modified FROM views WHERE enabled=1 AND view_id="+view_id);
 ResultSet rs = pStmt.executeQuery();
-GraphsBuilder run = new GraphsBuilder(con);
-String errors = new String("");
+GraphsBuilder run = new GraphsBuilder();
+String errors = "";
 
 if (rs.next())
 {
@@ -76,7 +74,7 @@
     
 %>
 <!-- <head> -->
-    <script type='text/javascript' src='/dojo/dojo/dojo.js' djConfig='isDebug: false,
parseOnLoad: true'>
+    <script type='text/javascript' src='<%=Constants.DOJO_JS%>' djConfig='isDebug:
false, parseOnLoad: true'>
     </script>
         <script type = "text/javascript">
 <!--

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp
Mon Nov 17 13:37:30 2008
@@ -18,12 +18,10 @@
 <%@ 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.monitoring.console.MRCConnector" %>
-<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <portlet:defineObjects/>
 <%
     String message = (String) request.getAttribute("message"); 

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp
Mon Nov 17 13:37:30 2008
@@ -16,23 +16,17 @@
 --%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
-<%@ page import="org.apache.geronimo.monitoring.console.StatsGraph" %>
-<%@ page import="org.apache.geronimo.monitoring.console.GraphsBuilder" %>
 <%@ page import="java.util.ArrayList" %>
 <%@ page import="java.util.Set" %>
 <%@ page import="java.util.HashMap" %>
 <%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.Map" %>
 <%@ page import="java.util.TreeMap" %>
 <%@ page import="java.lang.String" %>
 <%@ 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="java.sql.Timestamp" %>
 <%@ page import="javax.management.InstanceNotFoundException" %>
-<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
 <portlet:defineObjects/>
 

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp
Mon Nov 17 13:37:30 2008
@@ -17,13 +17,10 @@
 --%>
 <%@ 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.DatabaseMetaData" %>
 <%@ page import="java.sql.PreparedStatement" %>
 <%@ page import="java.sql.ResultSet" %>
-<%@ page import="java.sql.SQLException" %>
-<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <portlet:defineObjects/>
 <%
     String message = (String) request.getAttribute("message"); 

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp
Mon Nov 17 13:37:30 2008
@@ -16,19 +16,17 @@
 --%>
 <%@ 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.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.DBManager" %>
 <%@page import="org.apache.geronimo.monitoring.console.GraphsBuilder"%>
 <%@page import="org.apache.geronimo.monitoring.console.StatsGraph"%>
+<%@page import="org.apache.geronimo.monitoring.console.Constants"%>
 <portlet:defineObjects/>
 <html>
 <head>
 <%
 Connection con = (new DBManager()).getConnection();
-GraphsBuilder graphBuilder = new GraphsBuilder(con);
+GraphsBuilder graphBuilder = new GraphsBuilder();
 String graph_id = request.getParameter("graph_id");
 StatsGraph graph = graphBuilder.buildOneDB(Integer.parseInt(graph_id));
 String graphString = graph.getJS();
@@ -38,7 +36,7 @@
 String yAxis = graph.getYAxis();
 %>
 
-<script type='text/javascript' src='/dojo/dojo/dojo.js' djConfig='isDebug: false, parseOnLoad:
true'></script>
+<script type='text/javascript' src='<%=Constants.DOJO_JS%>' djConfig='isDebug: false,
parseOnLoad: true'></script>
 <script type='text/javascript'>
     dojo.require("dojox.charting.Chart2D");
     dojo.require("dojox.charting.themes.PlotKit.blue");

Modified: geronimo/server/trunk/plugins/monitoring/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/pom.xml?rev=718393&r1=718392&r2=718393&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/pom.xml (original)
+++ geronimo/server/trunk/plugins/monitoring/pom.xml Mon Nov 17 13:37:30 2008
@@ -14,13 +14,7 @@
     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.
--->
-
-<!-- $Rev$ $Date$ -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+--><!-- $Rev$ $Date$ --><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -85,4 +79,13 @@
         </pluginManagement>
     </build>
 
-</project>
+    <profiles>
+        <profile>
+            <id>it</id>
+            <modules>
+                <module>mconsole-jetty-server</module>
+            </modules>
+        </profile>
+    </profiles>
+
+</project>
\ No newline at end of file



Mime
View raw message