Block job report if no jobs are found
[proteocache.git] / webapp / view / reports / Job.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="/sequence/results" var="sequence_query" />
15                 <spring:url value="/admin/ip/results" var="ip_query" />
16                 <spring:url value="/job/results?IdJob=${IdJob}" var="the_query" />
17                 <spring:url value="/database/remove/go?byId=on&id=${IdJob}&byId=off&date1=&date2=&byDate=off&ip=&byIp=off&seq=&bySequence=off" var="remove_query" />
18
19                 <!-- reload and CSV buttons  -->
20                 <ul class="nav navbar-nav navbar-right">
21                         <li>
22                         <a href="${the_query}" class="btn btn-default active">Reload</a>
23                         </li>
24 <sec:authorize access="hasRole('ROLE_ADMIN')">
25                         <li>
26                         <a href="${remove_query}" class="btn btn-default active">Delete</a>
27                         </li>
28 </sec:authorize>
29                 </ul>
30
31                 <div class="panel panel-default">
32                 <div class="panel-heading">
33                         <p style="font-weight:bold;">Information for the job ${IdJob}</p>
34                 </div>
35                 <div class="panel-body">
36                         <c:choose><c:when test="${jobnotfound == 'yes'}">
37                                 <p>The job not found</p>
38                         </c:when><c:otherwise>
39                         <p>Start timestamp : ${result.dateStart}</p>
40                         <p>End timestamp : ${result.dateEnd}</p>
41                         <c:if test='${result.programName != null}'>
42                                 <c:choose>
43                                 <c:when test="${result.programLink != ''}">
44                                         <p style="font-weight:bold;">
45                                         Program: <a href="${result.programLink}">${result.programName}</a> (version : ${result.programVersion})
46                                         </p>
47                                 </c:when>
48                                 <c:otherwise>
49                                         <p style="font-weight:bold;">Program : ${result.programName} (version : ${result.programVersion})</p>
50                                 </c:otherwise>
51                                 </c:choose>
52                         </c:if>
53 <sec:authorize access="hasRole('ROLE_ADMIN')">
54                         <p>IP: <a title="Click to view other jobs" href="${ip_query}?ip=${result.ip}">${result.ip}</a></p>
55 </sec:authorize>
56                         <c:if test='${jobarchive != null}'>
57                                 <spring:url value="../${jobarchive}" var="jobarchivefile" />
58                                 <p>Job archive: <a title="Click to get the file" href="${jobarchivefile}">download</a></p>
59                         </c:if>
60                         <c:if test='${jobremotelink != null}'>
61                                 <p>Original job link: <a title="Click to go to original job" href="${jobremotelink}">view</a></p>
62                         </c:if>
63                         <div class="grid-wrapper-div">
64                         <table class="table table-striped table-hover table-bordered">
65                         <tbody>
66                                 <thead>
67                                         <tr>
68                                                 <th>ID</th>
69                                                 <th >Sequence</th>
70                                         </tr>
71                                 </thead>
72                                 <tr>
73                                         <td>Protein</td>
74                                         <td >
75                                                 <a title="Click to view other jobs" href="${sequence_query}?sequence=${result.sequence}&searchtype=whole">${result.sequence}</a>
76                                         </td>
77                                 </tr>
78                                 <c:forEach items="${result.prediction}" var="pred">
79                                         <tr>
80                                                 <td>${pred.key}</td>
81                                                 <td style="text-align: left; border-buttom: dotted; font-family: monospace">${pred.value}</td>
82                                         </tr>
83                                 </c:forEach>
84                         </tbody>
85                         </table>
86                         </div>
87                         </c:otherwise></c:choose>
88                 </div>
89                 </div>
90
91                 <jsp:include page="../fragments/footer.jsp" />
92         </div>
93 </body>
94 </html>