b9bfe7bcbfef7ce4250e0373837b3887d043a9b1
[proteocache.git] / webapp / view / ReportJobsByDate.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/bodyHeader.jsp" />
16                 <spring:url value="/stat/oneday" var="onedayquery" />
17
18                 <c:choose>
19                         <c:when test="${flag == 'AllDate'}">
20                                 <h3>Jobs statistics for the whole period</h3>
21                         </c:when>
22                         <c:otherwise>
23                                 <h3>
24                                         Jobs statistics for the time period: (<c:out value="${data1}" />, <c:out value="${data2}"/>)
25                                 </h3>
26                         </c:otherwise>
27                 </c:choose>
28                 <h3>Time execution: ${timeExecution} ms</h3>
29                 <c:choose>
30
31                         <c:when test="${result == null}">
32                                 <h3>No jobs for this period</h3>
33                         </c:when>
34                         <c:otherwise>
35
36                                 <c:set var="sum" value="0" />
37                                 <c:set var="sumOK" value="0" />
38                                 <c:set var="sumStopped" value="0" />
39                                 <c:set var="sumError" value="0" />
40                                 <c:set var="sumTimeOut" value="0" />
41                                 <c:forEach items="${result}" var="res">
42                                         <c:set var="tot" value="${res.total}" />
43                                         <c:set var="sum" value="${sum + tot}" />
44                                         <c:set var="totOK" value="${res.totalOK}" />
45                                         <c:set var="sumOK" value="${sumOK + totOK}" />
46                                         <c:set var="totStopped" value="${res.totalStopped}" />
47                                         <c:set var="sumStopped" value="${sumStopped + totStopped}" />
48                                         <c:set var="totError" value="${res.totalError}" />
49                                         <c:set var="sumError" value="${sumError + totError}" />
50                                         <c:set var="totTimeOut" value="${res.totalTimeOut}" />
51                                         <c:set var="sumTimeOut" value="${sumTimeOut + totTimeOut}" />
52                                 </c:forEach>
53
54                                 <table border="1"
55                                         style="border-collapse: collapse; white-space: nowrap">
56                                         <thead>
57                                                 <tr>
58                                                         <th rowspan="2" style="text-align: centre">Date</th>
59                                                         <th rowspan="2" style="text-align: centre">Total jobs</th>
60                                                         <th colspan="5" style="text-align: centre">Number of jobs</th>
61                                                 </tr>
62                                                 <tr>
63                                                         <th style="text-align: centre">Status "OK"</th>
64                                                         <th style="text-align: centre">Status "Stopped"</th>
65                                                         <th style="text-align: centre">Status "Error"</th>
66                                                         <th style="text-align: centre">Status "Time out"</th>
67                                                 </tr>
68                                         </thead>
69
70                                         <tbody>
71                                                 <tr style="font-weight: bolder;">
72                                                         <td>Total:</td>
73                                                         <td style="text-align: right">${sum}</td>
74                                                         <td style="text-align: right">${sumOK}</td>
75                                                         <td style="text-align: right">${sumStopped}</td>
76                                                         <td style="text-align: right">${sumError}</td>
77                                                         <td style="text-align: right">${sumTimeOut}</td>
78                                                 </tr>
79
80                                                 <c:forEach items="${result}" var="res">
81                                                         <tr>
82                                                                 <td>${res.date}</td>
83                                                                 <td style="text-align: right">${res.total}</td>
84                                                                 <td style="text-align: right"><a href="${onedayquery}?date=${res.date}">${res.totalOK}</a></td>
85                                                                 <td style="text-align: right">${res.totalStopped}</td>
86                                                                 <td style="text-align: right">${res.totalError}</td>
87                                                                 <td style="text-align: right">${res.totalTimeOut}</td>
88                                                         </tr>
89                                                 </c:forEach>
90                                         </tbody>
91
92                                 </table>
93                         </c:otherwise>
94                 </c:choose>
95
96                 <jsp:include page="fragments/footer.jsp" />
97         </div>
98 </body>
99 </html>