continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r580518 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/ continuum-core/src/mai...
Date Fri, 28 Sep 2007 23:47:47 GMT
Author: olamy
Date: Fri Sep 28 16:47:45 2007
New Revision: 580518

URL: http://svn.apache.org/viewvc?rev=580518&view=rev
Log:
[CONTINUUM-583] Show the build/checkout queues on the web interface
add :
- display the checkout queue
- add checkboxes to remove entries and not only one
- display current build/checkout


Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
      - copied, changed from r580071, maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
Removed:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildQueueComponent.jsp
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
    maven/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenOneProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Fri Sep 28 16:47:45 2007
@@ -146,6 +146,13 @@
     boolean removeProjectsFromBuildingQueue( int[] projectsId )
         throws ContinuumException;
 
+    /**
+     * @param hashCodes BuildProjectTask hashCodes
+     * @throws ContinuumException
+     */
+    void removeProjectsFromBuildingQueueWithHashCodes( int[] hashCodes )
+        throws ContinuumException;
+
     boolean removeFromBuildingQueue( int projectId, int buildDefinitionId, int trigger, String projectName )
         throws ContinuumException;
 
@@ -155,11 +162,18 @@
     boolean removeProjectFromCheckoutQueue( int projectId )
         throws ContinuumException;
 
-    List getCheckOutTasksInQueue()
+    List /* CheckOutTask */getCheckOutTasksInQueue()
         throws ContinuumException;
 
     boolean removeProjectsFromCheckoutQueue( int[] projectId )
         throws ContinuumException;
+    
+    /**
+     * @param hashCodes CheckOutTask hashCodes
+     * @throws ContinuumException
+     */
+    void removeTasksFromCheckoutQueueWithHashCodes( int[] hashCodes )
+        throws ContinuumException;    
 
     // ----------------------------------------------------------------------
     // Building

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Fri Sep 28 16:47:45 2007
@@ -546,7 +546,14 @@
     public boolean removeFromBuildingQueue( int projectId, int buildDefinitionId, int trigger, String projectName )
         throws ContinuumException
     {
-        BuildProjectTask buildProjectTask = new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName );
+        BuildDefinition buildDefinition = getBuildDefinition( buildDefinitionId );
+        String buildDefinitionLabel = buildDefinition.getDescription();
+        if ( StringUtils.isEmpty( buildDefinitionLabel ) )
+        {
+            buildDefinitionLabel = buildDefinition.getGoals();
+        }
+        BuildProjectTask buildProjectTask = new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName,
+                                                                  buildDefinitionLabel );
         return this.buildQueue.remove( buildProjectTask );
     }
 
@@ -636,6 +643,20 @@
         return false;
     }
 
+    public void removeProjectsFromBuildingQueueWithHashCodes( int[] hashCodes )
+        throws ContinuumException
+    {
+        List<BuildProjectTask> queue = getProjectsInBuildQueue();
+
+        for ( BuildProjectTask task : queue )
+        {
+            if ( ArrayUtils.contains( hashCodes, task.hashCode() ) )
+            {
+                buildQueue.remove( task );
+            }
+        }
+    }
+
     public boolean removeProjectFromCheckoutQueue( int projectId )
         throws ContinuumException
     {
@@ -652,10 +673,27 @@
         return false;
     }
 
+    public void removeTasksFromCheckoutQueueWithHashCodes( int[] hashCodes )
+        throws ContinuumException
+    {
+        List<CheckOutTask> queue = getCheckOutTasksInQueue();
+
+        for ( CheckOutTask task : queue )
+        {
+            if ( ArrayUtils.contains( hashCodes, task.hashCode() ) )
+            {
+                checkoutQueue.remove( task );
+            }
+        }
+    }    
+    
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
+
+
     public void removeProject( int projectId )
         throws ContinuumException
     {
@@ -1106,11 +1144,18 @@
                 project = store.getProject( project.getId() );
             }
 
+            BuildDefinition buildDefinition = getBuildDefinition( buildDefinitionId );
+            String buildDefinitionLabel = buildDefinition.getDescription();
+            if ( StringUtils.isEmpty( buildDefinitionLabel ) )
+            {
+                buildDefinitionLabel = buildDefinition.getGoals();
+            }            
+            
             getLogger().info(
                 "Enqueuing '" + project.getName() + "' (Build definition id=" + buildDefinitionId + ")." );
 
