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