continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r734907 - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/buildmanager/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ continuum-webapp/src/main/resources/ continuum-webapp/src/main/resourc...
Date Fri, 16 Jan 2009 04:19:52 GMT
Author: oching
Date: Thu Jan 15 20:19:51 2009
New Revision: 734907

URL: http://svn.apache.org/viewvc?rev=734907&view=rev
Log:
[CONTINUUM-2034]
revert changes to -r734745

Added:
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp
Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/resources/struts.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java?rev=734907&r1=734906&r2=734907&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java (original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java Thu Jan 15 20:19:51 2009
@@ -23,6 +23,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Project;

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=734907&r1=734906&r2=734907&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java Thu Jan 15 20:19:51 2009
@@ -32,8 +32,8 @@
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
-import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
-import org.apache.maven.continuum.ContinuumException;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -59,6 +59,8 @@
 	extends ContinuumActionSupport
 	implements SecureAction, LogEnabled
 {
+    private static final String DISTRIBUTED_BUILD_SUCCESS = "distributed-build-success";
+
 	private List<String> selectedBuildTaskHashCodes;
 	    
 	private List<String> selectedCheckOutTaskHashCodes;
@@ -194,10 +196,9 @@
 	
 	public String display()
 	    throws Exception
-	{	  
-	    // distributed builds
-	    try
-	    {
+	{
+	    /*if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )	    
+        {
             distributedBuildSummary = new ArrayList<DistributedBuildSummary>();
 
             Map<String, PrepareBuildProjectsTask> map = distributedBuildManager.getDistributedBuildProjects();
@@ -229,96 +230,89 @@
             }
 
             distributedBuildQueues = getContinuum().getTaskQueueManager().getDistributedBuildProjectsInQueue();
-	    }
-	    catch ( ContinuumException e )
-	    {
-	        addActionError( e.getMessage() );
-	        return ERROR;
-	    }
-	    catch( TaskQueueManagerException e )
-	    {
-	        addActionError( e.getMessage() );
-            return ERROR;
-	    }            
-        
-	    // local build queues
-        try
-        {
-            // current builds
-            Map<String, Task> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
-            Set<String> keySet = currentBuilds.keySet();
-            for( String key : keySet )
-            {
-                BuildProjectTask buildTask = (BuildProjectTask) currentBuilds.get( key );
-                currentBuildProjectTasks.put( key, buildTask );
-            }
-        }
-        catch ( BuildManagerException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
-        }
 
-        try
-        {
-            // queued builds
-            Map<String, List<Task>> builds = getContinuum().getBuildsManager().getProjectsInBuildQueues();
-            Set<String> keySet = builds.keySet();            
-            for( String key : keySet )
-            {
-                List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
-                for( Task task : builds.get( key ) )
-                {
-                    BuildProjectTask buildTask = (BuildProjectTask) task;
-                    buildTasks.add( buildTask ); 
-                }
-                buildsInQueue.put( key, buildTasks );
-            }
-        }
-        catch ( BuildManagerException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
+            return DISTRIBUTED_BUILD_SUCCESS;
         }
+        else
+        {*/
+	        try
+	        {
+	            // current builds
+	            Map<String, Task> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
+	            Set<String> keySet = currentBuilds.keySet();
+	            for( String key : keySet )
+	            {
+	                BuildProjectTask buildTask = (BuildProjectTask) currentBuilds.get( key );
+	                currentBuildProjectTasks.put( key, buildTask );
+	            }
+	        }
+	        catch ( BuildManagerException e )
+	        {
+	            addActionError( e.getMessage() );
+	            return ERROR;
+	        }
 
-        try
-        {
-            // current checkouts
-            Map<String, Task> currentCheckouts = getContinuum().getBuildsManager().getCurrentCheckouts();
-            Set<String> keySet = currentCheckouts.keySet();
-            for( String key : keySet )
-            {
-                CheckOutTask checkoutTask = (CheckOutTask) currentCheckouts.get( key );
-                currentCheckoutTasks.put( key, checkoutTask );
-            }
-        }
-        catch ( BuildManagerException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
-        }
+   	        try
+	        {
+	            // queued builds
+	            Map<String, List<Task>> builds = getContinuum().getBuildsManager().getProjectsInBuildQueues();
+	            Set<String> keySet = builds.keySet();            
+	            for( String key : keySet )
+	            {
+	                List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
+	                for( Task task : builds.get( key ) )
+	                {
+	                    BuildProjectTask buildTask = (BuildProjectTask) task;
+	                    buildTasks.add( buildTask ); 
+	                }
+	                buildsInQueue.put( key, buildTasks );
+	            }
+	        }
+	        catch ( BuildManagerException e )
+	        {
+	            addActionError( e.getMessage() );
+	            return ERROR;
+	        }
 
-        try
-        {
-            // queued checkouts
-            Map<String, List<Task>> checkouts = getContinuum().getBuildsManager().getProjectsInCheckoutQueues();
-            Set<String> keySet = checkouts.keySet();
-            for( String key : keySet )
-            {
-                List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
-                for( Task task : checkouts.get( key ) )
-                {
-                    CheckOutTask checkoutTask = (CheckOutTask) task;
-                    checkoutTasks.add( checkoutTask ); 
-                }
-                checkoutsInQueue.put( key, checkoutTasks );
-            }
-        }
-        catch ( BuildManagerException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
-        }
+ 	        try
+	        {
+	            // current checkouts
+	            Map<String, Task> currentCheckouts = getContinuum().getBuildsManager().getCurrentCheckouts();
+	            Set<String> keySet = currentCheckouts.keySet();
+	            for( String key : keySet )
+	            {
+	                CheckOutTask checkoutTask = (CheckOutTask) currentCheckouts.get( key );
+   	                currentCheckoutTasks.put( key, checkoutTask );
+	            }
+	        }
+	        catch ( BuildManagerException e )
+	        {
+	            addActionError( e.getMessage() );
+	            return ERROR;
+	        }
+
+	        try
+	        {
+	            // queued checkouts
+	            Map<String, List<Task>> checkouts = getContinuum().getBuildsManager().getProjectsInCheckoutQueues();
+	            Set<String> keySet = checkouts.keySet();
+	            for( String key : keySet )
+	            {
+	                List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
+	                for( Task task : checkouts.get( key ) )
+	                {
+	                    CheckOutTask checkoutTask = (CheckOutTask) task;
+	                    checkoutTasks.add( checkoutTask ); 
+	                }
+	                checkoutsInQueue.put( key, checkoutTasks );
+	            }
+	        }
+	        catch ( BuildManagerException e )
+	        {
+	            addActionError( e.getMessage() );
+	            return ERROR;
+	        }
+	   // }
 
 	    return SUCCESS;
 	}
@@ -341,23 +335,10 @@
 	        return REQUIRES_AUTHENTICATION;
 	    }
 	            
-	    try
-	    {
-    	    getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName );
-    	    Project project = getContinuum().getProject( projectId );
-    	    project.setState( project.getOldState() );
-    	    getContinuum().updateProject( project );
-	    }
-	    catch ( BuildManagerException e )
-	    {
-	        addActionError( e.getMessage() );
-            return ERROR;
-	    }
-	    catch ( ContinuumException e )
-	    {
-	        addActionError( e.getMessage() );
-            return ERROR;
-	    }
+	    getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName );
+	    Project project = getContinuum().getProject( projectId );
+	    project.setState( project.getOldState() );
+	    getContinuum().updateProject( project );
 	
 	    return SUCCESS;
 	}
