You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ak...@apache.org on 2007/12/16 17:11:32 UTC
svn commit: r604644 [4/4] - in /geronimo/sandbox/monitoring: ./ agent-ds/
agent-ear/ agent-ejb/ agent-ejb/src/main/java/org/apache/geronimo/monitor/
agent-ejb/src/main/java/org/apache/geronimo/monitoring/
agent-ejb/src/main/java/org/apache/geronimo/mon...
Modified: geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp?rev=604644&r1=604643&r2=604644&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp (original)
+++ geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringServers.jsp Sun Dec 16 08:11:29 2007
@@ -1,234 +1,233 @@
-<%--
- 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.DatabaseMetaData" %>
-<%@ page import="java.sql.PreparedStatement" %>
-<%@ page import="java.sql.ResultSet" %>
-<%@ page import="java.sql.SQLException" %>
-<%@ page import="org.apache.geronimo.plugins.monitoring.client.MRCConnector" %>
-<%@ page import="org.apache.geronimo.plugins.monitoring.client.util.*" %>
-<%@ page import="org.apache.geronimo.console.util.PortletManager" %>
-<portlet:defineObjects/>
-<%
- String message = (String) request.getAttribute("message");
-if (!message.equals(""))
-{
-%>
-<div align="left" style="width: 650px">
-<%=message %><br>
-</div>
-<%} %>
-<table>
- <tr>
- <!-- Body -->
- <td width="100%" align="left" valign="top">
-<%
- DBManager DBase = new DBManager();
- Connection con = DBase.getConnection();
-
- PreparedStatement pStmt = con.prepareStatement("SELECT * FROM servers");
- ResultSet rs = pStmt.executeQuery();
-%>
-<table width="100%" style="border-style: solid;
-border-width: 1px;">
- <thead align="center"><strong>Servers</strong></thead>
- <tr>
- <th class="DarkBackground" width="30%">Name</th>
- <th class="DarkBackground" width="10%">IP/Hostname</th>
- <th class="DarkBackground" width="15%">Status</th>
- <th class="DarkBackground" width="15%">Stat. Query</th>
- <th class="DarkBackground" width="30%" colspan="3">Actions</th>
- </tr>
- <%
- // data structure to store the server's info
- class ServerInfo {
- public String ip;
- public int port;
- public String username;
- public String password;
- public String server_id;
- public boolean enabled;
- public String name;
- }
-
- ArrayList<ServerInfo> serverInfos = new ArrayList<ServerInfo>();
- // for each server, save the information locally
- while(rs.next()) {
- ServerInfo s = new ServerInfo();
- s.ip = rs.getString("ip");
- s.username = rs.getString("username");
- s.password = rs.getString("password");
- s.server_id = rs.getString("server_id");
- s.name = rs.getString("name");
- s.enabled = rs.getInt("enabled") == 1 ? true : false;
- s.port = rs.getInt("port");
- serverInfos.add( s );
- }
- // for each server, draw it
- for(int i = 0 ; i < serverInfos.size(); i++) {
- String ip = serverInfos.get(i).ip;
- String username = serverInfos.get(i).username;
- String password = serverInfos.get(i).password;
- String server_id = serverInfos.get(i).server_id;
- int port = serverInfos.get(i).port;
- boolean enabled = serverInfos.get(i).enabled;
- String name = serverInfos.get(i).name;
- boolean online = false;
- boolean collecting = false;
- MRCConnector mrc = null;
- Long snapshotDuration = new Long(0);
- if (enabled) {
- try {
- mrc = new MRCConnector(ip, username, password, port);
- online = true;
- } catch (Exception e) {
- online = false;
- }
- try {
- snapshotDuration = mrc.getSnapshotDuration();
- if (mrc.isSnapshotRunning())
- collecting = true;
- else
- collecting = false;
- } catch (Exception e) {
- collecting = false;
- online = false;
- }
- }
- %>
- <c:set var="backgroundClass" value='MediumBackground'/>
- <c:choose>
- <c:when test="${backgroundClass == 'MediumBackground'}" >
- <c:set var="backgroundClass" value='LightBackground'/>
- </c:when>
- <c:otherwise>
- <c:set var="backgroundClass" value='MediumBackground'/>
- </c:otherwise>
- </c:choose>
- <tr>
- <%
-if(enabled){
- %>
- <td class="${backgroundClass}" width="30%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><%=name%></a></td>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><%=ip%></a></td>
-<%
-}
-else{
- %>
- <td class="${backgroundClass}" width="30%" align="center"><%=name%></td>
- <td class="${backgroundClass}" width="10%" align="center"><%=ip%></td>
- <%
-}
-if (online) { // online
-%>
- <td class="${backgroundClass}" width="15%" align="center" bgcolor="#cccccc">Online</td>
-<%
-} else if(enabled){ // offline
-%>
- <td class="${backgroundClass}" width="15%" align="center"><font color="red"><img border=0 src="/monitoring/images/help-b.png">Offline</font></td>
-<%
-} else { // Disabled
- %>
- <td class="${backgroundClass}" width="15%" align="center"><font color="red">Disabled</font></td>
- <%
- }
-if (!collecting) { // not collecting statistics
-%>
- <td class="${backgroundClass}" width="15%" align="center"><font color="red">(stopped)</font></td>
-<%
- if(enabled) { // enable the links
-%>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="startThread" /><portlet:param name="server_id" value="<%=server_id%>" /><portlet:param name="snapshotDuration" value="<%=java.lang.Long.toString(snapshotDuration)%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Enable Query</a></td>
-<%
- } else { // do not provide links
-%>
- <td class="${backgroundClass}" width="10%" align="center">Enable Query</td>
-<%
- }
-%>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
-<%
-} else { // collecting statistics
- if (enabled)
- {
-%>
- <td class="${backgroundClass}" width="15%" align="center"><%=snapshotDuration/1000/60+" min. (running)"%></td>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="stopThread" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/close-b.png">Disable Query</a></td>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
-<%
- }
- else
- {
- %>
- <td class="${backgroundClass}" width="15%" align="center">Stopped</td>
- <td class="${backgroundClass}" width="10%" align="center">Disable Query</td>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
- <%
- }
-}
-if(enabled) { // enabled server
-%>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="disableServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/close-b.png">Disable</a></td>
-<%
-} else { // disabled server
-%>
- <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="enableServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Enable</a></td>
-<%
-}
-%>
- </tr>
- <%}
-%>
-</table>
-<div align="right"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showAddServer" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Add Server</a></div>
-<%
- // close connection
- con.close();
-%>
- </td>
-
- <td> </td>
-
- <!-- Geronimo Links -->
- <td valign="top">
-
- <table width="100%" style="border-bottom: 1px solid #2581c7;" cellspacing="1" cellpadding="1">
- <tr>
- <td class="DarkBackground" align="left" nowrap>
- <font face="Verdana" size="+1">Navigation</font>
- </td>
- </tr>
- <tr>
- <td bgcolor="#FFFFFF" nowrap>
- <br />
- <ul>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showHome" /></portlet:actionURL>">Home</a></li>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllViews" /></portlet:actionURL>">Views</a></li>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllServers" /></portlet:actionURL>">Servers</a></li>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllGraphs" /></portlet:actionURL>">Graphs</a></li>
- </ul>
- <br />
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
+<%--
+ 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.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.*" %>
+<portlet:defineObjects/>
+<%
+ String message = (String) request.getAttribute("message");
+if (!message.equals(""))
+{
+%>
+<div align="left" style="width: 650px">
+<%=message %><br>
+</div>
+<%} %>
+<table>
+ <tr>
+ <!-- Body -->
+ <td width="100%" align="left" valign="top">
+<%
+ DBManager DBase = new DBManager();
+ Connection con = DBase.getConnection();
+
+ PreparedStatement pStmt = con.prepareStatement("SELECT * FROM servers");
+ ResultSet rs = pStmt.executeQuery();
+%>
+<table width="100%" style="border-style: solid;
+border-width: 1px;">
+ <thead align="center"><strong>Servers</strong></thead>
+ <tr>
+ <th class="DarkBackground" width="30%">Name</th>
+ <th class="DarkBackground" width="10%">IP/Hostname</th>
+ <th class="DarkBackground" width="15%">Status</th>
+ <th class="DarkBackground" width="15%">Stat. Query</th>
+ <th class="DarkBackground" width="30%" colspan="3">Actions</th>
+ </tr>
+ <%
+ // data structure to store the server's info
+ class ServerInfo {
+ public String ip;
+ public int port;
+ public String username;
+ public String password;
+ public String server_id;
+ public boolean enabled;
+ public String name;
+ }
+
+ ArrayList<ServerInfo> serverInfos = new ArrayList<ServerInfo>();
+ // for each server, save the information locally
+ while(rs.next()) {
+ ServerInfo s = new ServerInfo();
+ s.ip = rs.getString("ip");
+ s.username = rs.getString("username");
+ s.password = rs.getString("password");
+ s.server_id = rs.getString("server_id");
+ s.name = rs.getString("name");
+ s.enabled = rs.getInt("enabled") == 1 ? true : false;
+ s.port = rs.getInt("port");
+ serverInfos.add( s );
+ }
+ // for each server, draw it
+ for(int i = 0 ; i < serverInfos.size(); i++) {
+ String ip = serverInfos.get(i).ip;
+ String username = serverInfos.get(i).username;
+ String password = serverInfos.get(i).password;
+ String server_id = serverInfos.get(i).server_id;
+ int port = serverInfos.get(i).port;
+ boolean enabled = serverInfos.get(i).enabled;
+ String name = serverInfos.get(i).name;
+ boolean online = false;
+ boolean collecting = false;
+ MRCConnector mrc = null;
+ Long snapshotDuration = new Long(0);
+ if (enabled) {
+ try {
+ mrc = new MRCConnector(ip, username, password, port);
+ online = true;
+ } catch (Exception e) {
+ online = false;
+ }
+ try {
+ snapshotDuration = mrc.getSnapshotDuration();
+ if (mrc.isSnapshotRunning())
+ collecting = true;
+ else
+ collecting = false;
+ } catch (Exception e) {
+ collecting = false;
+ online = false;
+ }
+ }
+ %>
+ <c:set var="backgroundClass" value='MediumBackground'/>
+ <c:choose>
+ <c:when test="${backgroundClass == 'MediumBackground'}" >
+ <c:set var="backgroundClass" value='LightBackground'/>
+ </c:when>
+ <c:otherwise>
+ <c:set var="backgroundClass" value='MediumBackground'/>
+ </c:otherwise>
+ </c:choose>
+ <tr>
+ <%
+if(enabled){
+ %>
+ <td class="${backgroundClass}" width="30%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><%=name%></a></td>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><%=ip%></a></td>
+<%
+}
+else{
+ %>
+ <td class="${backgroundClass}" width="30%" align="center"><%=name%></td>
+ <td class="${backgroundClass}" width="10%" align="center"><%=ip%></td>
+ <%
+}
+if (online) { // online
+%>
+ <td class="${backgroundClass}" width="15%" align="center" bgcolor="#cccccc">Online</td>
+<%
+} else if(enabled){ // offline
+%>
+ <td class="${backgroundClass}" width="15%" align="center"><font color="red"><img border=0 src="/monitoring/images/help-b.png">Offline</font></td>
+<%
+} else { // Disabled
+ %>
+ <td class="${backgroundClass}" width="15%" align="center"><font color="red">Disabled</font></td>
+ <%
+ }
+if (!collecting) { // not collecting statistics
+%>
+ <td class="${backgroundClass}" width="15%" align="center"><font color="red">(stopped)</font></td>
+<%
+ if(enabled) { // enable the links
+%>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="startThread" /><portlet:param name="server_id" value="<%=server_id%>" /><portlet:param name="snapshotDuration" value="<%=java.lang.Long.toString(snapshotDuration)%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Enable Query</a></td>
+<%
+ } else { // do not provide links
+%>
+ <td class="${backgroundClass}" width="10%" align="center">Enable Query</td>
+<%
+ }
+%>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
+<%
+} else { // collecting statistics
+ if (enabled)
+ {
+%>
+ <td class="${backgroundClass}" width="15%" align="center"><%=snapshotDuration/1000/60+" min. (running)"%></td>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="stopThread" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/close-b.png">Disable Query</a></td>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
+<%
+ }
+ else
+ {
+ %>
+ <td class="${backgroundClass}" width="15%" align="center">Stopped</td>
+ <td class="${backgroundClass}" width="10%" align="center">Disable Query</td>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
+ <%
+ }
+}
+if(enabled) { // enabled server
+%>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="disableServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/close-b.png">Disable</a></td>
+<%
+} else { // disabled server
+%>
+ <td class="${backgroundClass}" width="10%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="enableServer" /><portlet:param name="server_id" value="<%=server_id%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Enable</a></td>
+<%
+}
+%>
+ </tr>
+ <%}
+%>
+</table>
+<div align="right"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showAddServer" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Add Server</a></div>
+<%
+ // close connection
+ con.close();
+%>
+ </td>
+
+ <td> </td>
+
+ <!-- Geronimo Links -->
+ <td valign="top">
+
+ <table width="100%" style="border-bottom: 1px solid #2581c7;" cellspacing="1" cellpadding="1">
+ <tr>
+ <td class="DarkBackground" align="left" nowrap>
+ <font face="Verdana" size="+1">Navigation</font>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF" nowrap>
+ <br />
+ <ul>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showHome" /></portlet:actionURL>">Home</a></li>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllViews" /></portlet:actionURL>">Views</a></li>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllServers" /></portlet:actionURL>">Servers</a></li>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllGraphs" /></portlet:actionURL>">Graphs</a></li>
+ </ul>
+ <br />
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
</table>
Modified: geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp?rev=604644&r1=604643&r2=604644&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp (original)
+++ geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViewServer.jsp Sun Dec 16 08:11:29 2007
@@ -16,8 +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.plugins.monitoring.client.StatsGraph" %>
-<%@ page import="org.apache.geronimo.plugins.monitoring.client.GraphsBuilder" %>
+<%@ 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" %>
@@ -31,9 +31,8 @@
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.SQLException" %>
<%@ page import="java.sql.Timestamp" %>
-<%@ 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.MRCConnector" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
<portlet:defineObjects/>
<%
Modified: geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp?rev=604644&r1=604643&r2=604644&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp (original)
+++ geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringViews.jsp Sun Dec 16 08:11:29 2007
@@ -1,117 +1,116 @@
-
-<%--
- 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.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" %>
-<portlet:defineObjects/>
-<%
- String message = (String) request.getAttribute("message");
-if (!message.equals(""))
-{
-%>
-<div align="left" style="width: 650px">
-<%=message %><br>
-</div>
-<%} %>
-<table>
- <tr>
- <!-- Body -->
- <td width="100%" align="left" valign="top">
-<table width="100%" style="border-style: solid;
-border-width: 1px;">
- <thead align="center"><strong>Views</strong></thead>
- <tr>
- <th class="DarkBackground" width="30%">Name</th>
- <th class="DarkBackground" width="10%">Elements</th>
- <th class="DarkBackground" width="10%">Created</th>
- <th class="DarkBackground" width="10%">Modified</th>
- <th class="DarkBackground" width="30%" colspan="2">Actions</th>
- </tr>
- <%
- DBManager DBase = new DBManager();
- Connection con = DBase.getConnection();
-
- PreparedStatement pStmt = con.prepareStatement("SELECT view_id, name, description, graph_count, added, modified FROM views");
- ResultSet rs = pStmt.executeQuery();
- while (rs.next())
- {
- String view_id = rs.getString("view_id");
- %>
- <c:set var="backgroundClass" value='MediumBackground'/>
- <c:choose>
- <c:when test="${backgroundClass == 'MediumBackground'}" >
- <c:set var="backgroundClass" value='LightBackground'/>
- </c:when>
- <c:otherwise>
- <c:set var="backgroundClass" value='MediumBackground'/>
- </c:otherwise>
- </c:choose>
- <tr>
- <td class="${backgroundClass}" width="30%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showView" /><portlet:param name="view_id" value="<%=rs.getString("view_id")%>" /></portlet:actionURL>"><%=rs.getString("name")%></a></td>
- <td class="${backgroundClass}" width="10%" align="center"><%=rs.getString("graph_count")%></td>
- <td class="${backgroundClass}" width="15%" align="center"><%=rs.getString("added").substring(0,16)%></td>
- <td class="${backgroundClass}" width="15%" align="center"><%=rs.getString("modified").substring(0,16)%></td>
- <td class="${backgroundClass}" width="15%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditView" /><portlet:param name="view_id" value="<%=rs.getString("view_id")%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
- </tr>
- <%
- }
- rs.close();
- %>
-</table>
-<div align="right"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showAddView" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Create View</a></div>
-<%
- // close connection
- con.close();
-%>
- </td>
-
- <td> </td>
-
- <!-- Geronimo Links -->
- <td valign="top">
-
- <table width="100%" style="border-bottom: 1px solid #2581c7;" cellspacing="1" cellpadding="1">
- <tr>
- <td class="DarkBackground" align="left" nowrap>
- <font face="Verdana" size="+1">Navigation</font>
- </td>
- </tr>
- <tr>
- <td bgcolor="#FFFFFF" nowrap>
- <br />
- <ul>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showHome" /></portlet:actionURL>">Home</a></li>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllViews" /></portlet:actionURL>">Views</a></li>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllServers" /></portlet:actionURL>">Servers</a></li>
- <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllGraphs" /></portlet:actionURL>">Graphs</a></li>
- </ul>
- <br />
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table>
+
+<%--
+ 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.DatabaseMetaData" %>
+<%@ page import="java.sql.PreparedStatement" %>
+<%@ page import="java.sql.ResultSet" %>
+<%@ page import="java.sql.SQLException" %>
+<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<portlet:defineObjects/>
+<%
+ String message = (String) request.getAttribute("message");
+if (!message.equals(""))
+{
+%>
+<div align="left" style="width: 650px">
+<%=message %><br>
+</div>
+<%} %>
+<table>
+ <tr>
+ <!-- Body -->
+ <td width="100%" align="left" valign="top">
+<table width="100%" style="border-style: solid;
+border-width: 1px;">
+ <thead align="center"><strong>Views</strong></thead>
+ <tr>
+ <th class="DarkBackground" width="30%">Name</th>
+ <th class="DarkBackground" width="10%">Elements</th>
+ <th class="DarkBackground" width="10%">Created</th>
+ <th class="DarkBackground" width="10%">Modified</th>
+ <th class="DarkBackground" width="30%" colspan="2">Actions</th>
+ </tr>
+ <%
+ DBManager DBase = new DBManager();
+ Connection con = DBase.getConnection();
+
+ PreparedStatement pStmt = con.prepareStatement("SELECT view_id, name, description, graph_count, added, modified FROM views");
+ ResultSet rs = pStmt.executeQuery();
+ while (rs.next())
+ {
+ String view_id = rs.getString("view_id");
+ %>
+ <c:set var="backgroundClass" value='MediumBackground'/>
+ <c:choose>
+ <c:when test="${backgroundClass == 'MediumBackground'}" >
+ <c:set var="backgroundClass" value='LightBackground'/>
+ </c:when>
+ <c:otherwise>
+ <c:set var="backgroundClass" value='MediumBackground'/>
+ </c:otherwise>
+ </c:choose>
+ <tr>
+ <td class="${backgroundClass}" width="30%" align="center"><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showView" /><portlet:param name="view_id" value="<%=rs.getString("view_id")%>" /></portlet:actionURL>"><%=rs.getString("name")%></a></td>
+ <td class="${backgroundClass}" width="10%" align="center"><%=rs.getString("graph_count")%></td>
+ <td class="${backgroundClass}" width="15%" align="center"><%=rs.getString("added").substring(0,16)%></td>
+ <td class="${backgroundClass}" width="15%" align="center"><%=rs.getString("modified").substring(0,16)%></td>
+ <td class="${backgroundClass}" width="15%" align="center"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showEditView" /><portlet:param name="view_id" value="<%=rs.getString("view_id")%>" /></portlet:actionURL>"><img border=0 src="/monitoring/images/edit-b.png">Edit</a></td>
+ </tr>
+ <%
+ }
+ rs.close();
+ %>
+</table>
+<div align="right"><a href="<portlet:actionURL portletMode="edit"><portlet:param name="action" value="showAddView" /></portlet:actionURL>"><img border=0 src="/monitoring/images/max-b.png">Create View</a></div>
+<%
+ // close connection
+ con.close();
+%>
+ </td>
+
+ <td> </td>
+
+ <!-- Geronimo Links -->
+ <td valign="top">
+
+ <table width="100%" style="border-bottom: 1px solid #2581c7;" cellspacing="1" cellpadding="1">
+ <tr>
+ <td class="DarkBackground" align="left" nowrap>
+ <font face="Verdana" size="+1">Navigation</font>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF" nowrap>
+ <br />
+ <ul>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showHome" /></portlet:actionURL>">Home</a></li>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllViews" /></portlet:actionURL>">Views</a></li>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllServers" /></portlet:actionURL>">Servers</a></li>
+ <li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action" value="showAllGraphs" /></portlet:actionURL>">Graphs</a></li>
+ </ul>
+ <br />
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+</table>
Modified: geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp?rev=604644&r1=604643&r2=604644&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp (original)
+++ geronimo/sandbox/monitoring/mconsole-war/src/main/webapp/monitoringPopUpGraph.jsp Sun Dec 16 08:11:29 2007
@@ -20,9 +20,9 @@
<%@ 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"%>
+<%@ page import="org.apache.geronimo.monitoring.console.util.*" %>
+<%@page import="org.apache.geronimo.monitoring.console.GraphsBuilder"%>
+<%@page import="org.apache.geronimo.monitoring.console.StatsGraph"%>
<portlet:defineObjects/>
<script language="JavaScript" type="text/javascript">
</script>
Modified: geronimo/sandbox/monitoring/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/pom.xml?rev=604644&r1=604643&r2=604644&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/pom.xml (original)
+++ geronimo/sandbox/monitoring/pom.xml Sun Dec 16 08:11:29 2007
@@ -20,7 +20,9 @@
<!-- $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">
+<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>
@@ -36,9 +38,7 @@
<packaging>pom</packaging>
<!-- <version>1.0-SNAPSHOT</version> -->
- <description>
- Geronimo Monitoring and Management
- </description>
+ <description> Geronimo Monitoring and Management </description>
<properties>
<!--
@@ -52,7 +52,7 @@
<!-- used in the plans
<version>1.0-SNAPSHOT</version> -->
<monitoringConsoleVersion>2.1-SNAPSHOT</monitoringConsoleVersion>
- <consoleVersion>1.0-SNAPSHOT</consoleVersion>
+ <consoleVersion>2.1-SNAPSHOT</consoleVersion>
</properties>
<dependencyManagement>
@@ -88,33 +88,6 @@
<version>${geronimoVersion}</version>
<type>car</type>
</dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>console-core</artifactId>
- <version>${consoleVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.modules</groupId>
- <artifactId>geronimo-connector</artifactId>
- </exclusion>
-
- <exclusion>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- </exclusion>
-
- <exclusion>
- <groupId>org.apache.geronimo.modules</groupId>
- <artifactId>geronimo-deploy-jsr88</artifactId>
- </exclusion>
-
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_2.5_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
</dependencies>
</dependencyManagement>
@@ -128,12 +101,10 @@
</resources>
<pluginManagement>
<plugins>
+ <!-- inheriting configration for war plugin, i,e, precompile JSPs -->
<plugin>
<groupId>org.apache.geronimo.plugins</groupId>
<artifactId>car-maven-plugin</artifactId>
- <version>${geronimoVersion}</version>
- <extensions>true</extensions>
-
<configuration>
<archive>
<!-- Do not include META-INF/maven to avoid long file problems on windows -->
@@ -142,62 +113,20 @@
<osiApproved>true</osiApproved>
</configuration>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <warSourceDirectory>${pom.basedir}/src/main/webapp</warSourceDirectory>
- <archiveClasses>true</archiveClasses>
- <archive>
- <!-- Do not include META-INF/maven to avoid long file problems on windows -->
- <addMavenDescriptor>false</addMavenDescriptor>
- </archive>
-
- <!--
- HACK: Include legal files explicity, otherwise they will end up in the wrong path
- or in another jar file in the war.
-
- NOTE: targetPath is broken for webResources (as documented)
- -->
- <webResources>
- <resource>
- <directory>${project.build.outputDirectory}</directory>
- <includes>
- <include>META-INF/LICENSE*</include>
- <include>META-INF/NOTICE*</include>
- <include>META-INF/DISCLAIMER*</include>
- </includes>
- </resource>
- </webResources>
- </configuration>
- </plugin>
-
- </plugins>
+ </plugins>
</pluginManagement>
</build>
-
- <profiles>
- <profile>
- <id>default</id>
-
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>agent</module>
- <module>agent-ds</module>
- <module>agent-ear</module>
- <module>agent-ejb</module>
- <module>agent-sql</module>
- <module>mconsole-ds</module>
- <module>mconsole-ear</module>
- <module>mconsole-jetty</module>
- <module>mconsole-tomcat</module>
- <module>mconsole-war</module>
- </modules>
- </profile>
- </profiles>
-
+
+ <modules>
+ <module>agent</module>
+ <module>agent-ds</module>
+ <module>agent-ear</module>
+ <module>agent-ejb</module>
+ <module>agent-sql</module>
+ <module>mconsole-ds</module>
+ <module>mconsole-ear</module>
+ <module>mconsole-jetty</module>
+ <module>mconsole-tomcat</module>
+ <module>mconsole-war</module>
+ </modules>
</project>