Merge branch 'JWS-35' into JABAWS_Release_2_0
[jabaws.git] / statpages / MonthlySummary.jsp
index 09d3ca5..ec06abf 100644 (file)
@@ -1,57 +1,62 @@
-<?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
 <%--\r
 Author: Peter Troshin\r
 Date: May 2011\r
 --%>\r
-\r
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\r
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>\r
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>\r
 <%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>\r
 \r
-    \r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r
-<head>\r
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />\r
-<title>JABAWS Monthly Summary Usage Statistics</title>\r
-<style type="text/css" media="all">\r
-     @import url("${pageContext.request.contextPath}/statpages/screen.css");\r
-</style>\r
-<link rel="stylesheet" href="${pageContext.request.contextPath}/statpages/print.css" type="text/css" media="print" />\r
-</head>\r
-\r
-<body>\r
+<c:import url="header.jsp" >\r
+       <c:param name="title">JABAWS Usage Statistics</c:param>\r
+</c:import>  \r
 \r
+<div style="margin: 20px ">  \r
 \r
-<h2>Web Services Usage Statistics</h2>\r
-<table class="its" style="border: 1px solid red; border-collapse: separate;"> \r
+<h1>JABAWS Usage Statistics</h1>\r
+<table class="center its" style="width: 600px "> \r
 <thead>\r
 <tr>\r
 <th rowspan="2">Month</th>\r
 <th colspan="4" style="text-align: center">Number of Jobs</th>\r
 </tr>\r
 <tr>\r
-<th>Total</th>\r
-<th>Incomplete</th>\r
-<th>Cancelled</th>\r
-<th>Abandoned</th>\r
+<th title="Total number of jobs received">Total</th>\r
+<th title="The number of jobs with no result">Incomplete</th>\r
+<th title="The number of cancelled jobs">Cancelled</th>\r
+<th title="The number of jobs started but not collected by the user">Abandoned</th>\r
 </tr>\r
 </thead>\r
 <tbody>\r
 \r
-<c:forEach items="${stat}" var="monthTotal" >\r
-<tr>\r
-<td><a href="DisplayStat?month=${monthTotal.key}"><fmt:formatDate value="${monthTotal.key}" type="date" pattern="MMM yyyy"/></a></td>\r
+<c:forEach items="${stat}" var="monthTotal" 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
+\r
+<td>\r
+<c:choose>\r
+<c:when test="${isAdmin}">\r
+  <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>\r
+</c:when>\r
+<c:otherwise>\r
+   <fmt:formatDate value="${monthTotal.key}" type="date" pattern="MMM yyyy"/>\r
+</c:otherwise>\r
+</c:choose>\r
+\r
+</td>\r
 <td>${monthTotal.value.total}</td>\r
 <td>${monthTotal.value.incomplete}</td>\r
 <td>${monthTotal.value.cancelled}</td>\r
 <td>${monthTotal.value.abandoned}</td>\r
 </tr>\r
 </c:forEach>\r
-<tr>\r
+<tr style="font-weight: bolder;">\r
 <td>Total:</td>\r
 <td>${total.total}</td>\r
 <td>${total.incomplete}</td>\r
@@ -61,6 +66,25 @@ Date: May 2011
 </tbody>\r
 </table>\r
 \r
+<div style="width: 600px">\r
+<h3>Help</h3>\r
+<p>\r
+The table contains the number of jobs processed by JABAWS per month, for the whole \r
+period when the statistics was collected</p> \r
+For each month the table contains the following information.  \r
+<ul>\r
+       <li>The period of time for which statistics is displayed. For example Jan 2011 means period of time from the first of \r
+       January to the 31 of January.</li>\r
+       <li>Total - the total number of jobs accepted by JABAWS</li>\r
+       <li>Incomplete - the number of jobs for which the result file was not found or was empty excluding cancelled</li>\r
+       <li>Cancelled - the number of jobs cancelled by the user</li>\r
+       <li>Abandoned - the number of jobs which result(s) were not collected</li>\r
+</ul>\r
+The summary for each column is displayed in the last row of the table.\r
+</div> <!-- Help text enclosing dev end -->\r
+<c:if test="${!isAdmin}">\r
+<br/><p><a href="AnnualStat">Please login as administrator</a> to view the detailed statistics (<a href=man_stats.html#helpUsageStats>help</a>)</p>\r
+</c:if>\r
 \r
-</body>\r
-</html>
\ No newline at end of file
+</div> <!-- page enclosing div end -->\r
+<jsp:include page="footer.jsp" />
\ No newline at end of file