[jboss-svn-commits] JBL Code SVN: r16291 - in labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp: include and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Nov 2 15:42:37 EDT 2007


Author: cbrock
Date: 2007-11-02 15:42:37 -0400 (Fri, 02 Nov 2007)
New Revision: 16291

Added:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/include/auth.jsp
Modified:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/index.jsp
Log:


Added: labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/include/auth.jsp
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/include/auth.jsp	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/include/auth.jsp	2007-11-02 19:42:37 UTC (rev 16291)
@@ -0,0 +1,7 @@
+<%@ page import="org.hibernate.Session" %>
+<%@ page import="org.hibernate.Transaction" %>
+<%@ page import="java.util.List" %>
+<% if (request.getRemoteUser() == null) {
+    response.sendRedirect("login.jsp");
+    return;
+} %>
\ No newline at end of file

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/index.jsp
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/index.jsp	2007-11-02 18:10:05 UTC (rev 16290)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_IR2/product/tools/console/management-web/src/main/webapp/index.jsp	2007-11-02 19:42:37 UTC (rev 16291)
@@ -1,92 +1,94 @@
-<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
+<%@ include file="include/auth.jsp" %>
+<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
 <%@ page session="true" %>
 <%@ page import="
-	java.util.List,
 	org.hibernate.Session,
-	org.hibernate.Transaction,
-	org.jboss.soa.esb.monitoring.MonitoringSessionFactory,
-	org.jboss.soa.esb.monitoring.pojo.*,
-	org.jboss.soa.esb.monitoring.server.StatisticsHelper
-"%>
+                 org.hibernate.Transaction" %>
 <html>
 <head>
-   <title>JBoss ESB Monitoring Console</title>
-   <link rel="stylesheet" href="style_master.css" type="text/css">
-   <meta http-equiv="cache-control" content="no-cache">
+    <title>JBoss ESB Monitoring Console</title>
+    <link rel="stylesheet" href="style_master.css" type="text/css">
+    <meta http-equiv="cache-control" content="no-cache">
 </head>
 <body>
-   <table>
-      <tr>
-         <td><img src="images/logo.gif" align="left" border="0" alt="JBoss"></td>
-         <td valign="middle">         
-         <h1>JBoss ESB Management Console</h1>
-         </td>
-      </tr>
-    </table>
-    <table cellpadding="5"/>
-      <tr>
-      	<td><a href="/jbossesb/operations.jsp">Management</a></td>
-      </tr>
-   </table>
+<table>
+    <tr>
+        <td><img src="images/logo.gif" align="left" border="0" alt="JBoss"></td>
+        <td valign="middle">
+            <h1>JBoss ESB Management Console</h1>
+        </td>
+    </tr>
+</table>
+<table cellpadding="5"/>
+<tr>
+    <td><a href="/jbossesb/operations.jsp">Management</a></td>
+</tr>
+</table>
 <hr>
-	<form action="collect.jsp" method="post">
-	<nobr>
- 	Current polling interval is <b><code><%=StatisticsHelper.getCollectionInterval()%></code></b> minutes.
-	Press the button to manually <input type="submit" value="Collect Statistics"/>
-	</nobr>
-	</form>
+<form action="collect.jsp" method="post">
+    <nobr>
+        Current polling interval is <b><code><%=StatisticsHelper.getCollectionInterval()%>
+    </code></b> minutes.
+        Press the button to manually <input type="submit" value="Collect Statistics"/>
+    </nobr>
+</form>
 <%
-Session sess = null;
-Transaction tx = null;
-try {
-	sess = MonitoringSessionFactory.getInstance().openSession();
-	tx = sess.beginTransaction();
-	List serverNames = StatisticsHelper.getServerNames(sess);
-	for (int i = 0; i<serverNames.size(); i++) {
-		String serverName = (String) serverNames.get(i);
+    Session sess = null;
+    Transaction tx = null;
+    try {
+        sess = MonitoringSessionFactory.getInstance().openSession();
+        tx = sess.beginTransaction();
+        List serverNames = StatisticsHelper.getServerNames(sess);
+        for (int i = 0; i < serverNames.size(); i++) {
+            String serverName = (String) serverNames.get(i);
 %>
 <hr>
-	<h1><code><%=serverName%></code></h1>
-<% 
-	List objectNames = StatisticsHelper.getObjectNamesForServer(sess, serverName);
-	for (int j = 0; j < objectNames.size(); j++) {
-		String objectName = (String) objectNames.get(j);
-		%>
-		<li><b><%=objectName%></b></li>
-		<ul>
-		<%
-		List attributeNames = StatisticsHelper.getAttributes(sess, serverName, objectName);
-		for (int k = 0; k < attributeNames.size(); k++) {
-			JMXAttribute jmxattr = (JMXAttribute) attributeNames.get(k);
-			String attributeName = jmxattr.getAttribute();
-			%>
-			<li><a href="attribute.jsp?servername=<%=serverName%>&id=<%=jmxattr.getId()%>"><%=attributeName%></a></li>
-			<%
-		}
-		%>
-		</ul>
-		<%
-	}
+<h1><code><%=serverName%>
+</code></h1>
+<%
+    List objectNames = StatisticsHelper.getObjectNamesForServer(sess, serverName);
+    for (int j = 0; j < objectNames.size(); j++) {
+        String objectName = (String) objectNames.get(j);
+%>
+<li><b><%=objectName%>
+</b></li>
+<ul>
+    <%
+        List attributeNames = StatisticsHelper.getAttributes(sess, serverName, objectName);
+        for (int k = 0; k < attributeNames.size(); k++) {
+            JMXAttribute jmxattr = (JMXAttribute) attributeNames.get(k);
+            String attributeName = jmxattr.getAttribute();
+    %>
+    <li><a href="attribute.jsp?servername=<%=serverName%>&id=<%=jmxattr.getId()%>"><%=attributeName%>
+    </a></li>
+    <%
+        }
+    %>
+</ul>
+<%
+        }
 
-}
+    }
 
-	if (serverNames.size() == 0) {
-		%>
-		No records found in database.
-		<% 
-	}
-} catch (Exception e) {
-	e.printStackTrace();
-} finally {
-	if (tx.isActive()) {
-		tx.rollback();
-	} 
-	tx = null;
-	
-	sess.flush();
-	sess.close();
-	sess = null;
-}
+    if (serverNames.size() == 0) {
 %>
+No records found in database.
+<%
+        }
+    }
+    catch (Exception e) {
+        e.printStackTrace();
+    }
+    finally {
+        if (tx.isActive()) {
+            tx.rollback();
+        }
+        tx = null;
+
+        sess.flush();
+        sess.close();
+        sess = null;
+    }
+%>
 </body>
 </html>




More information about the jboss-svn-commits mailing list