JWS-111 & JWS-109 Re-uploading improved ‘Service Status’ and ‘Usage Statistics’ pages...
authorFábio Madeira <fmmarquesmadeira@dundee.ac.uk>
Mon, 13 Feb 2017 17:35:11 +0000 (17:35 +0000)
committerFábio Madeira <fmmarquesmadeira@dundee.ac.uk>
Mon, 13 Feb 2017 17:35:11 +0000 (17:35 +0000)
website/statpages/Joblist.jsp [new file with mode: 0644]
website/statpages/MonthlySummary.jsp [new file with mode: 0644]
website/statpages/ServicesStatus.jsp [new file with mode: 0644]
website/statpages/Statistics.jsp [new file with mode: 0644]
website/statpages/StatisticsTable.jsp [new file with mode: 0644]

diff --git a/website/statpages/Joblist.jsp b/website/statpages/Joblist.jsp
new file mode 100644 (file)
index 0000000..5fcd831
--- /dev/null
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+                pageEncoding="ISO-8859-1"%>
+<%--
+Author: Peter Troshin
+Date: May 2011
+--%>
+<%@ 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:import url="../template_header.jsp" >
+       <c:param name="title">JABAWS Usage Statistics</c:param>
+       <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
+                                                                                 rel="stylesheet"></c:param>
+</c:import>
+
+<div class="row" id="mainpage">
+       <div class="col-md-12">
+               <div class="panel panel-default">
+                       <div class="panel panel-heading">
+                               <h1 class="panel-title">JABAWS Services Status</h1>
+                       </div>
+                       <div class="panel-body">
+                               <dt:table class="its" id="job" name="${stat.jobs}" export="true" sort="list"  pagesize="100"
+                                                 defaultsort="0" defaultorder="descending">
+                                       <dt:caption>JABAWS Jobs List (<a href="#dcolm">detailed column description</a>) </dt:caption>
+                                       <dt:column title="JobID" sortable="true">
+                                               <c:choose>
+                                                       <c:when test="${fn:startsWith(job.jobname,'@')}">
+                                                               <a href="${pageContext.request.contextPath}/${clusterTemp}/${job.escJobname}">${job.jobname}</a>
+                                                       </c:when>
+                                                       <c:otherwise>
+                                                               <a href="${pageContext.request.contextPath}/${localTemp}/${job.escJobname}">${job.jobname}</a>
+                                                       </c:otherwise>
+                                               </c:choose>
+                                       </dt:column>
+                                       <dt:column property="clusterJobId" title="Cluster JobID" sortable="false"></dt:column>
+                                       <dt:column property="inputSize" title="Input Size (b)" sortable="true"></dt:column>
+                                       <dt:column property="resultSize" title="Result Size (b)" sortable="true"></dt:column>
+                                       <dt:column title="Runtime (s)" sortable="true">
+                                               <c:choose>
+                                                       <c:when test="${job.runtime==-1}">
+                                                               ?
+                                                       </c:when>
+                                                       <c:when test="${job.runtime==0}">
+                                                               &lt;1
+                                                       </c:when>
+                                                       <c:otherwise>
+                                                               ${job.runtime}
+                                                       </c:otherwise>
+                                               </c:choose>
+                                       </dt:column>
+                                       <dt:column property="start" title="Start time" sortable="true"></dt:column>
+                                       <dt:column property="finish" title="Finish time" sortable="true"></dt:column>
+
+                                       <dt:column title="isCancelled" sortable="true">
+                                               ${job.isCancelled}
+                                       </dt:column>
+                                       <dt:column title="isCollected" sortable="true">
+                                               ${job.isCollected}
+                                       </dt:column>
+                                       <dt:column property="isFinished" title="isFinished?" sortable="true"></dt:column>
+
+
+                                       <dt:setProperty name="export.pdf" value="true"/>
+                                       <dt:setProperty name="paging.banner.group_size" value="15" />
+                                       <dt:setProperty name="export.decorated" value="false" />
+                                       <dt:setProperty name="export.pdf.include_header" value="true" />
+                                       <dt:setProperty name="export.excel.include_header" value="true" />
+                                       <dt:setProperty name="export.csv.include_header" value="true" />
+                                       <dt:setProperty name="export.amount" value="list" /> <!-- set list if want to export all -->
+                                       <dt:setProperty name="paging.banner.item_name" value="Job" />
+                                       <dt:setProperty name="paging.banner.items_name" value="Jobs" />
+                                       <dt:setProperty name="sort.amount" value="list" /> <!-- set page if want to sort only first page before viewing -->
+
+                               </dt:table>
+
+                               <c:if test="${!empty stat.jobs}">
+
+                                       <a name="dcolm"></a>Columns
+                                       <ul>
+                                               <li>JobID - the JABAWS job id, unique for every job</li>
+                                               <li>Cluster JobID - cluster job id</li>
+                                               <li>InputSize - input size in bytes</li>
+                                               <li>ResultSize - result size in bytes</li>
+                                               <li>Runtime (s) - job's runtime in seconds</li>
+                                               <li>Start time (s)- job's start time and date</li>
+                                               <li>Finish time (s)- job's finish time and date</li>
+                                               <li>isCancelled - whether the job was cancelled</li>
+                                               <li>isCollected - whether the job was collected. False for the jobs that
+                                                       has been initiated but which results has never been retrieved</li>
+                                               <li>isFinished - whether the job has finished. This does not necessarily mean that the
+                                                       job has produced the result. The job can sometime finish in failure.</li>
+                                       </ul>
+                               </c:if>
+
+                       </div>
+               </div>
+       </div>
+</div>
+
+<jsp:include page="../template_footer.jsp" />
\ No newline at end of file
diff --git a/website/statpages/MonthlySummary.jsp b/website/statpages/MonthlySummary.jsp
new file mode 100644 (file)
index 0000000..1aecb93
--- /dev/null
@@ -0,0 +1,109 @@
+<%--
+Author: Peter Troshin
+Date: May 2011
+--%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ 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:import url="../template_header.jsp" >
+       <c:param name="title">JABAWS Usage Statistics</c:param>
+       <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
+                                                                                 rel="stylesheet"></c:param>
+</c:import>
+
+<div class="row" id="mainpage">
+       <div class="col-md-12">
+               <div class="panel panel-default">
+                       <div class="panel panel-heading">
+                               <h1 class="panel-title">JABAWS Services Status</h1>
+                       </div>
+                       <div class="panel-body">
+                               <div style="margin: 20px ">
+                                       <ul>
+                                               <li>Server: <a href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}">
+                                                       ${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}
+                                               </a> </li>
+                                               <li>Time of execusion: ${timeexec} msec</li>
+                                       </ul>
+                                       <br/>
+                                       <table class="center its" style="width: 600px ">
+                                               <thead>
+                                               <tr>
+                                                       <th rowspan="2">Month</th>
+                                                       <th colspan="4" style="text-align: center">Number of Jobs</th>
+                                               </tr>
+                                               <tr>
+                                                       <th title="Total number of jobs received">Total</th>
+                                                       <th title="The number of jobs with no result">Incomplete</th>
+                                                       <th title="The number of cancelled jobs">Cancelled</th>
+                                                       <th title="The number of jobs started but not collected by the user">Abandoned</th>
+                                               </tr>
+                                               </thead>
+                                               <tbody>
+
+                                               <c:forEach items="${stat}" var="monthTotal" varStatus="status">
+                                                       <c:choose>
+                                                               <c:when test="${status.count%2==0}">
+                                                                       <tr class="even">
+                                                               </c:when>
+                                                               <c:otherwise>
+                                                                       <tr class="odd">
+                                                               </c:otherwise>
+                                                       </c:choose>
+
+                                                       <td>
+                                                               <c:choose>
+                                                                       <c:when test="${isAdmin}">
+                                                                               <a title="Click to view the detailed statistics for the period" href="DisplayStat?datetime=${monthTotal.key.time}"><fmt:formatDate value="${monthTotal.key}" type="date" pattern="MMM yyyy"/></a>
+                                                                       </c:when>
+                                                                       <c:otherwise>
+                                                                               <fmt:formatDate value="${monthTotal.key}" type="date" pattern="MMM yyyy"/>
+                                                                       </c:otherwise>
+                                                               </c:choose>
+
+                                                       </td>
+                                                       <td>${monthTotal.value.total}</td>
+                                                       <td>${monthTotal.value.incomplete}</td>
+                                                       <td>${monthTotal.value.cancelled}</td>
+                                                       <td>${monthTotal.value.abandoned}</td>
+                                                       </tr>
+                                               </c:forEach>
+                                               <tr style="font-weight: bolder;">
+                                                       <td>Total:</td>
+                                                       <td>${total.total}</td>
+                                                       <td>${total.incomplete}</td>
+                                                       <td>${total.cancelled}</td>
+                                                       <td>${total.abandoned}</td>
+                                               </tr>
+                                               </tbody>
+                                       </table>
+
+                                       <div style="width: 600px">
+                                               <h3>Help</h3>
+                                               <p>
+                                                       The table contains the number of jobs processed by JABAWS per month, for the whole
+                                                       period when the statistics was collected</p>
+                                               For each month the table contains the following information.
+                                               <ul>
+                                                       <li>The period of time for which statistics is displayed. For example Jan 2011 means period of time from the first of
+                                                               January to the 31 of January.</li>
+                                                       <li>Total - the total number of jobs accepted by JABAWS</li>
+                                                       <li>Incomplete - the number of jobs for which the result file was not found or was empty excluding cancelled</li>
+                                                       <li>Cancelled - the number of jobs cancelled by the user</li>
+                                                       <li>Abandoned - the number of jobs which result(s) were not collected</li>
+                                               </ul>
+                                               The summary for each column is displayed in the last row of the table.
+                                       </div> <!-- Help text enclosing dev end -->
+                                       <c:if test="${!isAdmin}">
+                                               <br/><p><a href="AnnualStat">Please login as administrator</a> to view the detailed statistics (<a href=man_stats.html#helpUsageStats>help</a>)</p>
+                                       </c:if>
+
+                               </div><!-- margin div -->
+                       </div>
+               </div>
+       </div>
+</div>
+
+<jsp:include page="../template_footer.jsp" />
\ No newline at end of file
diff --git a/website/statpages/ServicesStatus.jsp b/website/statpages/ServicesStatus.jsp
new file mode 100644 (file)
index 0000000..174ca2e
--- /dev/null
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+<%--
+Author: Peter Troshin
+Date: May 2011
+This is a JSP fragment to be inserted into document, cannot be used alone
+TODO refactor
+--%>
+<%@ 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:import url="../template_header.jsp" >
+       <c:param name="title">JABAWS Web Services Status</c:param>
+       <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
+                                                                                 rel="stylesheet"></c:param>
+</c:import>
+
+<div class="row" id="mainpage">
+       <div class="col-md-12">
+               <div class="panel panel-default">
+                       <div class="panel panel-heading">
+                               <h1 class="panel-title">JABAWS Services Status</h1>
+                       </div>
+                       <div class="panel-body">
+
+                               <div style="margin: 20px ">
+
+                                       <c:set var="host" value="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}" />
+
+                                       <ul>
+                                               <li>
+                                                       This servlet tests if the web services are healthy on the tomcat instance on which JABAWS is deployed. <br/>
+                                                       If the tomcat instance is mapped to another "proxy" web server, the servlet does not test availability of <br/>
+                                                       the web services at the endpoints of this external web server.</li>
+                                               <li>All the web services are tested while this page is being loaded.</li>
+                                               <li>If you want to test the services again, reload this page.</li>
+                                               <li>Click on the service status to see the results of the testing.</li>
+                                               <li>Server tested: <a href="${host}">${host}</a> </li>
+                                               <li>Time of execusion: ${timeexec} msec</li>
+                                               <li> Your IP is ${pageContext.request.remoteAddr}</li>
+                                       </ul>
+                                       <br/>
+                                       <h3 style="text-align: center;color: green">
+                                               Alignment Web Services
+                                       </h3>
+                                       <table class="its" >
+                                               <thead>
+                                               <tr>
+                                                       <th title="Service name" width="100px">Service</th>
+                                                       <th title="Service status">Version</th>
+                                                       <th title="Service status">Status</th>
+                                                       <th title="Service details">Reference and more details</th>
+                                               </tr>
+                                               </thead>
+                                               <c:forEach items="${results}" var="res" varStatus="status">
+                                                       <c:if test="${res.group=='alignment'}">
+                                                               <c:if test="${status.count%2==0}">
+                                                                       <tr class="even">
+                                                               </c:if><c:if test="${status.count%2!=0}">
+                                                               <tr class="odd">
+                                                       </c:if>
+                                                               <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>
+                                                               <td>${res.version}</td>
+                                                               <c:if test="${res.status}">
+                                                                       <td><div class="source">
+                                                                               <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                        title="Click to open/close"><span style="color: green">OK</span></div>
+                                                                               <div class="body collapsed" style="max-width: 400px;">
+                                                                                       <pre>${res.details}</pre>
+                                                                               </div></div></td>
+                                                               </c:if>
+                                                               <c:if test="${!res.status}">
+                                                                       <td><div class="source">
+                                                                               <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                        title="Click to open/close"><span style="color: red">Fail</span></div>
+                                                                               <div class="body collapsed" style="max-width: 400px;">
+                                                                                       <pre>${res.details}</pre>
+                                                                               </div></div></td>
+                                                               </c:if>
+                                                               <td><div class="source">
+                                                                       <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                title="Click to open/close"><span style="color: brown">INFO</span></div>
+                                                                       <div class="body collapsed" style="max-width: 500px;">
+                                                                               <pre>${res.reference}</pre>
+                                                                       </div></div></td>
+                                                               </tr>
+                                                       </c:if>
+                                               </c:forEach>
+                                       </table>
+
+                                       <br/>
+                                       <br/>
+                                       <h3 style="text-align: center;color: green;">
+                                               Disorder Web Services
+                                       </h3>
+                                       <table class="its" >
+                                               <thead>
+                                               <tr>
+                                                       <th title="Service name" width="100px">Service</th>
+                                                       <th title="Service status">Version</th>
+                                                       <th title="Service status">Status</th>
+                                                       <th title="Service details">Reference and more details</th>
+                                               </tr>
+                                               </thead>
+                                               <c:forEach items="${results}" var="res" varStatus="status">
+                                                       <c:if test="${res.group=='disorder'}">
+                                                               <c:if test="${status.count%2==0}">
+                                                                       <tr class="even">
+                                                               </c:if><c:if test="${status.count%2!=0}">
+                                                               <tr class="odd">
+                                                       </c:if>
+                                                               <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>
+                                                               <td>${res.version}</td>
+                                                               <c:if test="${res.status}">
+                                                                       <td><div class="source">
+                                                                               <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                        title="Click to open/close"><span style="color: green">OK</span></div>
+                                                                               <div class="body collapsed" style="max-width: 400px;">
+                                                                                       <pre>${res.details}</pre>
+                                                                               </div></div></td>
+                                                               </c:if>
+                                                               <c:if test="${!res.status}">
+                                                                       <td><div class="source">
+                                                                               <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                        title="Click to open/close"><span style="color: red">Fail</span></div>
+                                                                               <div class="body collapsed" style="max-width: 400px;">
+                                                                                       <pre>${res.details}</pre>
+                                                                               </div></div></td>
+                                                               </c:if>
+                                                               <td><div class="source">
+                                                                       <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                title="Click to open/close"><span style="color: brown">INFO</span></div>
+                                                                       <div class="body collapsed" style="max-width: 500px;">
+                                                                               <pre>${res.reference}</pre>
+                                                                       </div></div></td>
+                                                               </tr>
+                                                       </c:if>
+                                               </c:forEach>
+                                       </table>
+
+                                       <br/>
+                                       <br/>
+                                       <h3 style="text-align: center;color: green;">
+                                               Other Web Services
+                                       </h3>
+                                       <table class="its" >
+                                               <thead>
+                                               <tr>
+                                                       <th title="Service name" width="100px">Service</th>
+                                                       <th title="Service status">Version</th>
+                                                       <th title="Service status">Status</th>
+                                                       <th title="Service details">Reference and more details</th>
+                                               </tr>
+                                               </thead>
+                                               <c:forEach items="${results}" var="res" varStatus="status">
+                                                       <c:if test="${res.group!='alignment' and res.group!='disorder'}">
+                                                               <c:if test="${status.count%2==0}">
+                                                                       <tr class="even">
+                                                               </c:if><c:if test="${status.count%2!=0}">
+                                                               <tr class="odd">
+                                                       </c:if>
+                                                               <td width="100px"><a href="${host}/${res.service}?wsdl">${res.service}</a></td>
+                                                               <td>${res.version}</td>
+                                                               <c:if test="${res.status}">
+                                                                       <td><div class="source">
+                                                                               <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                        title="Click to open/close"><span style="color: green">OK</span></div>
+                                                                               <div class="body collapsed" style="max-width: 400px;">
+                                                                                       <pre>${res.details}</pre>
+                                                                               </div></div></td>
+                                                               </c:if>
+                                                               <c:if test="${!res.status}">
+                                                                       <td><div class="source">
+                                                                               <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                        title="Click to open/close"><span style="color: red">Fail</span></div>
+                                                                               <div class="body collapsed" style="max-width: 400px;">
+                                                                                       <pre>${res.details}</pre>
+                                                                               </div></div></td>
+                                                               </c:if>
+                                                               <td><div class="source">
+                                                                       <div class="header collapsed" onclick="$(this).next('.body.collapsed').toggle();"
+                                                                                title="Click to open/close"><span style="color: brown">INFO</span></div>
+                                                                       <div class="body collapsed" style="max-width: 500px;">
+                                                                               <pre>${res.reference}</pre>
+                                                                       </div></div></td>
+                                                               </tr>
+                                                       </c:if>
+                                               </c:forEach>
+                                       </table>
+
+                                       <p>If you would like to integrate JABAWS with automated health check system you may want to use
+                                               the HTTP code response service checker. It responds with HTTP status code depending on the status
+                                               of the web service.
+                                               For more information please refer to <a href="${pageContext.request.contextPath}/man_serverwar.jsp#usingWsTester">
+                                                       Testing JABAWS server</a> help page.</p>
+                               </div><!-- margin div -->
+                       </div>
+               </div>
+       </div>
+</div>
+
+<jsp:include page="../template_footer.jsp" />
diff --git a/website/statpages/Statistics.jsp b/website/statpages/Statistics.jsp
new file mode 100644 (file)
index 0000000..528ff00
--- /dev/null
@@ -0,0 +1,69 @@
+<%--
+Author: Peter Troshin
+Date: May 2011
+--%>
+
+<%@ 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:import url="../template_header.jsp" >
+       <c:param name="title">Usage Statistics</c:param>
+       <c:param name="html_custom_css"><link href="${pageContext.request.contextPath}/static/css/table.css"
+                                                                                 rel="stylesheet"></c:param>
+</c:import>
+
+
+<div class="row">
+       <div class="col-md-12">
+               <div class="panel panel-default">
+                       <div class="panel panel-heading">
+                               <h1 class="panel-title">JABAWS Usage Statistics for the Period:
+                                       <fmt:formatDate value="${startDate}" /> to <fmt:formatDate value="${stopDate}"/></h1>
+                       </div>
+                       <div class="panel-body">
+                               <div style="margin: 20px ">
+                                       <h3>All Jobs</h3>
+                                       <c:set var="where"  value="everywhere" scope="request"/>
+                                       <c:set var="statistics"  value="${stat.allStat}" scope="request"/>
+                                       <c:set var="totals" value="${statTotal}" scope="request"/>
+                                       <c:import url="StatisticsTable.jsp"/>
+
+                                       <h3>Local Jobs</h3>
+                                       <c:set var="where"  value="local" scope="request"/>
+                                       <c:set var="statistics"  value="${stat.localStat}" scope="request"/>
+                                       <c:set var="totals" value="${statTotalLocal}" scope="request"/>
+                                       <c:import url="StatisticsTable.jsp"/>
+
+                                       <h3>Cluster Jobs</h3>
+                                       <c:set var="where"  value="cluster" scope="request"/>
+                                       <c:set var="statistics"  value="${stat.clusterStat}" scope="request"/>
+                                       <c:set var="totals" value="${statTotalCluster}" scope="request"/>
+                                       <c:import url="StatisticsTable.jsp"/>
+
+                                       <div style="width: 600px">
+                                               <h3>Help</h3>
+                                               <p>
+                                                       Each table contains the number of jobs processed by JABAWS during the period of
+                                                       time specified in the title.</p>
+                                               <ul>
+                                                       <li>The "All Jobs" table contains the summary of all jobs.</li>
+                                                       <li>"Local Jobs" table - contains the summary of the jobs calculated by the local engine.</li>
+                                                       <li>"Cluster Jobs" table - contains the summary of the jobs calculated by the cluster.</li>
+                                               </ul>
+                                               Each table contains the following information for each web service
+                                               <ul>
+                                                       <li>Total - the total number of jobs accepted by a particular JABA service</li>
+                                                       <li>Incomplete - the number of jobs for which the result file was not found or was empty excluding cancelled</li>
+                                                       <li>Cancelled - the number of jobs cancelled by the user</li>
+                                                       <li>Abandoned - the number of jobs which result(s) were not collected</li>
+                                               </ul>
+                                       </div> <!-- Help text enclosing dev end -->
+                               </div><!-- margin div -->
+                       </div>
+               </div>
+       </div>
+</div>
+
+<jsp:include page="../template_footer.jsp" />
diff --git a/website/statpages/StatisticsTable.jsp b/website/statpages/StatisticsTable.jsp
new file mode 100644 (file)
index 0000000..c6b336a
--- /dev/null
@@ -0,0 +1,55 @@
+<%--
+Author: Peter Troshin
+Date: May 2011
+--%>
+
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ 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" %>
+
+
+<table class="its" style="width:600px ">
+       <thead>
+       <tr>
+               <th rowspan="2">Web Service</th>
+               <th colspan="4" style="text-align: center">Number of Jobs</th>
+       </tr>
+       <tr>
+               <th title="Total number of jobs received">Total</th>
+               <th title="The number of jobs with no result">Incomplete</th>
+               <th title="The number of cancelled jobs">Cancelled</th>
+               <th title="The number of jobs started but not collected by the user">Abandoned</th>
+       </tr>
+       </thead>
+       <tbody>
+
+       <c:forEach items="${statistics}" var="ws" varStatus="status">
+               <c:choose>
+                       <c:when test="${status.count%2==0}">
+                               <tr class="even">
+                       </c:when>
+                       <c:otherwise>
+                               <tr class="odd">
+                       </c:otherwise>
+               </c:choose>
+
+               <td>${ws.key}</td>
+               <td><a title="Click to view jobs" href="Joblist?ws=${ws.key}&where=${where}&type=all&from=${startDate.time}&to=${stopDate.time}">${ws.value.jobNumber}</a></td>
+               <td><a title="Click to view jobs" href="Joblist?ws=${ws.key}&where=${where}&type=incomplete&from=${startDate.time}&to=${stopDate.time}">${fn:length(ws.value.incompleteJobs)}</a></td>
+               <td><a title="Click to view jobs" href="Joblist?ws=${ws.key}&where=${where}&type=cancelled&from=${startDate.time}&to=${stopDate.time}">${fn:length(ws.value.cancelledJobs)}</a></td>
+               <td><a title="Click to view jobs" href="Joblist?ws=${ws.key}&where=${where}&type=abandoned&from=${startDate.time}&to=${stopDate.time}">${fn:length(ws.value.abandonedJobs)}</a></td>
+               </tr>
+       </c:forEach>
+
+       <tr style="font-weight: bolder;">
+               <td>Total:</td>
+               <td>${totals.total}</td>
+               <td>${totals.incomplete}</td>
+               <td>${totals.cancelled}</td>
+               <td>${totals.abandoned}</td>
+       </tr>
+       </tbody>
+</table>
+<c:remove var="statistics"/>
+<c:remove var="totals"/>
\ No newline at end of file