-            BuildProjectTask task =
-                new BuildProjectTask( project.getId(), buildDefinitionId, trigger, project.getName() );
+            BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinitionId, trigger, project
+                .getName(), buildDefinitionLabel );
 
             task.setMaxExecutionTime( store.getBuildDefinition( buildDefinitionId ).getSchedule()
                 .getMaxJobExecutionTime() * 1000 );

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java Fri Sep 28 16:47:45 2007
@@ -27,7 +27,7 @@
  */
 public class BuildProjectTask
     implements Task
-{
+{    
     private int projectId;
 
     private int buildDefinitionId;
@@ -39,8 +39,11 @@
     private long maxExecutionTime;
     
     private String projectName;
+    
+    private String buildDefinitionLabel;
 
-    public BuildProjectTask( int projectId, int buildDefinitionId, int trigger, String projectName )
+    public BuildProjectTask( int projectId, int buildDefinitionId, int trigger, String projectName,
+                             String buildDefinitionLabel )
     {
         this.projectId = projectId;
 
@@ -49,8 +52,10 @@
         this.timestamp = System.currentTimeMillis();
 
         this.trigger = trigger;
-        
+
         this.projectName = projectName;
+        
+        this.buildDefinitionLabel = buildDefinitionLabel;
     }
 
     public int getProjectId()
@@ -88,6 +93,11 @@
         return projectName;
     }    
     
+    public String getBuildDefinitionLabel()
+    {
+        return buildDefinitionLabel;
+    }    
+    
     public boolean equals( Object obj )
     {
         if ( obj == null )
@@ -113,5 +123,8 @@
         return this.getBuildDefinitionId() + this.getProjectId() + this.getTrigger();
     }
     
-    
+    public int getHashCode()
+    {
+        return this.hashCode();
+    }    
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Fri Sep 28 16:47:45 2007
@@ -57,7 +57,7 @@
         Project project = store.getProject( getProjectId( context ) );
 
         CheckOutTask checkOutTask =
-            new CheckOutTask( project.getId(), workingDirectoryService.getWorkingDirectory( project ) );
+            new CheckOutTask( project.getId(), workingDirectoryService.getWorkingDirectory( project ), project.getName() );
 
         checkOutQueue.put( checkOutTask );
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java Fri Sep 28 16:47:45 2007
@@ -33,12 +33,16 @@
     private int projectId;
 
     private File workingDirectory;
+    
+    private String projectName;
 
-    public CheckOutTask( int projectId, File workingDirectory )
+    public CheckOutTask( int projectId, File workingDirectory, String projectName )
     {
         this.projectId = projectId;
 
         this.workingDirectory = workingDirectory;
+        
+        this.projectName = projectName;
     }
 
     public int getProjectId()
@@ -55,4 +59,14 @@
     {
         return 0;
     }
+
+    public String getProjectName()
+    {
+        return projectName;
+    }
+    
+    public int getHashCode()
+    {
+        return this.hashCode();
+    }    
 }

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java Fri Sep 28 16:47:45 2007
@@ -250,7 +250,8 @@
 
         // projectGroup = continuumStore.addProjectGroup( projectGroup );
 
-        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), 0, project.getName() );
+        BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinition.getId(), 0, project.getName(),
+                                                      buildDefinition.getDescription() );
 
         task.setMaxExecutionTime( maxRunTime );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java Fri Sep 28 16:47:45 2007
@@ -130,7 +130,7 @@
     private void buildProject( int projectId, int trigger )
         throws Exception
     {
-        buildQueue.put( new BuildProjectTask( projectId, 0, trigger, null ) );
+        buildQueue.put( new BuildProjectTask( projectId, 0, trigger, null, null ) );
     }
 
     private void assertNextBuildIs( int expectedProjectId )

Modified: maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java (original)
+++ maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java Fri Sep 28 16:47:45 2007
@@ -114,5 +114,5 @@
     
     public static final String CONTINUUM_MANAGE_BUILD_TEMPLATES = "continuum-manage-build-templates";
     
-    public static final String CONTINUUM_MANAGE_BUILD_QUEUE = "continuum-manage-build-queue";
+    public static final String CONTINUUM_MANAGE_QUEUES = "continuum-manage-queues";
 }

Modified: maven/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml (original)
+++ maven/continuum/trunk/continuum-security/src/main/resources/META-INF/redback/redback.xml Fri Sep 28 16:47:45 2007
@@ -3,9 +3,9 @@
   <application>Continuum</application>
   <operations>
     <operation>
