Clean up JSP code
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Mon, 2 Dec 2013 14:49:49 +0000 (14:49 +0000)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Mon, 2 Dec 2013 14:49:49 +0000 (14:49 +0000)
18 files changed:
webapp/view/ReportAboutRemove.jsp
webapp/view/home.jsp
webapp/view/queryIP.jsp
webapp/view/queryIPStatistics.jsp
webapp/view/queryJobLog.jsp
webapp/view/queryJobStatistics.jsp
webapp/view/queryProteinSequence.jsp
webapp/view/queryProteinSequenceCounter.jsp
webapp/view/queryRemoveJobs.jsp
webapp/view/queryTimeExecution.jsp
webapp/view/reportIP.jsp
webapp/view/reportIPstatistics.jsp
webapp/view/reportJobLog.jsp
webapp/view/reportJobStatistics.jsp
webapp/view/reportJobStatisticsOneDay.jsp
webapp/view/reportProteinSequences.jsp
webapp/view/reportProteinSequencesCounter.jsp
webapp/view/reportTimeExecution.jsp

index 6789b06..67e120d 100644 (file)
@@ -1,10 +1,8 @@
-<%@ 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">
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Proteocache removed</title>
+<title>Jobs have been removed from ProteoCache</title>
 </head>
 <body>
 <h1>ProteoCache removed : ${result} jobs</h1>
index e960b0f..db9857c 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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 prefix="spring" uri="http://www.springframework.org/tags"%>
@@ -29,8 +28,6 @@
                        </div>
                </div>
                </div>
-               
-
                <jsp:include page="fragments/footer.jsp"/>
        </div>
 </body>
index 5c88761..95ca909 100644 (file)
@@ -1,5 +1,3 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@page import="java.util.Calendar"%>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
 <body>
        <div class="container">
        <jsp:include page="fragments/mainmenu.jsp" />
+       <spring:url value="/ip/query" var="query"/>
 
        <div class="panel panel-default">
                <div class="panel-heading">
                        <div style="font-weight:bold;">Enter IP</div>
                </div>
                <div class="panel-body">
-                       <spring:url value="/ip/query" var="formurl"/>
-                       <form method="get" action="${fn:escapeXml(formurl)}">
+                       <form method="get" action="${query}">
                                <p><input type="text" name="ip" value="${value}"></p>
                                <input type="submit" name="Search" value="Search"/>
                        </form>
index a5dd4d3..9181754 100644 (file)
@@ -1,8 +1,7 @@
-<%@ 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 prefix="spring" uri="http://www.springframework.org/tags"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
 <body>
        <div class="container">
        <jsp:include page="fragments/mainmenu.jsp" />
+       <spring:url value="/ip/stat/querycounter" var="query"/>
 
        <div class="panel panel-default">
                <div class="panel-heading">
                        <div style="font-weight:bold;">IPs with multipled executed jobs</div>
                </div>
                <div class="panel-body">
-       <spring:url value="/ip/stat/querycounter" var="formurl"/>
-       <form method="get" action="${fn:escapeXml(formurl)}" role="form">
-               <div class="col-xs-2"> <!-- make the field shorter -->
-               <c:choose>
-                       <c:when test="${error == null}"><div class="form-group"></c:when>
-                       <c:otherwise><div class="form-group has-error"></c:otherwise>
-               </c:choose>
-               <label for="JobCounterinput">Number of jobs</label>
-               <input class="form-control" type="text" name="JobCounter" value ="${value}" id="JobCounterinput" style="width: 200 px">
-               <c:if test="${error != null}">
-                       <p class="help-block">${error}</p>
-               </c:if>
+                       <form method="get" action="${query}">
+                       <div class="col-xs-2"> <!-- make the field shorter -->
+                               <c:choose>
+                                       <c:when test="${error == null}">
+                                       <div class="form-group">
+                                               <label for="JobCounterinput">Number of jobs</label>
+                                               <input class="form-control" type="text" name="JobCounter" value ="${value}" id="JobCounterinput" style="width: 200 px">
+                                       </div>
+                                       </c:when>
+                                       <c:otherwise>
+                                       <div class="form-group has-error">
+                                               <label for="JobCounterinput">Number of jobs</label>
+                                               <input class="form-control" type="text" name="JobCounter" value ="${value}" id="JobCounterinput" style="width: 200 px">
+                                               <p class="help-block">${error}</p>
+                                       </div>
+                                       </c:otherwise>
+                               </c:choose>
+                               <input type="submit" name="Search" value="Search"/>
+                       </div>
+                       </form>
                </div>
