servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r703393 - /servicemix/scripts/builds/webapps/builds/status.jsp
Date Fri, 10 Oct 2008 10:53:11 GMT
Author: lhein
Date: Fri Oct 10 03:53:11 2008
New Revision: 703393

URL: http://svn.apache.org/viewvc?rev=703393&view=rev
Log:
test

Modified:
    servicemix/scripts/builds/webapps/builds/status.jsp

Modified: servicemix/scripts/builds/webapps/builds/status.jsp
URL: http://svn.apache.org/viewvc/servicemix/scripts/builds/webapps/builds/status.jsp?rev=703393&r1=703392&r2=703393&view=diff
==============================================================================
--- servicemix/scripts/builds/webapps/builds/status.jsp (original)
+++ servicemix/scripts/builds/webapps/builds/status.jsp Fri Oct 10 03:53:11 2008
@@ -63,13 +63,11 @@
   String key_timestamps = "timestamps";
   String key_lastresults= "lastResults";
 
-  HttpSession session = null;
-  
   TreeMap prjMap = null;
   TreeMap tsMap = null;
   TreeMap lastResultMap = null;
 
-  void setupMaps() {
+  void setupMaps(HttpSession session) {
       // first setup the projects map
       if (session.getAttribute(key_projectMap) != null) {
         prjMap = (TreeMap)session.getAttribute(key_projectMap);
@@ -114,7 +112,7 @@
       }
     }
   
-  String processBuildFile(String uri) {
+  String processBuildFile(HttpSession session, String uri) {
     // lets check to see if its
     boolean failedTests = false;
     String file = dir + uri;
@@ -155,11 +153,11 @@
           } else if (line.contains("BUILD SUCCESSFUL")) {
             if (failedTests) {
               String result = "<td class='success_with_failed_tests' width='60%'><a
href='logs/" + uri + "' class='success_with_failed_tests'>SUCCESS (with failures) " + durationText
+ "</a></td>";
-              saveResult(f.lastModified(), uri, result);
+              saveResult(session, f.lastModified(), uri, result);
               return result;
             } else {
               String result = "<td class='success' width='60%'><a href='logs/" +
uri + "' class='success'>SUCCESS " + durationText + "</a></td>";
-              saveResult(f.lastModified(), uri, result);
+              saveResult(session, f.lastModified(), uri, result);
               return result;
             }
           }
@@ -178,11 +176,11 @@
       }
     }
     String result = "<td class='failure' width='60%'><a href='logs/" + uri + "'
class='failure'>FAILURE " + durationText + "</a></td>";
-    saveResult(f.lastModified(), uri, result);
+    saveResult(session, f.lastModified(), uri, result);
     return result;
   }
   
-  void saveResult(long ts, String uri, String result) {
+  void saveResult(HttpSession session, long ts, String uri, String result) {
     // remember the last time we accessed the file
     tsMap.put(uri, new Long(ts));
     // remember the result
@@ -236,10 +234,8 @@
 
 <table width='80%' cellpadding='0' cellspacing='0'>
 <%
-  session = request.getSession();
-
   // ensure the map is filled
-  setupMaps();
+  setupMaps(request.getSession());
   
   Iterator it = prjMap.keySet().iterator();
   int cnt = 0;
@@ -251,7 +247,7 @@
     out.write("  <td class='" + (cnt % 2 != 0 ? "gray" : "white") + "' width='40%'>");
     out.write(projectName);
     out.write("  </td>");
-    out.write(processBuildFile(logFileName));
+    out.write(processBuildFile(request.getSession(), logFileName));
     out.write("</tr>");
     cnt++;
   }



Mime
View raw message