261a11bf2959bfe54699b58e0e0a702696993b58
[proteocache.git] / website / ReportJobsByDate.jsp
1 <%@page import="java.util.ArrayList"%>
2 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
3 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
4 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
5 <%@ taglib uri="http://displaytag.sf.net" prefix="dt"%>
6 <c:choose>
7         <c:when test="${flag == 'AllDate'}">
8                 <h3>Jobs statistics for the whole period</h3>
9         </c:when>
10         <c:otherwise>
11                 <h3>
12                         Jobs statistics for the Period:
13                         <c:out value="${data1}" />
14                         to
15                         <c:out value="${data2}" />
16                 </h3>
17         </c:otherwise>
18 </c:choose>
19 <h3>Time execution: ${timeExecution} ms</h3>
20
21 <c:set var="sum" value="0" />
22 <c:forEach items="${result}" var="res">
23         <c:set var="tot" value="${res.total}" />
24         <c:set var="sum" value="${sum + tot}" />
25 </c:forEach>
26
27
28 <table border="1" style="border-collapse: collapse; white-space: nowrap">
29         <thead>
30                 <tr>
31                         <th rowspan="2" style="text-align: centre">Date</th>
32                         <th colspan="4" style="text-align: centre">Number of Proteins</th>
33                 </tr>
34                 <tr>
35                         <th style="text-align: centre">Total</th>
36                         <th style="text-align: centre">Failed</th>
37                         <th style="text-align: centre">Cancelled</th>
38                         <th style="text-align: centre">Abandoned</th>
39                 </tr>
40         </thead>
41         <tbody>
42
43                 <tr style="font-weight: bolder;">
44                         <td>Total:</td>
45                         <td style="text-align: right">${sum}</td>
46                         <td style="text-align: right">0</td>
47                         <td style="text-align: right">0</td>
48                         <td style="text-align: right">0</td>
49                 </tr>
50
51                 <c:forEach items="${result}" var="res">
52                         <tr>
53                                 <td>${res.date}</td>
54                                 <td style="text-align: right"><c:out value="${res.total}" /></td>
55                                 <td style="text-align: right">0</td>
56                                 <td style="text-align: right">0</td>
57                                 <td style="text-align: right">0</td>
58                         </tr>
59                 </c:forEach>
60
61         </tbody>
62 </table>