servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r701089 - /servicemix/scripts/builds/webapps/builds/status.jsp
Date Thu, 02 Oct 2008 11:46:18 GMT
Author: lhein
Date: Thu Oct  2 04:46:17 2008
New Revision: 701089

URL: http://svn.apache.org/viewvc?rev=701089&view=rev
Log:
for testing purposes

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=701089&r1=701088&r2=701089&view=diff
==============================================================================
--- servicemix/scripts/builds/webapps/builds/status.jsp (original)
+++ servicemix/scripts/builds/webapps/builds/status.jsp Thu Oct  2 04:46:17 2008
@@ -1,4 +1,4 @@
-<%@ page import="java.io.BufferedReader, java.io.File, java.io.FileReader, java.io.IOException,
java.util.Date"%>
+<%@ page import="java.io.BufferedReader, java.io.File, java.io.FileReader, java.io.IOException,
java.util.HashMap, java.util.Date, java.util.Iterator"%>
 <html>
 <head>
   <title>Apache Build Status at: <%= new Date() %></title>
@@ -10,6 +10,9 @@
     .gray {
       background-color: lightgray;
     }
+    .white {
+      background-color: white;
+    }
     .failure {
       background-color: red;
       color: white;
@@ -45,11 +48,37 @@
 </head>
 <body>
 <h1>Apache Build Status</h1>
+<hr />
 
 <%!
+
   String dir = "/mnt/builds/logs/";
   String failedTestsCheck = "[ERROR] There are test failures.";
+  HashMap prjMap = null;
 
+  void setupProjectMap() {
+      if (prjMap == null) {
+        prjMap = new HashMap();
+        // now add all projects
+        prjMap.put("activemq-deploy.log", "ActiveMQ trunk deploy");
+        prjMap.put("camel-deploy.log", "Camel trunk deploy");
+        prjMap.put("servicemix-3.2-deploy.log", "ServiceMix 3.2 deploy 1");
+        prjMap.put("servicemix-3.2-deploy-2.log", "ServiceMix 3.2 deploy 2");
+        prjMap.put("smx-3.3-trunk-deploy.log", "ServiceMix 3.3 deploy");
+        prjMap.put("smx4-legal-deploy.log", "ServiceMix 4 legal deploy");
+        prjMap.put("smx4-bundles-deploy.log", "ServiceMix 4 bundles deploy");
+        prjMap.put("smx4-kernel-deploy.log", "ServiceMix 4 kernel deploy");
+        prjMap.put("smx4-specs-deploy.log", "ServiceMix 4 specs deploy");
+        prjMap.put("smx4-nmr-deploy.log", "ServiceMix 4 nmr deploy");
+        prjMap.put("smx4-features-deploy.log", "ServiceMix 4 features deploy");
+        prjMap.put("smx-components-pom-deploy.log", "ServiceMix Components POM");
+        prjMap.put("smx-archetypes-deploy.log", "ServiceMix Archetypes");
+        prjMap.put("smx-mvn-plugins-pom-deploy.log", "ServiceMix Maven Plugins POM");
+        prjMap.put("smx-utils-trunk-deploy.log", "ServiceMix Utils");
+        // add more projects here
+      }      
+    }
+  
   String processBuildFile(String uri) {
     // lets check to see if its
     boolean failedTests = false;
@@ -136,66 +165,24 @@
 %>
 
 <table width='80%' cellpadding='0' cellspacing='0'>
-  <tr>
-    <td class='gray' width='40%'>ActiveMQ trunk deploy</td>
-    <%= processBuildFile("activemq-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>Camel trunk deploy</td>
-    <%= processBuildFile("camel-deploy.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix 3.2 deploy 1</td>
-    <%= processBuildFile("servicemix-3.2-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>ServiceMix 3.2 deploy 2</td>
-    <%= processBuildFile("servicemix-3.2-deploy-2.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix 3.3 deploy</td>
-    <%= processBuildFile("smx-3.3-trunk-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>ServiceMix 4 legal deploy</td>
-    <%= processBuildFile("smx4-legal-deploy.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix 4 bundles deploy</td>
-    <%= processBuildFile("smx4-bundles-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>ServiceMix 4 kernel deploy</td>
-    <%= processBuildFile("smx4-kernel-deploy.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix 4 specs deploy</td>
-    <%= processBuildFile("smx4-specs-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>ServiceMix 4 nmr deploy</td>
-    <%= processBuildFile("smx4-nmr-deploy.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix 4 features deploy</td>
-    <%= processBuildFile("smx4-features-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>ServiceMix Components POM</td>
-    <%= processBuildFile("smx-components-pom-deploy.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix Archetypes</td>
-    <%= processBuildFile("smx-archetypes-deploy.log")%>
-  </tr>
-  <tr>
-    <td width='40%'>ServiceMix Maven Plugins POM</td>
-    <%= processBuildFile("smx-mvn-plugins-pom-deploy.log")%>
-  </tr>
-  <tr>
-    <td class='gray' width='40%'>ServiceMix Utils</td>
-    <%= processBuildFile("smx-utils-trunk-deploy.log")%>
-  </tr>
+<%!
+  // ensure the map is filled
+  setupProjectMap();
+  
+  Iterator it = prjMap.keySet().iterator();
+  int cnt = 0;
+  while (it.hasNext()) {
+    String logFileName = (String)it.next();
+    String projectName = (String)prjMap.get(logFileName);
+    
+    out.write("<tr>");    
+    out.write("  <td class='" + (cnt % 2 != 0 ? "gray" : "white") + "' width='40%'>");
+    out.write(projectName);
+    out.write("  </td>");
+    out.write(processBuildFile(logFileName));
+    out.write("</tr>");
+  }
+%>
 </table>
 </body>
 </html>



Mime
View raw message