@@ -380,16 +361,8 @@
 	        return REQUIRES_AUTHENTICATION;
 	    }
 	    
-	    try
-	    {
-    	    getContinuum().getBuildsManager().removeProjectsFromBuildQueueWithHashcodes(
-    	             listToIntArray( this.getSelectedBuildTaskHashCodes() ) );
-	    }
-	    catch ( BuildManagerException e )
-	    {
-	        addActionError( e.getMessage() );
-            return ERROR;
-	    }
+	    getContinuum().getBuildsManager().removeProjectsFromBuildQueueWithHashcodes(
+	             listToIntArray( this.getSelectedBuildTaskHashCodes() ) );
 	    return SUCCESS;
 	}
 	
@@ -411,16 +384,8 @@
 	        return REQUIRES_AUTHENTICATION;
 	    }
 	 
-	    try
-	    {
-	        getContinuum().getBuildsManager().removeProjectsFromCheckoutQueueWithHashcodes(
+	    getContinuum().getBuildsManager().removeProjectsFromCheckoutQueueWithHashcodes(
 	                listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
-	    }
-	    catch ( BuildManagerException e )
-	    {
-	        addActionError( e.getMessage() );
-            return ERROR;
-	    }
 	    return SUCCESS;
 	}
 
@@ -442,15 +407,8 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        try
-        {
-            distributedBuildManager.cancelDistributedBuild( buildAgentUrl, projectGroupId, scmRootAddress );
-        }
-        catch ( ContinuumException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
-        }
+        distributedBuildManager.cancelDistributedBuild( buildAgentUrl, projectGroupId, scmRootAddress );
+
         return SUCCESS;
     }
 
