continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From batkin...@apache.org
Subject svn commit: r1676050 - in /continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ProjectViewAction.java webapp/WEB-INF/jsp/projectView.jsp
Date Sat, 25 Apr 2015 18:41:28 GMT
Author: batkinson
Date: Sat Apr 25 18:41:28 2015
New Revision: 1676050

URL: http://svn.apache.org/r1676050
Log:
Added clickable icon for last build result to project view.

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java?rev=1676050&r1=1676049&r2=1676050&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java
Sat Apr 25 18:41:28 2015
@@ -24,6 +24,7 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
+import org.apache.maven.continuum.web.view.buildresults.StateCell;
 import org.codehaus.plexus.component.annotations.Component;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -131,4 +132,15 @@ public class ProjectViewAction
     {
         return new Date( time );
     }
+
+    /**
+     * Converts the specified result to an html icon.
+     *
+     * @param result the build result to convert.
+     * @return icon as html, either an img or if appropriate, a clickable link containing
the img
+     */
+    public String resultIcon( BuildResult result )
+    {
+        return StateCell.iconifyResult( result, result.getState() );
+    }
 }

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp?rev=1676050&r1=1676049&r2=1676050&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp Sat Apr 25
18:41:28 2015
@@ -80,6 +80,10 @@
               <th><label class="label"><s:text name='projectView.project.lastBuildDateTime'/>:</label></th>
               <td><s:date name="timeToDate(mapZeroTime(latestResult.endTime))"/></td>
             </tr>
+            <tr class="b">
+              <th><label class="label"><s:text name='buildResults.result'/>:</label></th>
+              <td><s:property value="resultIcon(latestResult)" escape="false"/></td>
+            </tr>
           </table>
 
           <redback:ifAuthorized permission="continuum-modify-group" resource="${project.projectGroup.name}">



Mime
View raw message