-      <id>continuum-manage-build-queue</id>
-      <name>continuum-manage-build-queue</name>
-      <description>Manage Continuum Build Queue</description>
+      <id>continuum-manage-queues</id>
+      <name>continuum-manage-queues</name>
+      <description>Manage Continuum Queues</description>
     </operation>    
     <operation>
       <id>continuum-manage-build-templates</id>
@@ -172,7 +172,7 @@
         <childRole>continuum-manage-profiles</childRole>
         <childRole>continuum-manage-schedules</childRole>
         <childRole>continuum-manage-build-templates</childRole>
-        <childRole>continuum-manage-build-queue</childRole>
+        <childRole>continuum-manage-queues</childRole>
       </childRoles>
     </role>
     <role>
@@ -312,16 +312,16 @@
       </permissions>
     </role>    
     <role>
-      <id>continuum-manage-build-queue</id>
-      <name>continuum-manage-build-queue</name>
+      <id>continuum-manage-queues</id>
+      <name>continuum-manage-queues</name>
       <assignable>true</assignable>
       <permanent>true</permanent>
       <permissions>
         <permission>
-          <id>continuum-manage-build-queue</id>
-          <name>Manage Continuum Build Queue</name>
+          <id>continuum-manage-queues</id>
+          <name>Manage Continuum Queues</name>
           <permanent>true</permanent>
-          <operation>continuum-manage-build-queue</operation>
+          <operation>continuum-manage-queues</operation>
           <resource>global</resource>
         </permission>
       </permissions>

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenOneProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenOneProjectAction.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenOneProjectAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenOneProjectAction.java Fri Sep 28 16:47:45 2007
@@ -22,8 +22,6 @@
 import java.io.File;
 
 import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 
 /**

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java Fri Sep 28 16:47:45 2007
@@ -26,12 +26,9 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
-import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java Fri Sep 28 16:47:45 2007
@@ -27,7 +27,6 @@
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java Fri Sep 28 16:47:45 2007
@@ -19,28 +19,22 @@
  * under the License.
  */
 
+import java.util.List;
+
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.maven.continuum.web.action.admin.AbstractBuildQueueAction;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
-import org.codehaus.plexus.taskqueue.Task;
-import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.util.List;
-
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
  * @plexus.component role="com.opensymphony.xwork.Action" role-hint="cancelBuild"
  */
 public class CancelBuildAction
-    extends ContinuumActionSupport
+    extends AbstractBuildQueueAction
 {
-    /**
-     * @plexus.requirement role-hint='build-project'
-     */
-    private TaskQueueExecutor taskQueueExecutor;
 
     private int projectId;
 
@@ -91,56 +85,6 @@
         return SUCCESS;
     }
 