-               <!-- <p><input type="text" name="JobCounter" value = 3></p>--> 
-               <input type="submit" name="Search" value="Search"/>
-               </div>
-       </form>
-       </div>
        </div>
 
        <jsp:include page="fragments/footer.jsp"/>
index f08aa52..7c5db0a 100644 (file)
@@ -1,5 +1,3 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@page import="java.util.Calendar"%>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
index dec5320..35d813d 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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 prefix="spring" uri="http://www.springframework.org/tags"%>
index aedf713..a0bde5a 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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 prefix="spring" uri="http://www.springframework.org/tags"%>
index 00bb5d7..c7d7ab6 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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 prefix="spring" uri="http://www.springframework.org/tags"%>
 <body>
        <div class="container">
        <jsp:include page="fragments/mainmenu.jsp" />
+       <spring:url value="/sequence/querycounter" var="query"/>
 
        <div class="panel panel-default">
                <div class="panel-heading">
                        <div style="font-weight:bold;">Proteins with multiple executed jobs</div>
                </div>
                <div class="panel-body">
-                       <spring:url value="/sequence/querycounter" var="formurl"/>
-                       <form method="get" action="${fn:escapeXml(formurl)}">
+                       <form method="get" action="${query}">
                        <div class="col-xs-2"> <!-- make the field shorter -->
                        <c:choose>
                        <c:when test="${error == null}">
-                               <div class="form-group">
+                       <div class="form-group">
+                               <label for="JobCounterinput">Number of jobs </label>
+                               <input class="form-control" type="text" name="counterJob" value ="${value}" id="JobCounterinput">
+                       </div>
                        </c:when>
                        <c:otherwise>
-                               <div class="form-group has-error">
-                       </c:otherwise>
-                       </c:choose>
+                       <div class="form-group has-error">
                                <label for="JobCounterinput">Number of jobs </label>
                                <input class="form-control" type="text" name="counterJob" value ="${value}" id="JobCounterinput">
-                               <c:if test="${error != null}">
-                                       <p class="help-block">${error}</p>
-                               </c:if>
+                               <p class="help-block">${error}</p>
                        </div>
-                               <!-- <p><input type="text" name="counterJob" value = 3></p>-->
+                       </c:otherwise>
+                       </c:choose>
                        <input type="submit" name="Search" value="Search"/>
                        </div>
                        </form>
index 41e0177..53f0d4d 100644 (file)
@@ -1,5 +1,3 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@page import="java.util.Calendar"%>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
@@ -23,7 +21,7 @@
                                <!-- remove a particular job -->
                                <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>
+                                       <div id='id' style="visibility:hidden;">Job Id: <input type="text" name="id" value="${samplejobid}" /></div>
                                </p>
 
                                <!-- remove jobs executed on the dates: -->
@@ -43,7 +41,7 @@
                                <!-- 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>
+                                       <div id='seq' style="visibility:hidden;"> Sequence: <input type="text" name="seq" value = "${sampleseq}"/></div>
                                </p>
                                
                                <p><input type="submit" name="Delete" value="Delete"/></p>
index 719073c..3f5d1c6 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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 prefix="spring" uri="http://www.springframework.org/tags"%>
 <body>
        <div class="container">
        <jsp:include page="fragments/mainmenu.jsp" />
+       <spring:url value="/exectime/query" var="query"/>
 
        <div class="panel panel-default">
                <div class="panel-heading">
                        <div style="font-weight:bold;">Enter time period for execution statistics</div>
                </div>
                <div class="panel-body">
-                       <spring:url value="/exectime/query" var="formurl"/>
-                       <form method="get" action="${fn:escapeXml(formurl)}">
+                       <form method="get" action="${query}">
                                <p><input type="checkbox" name="option" value="AllDates" checked="checked" onclick="hide(this, 'date');"> Query for all dates</p>
                                        <div id='date' style="visibility:hidden;">
                                        <p>
index 69d7aa2..e224de5 100644 (file)
@@ -1,12 +1,9 @@
-<%@ 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" />
@@ -62,7 +59,6 @@
        </div>
        </div>
 
-
                <jsp:include page="fragments/footer.jsp" />
        </div>
 </body>
index 87b73ce..dec24be 100644 (file)
@@ -1,5 +1,3 @@
-<%@ 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"%>
index 2c204df..b886aa9 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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"%>
                <spring:url value="/sequence/querysequence" var="searchquery" />
                <spring:url value="/ip/query" var="ipquery" />
 
