[Zope-Checkins] CVS: Zope/lib/python/Products/CallProfiler/dtml - aggregateDetail.dtml:1.1.2.2 aggregates.dtml:1.1.2.2 configure.dtml:1.1.2.2 detail.dtml:1.1.2.2 results.dtml:1.1.2.2

Anthony Baxter anthony@interlink.com.au
Mon, 20 May 2002 03:21:38 -0400


Update of /cvs-repository/Zope/lib/python/Products/CallProfiler/dtml
In directory cvs.zope.org:/tmp/cvs-serv2477/dtml

Modified Files:
      Tag: anthony-CallProfiler-branch
	aggregateDetail.dtml aggregates.dtml configure.dtml 
	detail.dtml results.dtml 
Log Message:
First commit of merged ZC changes (from Ken, Tres and Shane (according to
the rcs dollarLogdollar))

Major changes:

  You can now wrap/instrument _any_ method, not just the __call__ or _exec
  one. 

  Some changes to the way displays work.

  Various cleanups.

Note _well_ the second entry in the TODO.txt file: Right now, if the
publisher hook is installed, and you refresh this product, you will 
end up with a trashed Zope that needs a restart. I'm looking at this
now. I don't see exactly why this is happening, yet.

Still some display cleanup to come, as well.



=== Zope/lib/python/Products/CallProfiler/dtml/aggregateDetail.dtml 1.1.2.1 => 1.1.2.2 ===
 
     <td>
-     <dtml-if object><tt>&dtml-treepart;</tt><dtml-if icon><img
-src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;"></dtml-if>
+     <dtml-if path>
+       <tt>&dtml-treepart;</tt>
+       <dtml-if icon>
+         <img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;">
+       <dtml-else>
+         <!-- no image <dtml-if meta_type> for &dtml-meta_type; <dtml-else> and no meta_type </dtml-if> -->
+       </dtml-if>
+       &dtml-path;
+       &dtml-str_call_count;
+     <dtml-elif object>
+       <tt>&dtml-treepart;</tt>
+       <dtml-if icon>
+         <img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;">
+       </dtml-if>
        &dtml-object;
        &dtml-str_call_count;
      <dtml-else><tt>&dtml-treepart; |</tt></dtml-if>


=== Zope/lib/python/Products/CallProfiler/dtml/aggregates.dtml 1.1.2.1 => 1.1.2.2 ===
 <dtml-in aggregateResults>
  <tr  class="<dtml-if sequence-odd>row-hilite<dtml-else>row-normal</dtml-if>">
-  <td><a href="aggregateDetail?tid=<dtml-var "tids[0]" html_quote>">&dtml-truncated_url;</a></td>
+  <td><a href="aggregateDetail?tid=<dtml-var "tids[0]" html_quote>">
+       &dtml-truncated_url;
+      </a>
+  </td>
   <td>&dtml-num_runs;</td>
   <td>&dtml-num_event;</td>
   <td>&dtml-num_cache_hit;</td>
@@ -34,7 +37,10 @@
   <td><dtml-var ave_time_total fmt="%2.4f"></td>
   <td><dtml-var max_time_total fmt="%2.4f"></td>
   <td><small><dtml-in getTransactions>
-     <a href="detail?tid=&dtml-tid;"><dtml-var time_total fmt="%2.4f"></a><dtml-unless sequence-end>, </dtml-unless>
+     <a href="detail?tid=&dtml-tid;">
+       <dtml-var time_total fmt="%2.4f">
+     </a>
+     <dtml-unless sequence-end>, </dtml-unless>
   </dtml-in></small></td>
  </tr>
 </dtml-in>


=== Zope/lib/python/Products/CallProfiler/dtml/configure.dtml 1.1.2.1 => 1.1.2.2 ===
 <form action="&dtml-URL1;" method="POST">
 
-<dtml-in getComponentModules>
- <dtml-if icon>
-  <img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;" 
-  title="&dtml-meta_type;" border="0" />
- </dtml-if>
-<dtml-var checkbox>
-<br>
-</dtml-in>
+<table>
+  <dtml-in getComponentModules>
+    <tr>
+      <td>
+        <dtml-if icon>
+           <img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;" 
+                title="&dtml-meta_type;" border="0" />
+        <dtml-else>
+           &nbsp;
+        </dtml-if>
+      </td>
+      <td>
+        <input name="enabled:list" type="checkbox"
+                     value="&dtml-name;.&dtml-method_name;"
+        <dtml-if name="isInstalled">CHECKED</dtml-if>>
+      </td>
+      <td>
+         &dtml-name; <font color="gray"><em> &dtml-method_name; </em> </font>
+      </td>
+    </tr>
+  </dtml-in>
+</table>
 
 <input type="submit" name="configure:method" value="Monitor selected calls">
 <input type="submit" name="monitorAll:method" value="Monitor all">
@@ -44,7 +58,7 @@
  is refreshed.
 </p>
 
-<form action="&dtml-URL1;/addModule" method="POST">
+<form action="&dtml-URL1;/addMethod" method="POST">
 
 <table>
 <tr>
@@ -61,7 +75,7 @@
 
 <tr>
  <th align="right" class="form-label">Method</th>
- <td><input type="text" name="method" value=""></td>
+ <td><input type="text" name="method_name" value=""></td>
  <td class="form-help">Name of class method (no spaces!), e.g, 'showFoo'</td>
 </tr>
 