@@ -472,15 +430,7 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        try
-        {
-            getContinuum().getTaskQueueManager().removeFromDistributedBuildQueue( projectGroupId, scmRootAddress );
-        }
-        catch ( TaskQueueManagerException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
-        }
+        getContinuum().getTaskQueueManager().removeFromDistributedBuildQueue( projectGroupId, scmRootAddress );
 
         return SUCCESS;
     }
@@ -503,16 +453,8 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        try
-        {
-            getContinuum().getTaskQueueManager()
-                .removeTasksFromDistributedBuildQueueWithHashCodes( listToIntArray( this.getSelectedDistributedBuildTaskHashCodes() ) );
-        }
-        catch ( TaskQueueManagerException e )
-        {
-            addActionError( e.getMessage() );
-            return ERROR;
-        }
+        getContinuum().getTaskQueueManager()
+            .removeTasksFromDistributedBuildQueueWithHashCodes( listToIntArray( this.getSelectedDistributedBuildTaskHashCodes() ) );
 
         return SUCCESS;
     }

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=734907&r1=734906&r2=734907&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Thu Jan 15 20:19:51 2009
@@ -808,8 +808,7 @@
 # ----------------------------------------------------------------------
 # Page: Queues
 # ----------------------------------------------------------------------
-buildQueue.page.title = Continuum - Build Queues
-buildQueue.heading.title = Continuum - Local Build Queues
+buildQueue.page.title = Continuum - Build Queue
 buildQueue.section.title = Continuum - Build Queue
 buildQueue.empty = Build Queue is empty
 buildQueue.currentTask.section.title = Current Build
@@ -1070,12 +1069,11 @@
 # ----------------------------------------------------------------------
 # Page: View Distributed Build
 # ----------------------------------------------------------------------
-distributedBuilds.heading.title = Continuum - Distributed Builds
+distributedBuilds.page.title = Continuum - View Distributed Builds
 distributedBuilds.section.title = Distributed Builds
 distributedBuilds.buildQueue.section.title = Build Queue
 distributedBuild.table.projectGroupName = Project Group Name
 distributedBuild.table.scmRootAddress = Scm Root Address
 distributedBuild.table.agentUrl = Build Agent URL
 distributedBuilds.empty = No Distributed Builds
-distributedBuilds.removeEntries = Cancel Entries
-distributedBuilds.queue.empty = Distributed Builds Queue is empty
\ No newline at end of file
+distributedBuilds.removeEntries = Cancel Entries
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/struts.xml?rev=734907&r1=734906&r2=734907&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/struts.xml Thu Jan 15 20:19:51 2009
@@ -761,7 +761,7 @@
     
     <action name="displayQueues" class="queues" method="display">
       <result name="success">/WEB-INF/jsp/admin/buildQueueView.jsp</result>
-      <!-- <result name="distributed-build-success">/WEB-INF/jsp/admin/viewDistributedBuilds.jsp</result>  -->
+      <result name="distributed-build-success">/WEB-INF/jsp/admin/viewDistributedBuilds.jsp</result>
     </action>
     
     <action name="removeBuildQueueEntry" class="queues" method="remove">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp?rev=734907&r1=734906&r2=734907&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp Thu Jan 15 20:19:51 2009
@@ -19,6 +19,7 @@
 
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
 <%@ taglib uri="/struts-tags" prefix="s" %>
+<%@ taglib uri="continuum" prefix="c1" %>
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri="http://plexus.codehaus.org/redback/taglib-1.0" prefix="redback" %>
 
@@ -30,331 +31,212 @@
     </head>
     <body>
       <s:form id="removeForm" action="none" method="post">
