jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r179801 - in /incubator/jackrabbit/trunk/contrib/tck-webapp: project.xml src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java src/webapp/WEB-INF/web.xml src/webapp/docroot/js/server_call.js src/webapp/index.jsp src/webapp/submit_result.jsp src/webapp/version.id
Date Fri, 03 Jun 2005 14:32:13 GMT
Author: tripod
Date: Fri Jun  3 07:32:12 2005
New Revision: 179801

URL: http://svn.apache.org/viewcvs?rev=179801&view=rev
Log:
- adjusting to version 1.0
- minor enhancements

Modified:
    incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/js/server_call.js
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/submit_result.jsp
    incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/version.id

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/project.xml Fri Jun  3 07:32:12 2005
@@ -22,7 +22,7 @@
     <id>tck-webapp</id>
     <!-- <type>war</type> -->
     <name>Day TCK web application</name>
-    <currentVersion>0.16.4.1</currentVersion>
+    <currentVersion>1.0</currentVersion>
 
 
     <!-- ====================================================================== -->
@@ -66,8 +66,7 @@
         <dependency>
             <groupId>jsr170</groupId>
             <artifactId>jcr</artifactId>
-            <version>0.16.4.1</version>
-            <url>http://www.day.com/maven/jsr170/jars/jcr-0.16.4.jar</url>
+            <version>1.0</version>
         </dependency>
         <!-- dependencies from jcr that we want to bundle -->
         <dependency>

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
(original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/java/org/apache/jackrabbit/tck/j2ee/RepositoryServlet.java
Fri Jun  3 07:32:12 2005
@@ -64,6 +64,9 @@
     /** exclude list version checker gif path */
     public static final String  CHECK_EXCLUDELIST_VERSION_GIF_PATH = "check-excludelist-version-gif";
 
+    /** exclude list version checker gif path */
+    public static final String  TCK_UPDATE_URL = "tck-update-page";
+
     /** tck webapp jar path name */
     public static final String  TCK_WEBAPP_JAR_PATH = "tck-webapp-jar-path";
 
@@ -94,6 +97,9 @@
     /** the exclude list checker url */
     private static String excludeListCheckerPath;
 
+    /** the update url */
+    private static String tckUpdateUrl;
+
     /**
      * The init method starts the repository to read/write test results and configuration,
      * sets the jaas config and the user id and the user password
@@ -188,6 +194,9 @@
             // set the exclude list checker path
             excludeListCheckerPath = getServletConfig().getInitParameter(CHECK_EXCLUDELIST_VERSION_GIF_PATH);
 
+            // set the tck update page url
+            tckUpdateUrl = getServletConfig().getInitParameter(TCK_UPDATE_URL);
+
         } catch (RepositoryException e) {
             log_info("Unable to initialize repository: " + e.toString(), e);
             throw new ServletException("Unable to initialize repository: " + e.toString(),
e);
@@ -292,5 +301,14 @@
      */
     public static String getExcludeListCheckerPath() {
         return excludeListCheckerPath;
+    }
+
+    /**
+     * Returns the tck update url
+     *
+     * @return url pointing to update page
+     */
+    public static String getTckUpdateUrl() {
+        return tckUpdateUrl;
     }
 }

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/WEB-INF/web.xml Fri Jun  3 07:32:12
2005
@@ -50,19 +50,19 @@
 
         <init-param>
             <param-name>submit-url</param-name>
-            <param-value>http://www.day.com/en/product/jsr_170/tck_submit.html</param-value>
+            <param-value>http://www.day.com/en/product/jsr_170/tck/tck_submit.html</param-value>
             <description>Url pointing to test result submit receiver</description>
         </init-param>
 
         <init-param>
             <param-name>tck-webapp-jar-path</param-name>
-            <param-value>/WEB-INF/lib/tck-webapp-0.16.4.1.jar</param-value>
+            <param-value>/WEB-INF/lib/tck-webapp-1.0.jar</param-value>
             <description>Path to the tck webapp jar, where the test sources reside</description>
         </init-param>
 
         <init-param>
             <param-name>exclude-list-url</param-name>
-            <param-value>http://www.day.com/en/product/jsr_170/exclude_list.html</param-value>
+            <param-value>http://www.day.com/en/product/jsr_170/tck/excludelist</param-value>
             <description>Url pointing to exclude list provider</description>
         </init-param>
 
@@ -76,6 +76,12 @@
             <param-name>check-excludelist-version-gif</param-name>
             <param-value>http://dev.day.com/excludelist.gif</param-value>
             <description>Url pointing to the excludelist version checker</description>
