64cef8954d8a18b443c80f66531c221b3322bbf6
[proteocache.git] / webapp / view / reportTimeExecution.jsp
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
3 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
4 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
5 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
6 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
7
8 <html>
9 <jsp:include page="fragments/header.jsp" />
10 <body>
11         <div class="container">
12                 <jsp:include page="fragments/mainmenu.jsp" />
13                 <spring:url value="/stat/exectime/query?date1=${date1}&date2=${date2}&option=${option}" var="the_query" />
14
15         <!-- reload button  -->
16         <ul class="nav navbar-nav navbar-right">
17                 <li>
18                 <a href="${the_query}" class="btn btn-default active">Reload</a>
19                 </li>
20         </ul>
21
22         <div class="panel panel-default">
23         <div class="panel-heading">
24                 <c:choose>
25                         <c:when test="${option == 'AllDates,off'}">
26                                 <p style="font-weight:bold;">Time execution for the whole period (${ndays} days)</p>
27                         </c:when>
28                         <c:otherwise>
29                                 <p style="font-weight:bold;">Time execution for the interval: ${date1} - ${date2} (${ndays} days)</p>
30                         </c:otherwise>
31                 </c:choose>
32         </div>
33         
34         <div class="panel-body">
35                 <c:set var="sum" value="0" />
36                 <c:forEach items="${result}" var="res" varStatus="loop">
37                         <c:choose>
38                                 <c:when test="${loop.last}">
39                                         <c:forEach items="${res.timeTotalExec}" var="total">
40                                                 <c:set var="sum" value="${sum + total}" />
41                                         </c:forEach>
42                                 </c:when>
43                         </c:choose>
44                 </c:forEach>
45
46                 <p>There are ${sum} jobs in total</p>
47
48                 <table class="table table-striped table-hover table-bordered">
49                         <thead>
50                                 <tr>
51                                         <th style="text-align: center; width: 150px">Date</th>
52                                         <th style="text-align: center; width: 150px">Total</th>
53                                         <th style="text-align: center; width: 150px">0 - 30 s</th>
54                                         <th style="text-align: center; width: 150px">30 - 60 s</th>
55                                         <th style="text-align: center; width: 150px">1 - 2 min</th>
56                                         <th style="text-align: center; width: 150px">2 - 10 min</th>
57                                         <th style="text-align: center; width: 150px">more then 10 min</th>
58                                 </tr>
59                         </thead>
60                         <tbody>
61                                 <c:forEach items="${result}" var="res" varStatus="loop">
62                                         <c:choose>
63                                                 <c:when test="${loop.last}">
64                                                         <tr style="font-weight: bolder;">
65                                                                 <td style="text-align: right">Total numbers:</td>
66                                                                 <c:set var="alldaytotal" value="0"/>
67                                                                 <c:forEach items="${res.timeTotalExec}" var="total">
68                                                                         <c:set var="alldaytotal" value="${alldaytotal + total}"/>
69                                                                 </c:forEach>
70                                                                 <td style="text-align: right">${alldaytotal}</td>
71                                                                 <c:forEach items="${res.timeTotalExec}" var="total">
72                                                                         <td style="text-align: right">${total}</td>
73                                                                 </c:forEach>
74                                                         </tr>
75                                                 </c:when>
76                                         </c:choose>
77                                 </c:forEach>
78
79                                 <c:forEach items="${result}" var="res" varStatus="loop">
80                                         <c:choose>
81                                                 <c:when test="${not loop.last}">
82                                                         <tr>
83                                                                 <td style="text-align: center">${res.date}</td>
84                                                                 <c:set var="daytotal" value="0"/>
85                                                                 <c:forEach items="${res.timeRez}" var="time">
86                                                                         <c:set var="daytotal" value="${daytotal + time}"/>
87                                                                 </c:forEach>
88                                                                 <td style="text-align: right">${daytotal}</td>
89                                                                 <c:forEach items="${res.timeRez}" var="time">
90                                                                         <td style="text-align: right">${time}</td>
91                                                                 </c:forEach>
92                                                         </tr>
93                                                 </c:when>
94                                         </c:choose>
95                                 </c:forEach>
96                         </tbody>
97                 </table>
98         </div>
99         </div>
100
101         <jsp:include page="fragments/footer.jsp" />
102         </div>
103 </body>
104 </html>