Merge branch 'master' into servlets
[proteocache.git] / website / ReportNew.jsp
diff --git a/website/ReportNew.jsp b/website/ReportNew.jsp
new file mode 100644 (file)
index 0000000..969cad7
--- /dev/null
@@ -0,0 +1,63 @@
+<%@page import="java.util.ArrayList"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@ taglib uri="http://displaytag.sf.net" prefix="dt"%>
+<c:choose>
+       <c:when test="${flag == 'AllDate'}">
+               <h3>Jobs statistics for the whole period</h3>
+       </c:when>
+       <c:otherwise>
+               <h3>
+                       Jobs statistics for the Period:
+                       <c:out value="${data1}" />
+                       to
+                       <c:out value="${data2}" />
+               </h3>
+       </c:otherwise>
+</c:choose>
+<h3>Time execution: ${timeExecution} ms</h3>
+
+<c:set var="sum" value="0" />
+<c:forEach items="${result}" var="res">
+       <c:set var="tot" value="${res.total}" />
+       <c:set var="sum" value="${sum + tot}" />
+</c:forEach>
+
+
+<table border="1" style="border-collapse: collapse; white-space: nowrap">
+       <thead>
+               <tr>
+                       <th rowspan="2" style="text-align: centre">Date</th>
+                       <th colspan="4" style="text-align: centre">Number of Proteins</th>
+               </tr>
+               <tr>
+                       <th style="text-align: centre">Total</th>
+                       <th style="text-align: centre">Failed</th>
+                       <th style="text-align: centre">Cancelled</th>
+                       <th style="text-align: centre">Abandoned</th>
+               </tr>
+       </thead>
+       <tbody>
+
+               <tr style="font-weight: bolder;">
+                       <td>Total:</td>
+                       <td style="text-align: right">${sum}</td>
+                       <td style="text-align: right">0</td>
+                       <td style="text-align: right">0</td>
+                       <td style="text-align: right">0</td>
+               </tr>
+
+               <c:set var="sum" value="0" />
+               <c:forEach items="${result}" var="res">
+                       <tr>
+                               <td>${res.date}</td>
+                               <td style="text-align: right"><c:out value="${res.total}" /></td>
+                               <td style="text-align: right">0</td>
+                               <td style="text-align: right">0</td>
+                               <td style="text-align: right">0</td>
+                       </tr>
+               </c:forEach>
+
+       </tbody>
+</table>
\ No newline at end of file