continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r365889 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/view/buildresults/ java/org/apache/maven/continuum/web/view/commons/ webapp/
Date Wed, 04 Jan 2006 10:46:35 GMT
Author: evenisse
Date: Wed Jan  4 02:46:29 2006
New Revision: 365889

URL: http://svn.apache.org/viewcvs?rev=365889&view=rev
Log:
Add state in build results screen

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java
  (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java?rev=365889&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java
Wed Jan  4 02:46:29 2006
@@ -0,0 +1,57 @@
+package org.apache.maven.continuum.web.view.buildresults;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.web.util.StateGenerator;
+
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.BaseModel;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Used in BuildResults
+ *
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class StateCell
+    extends DisplayCell
+{
+    public void init(BaseModel model, Column column)
+    {
+        super.init(model, column);
+
+        HttpServletRequest request = (HttpServletRequest) model.getPageContext().getRequest();
+
+        Object value = column.getPropertyValue();
+
+        int state = -1;
+
+        if ( value instanceof Integer )
+        {
+            state = ( (Integer) value).intValue();
+        }
+
+        value = StateGenerator.generate( state, request.getContextPath() );
+
+        column.setValue(value);
+
+        column.setPropertyValue(value);
+    }
+}
\ No newline at end of file

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/buildresults/StateCell.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java?rev=365889&r1=365888&r2=365889&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java
Wed Jan  4 02:46:29 2006
@@ -27,8 +27,6 @@
 import org.extremecomponents.util.ExtremeUtils;
 
 /**
- * Used in Project view
- *
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
  */

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp?rev=365889&r1=365888&r2=365889&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp Wed Jan  4 02:46:29
2006
@@ -37,9 +37,7 @@
             </ec:column>
             <ec:column property="startTime" title="buildResults.startTime" cell="date"/>
             <ec:column property="endTime" title="buildResults.endTime" cell="date"/>
-            <ec:column property="state" title="buildResults.state">
-                STATE: TODO
-            </ec:column>
+            <ec:column property="state" title="buildResults.state" cell="org.apache.maven.continuum.web.view.buildresults.StateCell"/>
             <ec:column property="actions" title="&nbsp;">
               <a href="${pageContext.request.contextPath}/buildResult.action?projectId=<ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>&buildId=${pageScope.buildResult.id}">Result</a>
             </ec:column>



Mime
View raw message