SVN: toys/cvsstats/web/WebContent: . META-INF META-INF/MANIFEST.MF WEB-INF WEB-INF/lib WEB-INF/web.x...

pawelz pawelz at pld-linux.org
Mon Apr 5 13:22:26 CEST 2010


Author: pawelz
Date: Mon Apr  5 13:22:26 2010
New Revision: 11305

Added:
   toys/cvsstats/web/WebContent/
   toys/cvsstats/web/WebContent/META-INF/
   toys/cvsstats/web/WebContent/META-INF/MANIFEST.MF   (contents, props changed)
   toys/cvsstats/web/WebContent/WEB-INF/
   toys/cvsstats/web/WebContent/WEB-INF/lib/
   toys/cvsstats/web/WebContent/WEB-INF/web.xml   (contents, props changed)
   toys/cvsstats/web/WebContent/index.jsp   (contents, props changed)
Log:
- added WebContent directory. Strange... I forgot to commit it earlier.


Added: toys/cvsstats/web/WebContent/META-INF/MANIFEST.MF
==============================================================================
--- (empty file)
+++ toys/cvsstats/web/WebContent/META-INF/MANIFEST.MF	Mon Apr  5 13:22:26 2010
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: toys/cvsstats/web/WebContent/WEB-INF/web.xml
==============================================================================
--- (empty file)
+++ toys/cvsstats/web/WebContent/WEB-INF/web.xml	Mon Apr  5 13:22:26 2010
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+  <display-name>cvsstats</display-name>
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+    <welcome-file>index.htm</welcome-file>
+    <welcome-file>index.jsp</welcome-file>
+    <welcome-file>default.html</welcome-file>
+    <welcome-file>default.htm</welcome-file>
+    <welcome-file>default.jsp</welcome-file>
+  </welcome-file-list>
+</web-app>
\ No newline at end of file

Added: toys/cvsstats/web/WebContent/index.jsp
==============================================================================
--- (empty file)
+++ toys/cvsstats/web/WebContent/index.jsp	Mon Apr  5 13:22:26 2010
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8" import="pl.org.pld.cvsstats.Stats" %>
+<%@ page import="org.joda.time.Interval"%>
+<%@ page import="org.joda.time.Period"%>
+<%@ page import="org.joda.time.DateTime;"%>
+
+<% Stats s = new Stats(); %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>PLD Linux CVS Statistics</title>
+</head>
+<body>
+
+<h1>Basic stats</h1>
+Number of commiters: <%=s.simpleQuery("SELECT COUNT(DISTINCT author) FROM commits @WHERE@") %><br />
+Number of commits: <%=s.simpleQuery("SELECT COUNT(*) FROM commits @WHERE@") %><br />
+<br />
+Most hard-working developers:<br />
+<%=s.query("SELECT author, sum(added)+sum(removed) AS `Number of changed lines`, sum(added), sum(removed) FROM commits @WHERE@ GROUP BY author ORDER BY `Number of changed lines` DESC").getHtml() %>
+</body>
+</html>
\ No newline at end of file


More information about the pld-cvs-commit mailing list