-        
-        <!-- DISTRIBUTED BUILDS -->
-        
-        <div id="h2">
-          <h2><s:text name="distributedBuilds.heading.title"/></h2>
-        
-          <div id="h3">
-            <h3><s:text name="distributedBuilds.section.title"/></h3>
-            <c:if test="${!empty actionErrors}">
-              <div class="errormessage">
-                <s:iterator value="actionErrors">
-                  <p><s:property/></p>
-                </s:iterator>
-              </div>
-            </c:if>
-            <c:if test="${not empty distributedBuildSummary}">
-              <s:set name="distributedBuildSummary" value="distributedBuildSummary" scope="request"/>
-              <ec:table items="distributedBuildSummary"
-                      var="distributedBuild"
-                      showExports="false"
-                      showPagination="false"
-                      showStatusBar="false"
-                      sortable="false"
-                      filterable="false">
-                <ec:row>
-                  <ec:column property="projectGroupName" title="distributedBuild.table.projectGroupName"/>
-                  <ec:column property="scmRootAddress" title="distributedBuild.table.scmRootAddress"/>
-                  <ec:column property="url" title="distributedBuild.table.agentUrl"/>
-                  <ec:column property="cancelEntry" title="&nbsp;" width="1%">
-                    <c:choose>
-                      <c:when test="${pageScope.distributedBuild.cancelEnabled}">
-                        <s:url id="cancelUrl" action="cancelDistributedBuild" method="cancelDistributedBuild" namespace="/">
-                          <s:param name="projectGroupId">${pageScope.distributedBuild.projectGroupId}</s:param>
-                          <s:param name="scmRootAddress">${pageScope.distributedBuild.scmRootAddress}</s:param>
-                          <s:param name="buildAgentUrl">${pageScope.distributedBuild.url}</s:param>
-                        </s:url>
-                        <redback:ifAuthorized permission="continuum-manage-queues">
-                          <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
-                        </redback:ifAuthorized>
-                        <redback:elseAuthorized>
-                          <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
-                        </redback:elseAuthorized>
-                      </c:when>
-                      <c:otherwise>
-                        <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
-                      </c:otherwise>
-                    </c:choose>
-                  </ec:column>
-                </ec:row>
-              </ec:table>
-            </c:if>
-            <c:if test="${empty distributedBuildSummary}">
-              <s:text name="distributedBuilds.empty"/>
-            </c:if>
-          </div>
-          <div id="h3">
-            <h3>
-              <s:text name="distributedBuilds.buildQueue.section.title"/>
-            </h3>
-            <c:if test="${not empty distributedBuildQueues}">
-              <ec:table items="distributedBuildQueues"
-                      var="distributedBuildQueue"
-                      showExports="false"
-                      showPagination="false"
-                      showStatusBar="false"
-                      sortable="false"
-                      filterable="false">
-                <ec:row>
-                  <redback:ifAuthorized permission="continuum-manage-queues">
-                    <ec:column alias="selectedDistributedBuildTaskHashCodes" title="&nbsp;" style="width:5px" filterable="false" sortable="false" width="1%" headerCell="selectAll">
-                      <input type="checkbox" name="selectedDistributedBuildTaskHashCodes" value="${pageScope.distributedBuildQueue.hashCode}" />
-                    </ec:column>              
-                  </redback:ifAuthorized>
-                  <ec:column property="projectGroupName" title="distributedBuild.table.projectGroupName"/>
-                  <ec:column property="scmRootAddress" title="distributedBuild.table.scmRootAddress"/>
-                  <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+        <div id="h3">
+          <h3>
+            <s:text name="buildQueue.currentTask.section.title"/>
+          </h3>  
+          <table width="100%">
+            <s:if test="%{currentBuildProjectTasks != null}">
+            <tbody>
+              <tr>
+                <th><s:text name="buildQueue.currentTask.buildQueue"/></th>
+                <th><s:text name="buildQueue.currentTask.projectName"/></th>
+                <th><s:text name="buildQueue.currentTask.buildDefinition"/></th>
+                <th>&nbsp;</th>
+              </tr>
+              <c:forEach var="element" items="${currentBuildProjectTasks}">
+                <tr>              
+                  <td width="20%">${element.key}</td> 
+                  <td width="50%">${element.value.projectName}</td>
+                  <td width="29%">${element.value.buildDefinitionLabel}</td>
+                  <td width="1%">
                     <redback:ifAuthorized permission="continuum-manage-queues">
-                      <s:url id="cancelUrl" action="removeDistributedBuildEntry" method="removeDistributedBuildEntry" namespace="/">
-                        <s:param name="projectGroupId">${pageScope.distributedBuildQueue.projectGroupId}</s:param>
-                        <s:param name="scmRootAddress">${pageScope.distributedBuildQueue.scmRootAddress}</s:param>
+                      <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
+                        <s:param name="projectId">${element.value.projectId}</s:param>
                       </s:url>
                       <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
                     </redback:ifAuthorized>
                     <redback:elseAuthorized>
                       <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
                     </redback:elseAuthorized>
-                  </ec:column>
-                </ec:row>
-              </ec:table>
-            </c:if>
-            <c:if test="${empty distributedBuildQueues}">
-              <s:text name="distributedBuilds.empty"/>
-            </c:if>
-          </div>
-          <c:if test="${not empty distributedBuildQueues}">
-            <div class="functnbar3">
-              <table>
-                <tbody>
-                  <tr>
-                  <td>
-                      <input type="submit" value="<s:text name="distributedBuilds.removeEntries"/>"
-                           onclick="$('removeForm').action='removeDistributedBuildEntries!removeDistributedBuildEntries.action';$('removeForm').submit();" /> 
-                    </td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
-          </c:if>
-        
-        </div> <!-- h2 div closing -->
-        
-      
-        <!-- LOCAL BUILD QUEUES / PARALLEL BUILDS -->
-        
-        <div id="h2">
-          <h2><s:text name="buildQueue.heading.title"/></h2>
-        
-          <div id="h3">
-            <h3>
-              <s:text name="buildQueue.currentTask.section.title"/>
-            </h3>  
-            <table width="100%">
-              <s:if test="%{currentBuildProjectTasks != null}">
-              <tbody>
-                <tr>
-                  <th><s:text name="buildQueue.currentTask.buildQueue"/></th>
-                  <th><s:text name="buildQueue.currentTask.projectName"/></th>
-                  <th><s:text name="buildQueue.currentTask.buildDefinition"/></th>
-                  <th>&nbsp;</th>
+                  </td>
                 </tr>
