Re-design the ServiceStatus JSP page
[jabaws.git] / statpages / ServicesStatus.jsp
index b9c4fb2..7f5ffcd 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>\r
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1"\r
-    pageEncoding="ISO-8859-1"%>\r
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>\r
 <%--\r
 Author: Peter Troshin\r
 Date: May 2011\r
@@ -13,64 +12,170 @@ TODO refactor
 <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>\r
 \r
 <c:import url="header.jsp" >\r
-       <c:param name="title">JABAWS Services Status</c:param>\r
-</c:import>  \r
+       <c:param name="title">JABAWS Web Services Status</c:param>\r
+</c:import>\r
 <div style="margin: 20px ">\r
 <h2 style="text-align: center;">JABAWS Services Status</h2>\r
-<h2 style="text-align: center;">Server: \r
-<a href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}">\r
-<span style="color: green">${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}</span></a></h2>\r
+\r
+<ul style="font-weight: bold;">\r
+  <li>All the services are tested while this page is being loaded</li>\r
+  <li>If you want to test the services again, just reload this page.</li>\r
+  <li>Click on the service status to see the results of the testing.</li>\r
+  <li>Server tested: <a href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}">\r
+       ${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}\r
+       </a> </li>\r
+</ul>\r
+\r
+<br/>\r
 <br/>\r
-<p>All the services were tested while this page was loading. If you want to test the services again, just reload this page. Click on the service status to see the results of the testing.</p>\r
+<h2 style="text-align: center;color: green">\r
+       Alignment Web Services\r
+</h2>\r
 <table class="its" >\r
 <thead>\r
-<tr>\r
-<th title="The name of the service" width="100px">Service</th>\r
-<th title="Service status">Status</th>\r
-</tr>\r
+       <tr>\r
+               <th title="Service name" width="100px">Service</th>\r
+               <th title="Service status">Version</th>\r
+               <th title="Service status">Status</th>\r
+               <th title="Service details">Reference and more details</th>\r
+       </tr>\r
 </thead>\r
 <c:forEach items="${results}" var="res" varStatus="status">\r
-  <c:choose>\r
-       <c:when test="${status.count%2==0}">\r
-               <tr class="even">\r
-       </c:when>\r
-       <c:otherwise>\r
-               <tr class="odd">\r
-       </c:otherwise>\r
-</c:choose>\r
-  <td width="100px">${res.service}</td>\r
-  \r
-  <td>\r
-  <c:choose>\r
-       <c:when test="${res.status}">\r
-               \r
-               <div class="source">\r
-               <div class="header collapsed" onclick=\r
-               "$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
-               title="Click to open/close"><span style="color: green">OK</span></div>\r
+<c:if test="${res.group=='alignment'}">\r
+       <c:if test="${status.count%2==0}">\r
+       <tr class="even">\r
+       </c:if><c:if test="${status.count%2!=0}">\r
+       <tr class="odd">\r
+       </c:if>\r
+               <td width="100px">${res.service}</td>\r
+               <td>${res.version}</td>\r
+               <c:if test="${res.status}">\r
+                       <td><div class="source">\r
+                       <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                               title="Click to open/close"><span style="color: green">OK</span></div>\r
+                       <div class="body collapsed">\r
+                       <pre>${res.details}</pre>\r
+                       </div></div></td>\r
+               </c:if>\r
+               <c:if test="false == ${res.status}">\r
+                       <td><div class="source">\r
+                       <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                               title="Click to open/close"><span style="color: red">Fail</span></div>\r
+                       <div class="body collapsed">\r
+                       <pre>${res.details}</pre>\r
+                       </div></div></td>\r
+               </c:if>\r
+               <td><div class="source">\r
+               <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                       title="Click to open/close"><span style="color: brown">INFO</span></div>\r
                <div class="body collapsed">\r
-               <pre>${res.details}</pre>\r
-               </div>\r
-               </div>\r
-       </c:when>\r
-       <c:otherwise>\r
-       <div class="source">\r
-               <div class="header collapsed" onclick=\r
-               "$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
-               title="Click to open/close"><span style="color: red">Fail</span></div>\r
-               <div class="body collapsed">\r
-               <pre>${res.details}</pre>\r
-               </div>\r
-       </div>\r
+               <pre>${res.reference}</pre>\r
+               </div></div></td>\r
+       </tr>\r
+</c:if>\r
+</c:forEach>\r
+</table>\r
 \r
