Improve web view of the project (real pages for removal of DB records)
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Mon, 20 Jan 2014 15:17:35 +0000 (15:17 +0000)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Mon, 20 Jan 2014 15:17:35 +0000 (15:17 +0000)
webapp/view/query/JobLog.jsp
webapp/view/query/RemoveJobs.jsp
webapp/view/reports/RemoveDBrecords.jsp [deleted file]
webapp/view/reports/RemoveJobs.jsp [new file with mode: 0644]

index 2afcf3f..9310f25 100644 (file)
@@ -18,9 +18,9 @@
                </div>
                <div class="panel-body">
                        <form method="get" action="${query}">
-                       <p><input type="text" name="IdJob" value="${value}"></p>
-                       <input type="submit" name="Search" value="Search"/>
-               </form>
+                               <p><input type="text" name="IdJob" value="${value}"></p>
+                               <input type="submit" name="Search" value="Search"/>
+                       </form>
                </div>
        </div>
 
index cf3459f..d5c138f 100644 (file)
@@ -22,6 +22,7 @@
                                <p>
                                        <input type="checkbox" name="byId" onclick="show(this, 'id');" /> Job with the job Id
                                        <div id='id' style="visibility:hidden;">Job Id: <input type="text" name="id" value="${samplejobid}" /></div>
+                                       <input type="hidden" name="byId" value="off" />
                                </p>
 
                                <!-- remove jobs executed on the dates: -->
                                        <div id='date' style="visibility:hidden;">
                                        From <input type="text" name="date1" value = "${date1}" style=" width : 145px;" />
                                        to <input type="text" name="date2" value = "${date2}" /></div>
+                                       <input type="hidden" name="byDate" value="off" />
                                </p>
 
                                <!-- remove jobs executed from particular IP: -->
                                <p>
                                        <input type="checkbox" name="byIp" onclick="show(this, 'ip');" /> Jobs executed from the IP
                                        <div id='ip' style="visibility:hidden;">IP: <input type="text" name="ip" value = '${sampleip}'/></div>
+                                       <input type="hidden" name="byIp" value="off" />
                                </p>
                                
                                <!-- remove jobs with a particular protein subsiquence: -->
                                <p>
                                        <input type="checkbox" name="bySequence"  onclick="show(this, 'seq');"> Jobs with the protein subsequence
                                        <div id='seq' style="visibility:hidden;"> Sequence: <input type="text" name="seq" value = "${sampleseq}"/></div>
+                                       <input type="hidden" name="bySequence" value="off" />
                                </p>
                                
                                <p><input type="submit" name="Delete" value="Delete"/></p>
diff --git a/webapp/view/reports/RemoveDBrecords.jsp b/webapp/view/reports/RemoveDBrecords.jsp
deleted file mode 100644 (file)
index 67e120d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Jobs have been removed from ProteoCache</title>
-</head>
-<body>
-<h1>ProteoCache removed : ${result} jobs</h1>
-</body>
-</html>
\ No newline at end of file
diff --git a/webapp/view/reports/RemoveJobs.jsp b/webapp/view/reports/RemoveJobs.jsp
new file mode 100644 (file)
index 0000000..b1d62fa
--- /dev/null
@@ -0,0 +1,42 @@
+<!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"%>
+<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
+
+<html>
+<jsp:include page="../fragments/header.jsp" />
+<body>
+       <div class="container">
+               <jsp:include page="../fragments/mainmenu.jsp" />
+               <spring:url value="/sequence/sequence/results" var="sequence_query" />
+               <spring:url value="/admin/ip/results" var="ip_query" />
+
+               <div class="panel panel-default">
+               <div class="panel-heading">
+                       <p style="font-weight:bold;">Information for removed jobs</p>
+               </div>
+               <div class="panel-body">
+                       <!-- <div class="grid-wrapper-div">-->
+                       <c:if test="${byDate != 'off'}">
+                               <p>${njobs} jobs have been removed for time period: <c:out value="${date1}" /> to <c:out value="${date2}"/> (${ndays} days)</p>
+                       </c:if>
+                       <c:if test="${byId != 'off'}">
+                               <p>Job ${id} has been removed.</p>
+                       </c:if>
+                       <c:if test="${byIp != 'off'}">
+                               <p>Jobs launched from ${ip} have been removed. ${njobs} jobs have been removed.</p>
+                       </c:if>
+                       <c:if test="${bySequence != 'off'}">
+                               <p>Jobs launched with sequence ${seq} have been removed. ${njobs} jobs have been removed.</p>
+                       </c:if>
+                       <!-- </div>-->
+               </div>
+               </div>
+
+               <jsp:include page="../fragments/footer.jsp" />
+       </div>
+</body>
+</html>
\ No newline at end of file