-                <c:forEach var="element" items="${currentBuildProjectTasks}">
-                  <tr>              
-                    <td width="20%">${element.key}</td> 
-                    <td width="50%">${element.value.projectName}</td>
-                    <td width="29%">${element.value.buildDefinitionLabel}</td>
+              </c:forEach>
+            </tbody>
+            </s:if>
+            <s:else>
+              <s:text name="buildQueue.no.currentTaks" />
+            </s:else>
+          </table>
+        </div>  
+        
+        <div id="h3">
+          <h3>
+            <s:text name="buildQueue.section.title"/>
+          </h3>   
+          <table width="100%">
+            <s:if test="%{buildsInQueue != null}">
+            <tbody>
+              <tr>
+                <redback:ifAuthorized permission="continuum-manage-queues">
+                  <th>&nbsp;</th>
+                </redback:ifAuthorized>
+                <th><s:text name="buildQueue.currentTask.buildQueue"/></th>
+                <th><s:text name="buildQueue.currentTask.projectName"/></th>
+                <th><s:text name="buildQueue.currentTask.buildDefinition"/></th>
+                <th>&nbsp;</th>
+              </tr>
+              <c:forEach var="element" items="${buildsInQueue}">
+                <c:forEach var="buildTask" items="${element.value}">
+                  <tr>                                    
                     <td width="1%">
                       <redback:ifAuthorized permission="continuum-manage-queues">
-                        <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
-                          <s:param name="projectId">${element.value.projectId}</s:param>
+                        <input type="checkbox" name="selectedBuildTaskHashCodes" value="${buildTask.hashCode}" />                                      
+                      </redback:ifAuthorized>
+                    </td>
+                  	<td width="29%">${element.key}</td>
+                  	<td width="50%">${buildTask.projectName}</td>
+                  	<td width="19%">${buildTask.buildDefinitionLabel}</td>
+                    <td width="1%">
+                      <redback:ifAuthorized permission="continuum-manage-queues">
+                        <s:url id="cancelUrl" action="removeBuildQueueEntry" method="remove" namespace="/">
+                          <s:param name="projectId">${pageScope.buildTask.projectId}</s:param>
+                          <s:param name="buildDefinitionId">${pageScope.buildTask.buildDefinitionId}</s:param>
+                          <s:param name="trigger">${pageScope.buildTask.trigger}</s:param>
+                          <s:param name="projectName">${pageScope.buildTask.projectName}</s:param>
                         </s:url>
                         <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
                       </redback:ifAuthorized>
                       <redback:elseAuthorized>
                         <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
-                      </redback:elseAuthorized>
-                    </td>
+                      </redback:elseAuthorized>               
+                    </td>                                    
                   </tr>
                 </c:forEach>
+              </c:forEach>
+            </tbody>
+            </s:if>
+            <s:else>
+              <s:text name="buildQueue.empty"/>
+            </s:else>
+          </table>
+        </div>   
+        <c:if test="${not empty buildsInQueue}">
+          <div class="functnbar3">
+            <table>
+              <tbody>
+                <tr>
+                  <td>
+                    <input type="submit" value="<s:text name="buildQueue.removeEntries"/>"
+                           onclick="$('removeForm').action='removeBuildQueueEntries!removeBuildEntries.action';$('removeForm').submit();" /> 
+                  </td>
+                </tr>
               </tbody>
-              </s:if>
-              <s:else>
-                <s:text name="buildQueue.no.currentTaks" />
-              </s:else>
             </table>
-          </div>  
-          
-          <div id="h3">
-            <h3>
-              <s:text name="buildQueue.section.title"/>
-            </h3>   
-            <table width="100%">
-              <s:if test="%{buildsInQueue != null}">
-              <tbody>
+          </div>
+        </c:if> 
+        
+                
+        <!-- checkout queue -->
+        <div id="h3">
+          <h3>
+            <s:text name="checkoutQueue.currentTask.section.title"/>
+          </h3>  
+          <table width="100%">
+            <s:if test="%{currentCheckoutTasks != null}">
+            <tbody>
+              <tr>
+                <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
+                <th><s:text name="checkoutQueue.currentTask.projectName"/></th>
+                <th>&nbsp;</th>
+              </tr>
+              <c:forEach var="element" items="${currentCheckoutTasks}">
                 <tr>
