Add servlets for queries with IP
[proteocache.git] / webapp / view / reportIP.jsp
diff --git a/webapp/view/reportIP.jsp b/webapp/view/reportIP.jsp
new file mode 100644 (file)
index 0000000..b2dc4fd
--- /dev/null
@@ -0,0 +1,54 @@
+<%@ 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="/sequence/querysequence" var="searchquery" />
+               <spring:url value="/joblog/query" var="jobquery" />
+
+               <p style="font-weight:bold;">Job statistics for ${res.ip}</p>
+               <!-- <h3>Time execution: ${timeExecution} ms</h3>-->
+
+               <c:choose>
+                       <c:when test="${results == null}">
+                               <p>No jobs found...</p>
+                       </c:when>
+                       <c:otherwise>
+                               <p>${njobs} jobs found:</p>
+                               <div class="table-responsive">
+                                       <table class="table table-striped table-hover table-bordered">
+                                               <thead>
+                                                       <tr>
+                                                               <th style="text-align: centre">ID</th>
+                                                               <th style="text-align: left">IP</th>
+                                                               <th style="text-align: left">Sequence</th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody>
+                                                       <c:forEach items="${results}" var="res" varStatus="status">
+                                                               <tr>
+                                                                       <td><a href="{jobquery}?IdJob=${res.id}">${res.id}</a></td>
+                                                                       <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.ip}</td>
+                                                                       <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.prot}</td>
+                                                               </tr>
+                                                       </c:forEach>
+                                               </tbody>
+                                       </table>
+                               </div>
+                       </c:otherwise>
+               </c:choose>
+
+               <jsp:include page="fragments/footer.jsp" />
+       </div>
+</body>
+</html>
\ No newline at end of file