Add the "Reload" and "CSV" buttons
[proteocache.git] / webapp / view / reportJobStatisticsOneDay.jsp
index 9bde4ca..23af0ac 100644 (file)
@@ -1,30 +1,39 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8"
-       pageEncoding="UTF-8"%>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
-<%@page import="java.util.ArrayList"%>
 
 <html>
 <jsp:include page="fragments/header.jsp" />
 <body>
        <div class="container">
                <jsp:include page="fragments/mainmenu.jsp" />
-               <spring:url value="/joblog/query" var="jobquery" />
+               <spring:url value="/job/results" var="job_query" />
+               <spring:url value="/stat/onedaystat?date=${date}&status=${status}" var="the_query" />
+               <spring:url value="/sequence/sequence/results" var="sequence_query" />
 
-<p style="font-weight:bold;">Job statistics for ${date}</p>
+       <ul class="nav navbar-nav navbar-right">
+               <li>
+               <a href="${the_query}" class="btn btn-default active">Reload</a>
+               </li>
+       </ul>
 
-<c:choose>
-       <c:when test="${results == null}">
-               <p>No jobs found...</p>
-       </c:when>
-       <c:otherwise>
-       <p>${njobs} jobs found for the day:</p>
-       <div class="table-responsive">
-       <table class="table table-striped table-hover table-bordered">
+       <div class="panel panel-default">
+       <div class="panel-heading">
+               <p style="font-weight:bold;">Job statistics for ${date}</p>
+       </div>
+       <div class="panel-body">
+
+       <c:choose>
+               <c:when test="${results == null}">
+                       <p>No jobs found...</p>
+               </c:when>
+               <c:otherwise>
+               <p>${njobs} jobs found for the day:</p>
+               <div class="table-responsive">
+               <table class="table table-striped table-hover table-bordered">
                <thead>
                        <tr>
                                <th style="text-align: centre">Job ID</th>
                        </tr>
                </thead>
                <tbody>
-                       <c:forEach items="${results}" var="res" varStatus="status">
+                       <c:forEach items="${results.jobidAndSeq}" var="res" varStatus="status">
                                <tr>
-                                       <td><a href="${jobquery}?IdJob=${res.id}">${res.id}</a></td>
+                                       <td><a href="${job_query}?IdJob=${res.key}">${res.key}</a></td>
                                        <c:choose>
-                                       <c:when test="${res.prot == ''}">
+                                       <c:when test="${res.value == ''}">
                                                        <td>Job with alignment</td>
                                        </c:when>
                                        <c:otherwise>
-                                               <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.prot}</td>
+                                               <td style="text-align: left; border-buttom: dotted; font-family: monospace">
+                                               <!-- ${res.value}-->
+                                               <a title="Click to view all jobs" href="${sequence_query}?sequence=${res.value}&searchtype=whole">
+                                               <script>
+                                                       document.write(shorten('${res.value}', 108));
+                                               </script>
+                                               </a>
+                                               </td>
                                        </c:otherwise>
                                        </c:choose>
                                        
                                </tr>
                        </c:forEach>
                </tbody>
-       </table>
+               </table>
+               </div>
+               </c:otherwise>
+       </c:choose>
+       </div>
        </div>
-       </c:otherwise>
-</c:choose>
 
-               <jsp:include page="fragments/footer.jsp" />
+       <jsp:include page="fragments/footer.jsp" />
        </div>
 </body>
 </html>
\ No newline at end of file