JWS-121 Added new jsp enpoints that try loading chached service status and usage...
[jabaws.git] / website / service_status.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 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
5 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
6 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
7 <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>
8
9 <c:import url="/template_header.jsp" >
10         <c:param name="title">Service Status</c:param>
11         <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
12                                                                                   rel="stylesheet"></c:param>
13 </c:import>
14
15 <%-- check if the cached page is available: if not redirects--%>
16 <%@ page import="java.io.*,java.net.*" %>
17 <%
18     URL url = new URL(request.getRequestURL().toString().replaceAll("/service_status.jsp", "") +
19                       "/cached_service_status.html");
20     HttpURLConnection http = (HttpURLConnection)url.openConnection();
21     int statusCode = http.getResponseCode();
22     if (statusCode != 200) {
23         String redirectURL = "ServiceStatus";
24         response.sendRedirect(redirectURL);}
25 %>
26
27 <%-- load cached Service Status --%>
28     <div class="row">
29         <div class="col-md-3"></div>
30         <div class="col-md-6">
31             <div class="center-block">
32                 <hidden_loader style="display:none;">
33                     <div class="alert alert-warning" role="alert">
34                         <p style="text-align: center; font-size: 16px">
35                             <img src="${pageContext.request.contextPath}/static/img/loader.gif" style="width:7%;height:7%">
36                             &nbsp;&nbsp;&nbsp;&nbsp;This request usually takes several minutes to be served...
37                         </p>
38                     </div>
39                 </hidden_loader>
40             </div>
41         </div>
42         <div class="col-md-3"></div>
43     </div>
44
45 <div class="row" id="mainpage">
46         <div class="col-md-12">
47         <p>The results shown below have been cached from a request made (up to an hour) before...
48         <a class="btn btn-default" href="${pageContext.request.contextPath}/ServiceStatus" role="button"
49         title="JABAWS web-services status."
50            id="show_hidden1"><i class="fa fa-cogs" aria-hidden="true"></i> Get fresh Service Status</a>
51         </p>
52     </div>
53 </div>
54
55 <jsp:include page="/cached_service_status.html" />
56
57 <jsp:include page="/template_footer.jsp" />