-       <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">
-
-               <p>Start timestamp : ${result.logInfo.dateStart}</p>
-               <p>End timestamp : ${result.logInfo.dateEnd}</p>
-               <p>IP: <a title="Click to view other jobs" href="${ipquery}?ip=${result.logInfo.ip}&Search=Search">${result.logInfo.ip}</a></p>
+               <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">
+                       <p>Start timestamp : ${result.logInfo.dateStart}</p>
+                       <p>End timestamp : ${result.logInfo.dateEnd}</p>
+                       <p>IP: <a title="Click to view other jobs" href="${ipquery}?ip=${result.logInfo.ip}&Search=Search">${result.logInfo.ip}</a></p>
 
-               <table class="table table-striped table-hover table-bordered">
+                       <table class="table table-striped table-hover table-bordered">
                        <tbody>
                                <tr>
                                        <td>Sequence</td>
                                        </tr>
                                </c:forEach>
                        </tbody>
-               </table>
-
-       </div>
-       </div>
+                       </table>
+               </div>
+               </div>
 
                <jsp:include page="fragments/footer.jsp" />
        </div>
index da4bec2..5c707b7 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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"%>
@@ -6,8 +5,6 @@
 <%@ 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>
                <spring:url value="/stat/oneday" var="onedayquery" />
                <spring:url value="/stat/query?date1=${date1}&date2=${date2}&option=${option}" var="thequery" />
 
-               <ul class="nav navbar-nav navbar-right">
-                       <li>
-                       <a href="${thequery}" class="btn btn-default active" role="button">Reload</a>
-                       </li>
-               </ul>
+       <ul class="nav navbar-nav navbar-right">
+               <li>
+               <a href="${thequery}" class="btn btn-default active">Reload</a>
+               </li>
+       </ul>
 
        <div class="panel panel-default">
        <div class="panel-heading">
@@ -36,7 +33,6 @@
                </c:choose>
        </div>
 
-
        <div class="panel-body">
                <c:choose>
                        <c:when test="${result == null}">
index 9bde4ca..719ace8 100644 (file)
@@ -1,12 +1,9 @@
-<%@ 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" />
        <div class="container">
                <jsp:include page="fragments/mainmenu.jsp" />
                <spring:url value="/joblog/query" var="jobquery" />
+               <spring:url value="/stat/oneday?date=${date}" var="thequery" />
 
-<p style="font-weight:bold;">Job statistics for ${date}</p>
+       <ul class="nav navbar-nav navbar-right">
+               <li>
+               <a href="${thequery}" 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>
                        </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
index 8bc1213..19a7a79 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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">
 <%@ page trimDirectiveWhitespaces="true"%>
 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
@@ -17,7 +16,6 @@
 
        <div class="panel panel-default">
        <div class="panel-heading">
-
                <c:choose>
                        <c:when test="${flag == 'whole'}">
                                <p style="font-weight:bold;">Jobs for the protein sequence: ${prot}</p>
                                        ${prot}</p>
                        </c:otherwise>
                </c:choose>
-               <!-- <h3>Time execution: ${timeExecution} ms</h3>-->
-
        </div>
-       <div class="panel-body">
 
+       <div class="panel-body">
                <c:choose>
                        <c:when test="${njobs == 0}">
                                <p>No jobs found</p>
index 432af72..4f38666 100644 (file)
@@ -16,7 +16,6 @@
                <spring:url value="/sequence/querysequence" var="searchquery" />
                <spring:url value="/joblog/query" var="jobquery" />
 
-
        <div class="panel panel-default">
        <div class="panel-heading">
                <div style="font-weight:bold;">Jobs Statistics</div>
@@ -54,7 +53,7 @@
        </div>
        </div>
 
-               <jsp:include page="fragments/footer.jsp" />
+       <jsp:include page="fragments/footer.jsp" />
        </div>
 </body>
 </html>
\ No newline at end of file
index d711c05..907a578 100644 (file)
@@ -1,4 +1,3 @@
-<%@ 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"%>
@@ -6,8 +5,6 @@
 <%@ 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>
@@ -18,7 +15,7 @@
        <!-- reload button  -->
        <ul class="nav navbar-nav navbar-right">
                <li>
-               <a href="${thequery}" class="btn btn-default active" role="button">Reload</a>
+               <a href="${thequery}" class="btn btn-default active">Reload</a>
                </li>
        </ul>