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