509a539bbfce5069916d9fcd04c4ca4809ca6865
[proteocache.git] / webapp / view / reportJobStatistics.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/oneday" var="onedayquery" />
14                 <spring:url value="/stat/query?date1=${date1}&date2=${date2}&option=${option}" var="thequery" />
15
16         <ul class="nav navbar-nav navbar-right">
17                 <li>
18                 <a href="${thequery}" 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;">Jobs statistics for the whole period (${ndays} days)</p>
27                         </c:when>
28                         <c:otherwise>
29                                 <p style="font-weight:bold;">
30                                 Jobs statistics for the time period: <c:out value="${date1}" /> to <c:out value="${date2}"/> (${ndays} days)
31                                 </p>
32                         </c:otherwise>
33                 </c:choose>
34         </div>
35
36         <div class="panel-body">
37                 <c:choose>
38                         <c:when test="${result == null}">
39                                 <p>No jobs for this period</p>
40                         </c:when>
41                         <c:otherwise>
42                                 <div class="table-responsive">
43                                 <table class="table table-striped table-hover table-bordered">
44                                         <thead>
45                                                 <tr style="text-align: center">
46                                                         <th rowspan="2" style="text-align: center">Date</th>
47                                                         <th rowspan="2" style="text-align: center">Total number<br/> of jobs</th>
48                                                         <th colspan="5" style="text-align: center">Job Statistics</th>
49                                                 </tr>
50                                                 <tr>
51                                                         <th style="text-align: center">Status "OK"</th>
52                                                         <th style="text-align: center">Status "Stopped"</th>
53                                                         <th style="text-align: center">Status "Internal Error"</th>
54                                                         <th style="text-align: center">Status "Time out"</th>
55                                                 </tr>
56                                         </thead>
57
58                                         <tbody>
59                                                 <tr style="font-weight: bolder;">
60                                                         <td style="text-align: center">Total:</td>
61                                                         <c:set var="total" value="${result.wholeTotal}"/>
62                                                         <td style="text-align: right">${total.total}</td>
63                                                         <td style="text-align: right">${total.totalOK}</td>
64                                                         <td style="text-align: right">${total.totalStopped}</td>
65                                                         <td style="text-align: right">${total.totalError}</td>
66                                                         <td style="text-align: right">${total.totalTimeOut}</td>
67                                                 </tr>
68                                                 <c:forEach items="${result.dateTotal}" var="res">
69                                                         <tr>
70                                                                 <td style="text-align: center">${res.key}</td>
71                                                                 <c:set var="value" value="${res.value}"/>
72                                                                 <td style="text-align: right">${value.total}</td>
73                                                                 <td style="text-align: right"><a href="${onedayquery}?date=${res.key}">${value.totalOK}</a></td>
74                                                                 <td style="text-align: right">${value.totalStopped}</td>
75                                                                 <td style="text-align: right">${value.totalError}</td>
76                                                                 <td style="text-align: right">${value.totalTimeOut}</td>
77                                                         </tr>
78                                                 </c:forEach>
79                                         </tbody>
80                                 </table>
81                                 </div>
82                         </c:otherwise>
83                 </c:choose>
84
85         </div>
86         </div>
87
88                 <jsp:include page="fragments/footer.jsp" />
89         </div>
90 </body>
91 </html>