SVN: toys/cvsstats/web: WebContent/index.jsp build.xml
pawelz
pawelz at pld-linux.org
Sat May 1 22:25:26 CEST 2010
Author: pawelz
Date: Sat May 1 22:25:25 2010
New Revision: 11358
Modified:
toys/cvsstats/web/WebContent/index.jsp
toys/cvsstats/web/build.xml
Log:
- package java deps into war file
- tomcat redeploy target
Modified: toys/cvsstats/web/WebContent/index.jsp
==============================================================================
--- toys/cvsstats/web/WebContent/index.jsp (original)
+++ toys/cvsstats/web/WebContent/index.jsp Sat May 1 22:25:25 2010
@@ -6,7 +6,15 @@
<%@ page import="org.joda.time.DateTime;"%>
<%
- Stats s = new Stats();
+ Stats s = null;
+ if (request.getParameter("to") == null || request.getParameter("from") == null) {
+ s = new Stats();
+ } else {
+ s = new Stats(new Interval(
+ ((long)Integer.parseInt(request.getParameter("from")))*1000,
+ ((long)Integer.parseInt(request.getParameter("to")))*1000)
+ );
+ }
QueriesSet topbottom = new QueriesSet("top-bottom", s);
QueriesSet full = new QueriesSet("full", s);
%>
@@ -19,7 +27,7 @@
<link rel="stylesheet" type="text/css" href="stats.css" />
</head>
<body>
-
+<h1>Stats for <%s.getInterval().getStart().toString(); %> - <%s.getInterval().getEnd().toString(); %></h1>
<h1>Basic stats</h1>
<p>
Number of commiters: <%=s.simpleQuery("SELECT COUNT(DISTINCT author) FROM commits @WHERE@") %><br />
Modified: toys/cvsstats/web/build.xml
==============================================================================
--- toys/cvsstats/web/build.xml (original)
+++ toys/cvsstats/web/build.xml Sat May 1 22:25:25 2010
@@ -6,9 +6,10 @@
<property name="build.classes.dir" value="build" />
<property name="src.dir" value="src" />
- <property name="servlet.jar" value="/usr/share/java/servlet-api.jar" />
- <property name="joda-time.jar" value="/usr/share/java/joda-time.jar" />
- <property name="xerces.jar" value="/usr/share/java/xerces-j2.jar" />
+ <property name="java.dir" value="/usr/share/java" />
+ <property name="servlet.jar" value="servlet-api.jar" />
+ <property name="joda-time.jar" value="joda-time.jar" />
+ <property name="xerces.jar" value="xerces-j2.jar" />
<property name="catalina.home" value="/usr/share/tomcat" />
<property name="tomcat.deployment.dir" value="/var/lib/tomcat" />
@@ -21,9 +22,11 @@
<import file="${catalina.home}/bin/catalina-tasks.xml"/>
<path id="build.path">
- <pathelement location="${servlet.jar}" />
- <pathelement location="${joda-time.jar}" />
- <pathelement location="${xerces.jar}" />
+ <fileset dir="${java.dir}">
+ <include name="${servlet.jar}" />
+ <include name="${xerces.jar}" />
+ <include name="${joda-time.jar}" />
+ </fileset>
</path>
<property name="war" value="${appname}.war" />
@@ -40,6 +43,10 @@
<include name="README"/>
<include name="LICENSE"/>
</fileset>
+ <lib dir="${java.dir}">
+ <include name="${joda-time.jar}"/>
+ <include name="${xerces.jar}"/>
+ </lib>
</war>
</target>
@@ -69,4 +76,5 @@
path="/${appname}"/>
</target>
+ <target name="redeploy" depends="undeploy,deploy" description="Reinstall application in Tomcat"/>
</project>
More information about the pld-cvs-commit
mailing list