PROT-7 fixed report by dates
authorNatasha Sherstneva <n.shertneva@gmail.com>
Fri, 22 Nov 2013 11:46:09 +0000 (11:46 +0000)
committerNatasha Sherstneva <n.shertneva@gmail.com>
Fri, 22 Nov 2013 11:46:09 +0000 (11:46 +0000)
.classpath
.settings/org.eclipse.wst.common.project.facet.core.xml
server/compbio/listeners/ServletJobsByDate.java
server/compbio/statistic/CassandraRequester.java
website/ReportJobsByDate.jsp

index 38a76ef..b54f438 100644 (file)
        <classpathentry kind="lib" path="WEB-INF/lib/jcommon-1.0.20.jar"/>
        <classpathentry kind="lib" path="WEB-INF/lib/jfreechart-1.0.16.jar"/>
        <classpathentry kind="lib" path="testsrc/lib/testng-6.8.jar"/>
-       <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
-               <attributes>
-                       <attribute name="owner.project.facets" value="jst.web"/>
-               </attributes>
-       </classpathentry>
+       <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_45"/>
        <classpathentry kind="output" path="WEB-INF/classes"/>
 </classpath>
index bad9d4b..2905b91 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <faceted-project>
-  <runtime name="Apache Tomcat v7.0"/>
   <fixed facet="wst.jsdt.web"/>
   <fixed facet="java"/>
   <fixed facet="jst.web"/>
index 4aee8be..39fdf16 100644 (file)
@@ -39,7 +39,7 @@ public class ServletJobsByDate extends HttpServlet {
                request.setAttribute("result", res);
                final long endTime = System.currentTimeMillis();
                request.setAttribute("timeExecution", (endTime - startTime));
-               System.out.println ("QueryServlet.doGet: total number of dates = " + res.size());
+//             System.out.println ("QueryServlet.doGet: total number of dates = " + res.size());
                request.setAttribute("flag", request.getParameter("option"));
                RequestDispatcher rd = request.getRequestDispatcher("/ReportJobsByDate.jsp");
                rd.forward(request, response);
index ad99868..ec74c6f 100755 (executable)
@@ -142,6 +142,8 @@ public class CassandraRequester {
                query = new ArrayList<DataBase>();
                for (Date date = start.getTime(); !start.after(end); start.add(Calendar.DATE, 1), date = start.getTime()) {
                        List<Long> res = db.ReadDateTable(date.getTime());
+                       if (res == null)
+                               continue;
                        DataBase bean = new DataBase();
                        bean.setTotal((int)(long)res.get(0));
                        bean.setTotalOK((int)(long)res.get(1));
index f583510..f531446 100644 (file)
        </c:otherwise>
 </c:choose>
 <h3>Time execution: ${timeExecution} ms</h3>
+<c:choose>
+
+       <c:when test="${result == null}">
+               <h3>No jobs for this period  </h3>
+       </c:when>
+       <c:otherwise>
 
 <c:set var="sum" value="0" />
 <c:set var="sumOK" value="0" />
@@ -74,4 +80,6 @@
                </c:forEach>
 
        </tbody>
-</table>
\ No newline at end of file
+</table>
+</c:otherwise>
+</c:choose>
\ No newline at end of file