Block job report if no jobs are found
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Wed, 29 Jan 2014 08:01:53 +0000 (08:01 +0000)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Wed, 29 Jan 2014 08:01:53 +0000 (08:01 +0000)
webapp/view/reports/Job.jsp

index b43f0d7..e042564 100644 (file)
                <jsp:include page="../fragments/mainmenu.jsp" />
                <spring:url value="/sequence/results" var="sequence_query" />
                <spring:url value="/admin/ip/results" var="ip_query" />
+               <spring:url value="/job/results?IdJob=${IdJob}" var="the_query" />
+               <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" />
+
+               <!-- reload and CSV buttons  -->
+               <ul class="nav navbar-nav navbar-right">
+                       <li>
+                       <a href="${the_query}" class="btn btn-default active">Reload</a>
+                       </li>
+<sec:authorize access="hasRole('ROLE_ADMIN')">
+                       <li>
+                       <a href="${remove_query}" class="btn btn-default active">Delete</a>
+                       </li>
+</sec:authorize>
+               </ul>
 
                <div class="panel panel-default">
                <div class="panel-heading">
                        <p style="font-weight:bold;">Information for the job ${IdJob}</p>
                </div>
                <div class="panel-body">
+                       <c:choose><c:when test="${jobnotfound == 'yes'}">
+                               <p>The job not found</p>
+                       </c:when><c:otherwise>
                        <p>Start timestamp : ${result.dateStart}</p>
                        <p>End timestamp : ${result.dateEnd}</p>
                        <c:if test='${result.programName != null}'>
@@ -67,6 +84,7 @@
                        </tbody>
                        </table>
                        </div>
+                       </c:otherwise></c:choose>
                </div>
                </div>