Add reporting servlet time execution
[proteocache.git] / webapp / view / reports / IPstatistics.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 <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
8
9 <html>
10 <jsp:include page="../fragments/header.jsp" />
11 <body>
12         <div class="container">
13                 <jsp:include page="../fragments/mainmenu.jsp" />
14                 <spring:url value="/admin/ip/results" var="ipquery" />
15                 <spring:url value="/admin/ip/counts/results?JobCounter=${counter}" var="the_query"/>
16
17                 <!-- reload and CSV buttons  -->
18                 <ul class="nav navbar-nav navbar-right">
19                         <li>
20                         <a href="${the_query}" class="btn btn-default active">Reload</a>
21                         </li>
22                         <c:choose><c:when test="${csvfile != ''}">
23                         <li>
24                         <a id="forCSVfile" download="data.csv" href="data:application/csv;charset=utf-8,${csvfile}" class="btn btn-default active">CSV</a>
25                         </li>
26                         </c:when></c:choose>
27                 </ul>
28
29         <div class="panel panel-default">
30         <div class="panel-heading">
31                 <p style="font-weight:bold;">IP Statistics</p>
32         </div>
33         <div class="panel-body">
34 <sec:authorize access="hasRole('ROLE_ADMIN')">
35                 <p>Servlet execution time: ${timeExecution} milliseconds</p>
36 </sec:authorize>
37                 <c:choose>
38                 <c:when test="${njobs == 0}">
39                         <p>No IP with at least ${counter} jobs ever launched found</p>
40                 </c:when>
41                 <c:otherwise>
42                         <p>${njobs} IPs with at least ${counter} jobs ever launched</p>
43                         <div class="table-responsive">
44                         <table class="table table-striped table-hover table-bordered" id="counts">
45                         <thead>
46                                 <tr>
47                                         <th style="text-align: centre">Number of jobs</th>
48                                         <th style="text-align: left">IP</th>
49                                 </tr>
50                         </thead>
51                         <tbody>
52                                 <c:forEach items="${results}" var="res">
53                                         <tr>
54                                                 <td>${res.totaljobs}</td>
55                                                 <td><a title="Click to view other jobs" href="${ipquery}?ip=${res.name}&Search=Search">${res.name}</a></td>
56                                         </tr>
57                                 </c:forEach>
58                         </tbody>
59                         </table>
60                         </div>
61                 </c:otherwise>
62                 </c:choose>
63
64         </div>
65         </div>
66
67                 <jsp:include page="../fragments/footer.jsp" />
68         </div>
69 </body>
70 </html>