continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r360123 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/META-INF/plexus/ resources/localization/ webapp/
Date Fri, 30 Dec 2005 17:52:44 GMT
Author: evenisse
Date: Fri Dec 30 09:52:12 2005
New Revision: 360123

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

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp   (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java?rev=360123&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java
Fri Dec 30 09:52:12 2005
@@ -0,0 +1,83 @@
+package org.apache.maven.continuum.web.action;
+
+/*
+ * 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.Continuum;
+import org.apache.maven.continuum.ContinuumException;
+
+import com.opensymphony.xwork.ActionSupport;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class BuildResultsListAction
+    extends ActionSupport
+{
+    private Continuum continuum;
+
+    private Collection buildResults;
+
+    private int projectId;
+
+    private String projectName;
+
+    public String execute()
+    {
+        try
+        {
+            buildResults = continuum.getBuildResultsForProject( projectId );
+        }
+        catch ( ContinuumException e )
+        {
+            addActionError( "Can't get build results list for project (id=" + projectId +
") : " + e.getMessage() );
+
+            e.printStackTrace();
+
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+
+    public int getProjectId()
+    {
+        return projectId;
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public String getProjectName()
+    {
+        return projectName;
+    }
+
+    public void setProjectName( String projectName )
+    {
+        this.projectName = projectName;
+    }
+
+    public Collection getBuildResults()
+    {
+        return buildResults;
+    }
+}
\ No newline at end of file

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

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

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?rev=360123&r1=360122&r2=360123&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Fri Dec 30 09:52:12 2005
@@ -22,7 +22,6 @@
 import org.apache.maven.continuum.web.model.SummaryProjectModel;
 
 import com.opensymphony.xwork.ActionSupport;
-import com.opensymphony.webwork.ServletActionContext;
 
 import java.util.ArrayList;
 import java.util.Collection;

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml?rev=360123&r1=360122&r2=360123&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/components.xml
Fri Dec 30 09:52:12 2005
@@ -216,6 +216,17 @@
         </requirement>
       </requirements>
     </component>
+    <component>
+      <role>com.opensymphony.xwork.Action</role>
+      <role-hint>buildResults</role-hint>
+      <implementation>org.apache.maven.continuum.web.action.BuildResultsListAction</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.Continuum</role>
+        </requirement>
+      </requirements>
+    </component>
 
     <!--
      | Components

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=360123&r1=360122&r2=360123&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Fri Dec 30 09:52:12 2005
@@ -236,3 +236,13 @@
 notifier.event.sendOnFailure = Send on Failure
 notifier.event.sendOnError = Send on Error
 notifier.event.sendOnWarning = Send on Warning
+
+// ----------------------------------------------------------------------
+// Page: BuildResults
+// ----------------------------------------------------------------------
+buildResults.page.title = Continuum - Build results
+buildResults.section.title = Build results for {0}
+buildResults.buildNumber = Build #
+buildResults.startTime = Start Time
+buildResults.endTime = End Time
+buildResults.state = State

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=360123&r1=360122&r2=360123&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Fri Dec 30 09:52:12
2005
@@ -144,5 +144,10 @@
             <result name="input">notifierMsn.jsp</result>
             <result name="success" type="chain">projectView</result>
         </action>
+
+        <action name="buildResults"
+                class="buildResults">
+            <result name="success">buildResults.jsp</result>
+        </action>
     </package>
 </xwork>

Added: 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=360123&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp Fri Dec 30 09:52:12
2005
@@ -0,0 +1,49 @@
+<%@ taglib uri="webwork" prefix="ww" %>
+<%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title><ww:text name="buildResults.page.title"/></title>
+    </head>
+    <body>
+      <div id="h3">
+        <div>
+          <p style="border-top: 1px solid transparent; border-bottom: 1px solid black;">
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/projectView.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>">Info</a>
+            <b style="border: 1px solid black; padding-left: 1em; padding-right: 1em;">Builds</b>
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/workingCopy.action?projectId="/><ww:property
value="projectId"/>&projectName=<ww:property value="projectName"/>">Working&nbsp;Copy</a>
+          </p>
+        </div>
+
+        <h3>
+            <ww:text name="buildResults.section.title">
+                <ww:param><ww:property value="projectName"/></ww:param>
+            </ww:text>
+        </h3>
+        <ww:set name="buildResults" value="buildResults" scope="request"/>
+        <ec:table items="buildResults"
+                  var="buildResult"
+                  showExports="false"
+                  showPagination="false"
+                  showStatusBar="false"
+                  filterable="false"
+                  sortable="false">
+          <ec:row highlightRow="true">
+            <ec:column property="buildNumber" title="buildResults.buildNumber">
+                <c:if test="${!pageScope.buildResult.state == 2}">
+                    ${pageScope.buildResult.buildNumber}
+                </c:if>
+            </ec:column>
+            <ec:column property="startTime" title="buildResults.startTime" cell="date"/>
+            <ec:column property="entTime" title="buildResults.endTime" cell="date"/>
+            <ec:column property="state" title="buildResults.state" cell="org.apache.maven.continuum.web.view.StateCell"/>
+            <ec:column property="actions" title="&nbsp;">
+                RESULT
+            </ec:column>
+          </ec:row>
+        </ec:table>
+      </div>
+    </body>
+  </ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/buildResults.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp?rev=360123&r1=360122&r2=360123&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp Fri Dec 30 09:52:12
2005
@@ -8,6 +8,14 @@
     </head>
     <body>
       <div id="h3">
+        <div>
+          <p style="border-top: 1px solid transparent; border-bottom: 1px solid black;">
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;">Info</a>
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/buildResults.action?projectId="/><ww:property
value="project.id"/>&projectName=<ww:property value="project.name"/>">Builds</a>
+            <a style="border: 1px solid black; padding-left: 1em; padding-right: 1em;
text-decoration:none;" href="<ww:url value="/workingCopy.action?projectId="/><ww:property
value="project.id"/>&projectName=<ww:property value="project.name"/>">Working&nbsp;Copy</a>
+          </p>
+        </div>
+
         <h3><ww:text name="projectView.section.title"/></h3>
             
         <div class="axial">



Mime
View raw message