@@ -79,7 +93,7 @@
 <p class="form-help">
  Remove a module from the list above;  note that modules removed here
  may reaappear when Zope is restarted or when the CallProfiler product
- is refreshed (if they are hard-wired into the product).
+ is refreshed (if they are hard-wired into the CallProfiler product).
 </p>
 
 <form action="&dtml-URL1;/removeModule" method="POST">
@@ -89,7 +103,9 @@
  <td>
    <select name="name">
    <dtml-in getComponentModules>
-    <option value="&dtml-name;">&dtml-name;</option>
+    <option value="&dtml-name;.&dtml-method_name">
+      &dtml-name; -- &dtml-method_name;()
+    </option>
    </dtml-in>
    </select>
  </td>


=== Zope/lib/python/Products/CallProfiler/dtml/detail.dtml 1.1.2.1 => 1.1.2.2 ===
 
  <tr>
-  <td colspan=6><b>&dtml-url;</b> (total: <dtml-var time_total fmt="%.2fs">)</td>
+  <td colspan="6" align="right" nowrap>(total time: <dtml-var time_total fmt="%.2fs">)</td>
  </tr>
 
  <tr class="list-header">
@@ -32,8 +32,19 @@
     <dtml-else>
      <td>&nbsp;</td>
     </dtml-if>
-    <td>
-     <dtml-if object><tt>&dtml-treepart;</tt><dtml-if icon><img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;"></dtml-if>
+    <td nowrap>
+     <dtml-if path>
+       <tt>&dtml-treepart;</tt>
+       <dtml-if icon>
+         <img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;">
+       </dtml-if>
+       &dtml-path;
+       &dtml-str_call_count;
+     <dtml-elif object>
+     <tt>&dtml-treepart;</tt>
+     <dtml-if icon>
+        <img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;">
+     </dtml-if>
 	&dtml-object;
 	&dtml-str_call_count;
      <dtml-else><tt>&dtml-treepart; |</tt></dtml-if>


=== Zope/lib/python/Products/CallProfiler/dtml/results.dtml 1.1.2.1 => 1.1.2.2 ===
 <dtml-var manage_tabs>
 
-<form action="clear"><input type="submit" value="clear"></form>
+<table width="100%">
+  <tr>
+    <td>
+      <form action="clear"><input type="submit" value="clear"></form>
+    </td>
+    <td align="right">
+      <a href="results?expand_all=1"> Expand all entries (slow!) </a>
+    </td>
+  </tr>
+</table>
+  
 
-<table width="90%" border=0 cellspacing=0 cellpadding=2>
+<table border=1 cellspacing=0 cellpadding=2 width="100%">
 <tr class="list-header"><td rowspan=2 align="center" valign="bottom">
-	<dtml-var "sortcol('time_start', 'Time', 1)"></td>
+        <dtml-var "sortcol('time_start', 'Time', 1)"></td>
     <td rowspan=2 align="center" valign="bottom">
-	<dtml-var "sortcol('time_total', 'Total time')"></td>
+        <dtml-var "sortcol('time_total', 'Total time')"></td>
     <td rowspan=2 align="center" valign="bottom">
-	<dtml-var "sortcol('url', 'URL')"></td>
+        <dtml-var "sortcol('url', 'URL')"></td>
     <td rowspan=2 align="center" valign="bottom">
-	<dtml-var "sortcol('num_event', 'Calls')"></td>
+        <dtml-var "sortcol('num_event', 'Calls')"></td>
     <td colspan=2 align="center">Cache</td>
 </tr>
 <tr class="list-header">
@@ -21,19 +31,54 @@
 
 <dtml-in summary>
  <tr class="<dtml-if sequence-odd>row-hilite<dtml-else>row-normal</dtml-if>">
-  <td><a href="results?tid=&dtml-tid;">&dtml-str_time_start;</a></td>
-  <td><dtml-var time_total fmt="%2.4f"></td>
-  <td>&dtml-url;</td>
+  <td valign="top">
+     <a name="&dtml-tid;">     </a>
+       <a href="results?expand_tid=&dtml-tid;#&dtml-tid;">
+         &dtml-str_time_start;
+       </a>
+  </td>
+  <td valign="top">
+     <dtml-var time_total fmt="%2.4f">
+  </td>
+  <td>
+    <table>
+      <tr>
+        <td>
+          <b> &dtml-url; </b>
+        </td>
+      </tr>
+    <dtml-if expr="(REQUEST.get('expand_tid', 0) == tid)
+                   or REQUEST.get('expand_all', 0)">
+      <tr>
+        <td colspan="3">
+          <dtml-var "detail(this(), REQUEST, tid=tid)">
+        </td>
+      </tr>
+   </dtml-if>
+    </table>
+  </td>
   <td>&dtml-num_event;</td>
   <td>&dtml-num_cache_hit;</td>
   <td>&dtml-num_cache_miss;</td>
  </tr>
+
 </dtml-in>
 
 </table>
 
-<dtml-if tid><dtml-var "detail(this(), REQUEST, tid=tid)"></dtml-if>
-
-<form action="clear"><input type="submit" value="clear"></form>
+<table width="100%">
+  <tr>
+    <td>
+      <form action="clear"><input type="submit" value="clear"></form>
+    </td>
+    <td align="right">
+      <dtml-if expand_all>
+        <a href="results"> Collapse all entries</a>
+      <dtml-else>
+        <a href="results?expand_all=1"> Expand all entries (slow!) </a>
+      </dtml-if>
+    </td>
+  </tr>
+</table>
 
 <dtml-var manage_page_footer>