fixed Execution Time Statistics report
[proteocache.git] / webapp / view / reports / TimeExecution.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/jobsoneday/executionTime" var="oneday_query" />
14                 <spring:url value="/stat/exectime/results?date1=${date1}&date2=${date2}&option=${option}" var="the_query" />
15
16         <!-- reload and CSV buttons -->
17         <ul class="nav navbar-nav navbar-right">
18                 <li>
19                 <a href="${the_query}" class="btn btn-default active">Reload</a>
20                 </li>
21                 <c:choose><c:when test="${csvfile != ''}">
22                 <li>
23                 <a id="forCSVfile" download="data.csv" href="data:application/csv;charset=utf-8,${csvfile}" class="btn btn-default active">CVS</a>
24                 </li>
25                 </c:when></c:choose>
26         </ul>
27
28         <!-- main data loop  -->
29         <div class="panel panel-default">
30         <div class="panel-heading">
31                 <c:choose>
32                         <c:when test="${option == 'AllDates,off'}">
33                                 <p style="font-weight:bold;">Time execution for the whole period (${ndays} days)</p>
34                         </c:when>
35                         <c:otherwise>
36                                 <p style="font-weight:bold;">Time execution for the interval: ${date1} - ${date2} (${ndays} days)</p>
37                         </c:otherwise>
38                 </c:choose>
39         </div>
40         
41         <div class="panel-body">
42                 <c:choose>
43                         <c:when test="${result == null}">
44                                 <p>No jobs for this period</p>
45                         </c:when>
46                 <c:otherwise>
47                         <div class="table-responsive">
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                                 <tr style="font-weight: bolder;">
62                                                         <td style="text-align: center">Total:</td>
63                                                         <c:set var="total" value="${result.wholeTotal}"/>
64                                                         <td style="text-align: right">${total.total}</td>
65                                                         <td style="text-align: right">${total.total0_30s}</td>
66                                                         <td style="text-align: right">${total.total30_60s}</td>
67                                                         <td style="text-align: right">${total.total1_2m}</td>
68                                                         <td style="text-align: right">${total.total2_10m}</td>
69                                                         <td style="text-align: right">${total.total10m}</td>
70                                 </tr>
71
72                                 <c:forEach items="${result.dateTotal}" var="res">
73                                                         <tr>
74                                                                 <td style="text-align: center">${res.key}</td>
75                                                                 <c:set var="value" value="${res.value}"/>
76                                                                 <td style="text-align: right">${value.total}</td>
77                                                                 <td style="text-align: right">
78                                                                         <c:choose>
79                                                                                 <c:when test="${value.total0_30s == 0}">0</c:when>
80                                                                                 <c:otherwise><a href="${oneday_query}?date=${res.key}&interval=ZERO_THIRTY_SEC">${value.total0_30s}</a></c:otherwise>
81                                                                         </c:choose>
82                                                                 </td>
83                                                                 <td style="text-align: right">
84                                                                         <c:choose>
85                                                                                 <c:when test="${value.total0_30s == 0}">0</c:when>
86                                                                                 <c:otherwise><a href="${oneday_query}?date=${res.key}&interval=THIRTY_SIXTY_SEC">${value.total30_60s}</a></c:otherwise>
87                                                                         </c:choose>
88                                                                 </td>
89                                                                 <td style="text-align: right">
90                                                                         <c:choose>
91                                                                                 <c:when test="${value.total0_30s == 0}">0</c:when>
92                                                                                 <c:otherwise><a href="${oneday_query}?date=${res.key}&interval=ONE_TWO_MIN">${value.total1_2m}</a></c:otherwise>
93                                                                         </c:choose>
94                                                                 </td>
95                                                                 <td style="text-align: right">
96                                                                         <c:choose>
97                                                                                 <c:when test="${value.total0_30s == 0}">0</c:when>
98                                                                                 <c:otherwise><a href="${oneday_query}?date=${res.key}&interval=TWO_TEN_MIN">${value.total2_10m}</a></c:otherwise>
99                                                                         </c:choose>
100                                                                 </td>
101                                                                 <td style="text-align: right">
102                                                                         <c:choose>
103                                                                                 <c:when test="${value.total0_30s == 0}">0</c:when>
104                                                                                 <c:otherwise><a href="${oneday_query}?date=${res.key}&interval=MORE_THEN_TEN_MIN">${value.total10m}</a></c:otherwise>
105                                                                         </c:choose>
106                                                                 </td>
107                                                         </tr>
108                                                 </c:forEach>
109                         </tbody>
110                 </table>
111                 </div>
112                 </c:otherwise>
113                 </c:choose>
114         </div>
115         </div>
116
117         <jsp:include page="../fragments/footer.jsp" />
118         </div>
119 </body>
120 </html>