+                  <td width="30%">${element.key}</td>
+                  <td width="69%">${element.value.projectName}</td>
+                  <td width="1%">
                   <redback:ifAuthorized permission="continuum-manage-queues">
-                    <th>&nbsp;</th>
+                    <s:url id="cancelUrl" action="cancelCurrentQueueTask" method="cancelCurrentCheckout" namespace="/">
+                      <s:param name="projectId">${element.value.projectId}</s:param>
+                    </s:url>
+                    <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
                   </redback:ifAuthorized>
-                  <th><s:text name="buildQueue.currentTask.buildQueue"/></th>
-                  <th><s:text name="buildQueue.currentTask.projectName"/></th>
-                  <th><s:text name="buildQueue.currentTask.buildDefinition"/></th>
-                  <th>&nbsp;</th>
+                  <redback:elseAuthorized>
+                    <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+                  </redback:elseAuthorized>              
+                  </td>
                 </tr>
-                <c:forEach var="element" items="${buildsInQueue}">
-                  <c:forEach var="buildTask" items="${element.value}">
-                    <tr>                                    
-                      <td width="1%">
-                        <redback:ifAuthorized permission="continuum-manage-queues">
-                          <input type="checkbox" name="selectedBuildTaskHashCodes" value="${buildTask.hashCode}" />                                      
-                        </redback:ifAuthorized>
-                      </td>
-                   	  <td width="29%">${element.key}</td>
-                      <td width="50%">${buildTask.projectName}</td>
-                      <td width="19%">${buildTask.buildDefinitionLabel}</td>
-                      <td width="1%">
-                        <redback:ifAuthorized permission="continuum-manage-queues">
-                        <s:url id="cancelUrl" action="removeBuildQueueEntry" method="remove" namespace="/">
-                          <s:param name="projectId">${pageScope.buildTask.projectId}</s:param>
-                            <s:param name="buildDefinitionId">${pageScope.buildTask.buildDefinitionId}</s:param>
-                            <s:param name="trigger">${pageScope.buildTask.trigger}</s:param>
-                            <s:param name="projectName">${pageScope.buildTask.projectName}</s:param>
-                          </s:url>
-                          <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
-                        </redback:ifAuthorized>
-                        <redback:elseAuthorized>
-                          <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
-                        </redback:elseAuthorized>               
-                      </td>                                    
-                    </tr>
-                  </c:forEach>
-                </c:forEach>
-              </tbody>
-              </s:if>
-              <s:else>
-                <s:text name="buildQueue.empty"/>
-              </s:else>
-            </table>
-          </div>   
-          <c:if test="${not empty buildsInQueue}">
-            <div class="functnbar3">
-              <table>
-                <tbody>
+              </c:forEach>
+            </tbody>
+            </s:if>
+            <s:else>
+              <s:text name="checkoutQueue.no.currentTaks" />
+            </s:else>
+          </table>
+        </div>    
+        
+        <div id="h3">
+          <h3>
+            <s:text name="checkoutQueue.section.title"/>
+          </h3>   
+          <table width="100%">
+            <s:if test="%{checkoutsInQueue != null}">
+            <tbody>
+              <tr>
+                <redback:ifAuthorized permission="continuum-manage-queues">
+                  <th>&nbsp;</th>
+                </redback:ifAuthorized>
+                <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
+                <th><s:text name="checkoutQueue.currentTask.projectName"/></th>
+                <th>&nbsp;</th>
+              </tr>
+              <c:forEach var="element" items="${checkoutsInQueue}">
+                <c:forEach var="checkoutTask" items="${element.value}">
                   <tr>
-                    <td>
-                      <input type="submit" value="<s:text name="buildQueue.removeEntries"/>"
-                           onclick="$('removeForm').action='removeBuildQueueEntries!removeBuildEntries.action';$('removeForm').submit();" /> 
+                    <td width="1%">
+                      <redback:ifAuthorized permission="continuum-manage-queues">
+                        <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${checkoutTask.hashCode}" />                                      
+                      </redback:ifAuthorized>
                     </td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
-          </c:if> 
-                        
-          <!-- checkout queue -->
-          <div id="h3">
-            <h3>
-              <s:text name="checkoutQueue.currentTask.section.title"/>
-            </h3>  
-            <table width="100%">
-              <s:if test="%{currentCheckoutTasks != null}">
-                <tbody>
-                  <tr>
-                    <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
-                    <th><s:text name="checkoutQueue.currentTask.projectName"/></th>
-                    <th>&nbsp;</th>
-                  </tr>
-                  <c:forEach var="element" items="${currentCheckoutTasks}">
-                    <tr>
-                      <td width="30%">${element.key}</td>
-                      <td width="69%">${element.value.projectName}</td>
-                      <td width="1%">
+                  	<td width="29%">${element.key}</td>
+                  	<td width="69%">${checkoutTask.projectName}</td>
+                    <td width="1%">
                       <redback:ifAuthorized permission="continuum-manage-queues">