-    private boolean cancelBuild( int projectId )
-        throws ContinuumException
-    {
-        Task task = taskQueueExecutor.getCurrentTask();
-        getLogger().info( "TaskQueueExecutor: " + taskQueueExecutor );
-
-        if ( task != null )
-        {
-            if ( task instanceof BuildProjectTask )
-            {
-                if ( ( (BuildProjectTask) task ).getProjectId() == projectId )
-                {
-                    getLogger().info( "Cancelling task for project " + projectId );
-                    return taskQueueExecutor.cancelTask( task );
-                }
-                else
-                {
-                    getLogger().warn( "Current task is not for the given projectId (" + projectId + "): " +
-                        ( (BuildProjectTask) task ).getProjectId() + "; not cancelling" );
-                }
-            }
-            else
-            {
-                getLogger().warn( "Current task not a BuildProjectTask - not cancelling" );
-            }
-        }
-        else
-        {
-            getLogger().warn( "No task running - not cancelling" );
-        }
-        return false;
-    }
-
-    /**
-     * @return -1 if not project currently building
-     * @throws ContinuumException
-     */
-    private int getCurrentProjectIdBuilding()
-        throws ContinuumException
-    {
-        Task task = taskQueueExecutor.getCurrentTask();
-        if ( task != null )
-        {
-            if ( task instanceof BuildProjectTask )
-            {
-                return ( (BuildProjectTask) task ).getProjectId();
-            }
-        }
-        return -1;
-    }
 
     public void setProjectId( int projectId )
     {

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java?rev=580518&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java Fri Sep 28 16:47:45 2007
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+package org.apache.maven.continuum.web.action.admin;
+
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.maven.continuum.web.action.ContinuumActionSupport;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.taskqueue.Task;
+import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
+
+/**
+ * @author <a href="mailto:olamy@apache.org">olamy</a>
+ * @since 28 sept. 07
+ * @version $Id$
+ */
+public abstract class AbstractBuildQueueAction
+    extends ContinuumActionSupport
+    implements LogEnabled
+{
+
+    /**
+     * @plexus.requirement role-hint='build-project'
+     */
+    private TaskQueueExecutor taskQueueExecutor;    
+    
+    protected boolean cancelBuild( int projectId )
+        throws ContinuumException
+    {
+        Task task = getTaskQueueExecutor().getCurrentTask();
+
+        if ( task != null )
+        {
+            if ( task instanceof BuildProjectTask )
+            {
+                if ( ( (BuildProjectTask) task ).getProjectId() == projectId )
+                {
+                    getLogger().info( "Cancelling task for project " + projectId );
+                    return getTaskQueueExecutor().cancelTask( task );
+                }
+                else
+                {
+                    getLogger().warn(
+                                      "Current task is not for the given projectId (" + projectId + "): "
+                                          + ( (BuildProjectTask) task ).getProjectId() + "; not cancelling" );
+                }
+            }
+            else
+            {
+                getLogger().warn( "Current task not a BuildProjectTask - not cancelling" );
+            }
+        }
+        else
+        {
+            getLogger().warn( "No task running - not cancelling" );
+        }
+        return false;
+    }
+
+
+    /**
+     * @return -1 if not project currently building
+     * @throws ContinuumException
+     */
+    protected int getCurrentProjectIdBuilding()
+        throws ContinuumException
+    {
+        Task task = getTaskQueueExecutor().getCurrentTask();
+        if ( task != null )
+        {
+            if ( task instanceof BuildProjectTask )
+            {
+                return ( (BuildProjectTask) task ).getProjectId();
+            }
+        }
+        return -1;
+    }
+
+
+    public TaskQueueExecutor getTaskQueueExecutor()
+    {
+        return taskQueueExecutor;
+    }    
+    
+}

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

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Fri Sep 28 16:47:45 2007
@@ -0,0 +1 @@
+URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision LastChangedRevision Id

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java Fri Sep 28 16:47:45 2007
@@ -21,7 +21,6 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.continuum.installation.InstallationService;

Copied: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java (from r580071, maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java)
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?p2=maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java&p1=maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java&r1=580071&r2=580518&rev=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/BuildQueueAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java Fri Sep 28 16:47:45 2007
@@ -19,31 +19,54 @@
  * under the License.
  */
 
+import java.util.List;
+
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.scm.queue.CheckOutTask;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
-import org.apache.maven.continuum.web.action.ContinuumActionSupport;
+import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.redback.rbac.Resource;
 import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
 import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
 import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
-
-import java.util.List;
+import org.codehaus.plexus.taskqueue.Task;
+import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
 
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
  * @version $Id$
- * @plexus.component role="com.opensymphony.xwork.Action" role-hint="buildQueue"
+ * @plexus.component role="com.opensymphony.xwork.Action" role-hint="queues"
  * @since 24 sept. 07
  */
-public class BuildQueueAction
-    extends ContinuumActionSupport
-    implements SecureAction
+public class QueuesAction
+    extends AbstractBuildQueueAction
+    implements SecureAction, LogEnabled
 {
+    
+    /**
+     * @plexus.requirement role-hint='build-project'
+     */
+    private TaskQueueExecutor taskQueueExecutor;    
+    
+    private BuildProjectTask currentBuildProjectTask;
+    
     private List<BuildProjectTask> buildProjectTasks;
-
-    private List<String> selectedProjectIds;
-
+    
+    private List<String> selectedBuildTaskHashCodes;
+    
+    /**
+     * @plexus.requirement role-hint='check-out-project'
+     */    
+    private TaskQueueExecutor checkoutTaskQueueExecutor; 
+    
+    private CheckOutTask currentCheckOutTask;
+    
+    private List<CheckOutTask> currentCheckOutTasks;
+    
+    private List<String> selectedCheckOutTaskHashCodes;
+    
     private int buildDefinitionId;
 
     private int projectId;
@@ -56,16 +79,33 @@
     //  webwork
     // -----------------------------------------------------     
 
-    public String global()
+    public String cancelCurrent()
+        throws Exception
+    {
+        cancelBuild( projectId );
+        return SUCCESS;
+    }
+    
+    public String removeCheckout()
         throws Exception
     {
+        getContinuum().removeProjectFromCheckoutQueue( projectId );
         return SUCCESS;
     }
 
+    public String cancelCurrentCheckout()
+    {
+        cancelCheckout( projectId );
+        return SUCCESS;
+    }
+    
     public String display()
         throws Exception
     {
+        this.setCurrentBuildProjectTask( (BuildProjectTask) taskQueueExecutor.getCurrentTask() );        
         this.setBuildProjectTasks( getContinuum().getProjectsInBuildQueue() );
+        this.setCurrentCheckOutTask( (CheckOutTask) checkoutTaskQueueExecutor.getCurrentTask() );
+        this.setCurrentCheckOutTasks( getContinuum().getCheckOutTasksInQueue() );
         return SUCCESS;
     }
 
@@ -79,7 +119,37 @@
 
         return SUCCESS;
     }
+    
+    public String removeBuildEntries()
+        throws Exception
+    {
+        getContinuum().removeProjectsFromBuildingQueueWithHashCodes( listToIntArray(this.getSelectedBuildTaskHashCodes()) );
+        return SUCCESS;
+    }
 
+    public String removeCheckoutEntries()
+        throws Exception
+    {
+        getContinuum()
+            .removeTasksFromCheckoutQueueWithHashCodes( listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
+        return SUCCESS;
+    }
+
+    private int[] listToIntArray( List<String> strings )
+    {
+        if ( strings == null || strings.isEmpty() )
+        {
+            return new int[0];
+        }
+        int[] array = new int[0];
+        for ( String intString : strings )
+        {
+            array = ArrayUtils.add( array, Integer.parseInt( intString ) );
+        }
+        return array;
+    }
+    
+    
     // -----------------------------------------------------
     //  security
     // -----------------------------------------------------    
@@ -89,10 +159,43 @@
     {
         SecureActionBundle bundle = new SecureActionBundle();
         bundle.setRequiresAuthentication( true );
-        bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_BUILD_QUEUE, Resource.GLOBAL );
+        bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_QUEUES, Resource.GLOBAL );
 
         return bundle;
     }
