Add additional checks of input parameters
[proteocache.git] / webapp / view / reportTimeExecution.jsp
index 907a578..fceb06e 100644 (file)
        <div class="panel-heading">
                <c:choose>
                        <c:when test="${option == 'AllDates,off'}">
-                               <p style="font-weight:bold;">Time execution for the whole period</p>
+                               <p style="font-weight:bold;">Time execution for the whole period (${ndays} days)</p>
                        </c:when>
                        <c:otherwise>
-                               <p style="font-weight:bold;">Time execution for the interval: ${date1} - ${date2}</p>
+                               <p style="font-weight:bold;">Time execution for the interval: ${date1} - ${date2} (${ndays} days)</p>
                        </c:otherwise>
                </c:choose>
        </div>
                                                <c:when test="${loop.last}">
                                                        <tr style="font-weight: bolder;">
                                                                <td style="text-align: right">Total numbers:</td>
-                                                               <td style="text-align: right">0</td>
+                                                               <c:set var="alldaytotal" value="0"/>
+                                                               <c:forEach items="${res.timeTotalExec}" var="total">
+                                                                       <c:set var="alldaytotal" value="${alldaytotal + total}"/>
+                                                               </c:forEach>
+                                                               <td style="text-align: right">${alldaytotal}</td>
                                                                <c:forEach items="${res.timeTotalExec}" var="total">
                                                                        <td style="text-align: right">${total}</td>
                                                                </c:forEach>
                                                <c:when test="${not loop.last}">
                                                        <tr>
                                                                <td style="text-align: center">${res.date}</td>
-                                                               <td style="text-align: right">0</td>
+                                                               <c:set var="daytotal" value="0"/>
+                                                               <c:forEach items="${res.timeRez}" var="time">
+                                                                       <c:set var="daytotal" value="${daytotal + time}"/>
+                                                               </c:forEach>
+                                                               <td style="text-align: right">${daytotal}</td>
                                                                <c:forEach items="${res.timeRez}" var="time">
                                                                        <td style="text-align: right">${time}</td>
                                                                </c:forEach>