JWS-121 & JWS-109 Improved the way the service_status.jsp and usage_statistics.jsp...
[jabaws.git] / website / statpages / MonthlySummary.jsp
1 <%--
2 Author: Peter Troshin
3 Date: May 2011
4 --%>
5 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
6 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
7 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
8 <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>
9
10 <c:import url="../template_header.jsp" >
11         <c:param name="title">Usage Statistics</c:param>
12         <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
13                                                                                   rel="stylesheet"></c:param>
14 </c:import>
15
16 <%-- load cached Service Status --%>
17     <div class="row">
18         <div class="col-md-3"></div>
19         <div class="col-md-6">
20             <div class="center-block">
21                 <hidden_loader style="display:none;">
22                     <div class="alert alert-warning" role="alert">
23                         <p style="text-align: center; font-size: 16px">
24                             <img src="${pageContext.request.contextPath}/static/img/loader.gif" style="width:7%;height:7%">
25                             &nbsp;&nbsp;&nbsp;&nbsp;This request usually takes several minutes to be served...
26                         </p>
27                     </div>
28                 </hidden_loader>
29             </div>
30         </div>
31         <div class="col-md-3"></div>
32     </div>
33
34 <div class="row" id="mainpage">
35         <div class="col-md-12">
36                 <div class="panel panel-default">
37                         <div class="panel panel-heading">
38                                 <h1 class="panel-title">JABAWS Services Status</h1>
39                         </div>
40                         <div class="panel-body">
41                                 <div style="margin: 20px ">
42                                         <ul>
43                                                 <li><strong>Server:</strong> <a href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}">
44                                                         ${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}
45                                                 </a> </li>
46                                                 <li><strong>Time of execution:</strong> ${timeexec} sec</li>
47                                                 <li><strong>Usage Statistics as of:</strong> ${timestamp}</li>
48                                                 <li><a href="${pageContext.request.contextPath}/PublicAnnualStat" title="JABAWS server usage statistics."
49                                                 id="show_hidden2"><i class="fa fa-bar-chart" aria-hidden="true"></i> Refresh Usage Statistics</a></li>
50                                         </ul>
51                                         <br/>
52                                         <table class="center its" style="width: 600px ">
53                                                 <thead>
54                                                 <tr>
55                                                         <th rowspan="2">Month</th>
56                                                         <th colspan="4" style="text-align: center">Number of Jobs</th>
57                                                 </tr>
58                                                 <tr>
59                                                         <th title="Total number of jobs received">Total</th>
60                                                         <th title="The number of jobs with no result">Incomplete</th>
61                                                         <th title="The number of cancelled jobs">Cancelled</th>
62                                                         <th title="The number of jobs started but not collected by the user">Abandoned</th>
63                                                 </tr>
64                                                 </thead>
65                                                 <tbody>
66
67                                                 <c:forEach items="${stat}" var="monthTotal" varStatus="status">
68                                                         <c:choose>
69                                                                 <c:when test="${status.count%2==0}">
70                                                                         <tr class="even">
71                                                                 </c:when>
72                                                                 <c:otherwise>
73                                                                         <tr class="odd">
74                                                                 </c:otherwise>
75                                                         </c:choose>
76
77                                                         <td>
78                                                                 <c:choose>
79                                                                         <c:when test="${isAdmin}">
80                                                                                 <a title="Click to view the detailed statistics for the period" href="DisplayStat?datetime=${monthTotal.key.time}"><fmt:formatDate value="${monthTotal.key}" type="date" pattern="MMM yyyy"/></a>
81                                                                         </c:when>
82                                                                         <c:otherwise>
83                                                                                 <fmt:formatDate value="${monthTotal.key}" type="date" pattern="MMM yyyy"/>
84                                                                         </c:otherwise>
85                                                                 </c:choose>
86
87                                                         </td>
88                                                         <td>${monthTotal.value.total}</td>
89                                                         <td>${monthTotal.value.incomplete}</td>
90                                                         <td>${monthTotal.value.cancelled}</td>
91                                                         <td>${monthTotal.value.abandoned}</td>
92                                                         </tr>
93                                                 </c:forEach>
94                                                 <tr style="font-weight: bolder;">
95                                                         <td>Total:</td>
96                                                         <td>${total.total}</td>
97                                                         <td>${total.incomplete}</td>
98                                                         <td>${total.cancelled}</td>
99                                                         <td>${total.abandoned}</td>
100                                                 </tr>
101                                                 </tbody>
102                                         </table>
103
104                                         <div style="width: 600px">
105                                                 <h3>Help</h3>
106                                                 <p>
107                                                         The table contains the number of jobs processed by JABAWS per month, for the whole
108                                                         period when the statistics was collected</p>
109                                                 For each month the table contains the following information.
110                                                 <ul>
111                                                         <li>The period of time for which statistics is displayed. For example Jan 2011 means period of time from the first of
112                                                                 January to the 31 of January.</li>
113                                                         <li>Total - the total number of jobs accepted by JABAWS</li>
114                                                         <li>Incomplete - the number of jobs for which the result file was not found or was empty excluding cancelled</li>
115                                                         <li>Cancelled - the number of jobs cancelled by the user</li>
116                                                         <li>Abandoned - the number of jobs which result(s) were not collected</li>
117                                                 </ul>
118                                                 The summary for each column is displayed in the last row of the table.
119                                         </div> <!-- Help text enclosing dev end -->
120                                         <c:if test="${!isAdmin}">
121                                                 <br/><p><a href="AnnualStat">Please login as administrator</a> to view the detailed statistics (<a href=docs/stats.html>help</a>)</p>
122                                         </c:if>
123
124                                 </div><!-- margin div -->
125                         </div>
126                 </div>
127         </div>
128 </div>
129
130 <jsp:include page="../template_footer.jsp" />