+    
+    private boolean cancelCheckout(int projectId)
+    {
+        Task task = getCheckoutTaskQueueExecutor().getCurrentTask();
+
+        if ( task != null )
+        {
+            if ( task instanceof CheckOutTask )
+            {
+                if ( ( (CheckOutTask) task ).getProjectId() == projectId )
+                {
+                    getLogger().info( "Cancelling checkout for project " + projectId );
+                    return getCheckoutTaskQueueExecutor().cancelTask( task );
+                }
+                else
+                {
+                    getLogger().warn(
+                                      "Current task is not for the given projectId (" + projectId + "): "
+                                          + ( (CheckOutTask) task ).getProjectId() + "; not cancelling checkout" );
+                }
+            }
+            else
+            {
+                getLogger().warn( "Current task not a CheckOutTask - not cancelling checkout" );
+            }
+        }
+        else
+        {
+            getLogger().warn( "No task running - not cancelling checkout" );
+        }
+        return false;
+    }
+    
 
     public List<BuildProjectTask> getBuildProjectTasks()
     {
@@ -104,16 +207,6 @@
         this.buildProjectTasks = buildProjectTasks;
     }
 
-    public List<String> getSelectedProjectIds()
-    {
-        return selectedProjectIds;
-    }
-
-    public void setSelectedProjectIds( List<String> selectedProjectIds )
-    {
-        this.selectedProjectIds = selectedProjectIds;
-    }
-
     public int getBuildDefinitionId()
     {
         return buildDefinitionId;
@@ -154,5 +247,77 @@
         this.projectName = projectName;
     }
 
