Update of /var/cvs/html/mmbase/components/core/cache
In directory james.mmbase.org:/tmp/cvs-serv1991/components/core/cache

Modified Files:
        index.jspx show.jspx 
Log Message:
cache pages


See also: http://cvs.mmbase.org/viewcvs/html/mmbase/components/core/cache


Index: index.jspx
===================================================================
RCS file: /var/cvs/html/mmbase/components/core/cache/index.jspx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- index.jspx  21 Mar 2008 16:16:32 -0000      1.6
+++ index.jspx  26 Mar 2008 09:46:15 -0000      1.7
@@ -50,7 +50,7 @@
     <div class="msg">The releasestrategies of cache <em>${cache}</em> are 
turned ${active}.</div>
   </mm:present>
 
-  <table summary="cache manager" cellspacing="0" cellpadding="3" border="0">
+  <table summary="MMBase caches, their statistics and actions that can be 
taken" cellspacing="0" cellpadding="3" border="0">
     <caption>
       This tools hows the performance of the various MMBase caches. You can 
also (temporary) turn
       on/off the cache here. For a persistant change you should change 
caches.xml.
@@ -71,14 +71,14 @@
     <mm:listfunction set="caches" name="list" id="qc">
       <mm:first>
         <tr>
-          <th>Cache</th>
-          <th class="center">Requests</th>
-          <th class="center">Hits</th>
-          <th class="center">Misses</th>
-          <th class="center">Puts</th>
-          <th class="center">Size</th>
-          <th class="center">Performance</th>
-          <th class="center">Action</th>
+          <th scope="col">Cache</th>
+          <th scope="col" class="center">Requests</th>
+          <th scope="col" class="center">Hits</th>
+          <th scope="col" class="center">Misses</th>
+          <th scope="col" class="center">Puts</th>
+          <th scope="col" class="center">Size</th>
+          <th scope="col" class="center">Performance</th>
+          <th scope="col" class="center">Action</th>
         </tr>
       </mm:first>
       <tr>
@@ -202,14 +202,14 @@
     <mm:listfunction set="caches" name="list" remove="qc" id="c">
       <mm:first>
         <tr>
-          <th>Cache</th>
-          <th class="center">Requests</th>
-          <th class="center">Hits</th>
-          <th class="center">Misses</th>
-          <th class="center">Puts</th>
-          <th class="center">Size</th>
-          <th class="center">Performance</th>
-          <th class="center">Action</th>
+          <th scope="col">Cache</th>
+          <th scope="col" class="center">Requests</th>
+          <th scope="col" class="center">Hits</th>
+          <th scope="col" class="center">Misses</th>
+          <th scope="col" class="center">Puts</th>
+          <th scope="col" class="center">Size</th>
+          <th scope="col" class="center">Performance</th>
+          <th scope="col" class="center">Action</th>
         </tr>
       </mm:first>
       <tr>


Index: show.jspx
===================================================================
RCS file: /var/cvs/html/mmbase/components/core/cache/show.jspx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- show.jspx   21 Mar 2008 16:16:32 -0000      1.6
+++ show.jspx   26 Mar 2008 09:46:15 -0000      1.7
@@ -5,64 +5,70 @@
     xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
     class="component mm_c ${requestScope.componentClassName}"
     id="${requestScope.componentId}">
-  
+  <jsp:directive.page import="org.mmbase.cache.*" />
   <jsp:output omit-xml-declaration="true" />
   <mm:cloud rank="administrator">
   <mm:import externid="cache"       from="request" id="name"  required="true" 
/>
   <mm:import externid="deleteentry" from="request" 
vartype="integer">-1</mm:import>
   <mm:import externid="deletekey"   from="request" />
 
-  <mm:url id="form" page="showcache" />
+  <h3>Showing cache ${name}</h3>
+  <mm:voidfunction set="caches" name="get" referids="name" id="cache" />
   
-  <h3>Cache Monitor</h3>
+  <c:forEach items="${cache.entrySet}" var="entry" end="500" 
varStatus="status">
+    <c:if test="${deleteentry eq status.index}">
+      <div class="msg">
+        Removed <mm:function set="caches" name="remove" referids="[EMAIL 
PROTECTED],[EMAIL PROTECTED]" /> from cache.
+      </div>
+    </c:if>
+  </c:forEach>
   
   <form method="post">
     <input type="hidden" name="cache" value="${name}" />
     <table summary="show cache ${name}" cellspacing="0" cellpadding="3" 
border="0">
-
-      <mm:voidfunction set="caches" name="get" referids="name" id="cache" />
-      
       <caption>
-          ${cache.description} Cache - ${cache.size gt 500 ? 'first 500 of' : 
''} ${cache.size} entries
+        ${cache.description} : ${cache.size gt 500 ? 'first 500 of' : ''} 
${cache.size} entries
       </caption>
       
-      <mm:import externid="key"  from="request">.*</mm:import>
-      <mm:import externid="value" from="request">.*</mm:import>
+      <mm:import externid="key">.*</mm:import>
+      <mm:import externid="value">.*</mm:import>
       <tr>
-        <th>Position</th>
-        <th>Count</th>
-        <th>Key <input type="text" name="key" value="${key}" /></th>
-        <th>Value <input type="text" name="value" value="${value}" /></th>
-        <th><input type="submit" value="search" /></th>
+        <th scope="col">Position</th>
+        <th scope="col">Count</th>
+        <th scope="col">
+          <label for="cachekey">Key</label> 
+          <input type="text" id="cachekey" name="key" value="${key}" />
+        </th>
+        <th scope="col">
+          <label for="cachevalue">Value</label>
+          <input type="text" id="cachevalue" name="value" value="${value}" />
+          <input type="submit" value="search" /> 
+        </th>
+        <th scope="col"> Remove </th>
       </tr>
 
-
-      <c:forEach items="${cache.entrySet}" var="entry" end="500" 
varStatus="status">
-        <c:if test="${deleteentry eq status.index}">
-          <tr><td colspan="5">Deleting <mm:function set="caches" name="remove" 
referids="[EMAIL PROTECTED],[EMAIL PROTECTED]" /></td></tr>
-        </c:if>
-      </c:forEach>
-
       <c:forEach items="${cache.entrySet}" var="entry" end="500" 
varStatus="status">
         <mm:context>
           <mm:voidfunction id="k" set="utils" name="toString" referids="[EMAIL 
PROTECTED]" />
 
-          <mm:write value="${k}">
+          <mm:write value="${entry.key}">
             <mm:compare regexp="${key}">
               <mm:write value="${entry.value}">
                 <mm:compare regexp="${value}">
                   <tr>
-                    <td class="right"><mm:index /></td>
-                    <td>${cache.counts[entry.key]}</td>
-                    <td>${k} </td>
+                    <td class="view">${status.index}</td>
+                    <td class="center">
+                       ${cache.counts[entry.key]}
+                    </td>
+                    <td>${entry.key} </td>
                     <td>${entry.value} </td>
+                    <td class="center">
                     <mm:link referids="[EMAIL PROTECTED]">
                       <mm:param name="deletekey" value="${entry.key}" />
                       <mm:param name="deleteentry" value="${status.index}" />
-                      <td class="center">
                         <a title="remove this entry" href="${_}"><img 
src="${mm:link('/mmbase/style/images/delete.png')}" alt="remove" /></a>
-                      </td>
                     </mm:link>
+                    </td>
                   </tr>
                 </mm:compare>
               </mm:write>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to