JABA 1 is to keep working, later when 2 is ready replace jabaws mapping to point to \r
JABA 2 but provide a link to JABA 1. \r
\r
-install JABA 1 stat server \r
++install JABA 1 stat server \r
\r
+Get path to Java executable from JAVA_HOME ? (for Jronn AACon) \r
+Describe requirements \r
<servlet-class>compbio.stat.servlet.AnnualStat</servlet-class>\r
</servlet>\r
\r
+ <servlet>\r
+ <description>Display monthly summary statistics with no links to details</description>\r
+ <servlet-name>PublicAnnualStat</servlet-name>\r
+ <servlet-class>compbio.stat.servlet.AnnualStat</servlet-class>\r
+ </servlet>\r
+ \r
<servlet>\r
<servlet-name>RegistryWS</servlet-name>\r
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>\r
<url-pattern>/AnnualStat</url-pattern>\r
</servlet-mapping> \r
\r
+ <servlet-mapping>\r
+ <servlet-name>PublicAnnualStat</servlet-name>\r
+ <url-pattern>/PublicAnnualStat</url-pattern>\r
+ </servlet-mapping> \r
+ \r
+ \r
<servlet-mapping>\r
<servlet-name>Joblist</servlet-name>\r
<url-pattern>/Joblist</url-pattern>\r
</c:otherwise>\r
</c:choose>\r
\r
-<td><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></td>\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
</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_usagestats.html#helpUsageStats>help</a>)</p>\r
+</c:if>\r
+\r
</div> <!-- page enclosing div end -->\r
<jsp:include page="footer.jsp" />
\ No newline at end of file
\r
RequestDispatcher dispatcher = req\r
.getRequestDispatcher("statpages/MonthlySummary.jsp");\r
+\r
+ req.setAttribute("isAdmin", isAdmin(req));\r
dispatcher.forward(req, resp);\r
\r
} catch (SQLException e) {\r
}\r
}\r
\r
+ static boolean isAdmin(final HttpServletRequest request) {\r
+ return request.isUserInRole("admin");\r
+ }\r
+\r
}\r