+    public BuildProjectTask getCurrentBuildProjectTask()
+    {
+        return currentBuildProjectTask;
+    }
+
+    public void setCurrentBuildProjectTask( BuildProjectTask currentBuildProjectTask )
+    {
+        this.currentBuildProjectTask = currentBuildProjectTask;
+    }
+
+    public TaskQueueExecutor getTaskQueueExecutor()
+    {
+        return taskQueueExecutor;
+    }
+
+
+    public TaskQueueExecutor getCheckoutTaskQueueExecutor()
+    {
+        return checkoutTaskQueueExecutor;
+    }
+
+
+    public void setCheckoutTaskQueueExecutor( TaskQueueExecutor checkoutTaskQueueExecutor )
+    {
+        this.checkoutTaskQueueExecutor = checkoutTaskQueueExecutor;
+    }
+
+
+    public CheckOutTask getCurrentCheckOutTask()
+    {
+        return currentCheckOutTask;
+    }
+
+
+    public void setCurrentCheckOutTask( CheckOutTask currentCheckOutTask )
+    {
+        this.currentCheckOutTask = currentCheckOutTask;
+    }
+
+
+    public List<CheckOutTask> getCurrentCheckOutTasks()
+    {
+        return currentCheckOutTasks;
+    }
+
+
+    public void setCurrentCheckOutTasks( List<CheckOutTask> currentCheckOutTasks )
+    {
+        this.currentCheckOutTasks = currentCheckOutTasks;
+    }
+
+    public List<String> getSelectedBuildTaskHashCodes()
+    {
+        return selectedBuildTaskHashCodes;
+    }
+
+    public void setSelectedBuildTaskHashCodes( List<String> selectedBuildTaskHashCodes )
+    {
+        this.selectedBuildTaskHashCodes = selectedBuildTaskHashCodes;
+    }
+
+    public List<String> getSelectedCheckOutTaskHashCodes()
+    {
+        return selectedCheckOutTaskHashCodes;
+    }
+
+    public void setSelectedCheckOutTaskHashCodes( List<String> selectedCheckOutTaskHashCodes )
+    {
+        this.selectedCheckOutTaskHashCodes = selectedCheckOutTaskHashCodes;
+    }
+
 
+    
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Fri Sep 28 16:47:45 2007
@@ -74,7 +74,7 @@
 menu.administration.buildDefinitionTemplates = Build Definitions Templates
 menu.account.options = My account
 user.edit.account = Edit user info
-menu.administration.buildqueue = Build Queue
+menu.administration.queues = Queues
 
 # ----------------------------------------------------------------------
 # Page: error
@@ -729,3 +729,14 @@
 buildQueue.page.title = Continuum - Build Queue
 buildQueue.section.title = Continuum - Build Queue
 buildQueue.empty = Build Queue is empty
+buildQueue.currentTask.section.title = Current Build
+buildQueue.currentTask.projectName = Project Name
+buildQueue.currentTask.buildDefinition = Build Definition
+buildQueue.no.currentTaks = Nothing is building
+buildQueue.removeEntries = Cancel Entries
+checkoutQueue.currentTask.section.title = Current Checkout
+checkoutQueue.currentTask.projectName = Project Name
+checkoutQueue.no.currentTaks = No current checkout
+checkoutQueue.section.title = Checkout Queue
+checkoutQueue.empty = Checkout Queue is empty
+checkoutQueue.removeEntries = Cancel Entries
\ No newline at end of file

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Fri Sep 28 16:47:45 2007
@@ -658,19 +658,46 @@
       </result>
     </action>
     
-    <action name="displayGlobalBuildQueue" class="buildQueue" method="global">
+    <action name="displayQueues" class="queues" method="display">
       <result name="success">/WEB-INF/jsp/admin/buildQueueView.jsp</result>
     </action>
     
-    <action name="buildQueueView" class="buildQueue" method="display">
-      <result name="success">/WEB-INF/jsp/components/buildQueueComponent.jsp</result>
+    <action name="removeBuildQueueEntry" class="queues" method="remove">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>      
+    </action>   
+    
+    <action name="removeBuildQueueEntries" class="queues" method="removeBuildEntries">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>      
+    </action>    
+    
+    <action name="cancelCurrentBuildTask" class="queues" method="cancelCurrent">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>      
+    </action> 
+    
+    <action name="removeCheckoutQueueEntry" class="queues" method="removeCheckout">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>      
     </action>
     
-    <action name="removeBuildQueueEntry" class="buildQueue" method="remove">
+    <action name="cancelCurrentQueueTask" class="queues" method="cancelCurrentCheckout">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>      
+    </action>    
+    
+    <action name="removeCheckoutQueueEntries" class="queues" method="removeCheckoutEntries">
       <result name="success" type="redirect-action">
-        <param name="actionName">displayGlobalBuildQueue</param>
+        <param name="actionName">displayQueues</param>
       </result>      
     </action>    
