continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r453222 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/BuildResultAction.java java/org/apache/maven/continuum/web/util/StateGenerator.java webapp/buildResult.jsp
Date Thu, 05 Oct 2006 13:10:43 GMT
Author: evenisse
Date: Thu Oct  5 06:10:42 2006
New Revision: 453222

URL: http://svn.apache.org/viewvc?view=rev&rev=453222
Log:
[CONTINUUM-952] Fix build state icons
Submitted by: Maria Odea Ching

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?view=diff&rev=453222&r1=453221&r2=453222
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
Thu Oct  5 06:10:42 2006
@@ -21,11 +21,16 @@
 import java.util.List;
 
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.web.util.StateGenerator;
 import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.codehaus.plexus.util.FileUtils;
 
+import javax.servlet.jsp.PageContext;
+
+import com.opensymphony.webwork.ServletActionContext;
+
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
@@ -51,6 +56,8 @@
 
     private String buildOutput;
 
+    private String state;
+
     public String execute()
         throws ContinuumException, ConfigurationException, IOException
     {
@@ -70,9 +77,12 @@
             buildOutput = FileUtils.fileRead( buildOutputFile );
         }
 
+        state = StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+
         return SUCCESS;
     }
 
+
     public int getBuildId()
     {
         return buildId;
@@ -127,4 +137,10 @@
     {
         return buildOutput;
     }
+
+    public String getState()
+    {
+        return state;
+    }
+
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java?view=diff&rev=453222&r1=453221&r2=453222
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
Thu Oct  5 06:10:42 2006
@@ -50,7 +50,7 @@
         }
         else if ( state == ContinuumProjectState.BUILDING )
         {
-            return BUILDING;
+            return "<img src=\"" + contextPath + "/images/building.gif\" alt=\"Building\"
title=\"Building\" border=\"0\" />";
         }
         else if ( state == ContinuumProjectState.UPDATING )
         {

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp?view=diff&rev=453222&r1=453221&r2=453222
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResult.jsp Thu Oct  5 06:10:42
2006
@@ -30,7 +30,7 @@
                 <ww:param name="after"><ww:text name="buildResult.trigger.%{buildResult.trigger}"/></ww:param>
             </c1:data>
             <c1:data label="%{getText('buildResult.state')}">
-                <ww:param name="after"><ww:text name="buildResult.state.%{buildResult.state}"/></ww:param>
+                <ww:param name="after" value="state"/>
             </c1:data>
             <c1:data label="%{getText('buildResult.buildNumber')}">
                 <ww:param name="after">



Mime
View raw message