# HG changeset patch # User ymh # Date 1272988910 -7200 # Node ID 36a9450b88baed6749160ca34bb3211237e20694 # Parent 4f60d2511e12687db231ab631d7fe80bacb7c4ee Add version information diff -r 4f60d2511e12 -r 36a9450b88ba WebContent/META-INF/MANIFEST.MF --- a/WebContent/META-INF/MANIFEST.MF Wed Apr 28 22:32:31 2010 +0200 +++ b/WebContent/META-INF/MANIFEST.MF Tue May 04 18:01:50 2010 +0200 @@ -1,3 +1,5 @@ Manifest-Version: 1.0 Class-Path: - +Package-Title: SonyEngine Webapp +Package-Version: 01.00 +Package-Vendor: IRI \ No newline at end of file diff -r 4f60d2511e12 -r 36a9450b88ba WebContent/WEB-INF/templates/index.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebContent/WEB-INF/templates/index.ftl Tue May 04 18:01:50 2010 +0200 @@ -0,0 +1,10 @@ + + + IRI/Sony Engine web app + + +

Welcome to the IRI/Sony Engine webapp

+
+Status + + \ No newline at end of file diff -r 4f60d2511e12 -r 36a9450b88ba WebContent/WEB-INF/templates/status.ftl --- a/WebContent/WEB-INF/templates/status.ftl Wed Apr 28 22:32:31 2010 +0200 +++ b/WebContent/WEB-INF/templates/status.ftl Tue May 04 18:01:50 2010 +0200 @@ -12,6 +12,10 @@ + VERSION + ${version} + + DATABASE PATH ${dbpath} @@ -20,7 +24,7 @@ ${untrained_limit} - UNTRAINED COUNT + Untrained count ${untrained_count} diff -r 4f60d2511e12 -r 36a9450b88ba src/fr/iri/thd/sonyengine/Constants.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/fr/iri/thd/sonyengine/Constants.java Tue May 04 18:01:50 2010 +0200 @@ -0,0 +1,5 @@ +package fr.iri.thd.sonyengine; + +public class Constants { + public final static String VERSION = "01.00"; +} diff -r 4f60d2511e12 -r 36a9450b88ba src/fr/iri/thd/sonyengine/core/EngineAccessor.java --- a/src/fr/iri/thd/sonyengine/core/EngineAccessor.java Wed Apr 28 22:32:31 2010 +0200 +++ b/src/fr/iri/thd/sonyengine/core/EngineAccessor.java Tue May 04 18:01:50 2010 +0200 @@ -7,7 +7,6 @@ import thd.ThdEngine; import thd.ThdMovieFragment; -import com.sleepycat.je.Transaction; import com.sleepycat.persist.EntityCursor; import com.sleepycat.persist.EntityIndex; diff -r 4f60d2511e12 -r 36a9450b88ba src/fr/iri/thd/sonyengine/web/RootResource.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/fr/iri/thd/sonyengine/web/RootResource.java Tue May 04 18:01:50 2010 +0200 @@ -0,0 +1,28 @@ +package fr.iri.thd.sonyengine.web; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.ServletContext; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; + +import com.sun.jersey.api.view.Viewable; + +@Path ("") +public class RootResource { + @GET + @Produces(MediaType.TEXT_HTML) + public Viewable index(@Context ServletContext context) { + + + final Map vars = new HashMap(); + + Viewable view = new Viewable("/index", vars); + + return view; + } +} diff -r 4f60d2511e12 -r 36a9450b88ba src/fr/iri/thd/sonyengine/web/StatusResource.java --- a/src/fr/iri/thd/sonyengine/web/StatusResource.java Wed Apr 28 22:32:31 2010 +0200 +++ b/src/fr/iri/thd/sonyengine/web/StatusResource.java Tue May 04 18:01:50 2010 +0200 @@ -12,6 +12,7 @@ import com.sun.jersey.api.view.Viewable; +import fr.iri.thd.sonyengine.Constants; import fr.iri.thd.sonyengine.core.DataAccessor; import fr.iri.thd.sonyengine.core.DbEnv; import fr.iri.thd.sonyengine.core.EngineAccessor; @@ -43,6 +44,7 @@ vars.put("segments_nb", segments_nb); vars.put("segments_db_nb", segments_db_nb); vars.put("tags_nb", tags_nb); + vars.put("version", Constants.VERSION); Viewable view = new Viewable("/status", vars);