import java.sql.SQLException;\r
import java.util.Date;\r
import java.util.Map;\r
+import java.util.Calendar;\r
+import java.text.SimpleDateFormat;\r
\r
import javax.servlet.RequestDispatcher;\r
import javax.servlet.ServletException;\r
long endTime = System.nanoTime();\r
req.setAttribute("stat", monthlyTotals);\r
req.setAttribute("total", Totals.sumOfTotals(monthlyTotals));\r
- req.setAttribute("timeexec", (endTime - startTime) / 1000000);\r
+// req.setAttribute("timeexec", (endTime - startTime) / 1000000);\r
+ req.setAttribute("timeexec", (endTime - startTime) / 100000000);\r
+ String timeStamp = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(\r
+ Calendar.getInstance().getTime());\r
+ req.setAttribute("timestamp", timeStamp);\r
\r
RequestDispatcher dispatcher = req.getRequestDispatcher("statpages/MonthlySummary.jsp");\r
\r
import java.util.Iterator;\r
import java.util.List;\r
import java.util.Set;\r
-import java.util.Collections;\r
+import java.util.Calendar;\r
+import java.text.SimpleDateFormat;\r
\r
import javax.management.AttributeNotFoundException;\r
import javax.management.InstanceNotFoundException;\r
}\r
req.setAttribute("results", testResults);\r
long endTime = System.nanoTime();\r
- req.setAttribute("timeexec", (endTime - startTime) / 1000000);\r
+// req.setAttribute("timeexec", (endTime - startTime) / 1000000);\r
+ req.setAttribute("timeexec", (endTime - startTime) / 100000000);\r
+ String timeStamp = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(\r
+ Calendar.getInstance().getTime());\r
+ req.setAttribute("timestamp", timeStamp);\r
RequestDispatcher rd = req.getRequestDispatcher("statpages/ServicesStatus.jsp");\r
rd.forward(req, resp);\r
}\r
<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}">
+ <li><strong>Server:</strong> <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>
+ <li><strong>Time of execution:</strong> ${timeexec} sec</li>
+ <li><strong>Usage Statistics as of:</strong> ${timestamp}</li>
+ <li><a href="${pageContext.request.contextPath}/PublicAnnualStat" title="JABAWS server usage statistics."
+ id="show_hidden2"><i class="fa fa-bar-chart" aria-hidden="true"></i> Refresh Usage Statistics</a></li>
</ul>
<br/>
<table class="center its" style="width: 600px ">
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>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>
+ <li><strong>Server:</strong> <a href="${host}">${host}</a> </li>
+ <li><strong>Time of execution:</strong> ${timeexec} sec</li>
+ <li><strong>Service Status as of:</strong> ${timestamp}</li>
+ <li><a href="${pageContext.request.contextPath}/ServiceStatus" title="JABAWS web-services status."
+ id="show_hidden1"><i class="fa fa-cogs" aria-hidden="true"></i> Refresh Service Status</a></li>
+ <%--<li> Your IP is ${pageContext.request.remoteAddr}</li>--%>
</ul>
<br/>
<h3 style="text-align: center;color: green">