-                        <s:url id="cancelUrl" action="cancelCurrentQueueTask" method="cancelCurrentCheckout" namespace="/">
-                          <s:param name="projectId">${element.value.projectId}</s:param>
+                        <s:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout">
+                          <s:param name="projectId">${checkoutTask.projectId}</s:param>
                         </s:url>
                         <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
                       </redback:ifAuthorized>
                       <redback:elseAuthorized>
                         <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
-                      </redback:elseAuthorized>              
-                      </td>
-                    </tr>
-                  </c:forEach>
-                </tbody>
-                </s:if>
-                <s:else>
-                <s:text name="checkoutQueue.no.currentTaks" />
-              </s:else>
-            </table>
-          </div>    
-        
-          <div id="h3">
-            <h3>
-              <s:text name="checkoutQueue.section.title"/>
-            </h3>   
-            <table width="100%">
-              <s:if test="%{checkoutsInQueue != null}">
+                      </redback:elseAuthorized>             
+                    </td>                                    
+                  </tr>
+                </c:forEach>
+              </c:forEach>
+            </tbody>
+            </s:if>
+            <s:else>
+              <s:text name="checkoutQueue.no.currentTaks" />
+            </s:else>
+          </table>
+        </div>    
+        <c:if test="${not empty checkoutsInQueue}">
+          <div class="functnbar3">
+            <table>
               <tbody>
                 <tr>
-                  <redback:ifAuthorized permission="continuum-manage-queues">
-                    <th>&nbsp;</th>
-                  </redback:ifAuthorized>
-                  <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
-                  <th><s:text name="checkoutQueue.currentTask.projectName"/></th>
-                  <th>&nbsp;</th>
+                  <td>
+                    <redback:ifAuthorized permission="continuum-manage-queues">
+                    <input type="submit" value="<s:text name="checkoutQueue.removeEntries"/>"
+                           onclick="$('removeForm').action='removeCheckoutQueueEntries!removeCheckoutEntries.action';$('removeForm').submit();" />
+                    </redback:ifAuthorized>
+                  </td>
                 </tr>
-                <c:forEach var="element" items="${checkoutsInQueue}">
-                  <c:forEach var="checkoutTask" items="${element.value}">
-                    <tr>
-                      <td width="1%">
-                        <redback:ifAuthorized permission="continuum-manage-queues">
-                          <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${checkoutTask.hashCode}" />                                      
-                        </redback:ifAuthorized>
-                      </td>
-                   	  <td width="29%">${element.key}</td>
-                      <td width="69%">${checkoutTask.projectName}</td>
-                      <td width="1%">
-                        <redback:ifAuthorized permission="continuum-manage-queues">
-                          <s:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout">
-                            <s:param name="projectId">${checkoutTask.projectId}</s:param>
-                          </s:url>
-                          <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
-                        </redback:ifAuthorized>
-                        <redback:elseAuthorized>
-                          <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
-                        </redback:elseAuthorized>             
-                      </td>                                    
-                    </tr>
-                  </c:forEach>
-                </c:forEach>
               </tbody>
-              </s:if>
-              <s:else>
-                <s:text name="checkoutQueue.no.currentTaks" />
-              </s:else>
             </table>
-          </div>           
-        
-          <c:if test="${not empty checkoutsInQueue}">
-            <div class="functnbar3">
-              <table>
-                <tbody>
-                  <tr>
-                    <td>
-                      <redback:ifAuthorized permission="continuum-manage-queues">
-                        <input type="submit" value="<s:text name="checkoutQueue.removeEntries"/>"
-                           onclick="$('removeForm').action='removeCheckoutQueueEntries!removeCheckoutEntries.action';$('removeForm').submit();" />
-                      </redback:ifAuthorized>
-                    </td>
-                  </tr>
-                </tbody>
-              </table>
-            </div>
-          </c:if>
-        
-        </div> <!-- local build queues h2 div closing -->
+          </div>
+        </c:if>
                 
       </s:form>
     </body>

