Improve JSP pages
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Sat, 2 Nov 2013 10:35:05 +0000 (10:35 +0000)
committerNatasha Sherstneva <n.shertneva@gmail.com>
Tue, 5 Nov 2013 23:00:31 +0000 (23:00 +0000)
Conflicts:
website/ReportLength.jsp

website/ReportLength.jsp
website/ReportNew.jsp
website/Sequence.jsp

index ed85c88..e68dc64 100644 (file)
@@ -1,46 +1,68 @@
 <%@page import="java.util.ArrayList"%>
-<%@ page trimDirectiveWhitespaces="true" %>
-<%@ 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 uri="http://displaytag.sf.net" prefix="dt" %>
+<%@ page trimDirectiveWhitespaces="true"%>
+<%@ 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 uri="http://displaytag.sf.net" prefix="dt"%>
 <c:choose>
-<c:when test="${flag == 'AllDate'}">
-<h3>Time execution for the whole period</h3>
-</c:when>
-<c:otherwise>
-<h3>Time execution for the interval: ${data1}  -  ${data2}</h3> 
-</c:otherwise>
+       <c:when test="${flag == 'AllDate'}">
+               <h3>Time execution for the whole period</h3>
+       </c:when>
+       <c:otherwise>
+               <h3>Time execution for the interval: ${data1} - ${data2}</h3>
+       </c:otherwise>
 </c:choose>
 <h3>Time execution: ${timeExecution} ms</h3>
-<table border="1" style = "border-collapse: collapse; white-space: nowrap"> 
-<thead>
-<tr>
-<th style="text-align: centre;  width: 150px">Date</th>
-<th style="text-align: centre;  width: 150px">less then 30 s</th>
-<th style="text-align: centre;  width: 150px">30 s - 60 s</th>
-<th style="text-align: centre;  width: 150px">1 min - 2 min</th>
-<th style="text-align: centre;  width: 150px">more then 2min</th>
-</tr>
-</thead>
-<tbody>
+
+<c:set var="sum" value="0" />
 <c:forEach items="${result}" var="res" varStatus="loop">
        <c:choose>
-               <c:when test="${not loop.last}">
-                       <tr>
-                       <td>${res.date}</td>
-                       <c:forEach items="${res.timeRez}" var="time">
-                               <td style="text-align: right">${time}</td>
-                       </c:forEach>
-               </c:when>
-               <c:otherwise>
-                       <tr style="font-weight: bolder;">
-                       <td>Total:</td>
+               <c:when test="${loop.last}">
                        <c:forEach items="${res.timeTotalExec}" var="total">
-                               <td style="text-align: right">${total}</td>
+                               <c:set var="sum" value="${sum + total}" />
                        </c:forEach>
-               </c:otherwise>
+               </c:when>
        </c:choose>
 </c:forEach>
-</tbody>
+
+<h3>Total number of jobs: ${sum}</h3>
+
+<table border="1" style="border-collapse: collapse; white-space: nowrap">
+       <thead>
+               <tr>
+                       <th style="text-align: centre; width: 150px">Date</th>
+                       <th style="text-align: centre; width: 150px">less then 30 s</th>
+                       <th style="text-align: centre; width: 150px">30 s - 60 s</th>
+                       <th style="text-align: centre; width: 150px">1 min - 2 min</th>
+                       <th style="text-align: centre; width: 150px">2 min - 10 min</th>
+                       <th style="text-align: centre; width: 150px">more then 10 min</th>
+               </tr>
+       </thead>
+       <tbody>
+               <c:forEach items="${result}" var="res" varStatus="loop">
+                       <c:choose>
+                               <c:when test="${loop.last}">
+                                       <tr style="font-weight: bolder;">
+                                               <td>Total:</td>
+                                               <c:forEach items="${res.timeTotalExec}" var="total">
+                                                       <td style="text-align: right">${total}</td>
+                                               </c:forEach>
+                                       </tr>
+                               </c:when>
+                       </c:choose>
+               </c:forEach>
+
+               <c:forEach items="${result}" var="res" varStatus="loop">
+                       <c:choose>
+                               <c:when test="${not loop.last}">
+                                       <tr>
+                                               <td>${res.date}</td>
+                                               <c:forEach items="${res.timeRez}" var="time">
+                                                       <td style="text-align: right">${time}</td>
+                                               </c:forEach>
+                                       </tr>
+                               </c:when>
+                       </c:choose>
+               </c:forEach>
+       </tbody>
 </table>
index 5abae4d..969cad7 100644 (file)
@@ -1,50 +1,63 @@
 <%@page import="java.util.ArrayList"%>
-<%@ 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 uri="http://displaytag.sf.net" prefix="dt" %>
+<%@ 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 uri="http://displaytag.sf.net" prefix="dt"%>
 <c:choose>
