source: nutchez-0.1/tomcat/webapps/manager/xform.xsl @ 81

Last change on this file since 81 was 66, checked in by waue, 15 years ago

NutchEz - an easy way to nutch

File size: 3.9 KB
Line 
1<?xml version="1.0"?>
2<!--
3  Licensed to the Apache Software Foundation (ASF) under one or more
4  contributor license agreements.  See the NOTICE file distributed with
5  this work for additional information regarding copyright ownership.
6  The ASF licenses this file to You under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with
8  the License.  You may obtain a copy of the License at
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17-->
18
19<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
20  version="1.0">
21
22  <!-- Output method -->
23  <xsl:output encoding="iso-8859-1"
24              indent="no"/>
25
26  <xsl:template match="status">
27    <html>
28    <head>
29      <TITLE>Tomcat Status</TITLE>
30    <STYLE type="text/css">
31      body, table, tr, td, a, div, span {
32        vertical-align : top;
33      }
34    </STYLE>
35    </head>
36    <body>
37      <div style='font-size:20px;'>Tomcat Status</div>
38
39      <xsl:apply-templates select="jvm"/>
40      <xsl:apply-templates select="connector"/>
41     </body>
42    </html>
43  </xsl:template>
44
45  <xsl:template match="jvm">
46   <xsl:apply-templates select="memory"/>
47  </xsl:template>
48
49  <xsl:template match="memory">
50    <table><tr>
51         <td><b>JVM:</b></td>
52         <td><b>free:</b> <xsl:value-of select="@free"/></td>
53         <td><b>total:</b> <xsl:value-of select="@total"/></td>
54         <td><b>max:</b> <xsl:value-of select="@max"/></td>
55         </tr>
56    </table><hr />
57  </xsl:template>
58
59  <xsl:template match="connector">
60   <b>Connector -- </b> <xsl:value-of select="@name"/><br />
61
62    <xsl:apply-templates select="threadInfo"/>
63    <xsl:apply-templates select="requestInfo"/>
64    <xsl:apply-templates select="workers"/>
65  </xsl:template>
66
67  <xsl:template match="threadInfo">
68    <table><tr>
69         <td><b>threadInfo </b></td>
70         <td><b>maxThreads:</b> <xsl:value-of select="@maxThreads"/></td>
71         <td><b>minSpareThreads:</b> <xsl:value-of select="@minSpareThreads"/></td>
72         <td><b>maxSpareThreads:</b> <xsl:value-of select="@maxSpareThreads"/></td>
73         <td><b>currentThreadCount:</b> <xsl:value-of select="@currentThreadCount"/></td>
74         <td><b>currentThreadsBusy:</b> <xsl:value-of select="@currentThreadsBusy"/></td>
75         </tr>
76    </table><hr />
77  </xsl:template>
78
79  <xsl:template match="requestInfo">
80    <table><tr>
81         <td><b>requestInfo </b></td>
82         <td><b>maxTime:</b> <xsl:value-of select="@maxTime"/></td>
83         <td><b>processingTime:</b> <xsl:value-of select="@processingTime"/></td>
84         <td><b>requestCount:</b> <xsl:value-of select="@requestCount"/></td>
85         <td><b>errorCount:</b> <xsl:value-of select="@errorCount"/></td>
86         <td><b>bytesReceived:</b> <xsl:value-of select="@bytesReceived"/></td>
87         <td><b>bytesSent:</b> <xsl:value-of select="@bytesSent"/></td>
88         </tr>
89    </table><hr />
90  </xsl:template>
91
92  <xsl:template match="workers">
93   <table>
94    <tr><th>Stage</th><th>Time</th><th>B Sent</th><th>B Recv</th><th>Client</th><th>VHost</th><th>Request</th></tr>
95    <xsl:apply-templates select="worker"/>
96
97   </table><hr />
98  </xsl:template>
99
100  <xsl:template match="worker">
101   <tr>
102    <td><xsl:value-of select="@stage"/></td>
103    <td><xsl:value-of select="@requestProcessingTime"/></td>
104    <td><xsl:value-of select="@requestBytesSent"/></td>
105    <td><xsl:value-of select="@requestBytesReceived"/></td>
106    <td><xsl:value-of select="@remoteAddr"/></td>
107    <td><xsl:value-of select="@virtualHost"/></td>
108    <td><xsl:value-of select="@method"/> <xsl:value-of select="@currentUri"/>?<xsl:value-of select="@currentQueryString"/> <xsl:value-of select="@protocol"/></td>
109   </tr>
110  </xsl:template>
111
112</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.