You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by oc...@apache.org on 2009/01/15 17:30:47 UTC

svn commit: r734745 - 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...

Author: oching
Date: Thu Jan 15 08:30:47 2009
New Revision: 734745

URL: http://svn.apache.org/viewvc?rev=734745&view=rev
Log:
[CONTINUUM-2034]
o fix queues page to show all builds, distributed or built locally (parallel)

Removed:
    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=734745&r1=734744&r2=734745&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 08:30:47 2009
@@ -23,7 +23,6 @@
 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=734745&r1=734744&r2=734745&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 08:30:47 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.TaskQueueManager;
-import org.apache.maven.continuum.Continuum;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
+import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -59,8 +59,6 @@
 	extends ContinuumActionSupport
 	implements SecureAction, LogEnabled
 {
-    private static final String DISTRIBUTED_BUILD_SUCCESS = "distributed-build-success";
-
 	private List<String> selectedBuildTaskHashCodes;
 	    
 	private List<String> selectedCheckOutTaskHashCodes;
@@ -196,9 +194,10 @@
 	
 	public String display()
 	    throws Exception
-	{
-	    /*if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )	    
-        {
+	{	  
+	    // distributed builds
+	    try
+	    {
             distributedBuildSummary = new ArrayList<DistributedBuildSummary>();
 
             Map<String, PrepareBuildProjectsTask> map = distributedBuildManager.getDistributedBuildProjects();
@@ -230,89 +229,96 @@
             }
 
             distributedBuildQueues = getContinuum().getTaskQueueManager().getDistributedBuildProjectsInQueue();
-
-            return DISTRIBUTED_BUILD_SUCCESS;
+	    }
+	    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;
         }
-        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
-	        {
-	            // 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 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
-	        {
-	            // 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
+        {
+            // 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;
-	        }
-	   // }
+        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;
 	}
@@ -335,10 +341,23 @@
 	        return REQUIRES_AUTHENTICATION;
 	    }
 	            
-	    getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName );
-	    Project project = getContinuum().getProject( projectId );
-	    project.setState( project.getOldState() );
-	    getContinuum().updateProject( project );
+	    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;
+	    }
 	
 	    return SUCCESS;
 	}
@@ -361,8 +380,16 @@
 	        return REQUIRES_AUTHENTICATION;
 	    }
 	    
-	    getContinuum().getBuildsManager().removeProjectsFromBuildQueueWithHashcodes(
-	             listToIntArray( this.getSelectedBuildTaskHashCodes() ) );
+	    try
+	    {
+    	    getContinuum().getBuildsManager().removeProjectsFromBuildQueueWithHashcodes(
+    	             listToIntArray( this.getSelectedBuildTaskHashCodes() ) );
+	    }
+	    catch ( BuildManagerException e )
+	    {
+	        addActionError( e.getMessage() );
+            return ERROR;
+	    }
 	    return SUCCESS;
 	}
 	
@@ -384,8 +411,16 @@
 	        return REQUIRES_AUTHENTICATION;
 	    }
 	 
-	    getContinuum().getBuildsManager().removeProjectsFromCheckoutQueueWithHashcodes(
+	    try
+	    {
+	        getContinuum().getBuildsManager().removeProjectsFromCheckoutQueueWithHashcodes(
 	                listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
+	    }
+	    catch ( BuildManagerException e )
+	    {
+	        addActionError( e.getMessage() );
+            return ERROR;
+	    }
 	    return SUCCESS;
 	}
 
@@ -407,8 +442,15 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        distributedBuildManager.cancelDistributedBuild( buildAgentUrl, projectGroupId, scmRootAddress );
-
+        try
+        {
+            distributedBuildManager.cancelDistributedBuild( buildAgentUrl, projectGroupId, scmRootAddress );
+        }
+        catch ( ContinuumException e )
+        {
+            addActionError( e.getMessage() );
+            return ERROR;
+        }
         return SUCCESS;
     }
 
@@ -430,7 +472,15 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        getContinuum().getTaskQueueManager().removeFromDistributedBuildQueue( projectGroupId, scmRootAddress );
+        try
+        {
+            getContinuum().getTaskQueueManager().removeFromDistributedBuildQueue( projectGroupId, scmRootAddress );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            addActionError( e.getMessage() );
+            return ERROR;
+        }
 
         return SUCCESS;
     }
@@ -453,8 +503,16 @@
             return REQUIRES_AUTHENTICATION;
         }
 
-        getContinuum().getTaskQueueManager()
-            .removeTasksFromDistributedBuildQueueWithHashCodes( listToIntArray( this.getSelectedDistributedBuildTaskHashCodes() ) );
+        try
+        {
+            getContinuum().getTaskQueueManager()
+                .removeTasksFromDistributedBuildQueueWithHashCodes( listToIntArray( this.getSelectedDistributedBuildTaskHashCodes() ) );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            addActionError( e.getMessage() );
+            return ERROR;
+        }
 
         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=734745&r1=734744&r2=734745&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 08:30:47 2009
@@ -808,7 +808,8 @@
 # ----------------------------------------------------------------------
 # Page: Queues
 # ----------------------------------------------------------------------
-buildQueue.page.title = Continuum - Build Queue
+buildQueue.page.title = Continuum - Build Queues
+buildQueue.heading.title = Continuum - Local Build Queues
 buildQueue.section.title = Continuum - Build Queue
 buildQueue.empty = Build Queue is empty
 buildQueue.currentTask.section.title = Current Build
@@ -1069,11 +1070,12 @@
 # ----------------------------------------------------------------------
 # Page: View Distributed Build
 # ----------------------------------------------------------------------
-distributedBuilds.page.title = Continuum - View Distributed Builds
+distributedBuilds.heading.title = Continuum - 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
\ No newline at end of file
+distributedBuilds.removeEntries = Cancel Entries
+distributedBuilds.queue.empty = Distributed Builds Queue is empty
\ 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=734745&r1=734744&r2=734745&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/struts.xml Thu Jan 15 08:30:47 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=734745&r1=734744&r2=734745&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 08:30:47 2009
@@ -19,7 +19,6 @@
 
 <%@ 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" %>
 
@@ -31,212 +30,331 @@
     </head>
     <body>
       <s:form id="removeForm" action="none" method="post">
-        <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%">
+        
+        <!-- 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%">
                     <redback:ifAuthorized permission="continuum-manage-queues">
-                      <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
-                        <s:param name="projectId">${element.value.projectId}</s:param>
+                      <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>
-                  </td>
-                </tr>
-              </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">
-                        <input type="checkbox" name="selectedBuildTaskHashCodes" value="${buildTask.hashCode}" />                                      
-                      </redback:ifAuthorized>
+                  </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>
-                  	<td width="29%">${element.key}</td>
-                  	<td width="50%">${buildTask.projectName}</td>
-                  	<td width="19%">${buildTask.buildDefinitionLabel}</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>
+                </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="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 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>               
-                    </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>
-        </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}">
+          </div>  
+          
+          <div id="h3">
+            <h3>
+              <s:text name="buildQueue.section.title"/>
+            </h3>   
+            <table width="100%">
+              <s:if test="%{buildsInQueue != null}">
+              <tbody>
                 <tr>
-                  <td width="30%">${element.key}</td>
-                  <td width="69%">${element.value.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>
-                    <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>
+                    <th>&nbsp;</th>
                   </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}">
-            <tbody>
-              <tr>
-                <redback:ifAuthorized permission="continuum-manage-queues">
+                  <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: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>
+                <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>
                   <tr>
-                    <td width="1%">
-                      <redback:ifAuthorized permission="continuum-manage-queues">
-                        <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${checkoutTask.hashCode}" />                                      
-                      </redback:ifAuthorized>
+                    <td>
+                      <input type="submit" value="<s:text name="buildQueue.removeEntries"/>"
+                           onclick="$('removeForm').action='removeBuildQueueEntries!removeBuildEntries.action';$('removeForm').submit();" /> 
                     </td>
-                  	<td width="29%">${element.key}</td>
-                  	<td width="69%">${checkoutTask.projectName}</td>
-                    <td width="1%">
+                  </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%">
                       <redback:ifAuthorized permission="continuum-manage-queues">
-                        <s:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout">
-                          <s:param name="projectId">${checkoutTask.projectId}</s:param>
+                        <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>
                       <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>
+                      </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}">
               <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>
+                  <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 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>
+          </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 -->
                 
       </s:form>
     </body>