-<c:when test="${flag == 'AllDate'}">
-<h3>Jobs statistics for the whole period</h3>
-</c:when>
-<c:otherwise>
-<h3>Jobs statistics for the Period: 
-<c:out value = "${data1}"/> to <c:out value = "${data2}"/> </h3>
-</c:otherwise>
+       <c:when test="${flag == 'AllDate'}">
+               <h3>Jobs statistics for the whole period</h3>
+       </c:when>
+       <c:otherwise>
+               <h3>
+                       Jobs statistics for the Period:
+                       <c:out value="${data1}" />
+                       to
+                       <c:out value="${data2}" />
+               </h3>
+       </c:otherwise>
 </c:choose>
 <h3>Time execution: ${timeExecution} ms</h3>
-<table border="1" style = "border-collapse: collapse; white-space: nowrap"> 
-<thead>
-<tr>
-<th rowspan="2"style="text-align: centre">Date</th>
-<th colspan="4" style="text-align: centre">Number of Proteins</th>
-</tr>
-<tr>
-<th style="text-align: centre">Total</th>
-<th style="text-align: centre">Failed</th>
-<th style="text-align: centre">Cancelled</th>
-<th style="text-align: centre">Abandoned</th>
-</tr>
-</thead>
-<tbody>
-<c:set var="sum"  value="0" />
+
+<c:set var="sum" value="0" />
 <c:forEach items="${result}" var="res">
-<tr>
-<td>${res.date}</td>
-<c:set var="tot"  value="${res.total}" />
-<c:set var="sum"  value="${sum + tot}" />
-<td style="text-align: right"><c:out value = "${res.total}" /></td>
-<td style="text-align: right">0</td>
-<td style="text-align: right">0</td>
-<td style="text-align: right">0</td>
-</tr>
+       <c:set var="tot" value="${res.total}" />
+       <c:set var="sum" value="${sum + tot}" />
 </c:forEach>
-<tr style="font-weight: bolder;">
-<td>Total:</td>
-<td style="text-align: right">${sum}</td>
-<td style="text-align: right">0</td>
-<td style="text-align: right">0</td>
-<td style="text-align: right">0</td>
-</tr>
-</tbody>
+
+
+<table border="1" style="border-collapse: collapse; white-space: nowrap">
+       <thead>
+               <tr>
+                       <th rowspan="2" style="text-align: centre">Date</th>
+                       <th colspan="4" style="text-align: centre">Number of Proteins</th>
+               </tr>
+               <tr>
+                       <th style="text-align: centre">Total</th>
+                       <th style="text-align: centre">Failed</th>
+                       <th style="text-align: centre">Cancelled</th>
+                       <th style="text-align: centre">Abandoned</th>
+               </tr>
+       </thead>
+       <tbody>
+
+               <tr style="font-weight: bolder;">
+                       <td>Total:</td>
+                       <td style="text-align: right">${sum}</td>
+                       <td style="text-align: right">0</td>
+                       <td style="text-align: right">0</td>
+                       <td style="text-align: right">0</td>
+               </tr>
+
+               <c:set var="sum" value="0" />
+               <c:forEach items="${result}" var="res">
+                       <tr>
+                               <td>${res.date}</td>
+                               <td style="text-align: right"><c:out value="${res.total}" /></td>
+                               <td style="text-align: right">0</td>
+                               <td style="text-align: right">0</td>
+                               <td style="text-align: right">0</td>
+                       </tr>
+               </c:forEach>
+
+       </tbody>
 </table>
\ No newline at end of file
index 9e28601..1cccbb2 100644 (file)
        <br/>
        <form method="get" action="ProtServlet">
                <h3>Enter protein sequence</h3> 
-               <p><textarea rows="2" cols="100" name="prot">MPIDYSKWKDIEVSDDEDDTHPNIDTPSLFRWRHQARLERMAEKKMEQEKIDKEKGTTSKKMEELEKKLAAADVTDKSDIQKQIDEVKAQEEAWRKKEAELEEKERLEPWNVDTIGHEAFSTSRINKI</textarea></p>
-               <input type="radio" name="protein" value="whole"  Checked>search by the whole sequence
-               <input type="radio" name="protein" value="part">search by a part of sequence<br/>
+               <p><textarea rows="14" cols="80" name="prot">ABCDE</textarea></p>
+               <input type="radio" name="protein" value="part" Checked>search<br/>
                <input type="submit" name="Search" value="Search sequence"/><br/><br/>
-               <h3>Enter minimum counter of job/protein</h3>
+               <h3>Enter minimum number of jobs per protein</h3>
                <input type="text" name="counterJob" value = 3><br/>
                <input type="submit" name="Search" value="Search counter"/><br/><br/>
        </form>