You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by lh...@apache.org on 2008/10/10 13:14:51 UTC

svn commit: r703404 - /servicemix/scripts/builds/webapps/builds/status.jsp

Author: lhein
Date: Fri Oct 10 04:14:51 2008
New Revision: 703404

URL: http://svn.apache.org/viewvc?rev=703404&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=703404&r1=703403&r2=703404&view=diff
==============================================================================
--- servicemix/scripts/builds/webapps/builds/status.jsp (original)
+++ servicemix/scripts/builds/webapps/builds/status.jsp Fri Oct 10 04:14:51 2008
@@ -140,7 +140,19 @@
           tsMap.containsKey(uri) && 
           f.lastModified() == ((Long)tsMap.get(uri)).longValue()) {
           String lastRes = (String)lastResultMap.get(uri);
-          String updatedRes = lastRes.substring(0, lastRes.indexOf("</a></td>")); 
+          
+          String searchTerm = null;
+          if (lastRes.indexOf("SUCCESS (with failures) ") != -1) {
+              searchTerm = "SUCCESS (with failures) ";
+          } else if (lastRes.indexOf("SUCCESS ") != -1) {
+              searchTerm = "SUCCESS ";
+          } else if (lastRes.indexOf("FAILURE ") != -1) {
+              searchTerm = "FAILURE ";
+          } else {
+            return lastRes;
+          }
+              
+          String updatedRes = lastRes.substring(0, lastRes.indexOf(searchTerm) + searchTerm.length()); 
           updatedRes += durationText + "</a></td>";
           return updatedRes;
       }