+    
   </package>
 
   <package name="component" extends="default">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp Fri Sep 28 16:47:45 2007
@@ -29,12 +29,158 @@
       <meta http-equiv="refresh" content="60"/>
     </head>
     <body>
-      <div id="h3">
-        <h3>
-          <ww:text name="buildQueue.section.title"/>
-        </h3>  
-        <ww:action name="buildQueueView" executeResult="true"/>
-      </div>
+      <ww:form id="removeForm" action="none" method="post">
+        <div id="h3">
+          <h3>
+            <ww:text name="buildQueue.currentTask.section.title"/>
+          </h3>  
+          <table>
+            <ww:if test="currentBuildProjectTask != null">
+            <tbody>
+              <tr>
+                <th><ww:text name="buildQueue.currentTask.projectName"/></th>
+                <th><ww:text name="buildQueue.currentTask.buildDefinition"/></th>
+                <th>&nbsp;</th>
+              </tr>
+              <tr>
+                <td><ww:property value="currentBuildProjectTask.projectName"/></td>
+                <td><ww:property value="currentBuildProjectTask.buildDefinitionLabel"/></td>
+                <td>
+                  <ww:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
+                    <ww:param name="projectId"><ww:property value="currentBuildProjectTask.projectId"/></ww:param>
+                  </ww:url>      
+                  <ww:a href="%{cancelUrl}"><img src="<ww:url value='/images/cancelbuild.gif'/>" alt="<ww:text name='cancel'/>" title="<ww:text name='cancel'/>" border="0"></ww:a>              
+                </td>
+              </tr>
+            </tbody>
+            </ww:if>
+            <ww:else>
+              <ww:text name="buildQueue.no.currentTaks" />
+            </ww:else>
+          </table>
+        </div>    
+        <div id="h3">
+          <h3>
+            <ww:text name="buildQueue.section.title"/>
+          </h3>  
+            <ww:if test="${not empty buildProjectTasks}">
+              <ec:table items="buildProjectTasks"
+                        var="buildProjectTask"
+                        showExports="false"
+                        showPagination="false"
+                        showStatusBar="false"
+                        sortable="false"
+                        filterable="false">
+                <ec:row highlightRow="true">
+                  <ec:column alias="checkbox" title=" " style="width:5px" filterable="false" sortable="false" width="1%">
+                    <input type="checkbox" name="selectedBuildTaskHashCodes" value="${buildProjectTask.hashCode}" />
+                  </ec:column>              
+                  <ec:column property="projectName" title="Project Name" style="white-space: nowrap" />
+                  <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                    <ww:url id="cancelUrl" action="removeBuildQueueEntry" method="remove" namespace="/">
+                      <ww:param name="projectId">${pageScope.buildProjectTask.projectId}</ww:param>
+                      <ww:param name="buildDefinitionId">${pageScope.buildProjectTask.buildDefinitionId}</ww:param>
+                      <ww:param name="trigger">${pageScope.buildProjectTask.trigger}</ww:param>
+                      <ww:param name="projectName">${pageScope.buildProjectTask.projectName}</ww:param>
+                    </ww:url>      
+                    <ww:a href="%{cancelUrl}"><img src="<ww:url value='/images/cancelbuild.gif'/>" alt="<ww:text name='cancel'/>" title="<ww:text name='cancel'/>" border="0"></ww:a>    
+                  </ec:column>             
+                </ec:row>
+              </ec:table>
+            </ww:if>
+            <ww:else>
+              <ww:text name="buildQueue.empty"/>
+            </ww:else>
+        </div>
+        <ww:if test="${not empty buildProjectTasks}">
+          <div class="functnbar3">
+            <table>
+              <tbody>
+                <tr>
+                  <td>
+                    <input type="submit" value="<ww:text name="buildQueue.removeEntries"/>" 
+                           onclick="$('removeForm').action='removeBuildQueueEntries!removeBuildEntries.action';$('removeForm').submit();" /> 
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </ww:if>      
+        
+        
+        <!-- checkout queue -->
+        <div id="h3">
+          <h3>
+            <ww:text name="checkoutQueue.currentTask.section.title"/>
+          </h3>  
+          <table>
+            <ww:if test="currentCheckOutTask != null">
+            <tbody>
+              <tr>
+                <th><ww:text name="checkoutQueue.currentTask.projectName"/></th>
+                <th>&nbsp;</th>
+              </tr>
+              <tr>
+                <td><ww:property value="currentCheckOutTask.projectName"/></td>
+                <td>
+                  <ww:url id="cancelUrl" action="cancelCurrentQueueTask" method="cancelCurrentCheckout" namespace="/">
+                    <ww:param name="projectId"><ww:property value="currentCheckOutTask.projectId"/></ww:param>
+                  </ww:url>      
+                  <ww:a href="%{cancelUrl}"><img src="<ww:url value='/images/cancelbuild.gif'/>" alt="<ww:text name='cancel'/>" title="<ww:text name='cancel'/>" border="0"></ww:a>              
+                </td>
+              </tr>
+            </tbody>
+            </ww:if>
+            <ww:else>
+              <ww:text name="checkoutQueue.no.currentTaks" />
+            </ww:else>
+          </table>
+        </div>    
+        <div id="h3">
+          <h3>
+            <ww:text name="checkoutQueue.section.title"/>
+          </h3>  
+            <ww:if test="${not empty currentCheckOutTasks}">
+              <ec:table items="currentCheckOutTasks"
+                        var="currentCheckOutTask"
+                        showExports="false"
+                        showPagination="false"
+                        showStatusBar="false"
+                        sortable="false"
+                        filterable="false">
+                <ec:row highlightRow="true">
+                  <ec:column alias="checkbox" title=" " style="width:5px" filterable="false" sortable="false" width="1%">
+                    <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${currentCheckOutTask.hashCode}" />
+                  </ec:column>              
+                  <ec:column property="projectName" title="Project Name" style="white-space: nowrap" />
+                  <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                    <ww:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout">
+                      <ww:param name="projectId">${pageScope.currentCheckOutTask.projectId}</ww:param>
+                    </ww:url>      
+                    <ww:a href="%{cancelUrl}"><img src="<ww:url value='/images/cancelbuild.gif'/>" alt="<ww:text name='cancel'/>" title="<ww:text name='cancel'/>" border="0"></ww:a>    
+                  </ec:column>             
+                </ec:row>
+              </ec:table>
+            </ww:if>
+            <ww:else>
+              <ww:text name="checkoutQueue.empty"/>
+            </ww:else>
+        </div>
+        <ww:if test="${not empty currentCheckOutTasks}">
+          <div class="functnbar3">
+            <table>
+              <tbody>
+                <tr>
+                  <td>
+                    <input type="submit" value="<ww:text name="checkoutQueue.removeEntries"/>" 
+                           onclick="$('removeForm').action='removeCheckoutQueueEntries!removeCheckoutEntries.action';$('removeForm').submit();" />
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </ww:if>            
+      </ww:form>
     </body>
   </ww:i18n>
 </html>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp?rev=580518&r1=580517&r2=580518&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/navigations/Menu.jsp Fri Sep 28 16:47:45 2007
