JWS-121 & JWS-109 Improved the way the service_status.jsp and usage_statistics.jsp...
[jabaws.git] / website / statpages / ServicesStatus.jsp
1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2 <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
3 <%--
4 Author: Peter Troshin
5 Date: May 2011
6 This is a JSP fragment to be inserted into document, cannot be used alone
7 TODO refactor
8 --%>
9 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
10 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
11 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
12 <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>
13
14 <c:import url="../template_header.jsp" >
15         <c:param name="title">Service Status</c:param>
16         <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
17                                                                                   rel="stylesheet"></c:param>
18 </c:import>
19
20 <%-- load cached Service Status --%>
21     <div class="row">
22         <div class="col-md-3"></div>
23         <div class="col-md-6">
24             <div class="center-block">
25                 <hidden_loader style="display:none;">
26                     <div class="alert alert-warning" role="alert">
27                         <p style="text-align: center; font-size: 16px">
28                             <img src="${pageContext.request.contextPath}/static/img/loader.gif" style="width:7%;height:7%">
29                             &nbsp;&nbsp;&nbsp;&nbsp;This request usually takes several minutes to be served...
30                         </p>
31                     </div>
32                 </hidden_loader>
33             </div>
34         </div>
35         <div class="col-md-3"></div>
36     </div>
37
38 <div class="row" id="mainpage">
39         <div class="col-md-12">
40                 <div class="panel panel-default">
41                         <div class="panel panel-heading">
42                                 <h1 class="panel-title">JABAWS Service Status</h1>
43                         </div>
44                         <div class="panel-body">
45
46                                 <div style="margin: 20px ">
47
48                                         <c:set var="host" value="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}" />
49
50                                         <ul>
51                                                 <li>
52                                                         This servlet tests if the web services are healthy on the tomcat instance on which JABAWS is deployed. <br/>
53                                                         If the tomcat instance is mapped to another "proxy" web server, the servlet does not test availability of <br/>
54                                                         the web services at the endpoints of this external web server.</li>
55                                                 <%--<li>All the web services are tested while this page is being loaded.</li>--%>
56                                                 <%--<li>If you want to test the services again, reload this page.</li>--%>
57                                                 <li>Click on the service status to see the results of the testing.</li>
58                                                 <li><strong>Server:</strong> <a href="${host}">${host}</a> </li>
59                                                 <li><strong>Time of execution:</strong> ${timeexec} sec</li>
60                                                 <li><strong>Service Status as of:</strong> ${timestamp}</li>
61                                                 <li><a href="${pageContext.request.contextPath}/ServiceStatus" title="JABAWS web-services status."
62                                                    id="show_hidden1"><i class="fa fa-cogs" aria-hidden="true"></i> Refresh Service Status</a></li>
63                                                 <%--<li> Your IP is ${pageContext.request.remoteAddr}</li>--%>
64                                         </ul>
65                                         <br/>
66                                         <h3 style="text-align: center;color: green">
67                                                 Alignment Web Services
68                                         </h3>
69                                         <table class="its" >
70                                                 <thead>
71                                                 <tr>
72                                                         <th title="Service name" width="100px">Service</th>
73                                                         <th title="Service status">Version</th>
74                                                         <th title="Service status">Status</th>
75                                                         <th title="Service details">Reference and more details</th>
76                                                 </tr>
77                                                 </thead>
78                                                 <c:forEach items="${results}" var="res" varStatus="status">
79                                                         <c:if test="${res.group=='alignment'}">
80                                                                 <c:if test="${status.count%2==0}">
81                                                                         <tr class="even">
82                                                                 </c:if><c:if test="${status.count%2!=0}">
83                                                                 <tr class="odd">
84                                                         </c:if>
85                                                                 <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>
86                                                                 <td>${res.version}</td>
87                                                                 <c:if test="${res.status}">
88                                                                         <td><div class="source">
89                                                                                 <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
90                                                                                          title="Click to open/close"><span style="color: green">OK</span></div>
91                                                                                 <div class="body collapsed" style="max-width: 400px;">
92                                                                                         <pre>${res.details}</pre>
93                                                                                 </div></div></td>
94                                                                 </c:if>
95                                                                 <c:if test="${!res.status}">
96                                                                         <td><div class="source">
97                                                                                 <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
98                                                                                          title="Click to open/close"><span style="color: red">Fail</span></div>
99                                                                                 <div class="body collapsed" style="max-width: 400px;">
100                                                                                         <pre>${res.details}</pre>
101                                                                                 </div></div></td>
102                                                                 </c:if>
103                                                                 <td><div class="source">
104                                                                         <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
105                                                                                  title="Click to open/close"><span style="color: brown">INFO</span></div>
106                                                                         <div class="body collapsed" style="max-width: 500px;">
107                                                                                 <pre>${res.reference}</pre>
108                                                                         </div></div></td>
109                                                                 </tr>
110                                                         </c:if>
111                                                 </c:forEach>
112                                         </table>
113
114                                         <br/>
115                                         <br/>
116                                         <h3 style="text-align: center;color: green;">
117                                                 Disorder Web Services
118                                         </h3>
119                                         <table class="its" >
120                                                 <thead>
121                                                 <tr>
122                                                         <th title="Service name" width="100px">Service</th>
123                                                         <th title="Service status">Version</th>
124                                                         <th title="Service status">Status</th>
125                                                         <th title="Service details">Reference and more details</th>
126                                                 </tr>
127                                                 </thead>
128                                                 <c:forEach items="${results}" var="res" varStatus="status">
129                                                         <c:if test="${res.group=='disorder'}">
130                                                                 <c:if test="${status.count%2==0}">
131                                                                         <tr class="even">
132                                                                 </c:if><c:if test="${status.count%2!=0}">
133                                                                 <tr class="odd">
134                                                         </c:if>
135                                                                 <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>
136                                                                 <td>${res.version}</td>
137                                                                 <c:if test="${res.status}">
138                                                                         <td><div class="source">
139                                                                                 <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
140                                                                                          title="Click to open/close"><span style="color: green">OK</span></div>
141                                                                                 <div class="body collapsed" style="max-width: 400px;">
142                                                                                         <pre>${res.details}</pre>
143                                                                                 </div></div></td>
144                                                                 </c:if>
145                                                                 <c:if test="${!res.status}">
146                                                                         <td><div class="source">
147                                                                                 <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
148                                                                                          title="Click to open/close"><span style="color: red">Fail</span></div>
149                                                                                 <div class="body collapsed" style="max-width: 400px;">
150                                                                                         <pre>${res.details}</pre>
151                                                                                 </div></div></td>
152                                                                 </c:if>
153                                                                 <td><div class="source">
154                                                                         <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
155                                                                                  title="Click to open/close"><span style="color: brown">INFO</span></div>
156                                                                         <div class="body collapsed" style="max-width: 500px;">
157                                                                                 <pre>${res.reference}</pre>
158                                                                         </div></div></td>
159                                                                 </tr>
160                                                         </c:if>
161                                                 </c:forEach>
162                                         </table>
163
164                                         <br/>
165                                         <br/>
166                                         <h3 style="text-align: center;color: green;">
167                                                 Other Web Services
168                                         </h3>
169                                         <table class="its" >
170                                                 <thead>
171                                                 <tr>
172                                                         <th title="Service name" width="100px">Service</th>
173                                                         <th title="Service status">Version</th>
174                                                         <th title="Service status">Status</th>
175                                                         <th title="Service details">Reference and more details</th>
176                                                 </tr>
177                                                 </thead>
178                                                 <c:forEach items="${results}" var="res" varStatus="status">
179                                                         <c:if test="${res.group!='alignment' and res.group!='disorder'}">
180                                                                 <c:if test="${status.count%2==0}">
181                                                                         <tr class="even">
182                                                                 </c:if><c:if test="${status.count%2!=0}">
183                                                                 <tr class="odd">
184                                                         </c:if>
185                                                                 <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>
186                                                                 <td>${res.version}</td>
187                                                                 <c:if test="${res.status}">
188                                                                         <td><div class="source">
189                                                                                 <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
190                                                                                          title="Click to open/close"><span style="color: green">OK</span></div>
191                                                                                 <div class="body collapsed" style="max-width: 400px;">
192                                                                                         <pre>${res.details}</pre>
193                                                                                 </div></div></td>
194                                                                 </c:if>
195                                                                 <c:if test="${!res.status}">
196                                                                         <td><div class="source">
197                                                                                 <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
198                                                                                          title="Click to open/close"><span style="color: red">Fail</span></div>
199                                                                                 <div class="body collapsed" style="max-width: 400px;">
200                                                                                         <pre>${res.details}</pre>
201                                                                                 </div></div></td>
202                                                                 </c:if>
203                                                                 <td><div class="source">
204                                                                         <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
205                                                                                  title="Click to open/close"><span style="color: brown">INFO</span></div>
206                                                                         <div class="body collapsed" style="max-width: 500px;">
207                                                                                 <pre>${res.reference}</pre>
208                                                                         </div></div></td>
209                                                                 </tr>
210                                                         </c:if>
211                                                 </c:forEach>
212                                         </table>
213
214                                         <p>If you would like to integrate JABAWS with automated health check system you may want to use
215                                                 the HTTP code response service checker. It responds with HTTP status code depending on the status
216                                                 of the web service.
217                                                 For more information please refer to <a href="${pageContext.request.contextPath}/docs/advanced.html#testing-the-jabaws-server">
218                                                         Testing JABAWS server</a> help page.</p>
219                                 </div><!-- margin div -->
220                         </div>
221                 </div>
222         </div>
223 </div>
224
225 <jsp:include page="../template_footer.jsp" />