Improve JSP pages
[proteocache.git] / website / ReportLength.jsp
1 <%@page import="java.util.ArrayList"%>
2 <%@ page trimDirectiveWhitespaces="true"%>
3 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
6 <%@ taglib uri="http://displaytag.sf.net" prefix="dt"%>
7 <c:choose>
8         <c:when test="${flag == 'AllDate'}">
9                 <h3>Time execution for the whole period</h3>
10         </c:when>
11         <c:otherwise>
12                 <h3>Time execution for the interval: ${data1} - ${data2}</h3>
13         </c:otherwise>
14 </c:choose>
15 <h3>Time execution: ${timeExecution} ms</h3>
16
17 <c:set var="sum" value="0" />
18 <c:forEach items="${result}" var="res" varStatus="loop">
19         <c:choose>
20                 <c:when test="${loop.last}">
21                         <c:forEach items="${res.timeTotalExec}" var="total">
22                                 <c:set var="sum" value="${sum + total}" />
23                         </c:forEach>
24                 </c:when>
25         </c:choose>
26 </c:forEach>
27
28 <h3>Total number of jobs: ${sum}</h3>
29
30 <table border="1" style="border-collapse: collapse; white-space: nowrap">
31         <thead>
32                 <tr>
33                         <th style="text-align: centre; width: 150px">Date</th>
34                         <th style="text-align: centre; width: 150px">less then 30 s</th>
35                         <th style="text-align: centre; width: 150px">30 s - 60 s</th>
36                         <th style="text-align: centre; width: 150px">1 min - 2 min</th>
37                         <th style="text-align: centre; width: 150px">2 min - 10 min</th>
38                         <th style="text-align: centre; width: 150px">more then 10 min</th>
39                 </tr>
40         </thead>
41         <tbody>
42                 <c:forEach items="${result}" var="res" varStatus="loop">
43                         <c:choose>
44                                 <c:when test="${loop.last}">
45                                         <tr style="font-weight: bolder;">
46                                                 <td>Total:</td>
47                                                 <c:forEach items="${res.timeTotalExec}" var="total">
48                                                         <td style="text-align: right">${total}</td>
49                                                 </c:forEach>
50                                         </tr>
51                                 </c:when>
52                         </c:choose>
53                 </c:forEach>
54
55                 <c:forEach items="${result}" var="res" varStatus="loop">
56                         <c:choose>
57                                 <c:when test="${not loop.last}">
58                                         <tr>
59                                                 <td>${res.date}</td>
60                                                 <c:forEach items="${res.timeRez}" var="time">
61                                                         <td style="text-align: right">${time}</td>
62                                                 </c:forEach>
63                                         </tr>
64                                 </c:when>
65                         </c:choose>
66                 </c:forEach>
67         </tbody>
68 </table>