Improve JSP pages
[proteocache.git] / website / ReportLength.jsp
index cd4249d..e68dc64 100644 (file)
@@ -1,47 +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">2 min - 10 min</th>
-<th style="text-align: centre;  width: 150px">more then 10 min</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>