+        </init-param>
+
+        <init-param>
+            <param-name>tck-update-page</param-name>
+            <param-value>http://www.day.com/en/product/jsr_170/tck/tckupdate</param-value>
+            <description>Url pointing to the tck update page</description>
         </init-param>
 
         <load-on-startup>1</load-on-startup>

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/js/server_call.js
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/js/server_call.js?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/js/server_call.js (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/docroot/js/server_call.js Fri
Jun  3 07:32:12 2005
@@ -1,8 +1,10 @@
-function startTest(dlurl, checkerurl, currentVersion, useExcludeList) {
+var uptodate;
+
+function startTest(dlurl, useExcludeList) {
     if (!useExcludeList) {
         window.graph.document.location.href="graph.jsp?mode=testnow&useExcludeList=no";
     } else {
-        if (excludeListIsUpToDate(checkerurl + "?v=" + currentVersion)) {
+        if (uptodate) {
             window.graph.document.location.href="graph.jsp?mode=testnow&useExcludeList=yes";
         } else {
             if (window.confirm("The Exclude List is out of date.\nPress OK to continue testing
or CANCEL to get pointed to the download page")) {
@@ -15,11 +17,11 @@
 }
 
 function isUpToDate() {
-    return true;
+    uptodate = true;
 }
 
 function isOutOfDate() {
-    return false;
+    uptodate = false;
 }
 
 function excludeListIsUpToDate(url) {
@@ -28,5 +30,4 @@
     tester.onerror = isOutOfDate;
     tester.src = url;
 }
-
 

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/index.jsp Fri Jun  3 07:32:12
2005
@@ -32,7 +32,7 @@
 }
 
 // checker intervall
-long checkerIntervall = 3600;
+long CHECKER_INTERVALL = 24 * 60 * 60 * 1000;
 
 // load download id from file
 Properties props = new Properties();
@@ -68,7 +68,7 @@
 // last version checker time
 long lastChecked = (repSession.getRootNode().hasNode("lastChecked")) ? repSession.getRootNode().getNode("lastChecked").getProperty("time").getLong()
: 0;
 long currentTime = System.currentTimeMillis();
-boolean checkIt = ((lastChecked + checkerIntervall * 1000) < currentTime) || lastChecked
== 0;
+boolean checkIt = ((lastChecked + CHECKER_INTERVALL) < currentTime) || lastChecked ==
0;
 boolean isUpToDate = (repSession.getRootNode().hasNode("lastChecked")) ? repSession.getRootNode().getNode("lastChecked").getProperty("uptodate").getBoolean()
: true;
 
 // load version
@@ -121,6 +121,17 @@
 String mode = request.getParameter("mode");
 mode = (mode == null || mode.equals("")) ? "test" : mode;
 
+String exludeListTestMethod = "";
+
+if (mode.equals("test")) {
+    // get exclude list version currently stored in the tck repository
+    String excludeListVersion = "";
+    if (repSession.getRootNode().hasNode("excludelist")) {
+        Node excludeListNode = repSession.getRootNode().getNode("excludelist");
+        excludeListVersion = excludeListNode.getProperty("version").getString();
+    }
+    exludeListTestMethod = (mode.equals("test")) ? "excludeListIsUpToDate('" + RepositoryServlet.getExcludeListCheckerPath()
+ "?v=" + excludeListVersion + "');" : "";
+}
 %><html>
     <head><title>TCK for JSR170</title>
     <link rel="stylesheet" href="docroot/ui/default.css" type="text/css" title="style"
/>
@@ -138,23 +149,27 @@
             }
         }
 
-        function setGreen() {
+        function setGreen(doNotTell) {
             var img = document.getElementById('vcheckpic');
             img.src = "docroot/imgs/green.png";
             img.setAttribute("title", "The Tck web application is up to date.");
             // tell server that a check got performed (perform in 24h again)
-            tellChecked(<%= currentTime %>, true);
+            if (!doNotTell) {
+                tellChecked(<%= currentTime %>, true);
+            }
         }
 
-        function setRed() {
+        function setRed(doNotTell) {
             var img = document.getElementById('vcheckpic');
             img.src = "docroot/imgs/red.png";
             img.setAttribute("title", "A new Tck version is available.");
             var link = document.getElementById('vcheckpic_href');
-            link.setAttribute("href", "http://localhost:4302/update.html?did=<%= did %>");
+            link.setAttribute("href", "<%= RepositoryServlet.getTckUpdateUrl() %>");
             link.setAttribute("target", "_new");
             // tell server that a check got performed (perform in 24h again)
-            tellChecked(<%= currentTime %>, false);
+            if (!doNotTell) {
+                tellChecked(<%= currentTime %>, false);
+            }
         }
 
         function tellChecked(currTime, upToDate) {
@@ -176,16 +191,16 @@
                 <%
             } else {
                 if (isUpToDate) {
-                    %>setGreen();<%
+                    %>setGreen(true);<%
                 } else {
-                    %>setRed();<%
+                    %>setRed(true);<%
                 }
             }%>
         }
 
     </script>
     </head>
-    <body onload="setImage('logo', 'http://jsr170tools.day.com/crx/crx_main_files/banner_right.gif');checkVersion('<%=
checkVersionUrl %>');">
+    <body onload="setImage('logo', 'http://jsr170tools.day.com/crx/crx_main_files/banner_right.gif');checkVersion('<%=
checkVersionUrl %>');<%= exludeListTestMethod %>">
         <center>
             <table cellpadding="0" cellspacing="0" border="0" id="maintable">
                 <!-- banner -->
@@ -218,12 +233,6 @@
                 </tr>
                 <%
                 if (mode.equals("test")) {
-                    // get exclude list version currently stored in the tck repository
-                    String excludeListVersion = "";
-                    if (repSession.getRootNode().hasNode("excludelist")) {
-                        Node excludeListNode = repSession.getRootNode().getNode("excludelist");
-                        excludeListVersion = excludeListNode.getProperty("version").getString();
-                    }
                     %><tr>
                         <td colspan="2">
                             <iframe name="graph" src="graph.jsp" height="600" width="960"
frameborder="0"></iframe>
@@ -233,7 +242,7 @@
                         <td id="technavcell" colspan="2">
                             <table width="100%">
                                 <tr>
-                                    <td width="10%"><input type="button" value="Start"
class="submit" onclick="startTest('<%= RepositoryServlet.getExcludeListUrl() %>','<%=
RepositoryServlet.getExcludeListCheckerPath() %>','<%= excludeListVersion %>', document.getElementById('excudelist').checked)"></td>
+                                    <td width="10%"></script><input type="button"
value="Start" class="submit" onclick="startTest('<%= RepositoryServlet.getExcludeListUrl()
%>', document.getElementById('excudelist').checked)"></td>
                                     <td width="20%">Start Test</td>
                                     <td width="40%" align="center"><input type="checkbox"
id="excudelist" checked>Exclude List&nbsp;</td>
                                     <td width="20%" align="right">Submit Test Data</td>

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/submit_result.jsp
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/submit_result.jsp?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/submit_result.jsp (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/submit_result.jsp Fri Jun  3
07:32:12 2005
@@ -120,11 +120,13 @@
                 </tr>
                 <tr>
                     <td colspan="2" class="content">
-                        &nbsp;<input type="hidden" name="properties" value="<%=
properties %>"><input type="hidden" name="resultxml"><input type="hidden" name="downloadid"
value="<%= did %>"><input type="hidden" name="installid" value="<%= installid
%>">
+                        &nbsp;<input type="hidden" name="publishresults" id="publishresults"
value="yes"><input type="hidden" name="properties" value="<%= properties %>"><input
type="hidden" name="resultxml"><input type="hidden" name="downloadid" value="<%=
did %>"><input type="hidden" name="installid" value="<%= installid %>">
                     </td>
                 </tr>
                 <tr>
-                    <td colspan="2" class="content"><input type="checkbox" name="publishresults"
checked>Publishing test results allowed</td>
+                    <td colspan="2" class="content">
+                        <input type="checkbox" name="publishresultscb" checked onclick="if
(this.checked) {document.getElementById('publishresults').value='yes';}else{document.getElementById('publishresults').value='';}">Publishing
test results allowed
+                    </td>
                 </tr>
                 <tr>
                     <td class="content"><input type="submit" value="Send" class="submit"></td><td
align="right" class="content"><input type="button" value="Cancel" class="submit" onclick="window.close();"></td>

Modified: incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/version.id
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/version.id?rev=179801&r1=179800&r2=179801&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/version.id (original)
+++ incubator/jackrabbit/trunk/contrib/tck-webapp/src/webapp/version.id Fri Jun  3 07:32:12
2005
@@ -1 +1 @@
-version.id=1.0-RC2
\ No newline at end of file
+version.id=1.0



Mime
View raw message