Further work on statistics display
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Wed, 25 May 2011 17:43:20 +0000 (17:43 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Wed, 25 May 2011 17:43:20 +0000 (17:43 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4165 e3abac25-378b-4346-85de-24260fe3988d

statpages/Joblist.jsp
statpages/MonthlySummary.jsp [new file with mode: 0644]
statpages/Statistics.jsp

index 4de793b..ba232c2 100644 (file)
@@ -38,7 +38,7 @@ defaultsort="0" defaultorder="descending">
                </c:otherwise>\r
                </c:choose>\r
        </dt:column>\r
-       <dt:column property="clusterJobId" title="Cluster JobID" sortable="true"></dt:column>\r
+       <dt:column property="clusterJobId" title="Cluster JobID" sortable="false"></dt:column>\r
        <dt:column property="inputSize" title="Input Size (Kb)" sortable="true"></dt:column>\r
        <dt:column property="resultSize" title="Result Size (Kb)" sortable="true"></dt:column>\r
        <dt:column property="runtime" title="Runtime (s)" sortable="true"></dt:column>\r
diff --git a/statpages/MonthlySummary.jsp b/statpages/MonthlySummary.jsp
new file mode 100644 (file)
index 0000000..09d3ca5
--- /dev/null
@@ -0,0 +1,66 @@
+<?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
+\r
+\r
+<h2>Web Services Usage Statistics</h2>\r
+<table class="its" style="border: 1px solid red; border-collapse: separate;"> \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
+</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
+<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
+<td>Total:</td>\r
+<td>${total.total}</td>\r
+<td>${total.incomplete}</td>\r
+<td>${total.cancelled}</td>\r
+<td>${total.abandoned}</td>\r
+</tr>\r
+</tbody>\r
+</table>\r
+\r
+\r
+</body>\r
+</html>
\ No newline at end of file
index 11ab920..f788e7c 100644 (file)
@@ -18,35 +18,36 @@ Date: May 2011
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />\r
 <title>Cluster usage per user</title>\r
 <style type="text/css" media="all">\r
-     @import url("statpages/screen.css");\r
+     @import url("${pageContext.request.contextPath}/statpages/screen.css");\r
 </style>\r
-<link rel="stylesheet" href="statpages/print.css" type="text/css" media="print" />\r
-\r
+<link rel="stylesheet" href="${pageContext.request.contextPath}/statpages/print.css" type="text/css" media="print" />\r
 </head>\r
+\r
 <body>\r
 \r
-<div id="wrapper">\r
+\r
 <h2>All jobs</h2>\r
-<table style="border: 1px solid red; border-collapse: separate;"> \r
+<table class="its" style="border: 1px solid red; border-collapse: separate;"> \r
+<thead>\r
 <tr>\r
 <th rowspan="2">Web Service</th>\r
-<th colspan="3" style="text-align: center">Number of Jobs</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>Failed</th>\r
 <th>Abandoned</th>\r
 </tr>\r
+</thead>\r
+<tbody>\r
 <c:set var="count"></c:set>\r
-<c:forEach items="${stat}" var="ws" >\r
+<c:forEach items="${stat.allStat}" var="ws" >\r
 <tr>\r
 <td>${ws.key}</td>\r
 <td><a href="Joblist?ws=${ws.key}&where=everywhere&type=all&from=${startDate}&to=${stopDate}">${ws.value.jobNumber}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=everywhere&type=incomplete&from=${startDate}&to=${stopDate}">${fn:length(ws.value.incompleteJobs)}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=everywhere&type=cancelled&from=${startDate}&to=${stopDate}">${fn:length(ws.value.cancelledJobs)}</a></td>\r
-<td><a href="Joblist?ws=${ws.key}&where=everywhere&type=failed&from=${startDate}&to=${stopDate}">${fn:length(ws.value.failedJobs)}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=everywhere&type=abandoned&from=${startDate}&to=${stopDate}">${fn:length(ws.value.abandonedJobs)}</a></td>\r
 </tr>\r
 </c:forEach>\r
@@ -55,57 +56,76 @@ Date: May 2011
 <td>${statTotal.total}</td>\r
 <td>${statTotal.incomplete}</td>\r
 <td>${statTotal.cancelled}</td>\r
-<td>${statTotal.failed}</td>\r
 <td>${statTotal.abandoned}</td>\r
 </tr>\r
-\r
+</tbody>\r
 </table>\r
 \r
 <h2>Local jobs</h2>\r
 <table style="border: 1px solid red; border-collapse: separate;"> \r
 <tr>\r
 <th rowspan="2">Web Service</th>\r
-<th colspan="3" style="text-align: center">Number of Jobs</th>\r
+<th colspan="4" style="text-align: center">Number of Jobs</th>\r
 </tr>\r
 <tr>\r
-<th>OK </th>\r
-<th>Unfinished</th>\r
+<th>Total</th>\r
+<th>Incomplete</th>\r
 <th>Cancelled</th>\r
+<th>Abandoned</th>\r
 </tr>\r
 \r
-<c:forEach items="${statLocal}" var="ws" >\r
+<c:forEach items="${stat.localStat}" var="ws" >\r
 <tr>\r
 <td>${ws.key}</td>\r
 <td><a href="Joblist?ws=${ws.key}&where=local&type=all&from=${startDate}&to=${stopDate}">${ws.value.jobNumber}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=local&type=incomplete&from=${startDate}&to=${stopDate}">${fn:length(ws.value.incompleteJobs)}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=local&type=cancelled&from=${startDate}&to=${stopDate}">${fn:length(ws.value.cancelledJobs)}</a></td>\r
+<td><a href="Joblist?ws=${ws.key}&where=local&type=abandoned&from=${startDate}&to=${stopDate}">${fn:length(ws.value.abandonedJobs)}</a></td>\r
 </tr>\r
 </c:forEach>\r
+\r
+<tr>\r
+<td>Total:</td>\r
+<td>${statTotalLocal.total}</td>\r
+<td>${statTotalLocal.incomplete}</td>\r
+<td>${statTotalLocal.cancelled}</td>\r
+<td>${statTotalLocal.abandoned}</td>\r
+</tr>\r
+\r
 </table>\r
 \r
 <h2>Cluster jobs</h2>\r
 <table style="border: 1px solid red; border-collapse: separate;"> \r
 <tr>\r
 <th rowspan="2">Web Service</th>\r
-<th colspan="3" style="text-align: center">Number of Jobs</th>\r
+<th colspan="4" style="text-align: center">Number of Jobs</th>\r
 </tr>\r
 <tr>\r
-<th>OK </th>\r
-<th>Unfinished</th>\r
+<th>Total</th>\r
+<th>Incomplete</th>\r
 <th>Cancelled</th>\r
+<th>Abandoned</th>\r
 </tr>\r
 \r
-<c:forEach items="${statCluster}" var="ws" >\r
+<c:forEach items="${stats.clusterStat}" var="ws" >\r
 <tr>\r
 <td>${ws.key}</td>\r
 <td><a href="Joblist?ws=${ws.key}&where=cluster&type=all&from=${startDate}&to=${stopDate}">${ws.value.jobNumber}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=cluster&type=incomplete&from=${startDate}&to=${stopDate}">${fn:length(ws.value.incompleteJobs)}</a></td>\r
 <td><a href="Joblist?ws=${ws.key}&where=cluster&type=cancelled&from=${startDate}&to=${stopDate}">${fn:length(ws.value.cancelledJobs)}</a></td>\r
+<td><a href="Joblist?ws=${ws.key}&where=cluster&type=abandoned&from=${startDate}&to=${stopDate}">${fn:length(ws.value.abandonedJobs)}</a></td>\r
 </tr>\r
 </c:forEach>\r
+<tr>\r
+<td>Total:</td>\r
+<td>${statTotalCluster.total}</td>\r
+<td>${statTotalCluster.incomplete}</td>\r
+<td>${statTotalCluster.cancelled}</td>\r
+<td>${statTotalCluster.abandoned}</td>\r
+</tr>\r
+\r
 </table>\r
 \r
-</div><!-- Wrapper end -->\r
 \r
 <%--\r
 <dt:table class="its" id="order" name="${stat.abandonedJobs}" export="true" sort="list"  pagesize="-1" \r