continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r418388 - in /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view: BuildCell.java BuildNowCell.java
Date Fri, 30 Jun 2006 21:53:39 GMT
Author: evenisse
Date: Fri Jun 30 14:53:38 2006
New Revision: 418388

URL: http://svn.apache.org/viewvc?rev=418388&view=rev
Log:
Fix build cell rendering

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java?rev=418388&r1=418387&r2=418388&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
Fri Jun 30 14:53:38 2006
@@ -40,16 +40,20 @@
     {
         SummaryProjectModel project = (SummaryProjectModel) tableModel.getCurrentRowBean();
 
+        String contextPath = tableModel.getContext().getContextPath();
+
         int buildNumber = project.getBuildNumber();
 
+        String result = "<div align=\"center\">";
+
         if ( project.isInQueue() )
         {
-            return "<b>In&nbsp;queue</b>";
+            result += "<img src=\"" + contextPath + "/images/inqueue.gif\" alt=\"In Queue\"
title=\"In Queue\" border=\"0\">";
         }
         else
         {
-            if ( project.getState() == 1 || project.getState() == 2 || project.getState()
== 3 ||
-                project.getState() == 4 )
+            if ( project.getState() == 1 || project.getState() == 10 || project.getState()
== 2 ||
+                project.getState() == 3 || project.getState() == 4 )
             {
                 if ( project.getBuildNumber() > 0 )
                 {
@@ -69,17 +73,31 @@
 
                     String url = UrlHelper.buildUrl( "/buildResult.action", request, response,
params );
 
-                    return "<a href=\"" + url + ">" + project.getBuildNumber() + "</a>";
+                    result += "<a href=\"" + url + ">" + project.getBuildNumber() +
"</a>";
                 }
                 else
                 {
-                    return "&nbsp;";
+                    result += "&nbsp;";
                 }
             }
+            else if ( project.getState() == 6 )
+            {
+                result += "<img src=\"" + contextPath + "/images/building.gif\" alt=\"Building\"
title=\"Building\" border=\"0\">";
+            }
+            else if ( project.getState() == 7 )
+            {
+                result += "<img src=\"" + contextPath + "/images/checkingout.gif\" alt=\"Checking
Out sources\" title=\"Checking Out sources\" border=\"0\">";
+            }
+            else if ( project.getState() == 8 )
+            {
+                result += "<img src=\"" + contextPath + "/images/checkingout.gif\" alt=\"Updating
sources\" title=\"Updating sources\" border=\"0\">";
+            }
             else
             {
-                return "<b>In&nbsp;progress</b>";
+                result += "<img src=\"" + contextPath + "/images/inqueue.gif\" alt=\"In
Queue\" title=\"In Queue\" border=\"0\">";
             }
         }
+
+        return result + "</div>";
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java?rev=418388&r1=418387&r2=418388&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
Fri Jun 30 14:53:38 2006
@@ -41,12 +41,12 @@
         {
             return "<a href=\"" + contextPath + "/buildProject.action?projectId=" + project.getId()
+ "\"><img src=\"" +
                 contextPath +
-                "/images/buildnow.gif\" alt=\"Build Now\" title=\"Build Now\" width=\"16\"
height=\"16\" border=\"0\"></a>";
+                "/images/buildnow.gif\" alt=\"Build Now\" title=\"Build Now\" border=\"0\"></a>";
         }
         else
         {
             return "<img src=\"" + contextPath +
-                "/images/buildnow_disabled.gif\" alt=\"Build Now\" title=\"Build Now\" width=\"16\"
height=\"16\" border=\"0\">";
+                "/images/buildnow_disabled.gif\" alt=\"Build Now\" title=\"Build Now\" border=\"0\">";
         }
     }
 }



Mime
View raw message