jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asm...@apache.org
Subject svn commit: r449024 - in /jakarta/jcs/trunk: src/java/org/apache/jcs/admin/JCSAdmin.jsp xdocs/changes.xml
Date Fri, 22 Sep 2006 18:02:44 GMT
Author: asmuts
Date: Fri Sep 22 11:02:43 2006
New Revision: 449024

URL: http://svn.apache.org/viewvc?view=rev&rev=449024
Log:
Added a summary page to the JCSAdmin.jsp that just dumps
the stats for a region. It doesn't display all the keys.

Modified:
    jakarta/jcs/trunk/src/java/org/apache/jcs/admin/JCSAdmin.jsp
    jakarta/jcs/trunk/xdocs/changes.xml

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/admin/JCSAdmin.jsp
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/admin/JCSAdmin.jsp?view=diff&rev=449024&r1=449023&r2=449024
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/admin/JCSAdmin.jsp (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/admin/JCSAdmin.jsp Fri Sep 22 11:02:43 2006
@@ -33,6 +33,7 @@
 		 	String CLEAR_REGION_ACTION = "clearRegion";
 		 	String REMOVE_ACTION = "remove";
 		 	String DETAIL_ACTION = "detail";			
+		 	String REGION_SUMMARY_ACTION = "regionSummary";			
 		 	String ITEM_ACTION = "item";			
 			String KEY_PARAM = "key";
 			String SILENT_PARAM = "silent";
@@ -40,6 +41,7 @@
      		String DEFAULT_TEMPLATE_NAME = "DEFAULT";
      		String REGION_DETAIL_TEMPLATE_NAME = "DETAIL";
      		String ITEM_TEMPLATE_NAME = "ITEM";
+     		String REGION_SUMMARY_TEMPLATE_NAME = "SUMMARY";
      		
 			String templateName = DEFAULT_TEMPLATE_NAME;
 			
@@ -92,6 +94,10 @@
 				{
 					templateName = ITEM_TEMPLATE_NAME;
 				}
+				else if ( action.equals( REGION_SUMMARY_ACTION ) )
+				{
+					templateName = REGION_SUMMARY_TEMPLATE_NAME;
+				}
 			}
 
 			if ( request.getParameter( SILENT_PARAM ) != null )
@@ -140,6 +146,29 @@
 <%
 			}    
 			else
+			if ( templateName == REGION_SUMMARY_TEMPLATE_NAME ) 
+			{
+%>
+
+<h1> Summary for region [<%=cacheName%>] </h1>
+
+<a href="JCSAdmin.jsp">All Regions</a>
+
+<%    
+    JCS cache = JCS.getInstance( cacheName );
+    String stats = cache.getStats();
+%>  
+   
+    <br>
+<b> Stats for region [<%=cacheName%>] </b>
+
+    <pre>
+    	<%=stats%>
+    </pre>   
+
+<%
+			}    
+			else
 			if ( templateName == REGION_DETAIL_TEMPLATE_NAME ) 
 			{
 %>
@@ -253,8 +282,9 @@
             <td> <%=record.getCache().getMissCountNotFound()%> </td>
             <td> <%=record.getCache().getMissCountExpired()%> </td>
             <td>   
-                <a href="JCSAdmin.jsp?action=detail&cacheName=<%=record.getCache().getCacheName()%>">
Detail </a>
-                | <a href="javascript:decision('Clicking OK will remove all the data from
the region [<%=record.getCache().getCacheName()%>]!','JCSAdmin.jsp?action=clearRegion&cacheName=<%=record.getCache().getCacheName()%>')">
Remove all </a>
+                <a href="JCSAdmin.jsp?action=regionSummary&cacheName=<%=record.getCache().getCacheName()%>">
Summary </a>
+                | <a href="JCSAdmin.jsp?action=detail&cacheName=<%=record.getCache().getCacheName()%>">
Detail </a>
+                | <a href="javascript:decision('Clicking OK will remove all the data from
the region [<%=record.getCache().getCacheName()%>]!','JCSAdmin.jsp?action=clearRegion&cacheName=<%=record.getCache().getCacheName()%>')">
Clear </a>
             </td>
         </tr>
 <%  

Modified: jakarta/jcs/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/xdocs/changes.xml?view=diff&rev=449024&r1=449023&r2=449024
==============================================================================
--- jakarta/jcs/trunk/xdocs/changes.xml (original)
+++ jakarta/jcs/trunk/xdocs/changes.xml Fri Sep 22 11:02:43 2006
@@ -5,6 +5,13 @@
 	</properties>
 	<body>
 
+		<release version="1.2.7.9.2" date="in CVS">
+			<action dev="asmuts" type="update">
+				Added a summary page to the JCSAdmin.jsp that just dumps
+				the stats for a region. It doesn't display all the keys.
+			</action>
+		</release>
+
 		<release version="1.2.7.9" date="in CVS">
 			<action dev="asmuts" type="fix" issue="JCS-1">
 				Fixed last element too small recycle bin bug.



---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


Mime
View raw message