You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ec...@apache.org on 2008/02/06 12:26:26 UTC
svn commit: r618967 - in
/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main:
java/org/apache/geronimo/monitoring/console/ webapp/ webapp/WEB-INF/view/
Author: ecraig
Date: Wed Feb 6 03:26:22 2008
New Revision: 618967
URL: http://svn.apache.org/viewvc?rev=618967&view=rev
Log:
GERONIMO-3633
Monitoring client should auto redraw graphs/the page on any page that has graphs
GERONIMO-3818
Monitoring console should open individual graphs in actual new window rather than tabs in firefox
GERONIMO-3817
mconsole should display axis labels
Modified:
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddView.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditView.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringGraphs.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringNormal.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringPage.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java?rev=618967&r1=618966&r2=618967&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/GraphsBuilder.java Wed Feb 6 03:26:22 2008
@@ -138,10 +138,11 @@
TreeMap<Long, Long> snapshotList1 = mrc
.getSpecificStatistics(mBeanName, dataName1, snapCount,
skipCount, showArchive);
- TreeMap<Long, Long> snapshotList2 = new TreeMap<Long,Long>();
- if ((dataName2 != null) && !dataName2.equals("time") && !dataName2.equals("null") && !dataName2.equals(""))
- {
- snapshotList2 = mrc.getSpecificStatistics(mBeanName, dataName2, snapCount, skipCount, showArchive);
+ TreeMap<Long, Long> snapshotList2 = new TreeMap<Long, Long>();
+ if ((dataName2 != null) && !dataName2.equals("time")
+ && !dataName2.equals("null") && !dataName2.equals("")) {
+ snapshotList2 = mrc.getSpecificStatistics(mBeanName,
+ dataName2, snapCount, skipCount, showArchive);
}
// Check if snapshotList is empty
if (snapshotList1.size() == 0) {
@@ -158,21 +159,26 @@
// then
// add
// that to the tempMap
- snapshotList1.put(
- (timeFix - (mrc.getSnapshotDuration() * skipCount)), new Long(0));
+ snapshotList1
+ .put(
+ (timeFix - (mrc.getSnapshotDuration() * skipCount)),
+ new Long(0));
}
}
- if (snapshotList2.size() == 0){
- snapshotList2.put(System.currentTimeMillis(), new Long(0));
- while (snapshotList2.size() < snapCount) {
+ if (snapshotList2.size() == 0) {
+ snapshotList2.put(System.currentTimeMillis(), new Long(0));
+ while (snapshotList2.size() < snapCount) {
// Temporary, always is first element (oldest)
Long timeFix = snapshotList2.firstKey();
- snapshotList2.put(
- (timeFix - (mrc.getSnapshotDuration() * skipCount)), new Long(0));
+ snapshotList2
+ .put(
+ (timeFix - (mrc.getSnapshotDuration() * skipCount)),
+ new Long(0));
}
}
- for (Iterator<Long> it = snapshotList1.keySet().iterator(); it.hasNext();) {
+ for (Iterator<Long> it = snapshotList1.keySet().iterator(); it
+ .hasNext();) {
Long current = it.next();
snapshot_time.add(current);
ArrayList<Object> ArrayListTemp = DataList.get(graphName1);
@@ -191,34 +197,32 @@
if (dataName2.equals("time")) {
graph = (new StatsGraph(graph_id, ip + " - " + xlabel
- + " - " + prettyTimeFrame, description, "Time - "
- + prettyTimeFrame, ylabel,
- data1operation.charAt(0), DataList.get(graphName1),
- operation, data2operation.charAt(0), PrettyTime,
- snapshot_time,
+ + " - " + prettyTimeFrame, description, xlabel,
+ ylabel, data1operation.charAt(0), DataList
+ .get(graphName1), operation, data2operation
+ .charAt(0), PrettyTime, snapshot_time,
(int) (mrc.getSnapshotDuration() / 1000),
timeFrame, color, warninglevel1, warninglevel1));
} else if (!dataName2.equals("time") && (dataName2 != null)
&& !dataName2.equals("null") && !dataName2.equals("")) {
graph = (new StatsGraph(graph_id, ip + " - " + xlabel
- + " - " + prettyTimeFrame, description, "Time - "
- + prettyTimeFrame, ylabel,
- data1operation.charAt(0), DataList.get(graphName1),
- operation, data2operation.charAt(0), DataList
- .get(graphName2), snapshot_time, (int) (mrc
- .getSnapshotDuration() / 1000), timeFrame,
- color, warninglevel1, warninglevel1));
+ + " - " + prettyTimeFrame, description, xlabel,
+ ylabel, data1operation.charAt(0), DataList
+ .get(graphName1), operation, data2operation
+ .charAt(0), DataList.get(graphName2),
+ snapshot_time,
+ (int) (mrc.getSnapshotDuration() / 1000),
+ timeFrame, color, warninglevel1, warninglevel1));
} else if (dataName2 == null || dataName2.equals("null")
|| dataName2.equals("")) {
- graph = (new StatsGraph(graph_id, ip + " - " + xlabel
- + " - " + prettyTimeFrame, description, "Time - "
- + prettyTimeFrame, ylabel,
- data1operation.charAt(0), DataList.get(graphName1),
- operation, snapshot_time, (int) (mrc
- .getSnapshotDuration() / 1000), timeFrame,
- color, warninglevel1, warninglevel1));
+ graph = (new StatsGraph(graph_id, ip + " - " + xlabel
+ + " - " + prettyTimeFrame, description, xlabel,
+ ylabel, data1operation.charAt(0), DataList
+ .get(graphName1), operation, snapshot_time,
+ (int) (mrc.getSnapshotDuration() / 1000),
+ timeFrame, color, warninglevel1, warninglevel1));
} else {
- System.out.println("Using Null call.");
+ System.out.println("Using Null call.");
graph = (new StatsGraph());
}
}
@@ -243,4 +247,3 @@
return graph;
}
}
-
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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -35,23 +35,12 @@
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(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) {
DivName = "graph" + graph_id + "Container";
GraphName = graphName;
@@ -63,12 +52,17 @@
PointCount = dataSet1.size();
HexColor = hexColor;
- DivImplement = "<div id=\"" + DivName + "\" style=\"height: 220px;\"></div>" + "\n";
+ 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\"});\n" + "graph"
+ + graph_id + ".setTheme(dojox.charting.themes.PlotKit.blue);\n";
- GraphJS = "var " + "graph" + graph_id + " = new dojox.charting.Chart2D(\""+DivName+"\");\n"+
- "graph" + graph_id + ".addPlot(\"default\", {type: \"Areas\"});\n"+
- "graph" + graph_id + ".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)
@@ -88,20 +82,22 @@
}
GraphJS += "]});\n";
GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
-
- GraphJS += "graph" + graph_id + ".addSeries(\"Series"+graph_id+"\", [";
+
+ GraphJS += "graph" + graph_id + ".addSeries(\"Series" + graph_id
+ + "\", [";
if (data1operation == 'D' && data2operation == 'D') {
for (int i = 1; i < dataSet1.size(); i++) {
if (((Long) dataSet1.get(i) - (Long) 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
+ + ((Long) dataSet1.get(i) - (Long) 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, (Long) dataSet2.get(i)
+ - (Long) dataSet2.get(i - 1));
GraphJS += ",";
}
}
- if (data1operation == 'D' && data2operation != 'D')
- {
+ if (data1operation == 'D' && data2operation != 'D') {
for (int i = 1; i < dataSet1.size(); i++) {
GraphJS = GraphJS
+ ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1));
@@ -110,17 +106,16 @@
GraphJS += ",";
}
}
- if (data1operation != 'D' && data2operation == 'D')
- {
+ if (data1operation != 'D' && data2operation == 'D') {
for (int i = 1; i < dataSet1.size(); 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, (Long) dataSet2.get(i)
+ - (Long) dataSet2.get(i - 1));
GraphJS += ",";
}
}
- if (data1operation != 'D' && data2operation != 'D')
- {
+ if (data1operation != 'D' && data2operation != 'D') {
for (int i = 1; i < dataSet1.size(); i++) {
GraphJS = GraphJS + dataSet1.get(i);
// ensure there is not a division by 0
@@ -152,42 +147,48 @@
PointCount = dataSet1.size();
HexColor = hexColor;
- DivImplement = "<div id=\"" + DivName + "\" style=\"height: 220px;\"></div>" + "\n";
+ 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\"});\n" + "graph"
+ + graph_id + ".setTheme(dojox.charting.themes.PlotKit.blue);\n";
- GraphJS = "var " + "graph" + graph_id + " = new dojox.charting.Chart2D(\""+DivName+"\");\n"+
- "graph" + graph_id + ".addPlot(\"default\", {type: \"Areas\"});\n"+
- "graph" + graph_id + ".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)
- formatter = new SimpleDateFormat("M/d");
+ // 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 {
- 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)
- + "' }, \n";
- }
- GraphJS += "]});\n";
- GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
-
- GraphJS += "graph" + graph_id + ".addSeries(\"Series"+graph_id+"\", [";
+ 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)
+ + "' }, \n";
+ }
+ GraphJS += "]});\n";
+ GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
+
+ GraphJS += "graph" + graph_id + ".addSeries(\"Series" + graph_id
+ + "\", [";
if (data1operation == 'D')
for (int i = 1; i < dataSet1.size(); i++) {
- GraphJS = GraphJS + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1))
+ GraphJS = GraphJS
+ + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1))
+ operation + ",\n";
}
if (data1operation != 'D')
for (int i = 1; i < dataSet1.size(); i++) {
- GraphJS = GraphJS + dataSet1.get(i)
- + operation + ",\n";
+ GraphJS = GraphJS + dataSet1.get(i) + operation + ",\n";
}
GraphJS = GraphJS + "]);\n";
@@ -262,4 +263,3 @@
return HexColor;
}
}
-
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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -42,9 +42,6 @@
%>
<!-- <head> -->
-
- <style type='text/css'>
- </style>
<script type='text/javascript' src='/dojo/dojo.js'>
</script>
<script type = "text/javascript">
@@ -65,6 +62,10 @@
return;
}
+function openNewWindow(theURL,winName,features) {
+ window.open(theURL,winName,features);
+}
+
//-->
</script>
<!-- </head> -->
@@ -127,7 +128,7 @@
%>
<tr>
<td align="left" width="5%"><input type="checkbox" name="graph_ids" value="<%=rs.getString("graph_id")%>"></td>
- <td align="left"><a href="/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=rs.getString("graph_id")%>" target="window.open('','','width=670,height=220,resizable=1')"><%=rs.getString("name")%></a></td>
+ <td align="left"><a href="javascript: void(0)" onClick="openNewWindow('/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=rs.getString("graph_id")%>','graph','width=800,height=300','title=<%=rs.getString("name") %>')"><%=rs.getString("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/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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -59,8 +59,6 @@
%>
<!-- <head> -->
- <style type='text/css'>
- </style>
<script type='text/javascript' src='/dojo/dojo.js'>
</script>
<script type = "text/javascript">
@@ -81,6 +79,11 @@
return;
}
+
+function openNewWindow(theURL,winName,features) {
+ window.open(theURL,winName,features);
+}
+
//-->
</script>
<!-- </head> -->
@@ -160,7 +163,7 @@
%>
<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="/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=rs.getString("graph_id")%>" target="window.open('','','width=670,height=220,resizable=1')"><%=rs.getString("name")%></a></td>
+ <td align="left"><a href="javascript: void(0)" onClick="openNewWindow('/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=rs.getString("graph_id")%>','graph','width=800,height=300','title=<%=rs.getString("name") %>')"><%=rs.getString("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/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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -26,6 +26,11 @@
<%@page import="org.apache.geronimo.monitoring.console.StatsGraph"%>
<portlet:defineObjects/>
<script language="JavaScript" type="text/javascript">
+<!--
+function openNewWindow(theURL,winName,features) {
+ window.open(theURL,winName,features);
+}
+//-->
</script>
<%
String message = (String) request.getAttribute("message");
@@ -116,7 +121,7 @@
{
%>
<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>
+ <a href="javascript: void(0)" onClick="openNewWindow('/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=graph_id%>','graph','width=800,height=300','title=<%=name %>')"><%=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>
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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -26,6 +26,13 @@
<%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
<portlet:defineObjects/>
+<script type = "text/javascript">
+<!--
+function openNewWindow(theURL,winName,features) {
+ window.open(theURL,winName,features);
+}
+//-->
+</script>
<%
String message = (String) request.getAttribute("message");
if (message != null)
@@ -328,7 +335,7 @@
{
%>
<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>
+ <a href="javascript: void(0)" onClick="openNewWindow('/monitoring/monitoringPopUpGraph.jsp?graph_id=<%=graph_id%>','graph','width=800,height=300','title=<%=name %>')"><%=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>
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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -101,6 +101,12 @@
};
dojo.addOnLoad(makeObjects);
+function refreshPeriodic() {
+ // Reload the page every 5 minutes
+ location.reload();
+ timerID = setTimeout("refreshPeriodic()",300000);
+}
+timerID = setTimeout("refreshPeriodic()",300000);
</script>
<!-- </head> -->
@@ -122,7 +128,7 @@
{
%>
<p>
-<div id="<%=graph.getDivName()%>Head" style="background-color: #f2f2f2; border-top: 1px solid #2581c7; margin: 0px; width: 100%; height: 16px;"><div align="left" style="background-color: #f2f2f2; float:left; text-align:left; width:75%; height: 20px;"><%=graph.getName() %></div><div align=right style="background-color: #f2f2f2; float:left; width:25%; text-align:right;"><a href="#" onClick="hide('<%=graph.getDivName()%>')"><img border=0 src="/monitoring/images/min-b.png"></a> <a href="#" onClick="show('<%=graph.getDivName()%>')"><img border=0 src="/monitoring/images/max-b.png"></a> <a href="#" onClick="hide('<%=graph.getDivName()%>');hide('<%=graph.getDivName()%>Head');"><img border=0 src="/monitoring/images/close-b.png"> </a></div></div>
+<div id="<%=graph.getDivName()%>Head" style="background-color: #f2f2f2; border-top: 1px solid #2581c7; margin: 0px; width: 100%; height: 16px;"><div align="left" style="background-color: #f2f2f2; float:left; text-align:left; width:75%; height: 20px;"><%=graph.getName() %></div><div align=right style="background-color: #f2f2f2; float:left; width:25%; text-align:right;"><a href="#" onClick="hide('<%=graph.getDivName()%>');hide('<%=graph.getDivName()%>Sub');"><img border=0 src="/monitoring/images/min-b.png"></a> <a href="#" onClick="show('<%=graph.getDivName()%>');show('<%=graph.getDivName()%>Sub');"><img border=0 src="/monitoring/images/max-b.png"></a></div></div>
<%=graph.getDivImplement()%>
</p>
<%
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=618967&r1=618966&r2=618967&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 Wed Feb 6 03:26:22 2008
@@ -34,6 +34,8 @@
String graphString = graph.getJS();
String divImplString = graph.getDivImplement();
String divNameString = graph.getName();
+String xAxis = graph.getXAxis();
+String yAxis = graph.getYAxis();
%>
<script type='text/javascript' src='/dojo/dojo/dojo.js' djConfig='isDebug: false, parseOnLoad: true'></script>
@@ -46,10 +48,16 @@
<%=graphString%>
};
dojo.addOnLoad(makeObjects);
+ function refreshPeriodic() {
+ // Reload the page every 5 minutes
+ location.reload();
+ timerID = setTimeout("refreshPeriodic()",300000);
+}
+timerID = setTimeout("refreshPeriodic()",300000);
</script>
</head>
<body>
-<div id="<%=graph.getDivName()%>Head" "style="background-color: #f2f2f2; border-top: 1px solid #2581c7; margin: 0px; width: 100%; height: 16px;"><div align="left" style="background-color: #f2f2f2; float:left; text-align:left; width:75%; height: 20px;"><%=divNameString%></div><div align=right style="background-color: #f2f2f2; float:left; width:25%; text-align:right;"><a href="#" onClick="hide(\'<%=graph.getDivName()%>\')"><img border=0 src="/monitoring/images/min-b.png"></a> <a href="#" onClick="show(\'<%=graph.getDivName()%>\')"><img border=0 src="/monitoring/images/max-b.png"></a> <a href="#" onClick="hide(\'<%=graph.getDivName()%>\');hide(\'<%=graph.getDivName()%>Head\');"><img border=0 src="/monitoring/images/close-b.png"> </a></div></div>
+<div id="<%=graph.getDivName()%>Head" style="background-color: #f2f2f2; border-top: 1px solid #2581c7; margin: 0px; width: 100%; height: 16px;"><div align="left" style="background-color: #f2f2f2; float:left; text-align:left; width:75%; height: 20px;"><%=divNameString%></div><div align=right style="background-color: #f2f2f2; float:left; width:25%; text-align:right;"></div></div>
<%=divImplString %>
</body>
</html>