Added: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp?rev=734907&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp Thu Jan 15 20:19:51 2009
@@ -0,0 +1,134 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  --%>
+
+<%@ taglib uri="/struts-tags" prefix="s" %>
+<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+<%@ taglib uri="http://plexus.codehaus.org/redback/taglib-1.0" prefix="redback" %>
+
+<html>
+  <s:i18n name="localization.Continuum">
+    <head>
+      <title><s:text name="distributedBuilds.page.title"/></title>
+    </head>
+    <body>
+      <s:form id="removeForm" action="none" method="post">
+        <div id="h3">
+          <h3><s:text name="distributedBuilds.section.title"/></h3>
+          <c:if test="${!empty actionErrors}">
+            <div class="errormessage">
+              <s:iterator value="actionErrors">
+                <p><s:text name="<s:property/>" /></p>
+              </s:iterator>
+            </div>
+          </c:if>
+          <c:if test="${not empty distributedBuildSummary}">
+            <s:set name="distributedBuildSummary" value="distributedBuildSummary" scope="request"/>
+            <ec:table items="distributedBuildSummary"
+                      var="distributedBuild"
+                      showExports="false"
+                      showPagination="false"
+                      showStatusBar="false"
+                      sortable="false"
+                      filterable="false">
+              <ec:row>
+                <ec:column property="projectGroupName" title="distributedBuild.table.projectGroupName"/>
+                <ec:column property="scmRootAddress" title="distributedBuild.table.scmRootAddress"/>
+                <ec:column property="url" title="distributedBuild.table.agentUrl"/>
+                <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                  <c:choose>
+                    <c:when test="${pageScope.distributedBuild.cancelEnabled}">
+                      <s:url id="cancelUrl" action="cancelDistributedBuild" method="cancelDistributedBuild" namespace="/">
+                        <s:param name="projectGroupId">${pageScope.distributedBuild.projectGroupId}</s:param>
+                        <s:param name="scmRootAddress">${pageScope.distributedBuild.scmRootAddress}</s:param>
+                        <s:param name="buildAgentUrl">${pageScope.distributedBuild.url}</s:param>
+                      </s:url>
+                      <redback:ifAuthorized permission="continuum-manage-queues">
+                        <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+                      </redback:ifAuthorized>
+                      <redback:elseAuthorized>
+                        <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+                      </redback:elseAuthorized>
+                    </c:when>
+                    <c:otherwise>
+                      <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+                    </c:otherwise>
+                  </c:choose>
+                </ec:column>
+              </ec:row>
+            </ec:table>
+          </c:if>
+          <c:if test="${empty distributedBuildSummary}">
+            <s:text name="distributedBuilds.empty"/>
+          </c:if>
+        </div>
+        <div id="h3">
+          <h3>
+            <s:text name="distributedBuilds.buildQueue.section.title"/>
+          </h3>
+          <c:if test="${not empty distributedBuildQueues}">
+            <ec:table items="distributedBuildQueues"
+                      var="distributedBuildQueue"
+                      showExports="false"
+                      showPagination="false"
+                      showStatusBar="false"
+                      sortable="false"
+                      filterable="false">
+              <ec:row>
+                <redback:ifAuthorized permission="continuum-manage-queues">
+                  <ec:column alias="selectedDistributedBuildTaskHashCodes" title="&nbsp;" style="width:5px" filterable="false" sortable="false" width="1%" headerCell="selectAll">
+                    <input type="checkbox" name="selectedDistributedBuildTaskHashCodes" value="${pageScope.distributedBuildQueue.hashCode}" />
+                  </ec:column>              
+                </redback:ifAuthorized>
+                <ec:column property="projectGroupName" title="distributedBuild.table.projectGroupName"/>
+                <ec:column property="scmRootAddress" title="distributedBuild.table.scmRootAddress"/>
+                <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                  <redback:ifAuthorized permission="continuum-manage-queues">
+                    <s:url id="cancelUrl" action="removeDistributedBuildEntry" method="removeDistributedBuildEntry" namespace="/">
+                      <s:param name="projectGroupId">${pageScope.distributedBuildQueue.projectGroupId}</s:param>
+                      <s:param name="scmRootAddress">${pageScope.distributedBuildQueue.scmRootAddress}</s:param>
+                    </s:url>
+                    <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+                  </redback:ifAuthorized>
+                  <redback:elseAuthorized>
+                    <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+                  </redback:elseAuthorized>
+                </ec:column>
+              </ec:row>
+            </ec:table>
+          </c:if>
+        </div>
+        <c:if test="${not empty distributedBuildQueues}">
+          <div class="functnbar3">
+            <table>
+              <tbody>
+                <tr>
+                  <td>
+                    <input type="submit" value="<s:text name="distributedBuilds.removeEntries"/>"
+                           onclick="$('removeForm').action='removeDistributedBuildEntries!removeDistributedBuildEntries.action';$('removeForm').submit();" /> 
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </c:if>
+      </s:form>
+    </body>
+  </s:i18n>
+</html>
\ No newline at end of file



Mime
View raw message