-       </c:otherwise>\r
-       </c:choose>\r
-  </td>\r
-  \r
-</tr>\r
+<br/>\r
+<br/>\r
+<h2 style="text-align: center;color: green;">\r
+       Disorder Web Services\r
+</h2>\r
+<table class="its" >\r
+<thead>\r
+       <tr>\r
+               <th title="Service name" width="100px">Service</th>\r
+               <th title="Service status">Version</th>\r
+               <th title="Service status">Status</th>\r
+               <th title="Service details">Reference and more details</th>\r
+       </tr>\r
+</thead>\r
+<c:forEach items="${results}" var="res" varStatus="status">\r
+<c:if test="${res.group=='disorder'}">\r
+       <c:if test="${status.count%2==0}">\r
+       <tr class="even">\r
+       </c:if><c:if test="${status.count%2!=0}">\r
+       <tr class="odd">\r
+       </c:if>\r
+               <td width="100px">${res.service}</td>\r
+               <td>${res.version}</td>\r
+               <c:if test="${res.status}">\r
+                       <td><div class="source">\r
+                       <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                               title="Click to open/close"><span style="color: green">OK</span></div>\r
+                       <div class="body collapsed">\r
+                       <pre>${res.details}</pre>\r
+                       </div></div></td>\r
+               </c:if>\r
+               <c:if test="false == ${res.status}">\r
+                       <td><div class="source">\r
+                       <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                               title="Click to open/close"><span style="color: red">Fail</span></div>\r
+                       <div class="body collapsed">\r
+                       <pre>${res.details}</pre>\r
+                       </div></div></td>\r
+               </c:if>\r
+               <td><div class="source">\r
+               <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                       title="Click to open/close"><span style="color: brown">INFO</span></div>\r
+               <div class="body collapsed">\r
+               <pre>${res.reference}</pre>\r
+               </div></div></td>\r
+       </tr>\r
+</c:if>\r
+</c:forEach>\r
+</table>\r
 \r
+<br/>\r
+<br/>\r
+<h2 style="text-align: center;color: green;">\r
+       Other Web Services\r
+</h2>\r
+<table class="its" >\r
+<thead>\r
+       <tr>\r
+               <th title="Service name" width="100px">Service</th>\r
+               <th title="Service status">Version</th>\r
+               <th title="Service status">Status</th>\r
+               <th title="Service details">Reference and more details</th>\r
+       </tr>\r
+</thead>\r
+<c:forEach items="${results}" var="res" varStatus="status">\r
+<c:if test="${res.group!='alignment' and res.group!='disorder'}">\r
+       <c:if test="${status.count%2==0}">\r
+       <tr class="even">\r
+       </c:if><c:if test="${status.count%2!=0}">\r
+       <tr class="odd">\r
+       </c:if>\r
+               <td width="100px">${res.service}</td>\r
+               <td>${res.version}</td>\r
+               <c:if test="${res.status}">\r
+                       <td><div class="source">\r
+                       <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                               title="Click to open/close"><span style="color: green">OK</span></div>\r
+                       <div class="body collapsed">\r
+                       <pre>${res.details}</pre>\r
+                       </div></div></td>\r
+               </c:if>\r
+               <c:if test="false == ${res.status}">\r
+                       <td><div class="source">\r
+                       <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                               title="Click to open/close"><span style="color: red">Fail</span></div>\r
+                       <div class="body collapsed">\r
+                       <pre>${res.details}</pre>\r
+                       </div></div></td>\r
+               </c:if>\r
+               <td><div class="source">\r
+               <div class="header collapsed" onclick="$(this).toggleClassName('collapsed'); $(this).next('.body').toggleClassName('collapsed');"\r
+                       title="Click to open/close"><span style="color: brown">INFO</span></div>\r
+               <div class="body collapsed">\r
+               <pre>${res.reference}</pre>\r
+               </div></div></td>\r
+       </tr>\r
+</c:if>\r
 </c:forEach>\r
 </table>\r
+\r
 <p>If you would like to integrate JABAWS with automated health check system you may want to use \r
 the HTTP code response service checker. It responds with HTTP status code depending on the status \r
 of the web service.\r