@@ -82,7 +82,7 @@
   </redback:ifAuthorized>
 
 
-  <redback:ifAnyAuthorized permissions="continuum-manage-build-templates,continuum-manage-schedules,continuum-manage-configuration,continuum-manage-users,continuum-manage-installations,continuum-manage-profiles,continuum-manage-build-queue">
+  <redback:ifAnyAuthorized permissions="continuum-manage-build-templates,continuum-manage-schedules,continuum-manage-configuration,continuum-manage-users,continuum-manage-installations,continuum-manage-profiles,continuum-manage-queues">
     <div id="projectmenu" class="toolgroup">
       <div class="label">
         <ww:text name="menu.administration"/>
@@ -112,11 +112,11 @@
             </ww:a>
           </div> 
         </redback:ifAuthorized> 
-        <redback:ifAuthorized permission="continuum-manage-build-queue">
-          <ww:url id="buildQueueUrl" action="displayGlobalBuildQueue" namespace="/admin" method="global" includeParams="none"/>
+        <redback:ifAuthorized permission="continuum-manage-queues">
+          <ww:url id="queueUrls" action="displayQueues" namespace="/admin" method="display" includeParams="none"/>
           <div class="body">
-            <ww:a href="%{buildQueueUrl}">
-              <ww:text name="menu.administration.buildqueue"/>
+            <ww:a href="%{queueUrls}">
+              <ww:text name="menu.administration.queues"/>
             </ww:a>
           </div> 
         </redback:ifAuthorized> 



Mime
View raw message