Slightly changed JSP page
[jabaws.git] / statpages / ServicesStatus.jsp
1 <?xml version="1.0" encoding="ISO-8859-1" ?>\r
2 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>\r
3 <%--\r
4 Author: Peter Troshin\r
5 Date: May 2011\r
6 This is a JSP fragment to be inserted into document, cannot be used alone\r
7 TODO refactor\r
8 --%>\r
9 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\r
10 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>\r
11 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>\r
12 <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>\r
13 \r
14 <c:import url="header.jsp" >\r
15         <c:param name="title">JABAWS Web Services Status</c:param>\r
16 </c:import>\r
17 <div style="margin: 20px ">\r
18 <h2 style="text-align: center;">JABAWS Services Status</h2>\r
19 \r
20 <c:set var="host" value="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}" />\r
21 \r
22 <ul style="font-weight:bold;">\r
23         <li>\r
24                 This servlet tests if the web services are healthy on the tomcat instance on which JABAWS is deployed. <br/>\r
25                 If the tomcat instance is mapped to another "proxy" web server, the servlet does not test availability of <br/>\r
26                 the web services at the endpoints of this external web server.</li>\r
27         <li>All the web services are tested while this page is being loaded</li>\r
28         <li>If you want to test the services again, reload this page.</li>\r
29         <li>Click on the service status to see the results of the testing.</li>\r
30         <li>Server tested: <a href="${host}">${host}</a> </li>\r
31         <li>Time of execusion: ${timeexec} msec</li>\r
32         <li> Your IP is ${pageContext.request.remoteAddr}</li>\r
33 </ul>\r
34 \r
35 <br/>\r
36 <br/>\r
37 <h2 style="text-align: center;color: green">\r
38         Alignment Web Services\r
39 </h2>\r
40 <table class="its" >\r
41 <thead>\r
42         <tr>\r
43                 <th title="Service name" width="100px">Service</th>\r
44                 <th title="Service status">Version</th>\r
45                 <th title="Service status">Status</th>\r
46                 <th title="Service details">Reference and more details</th>\r
47         </tr>\r
48 </thead>\r
49 <c:forEach items="${results}" var="res" varStatus="status">\r
50 <c:if test="${res.group=='alignment'}">\r
51         <c:if test="${status.count%2==0}">\r
52         <tr class="even">\r
53         </c:if><c:if test="${status.count%2!=0}">\r
54         <tr class="odd">\r
55         </c:if>\r
56                 <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>\r
57                 <td>${res.version}</td>\r
58                 <c:if test="${res.status}">\r
59                         <td><div class="source">\r
60                         <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
61                                 title="Click to open/close"><span style="color: green">OK</span></div>\r
62                         <div class="body collapsed">\r
63                         <pre>${res.details}</pre>\r
64                         </div></div></td>\r
65                 </c:if>\r
66                 <c:if test="${!res.status}">\r
67                         <td><div class="source">\r
68                         <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
69                                 title="Click to open/close"><span style="color: red">Fail</span></div>\r
70                         <div class="body collapsed">\r
71                         <pre>${res.details}</pre>\r
72                         </div></div></td>\r
73                 </c:if>\r
74                 <td><div class="source">\r
75                 <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
76                         title="Click to open/close"><span style="color: brown">INFO</span></div>\r
77                 <div class="body collapsed">\r
78                 <pre>${res.reference}</pre>\r
79                 </div></div></td>\r
80         </tr>\r
81 </c:if>\r
82 </c:forEach>\r
83 </table>\r
84 \r
85 <br/>\r
86 <br/>\r
87 <h2 style="text-align: center;color: green;">\r
88         Disorder Web Services\r
89 </h2>\r
90 <table class="its" >\r
91 <thead>\r
92         <tr>\r
93                 <th title="Service name" width="100px">Service</th>\r
94                 <th title="Service status">Version</th>\r
95                 <th title="Service status">Status</th>\r
96                 <th title="Service details">Reference and more details</th>\r
97         </tr>\r
98 </thead>\r
99 <c:forEach items="${results}" var="res" varStatus="status">\r
100 <c:if test="${res.group=='disorder'}">\r
101         <c:if test="${status.count%2==0}">\r
102         <tr class="even">\r
103         </c:if><c:if test="${status.count%2!=0}">\r
104         <tr class="odd">\r
105         </c:if>\r
106                 <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>\r
107                 <td>${res.version}</td>\r
108                 <c:if test="${res.status}">\r
109                         <td><div class="source">\r
110                         <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
111                                 title="Click to open/close"><span style="color: green">OK</span></div>\r
112                         <div class="body collapsed">\r
113                         <pre>${res.details}</pre>\r
114                         </div></div></td>\r
115                 </c:if>\r
116                 <c:if test="${!res.status}">\r
117                         <td><div class="source">\r
118                         <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
119                                 title="Click to open/close"><span style="color: red">Fail</span></div>\r
120                         <div class="body collapsed">\r
121                         <pre>${res.details}</pre>\r
122                         </div></div></td>\r
123                 </c:if>\r
124                 <td><div class="source">\r
125                 <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
126                         title="Click to open/close"><span style="color: brown">INFO</span></div>\r
127                 <div class="body collapsed">\r
128                 <pre>${res.reference}</pre>\r
129                 </div></div></td>\r
130         </tr>\r
131 </c:if>\r
132 </c:forEach>\r
133 </table>\r
134 \r
135 <br/>\r
136 <br/>\r
137 <h2 style="text-align: center;color: green;">\r
138         Other Web Services\r
139 </h2>\r
140 <table class="its" >\r
141 <thead>\r
142         <tr>\r
143                 <th title="Service name" width="100px">Service</th>\r
144                 <th title="Service status">Version</th>\r
145                 <th title="Service status">Status</th>\r
146                 <th title="Service details">Reference and more details</th>\r
147         </tr>\r
148 </thead>\r
149 <c:forEach items="${results}" var="res" varStatus="status">\r
150 <c:if test="${res.group!='alignment' and res.group!='disorder'}">\r
151         <c:if test="${status.count%2==0}">\r
152         <tr class="even">\r
153         </c:if><c:if test="${status.count%2!=0}">\r
154         <tr class="odd">\r
155         </c:if>\r
156                 <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>\r
157                 <td>${res.version}</td>\r
158                 <c:if test="${res.status}">\r
159                         <td><div class="source">\r
160                         <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
161                                 title="Click to open/close"><span style="color: green">OK</span></div>\r
162                         <div class="body collapsed">\r
163                         <pre>${res.details}</pre>\r
164                         </div></div></td>\r
165                 </c:if>\r
166                 <c:if test="${!res.status}">\r
167                         <td><div class="source">\r
168                         <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
169                                 title="Click to open/close"><span style="color: red">Fail</span></div>\r
170                         <div class="body collapsed">\r
171                         <pre>${res.details}</pre>\r
172                         </div></div></td>\r
173                 </c:if>\r
174                 <td><div class="source">\r
175                 <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
176                         title="Click to open/close"><span style="color: brown">INFO</span></div>\r
177                 <div class="body collapsed">\r
178                 <pre>${res.reference}</pre>\r
179                 </div></div></td>\r
180         </tr>\r
181 </c:if>\r
182 </c:forEach>\r
183 </table>\r
184 \r
185 <p>If you would like to integrate JABAWS with automated health check system you may want to use \r
186 the HTTP code response service checker. It responds with HTTP status code depending on the status \r
187 of the web service.\r
188 For more information please refer to <a href="man_serverwar.html#usingWsTester">Testing JABAWS server</a> help page.</p>\r
189 </div><!-- margin div -->       \r
190 <jsp:include page="footer.jsp" />\r