continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r776516 - in /continuum/branches/continuum-1.3.x: continuum-api/src/main/java/org/apache/continuum/buildmanager/ continuum-core/src/main/java/org/apache/continuum/buildmanager/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/a...
Date Wed, 20 May 2009 01:38:09 GMT
Author: ctan
Date: Wed May 20 01:38:08 2009
New Revision: 776516

URL: http://svn.apache.org/viewvc?rev=776516&view=rev
Log:
[CONTINUUM-2231] added prepare build queue in Queues page

Modified:
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
Wed May 20 01:38:08 2009
@@ -25,6 +25,7 @@
 
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.CheckOutTask;
+import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Project;
@@ -342,4 +343,39 @@
      * @return
      */
     boolean isBuildInProgress();
+
+    /**
+     * Return currently preparing build project 
+     * @return
+     * @throws BuildManagerException
+     */
+    PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
+        throws BuildManagerException;
+
+    /**
+     * Return all projects in prepare build queue
+     * @return
+     * @throws BuildManagerException
+     */
+    List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()
+        throws BuildManagerException;
+
+    /**
+     * Remove a project from a prepare build queue
+     * @param projectGroupId
+     * @param scmRootId
+     * @return
+     * @throws BuildManagerException
+     */
+    boolean removeProjectFromPrepareBuildQueue( int projectGroupId, int scmRootId )
+        throws BuildManagerException;
+
+    /**
+     * Removes a set of projects using the specified hashcodes from the prepare build queues.
+     *
+     * @param hashcodes
+     * @throws BuildManagerException
+     */
+    void removeProjectsFromPrepareBuildQueueWithHashCodes( int[] hashCodes )
+        throws BuildManagerException;
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
Wed May 20 01:38:08 2009
@@ -28,6 +28,7 @@
 
 import javax.annotation.Resource;
 
+import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.buildqueue.BuildQueueService;
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
 import org.apache.continuum.dao.BuildDefinitionDao;
@@ -1048,6 +1049,70 @@
         }
     }
 
+    public PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
+        throws BuildManagerException
+    {
+        Task task = getPrepareBuildTaskQueueExecutor().getCurrentTask();
+
+        if ( task != null )
+        {
+            return (PrepareBuildProjectsTask) task;
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+    public List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()
+        throws BuildManagerException
+    {
+        try
+        {
+            return getPrepareBuildQueue().getQueueSnapshot();
+        }
+        catch ( TaskQueueException e )
+        {
+            throw new BuildManagerException( "Error occurred while retrieving projects in
prepare build queue", e );
+        }
+    }
+
+    public boolean removeProjectFromPrepareBuildQueue( int projectGroupId, int scmRootId
)
+        throws BuildManagerException
+    {
+        List<PrepareBuildProjectsTask> tasks = getProjectsInPrepareBuildQueue();
+
+        if ( tasks != null )
+        {
+            for ( PrepareBuildProjectsTask task : tasks )
+            {
+                if ( task.getProjectGroupId() == projectGroupId && task.getProjectScmRootId()
== scmRootId )
+                {
+                    return getPrepareBuildQueue().remove( task );
+                }
+            }
+        }
+
+        return false;
+    }
+
+    public void removeProjectsFromPrepareBuildQueueWithHashCodes( int[] hashCodes )
+        throws BuildManagerException
+    {
+        List<PrepareBuildProjectsTask> tasks = getProjectsInPrepareBuildQueue();
+
+        if ( tasks != null )
+        {
+            for ( PrepareBuildProjectsTask task : tasks )
+            {
+                if ( ArrayUtils.contains( hashCodes, task.getHashCode() ) )
+                {
+                    getPrepareBuildQueue().remove( task );
+                }
+            }
+        }
+    }
+
     private boolean isInQueue( int projectId, int typeOfQueue, int buildDefinitionId )
         throws TaskQueueException
     {
@@ -1273,6 +1338,19 @@
         }
     }
 
+    public TaskQueueExecutor getPrepareBuildTaskQueueExecutor()
+        throws BuildManagerException
+    {
+        try
+        {
+            return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project"
);
+        }
+        catch ( ComponentLookupException e )
+        {
+            throw new BuildManagerException( e.getMessage(), e );
+        }
+    }
+
     public void contextualize( Context context )
         throws ContextException
     {

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
Wed May 20 01:38:08 2009
@@ -38,7 +38,7 @@
 import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.apache.maven.continuum.web.model.DistributedBuildSummary;
-import org.apache.maven.continuum.web.model.DistributedPrepareBuildSummary;
+import org.apache.maven.continuum.web.model.PrepareBuildSummary;
 import org.codehaus.plexus.redback.rbac.Resource;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.redback.integration.interceptor.SecureAction;
@@ -83,9 +83,13 @@
 
     private List<CheckoutQueue> checkoutsInQueue = new ArrayList<CheckoutQueue>();
 
-    private List<DistributedPrepareBuildSummary> currentDistributedPrepareBuilds =
new ArrayList<DistributedPrepareBuildSummary>();
+    private List<PrepareBuildSummary> currentPrepareBuilds = new ArrayList<PrepareBuildSummary>();
 
-    private List<DistributedPrepareBuildSummary> distributedPrepareBuildQueues = new
ArrayList<DistributedPrepareBuildSummary>();
+    private List<PrepareBuildSummary> prepareBuildQueues = new ArrayList<PrepareBuildSummary>();
+
+    private List<PrepareBuildSummary> currentDistributedPrepareBuilds = new ArrayList<PrepareBuildSummary>();
+
+    private List<PrepareBuildSummary> distributedPrepareBuildQueues = new ArrayList<PrepareBuildSummary>();
 
     private List<DistributedBuildSummary> currentDistributedBuilds = new ArrayList<DistributedBuildSummary>();
 
@@ -207,7 +211,7 @@
 
                 ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId()
);
 
-                DistributedPrepareBuildSummary summary = new DistributedPrepareBuildSummary();
+                PrepareBuildSummary summary = new PrepareBuildSummary();
                 summary.setBuildAgentUrl( url );
                 summary.setProjectGroupId( task.getProjectGroupId() );
                 summary.setProjectGroupName( projectGroup.getName() );
@@ -247,7 +251,7 @@
                 {
                     ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId()
);
 
-                    DistributedPrepareBuildSummary summary = new DistributedPrepareBuildSummary();
+                    PrepareBuildSummary summary = new PrepareBuildSummary();
                     summary.setBuildAgentUrl( url );
                     summary.setProjectGroupId( task.getProjectGroupId() );
                     summary.setProjectGroupName( projectGroup.getName() );
@@ -288,6 +292,28 @@
         {
             try
             {
+                // current prepare builds
+                PrepareBuildProjectsTask currentPrepareBuildTask = getContinuum().getBuildsManager().getCurrentProjectInPrepareBuild();
+
+                if ( currentPrepareBuildTask != null )
+                {
+                    PrepareBuildSummary s = new PrepareBuildSummary();
+                    
+                    s.setProjectGroupId( currentPrepareBuildTask.getProjectGroupId() );
+                    s.setProjectGroupName( currentPrepareBuildTask.getProjectGroupName()
);
+                    s.setScmRootId( currentPrepareBuildTask.getProjectScmRootId() );
+                    s.setScmRootAddress( currentPrepareBuildTask.getScmRootAddress() );
+                    currentPrepareBuilds.add( s );
+                }
+            }
+            catch ( BuildManagerException e )
+            {
+                addActionError( e.getMessage() );
+                return ERROR;
+            }
+
+            try
+            {
                 // current builds
                 Map<String, BuildProjectTask> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
                 Set<String> keySet = currentBuilds.keySet();
@@ -308,6 +334,29 @@
 
             try
             {
+                // queued prepare builds
+                List<PrepareBuildProjectsTask> prepareBuilds = 
+                    getContinuum().getBuildsManager().getProjectsInPrepareBuildQueue();
+                for ( PrepareBuildProjectsTask task : prepareBuilds )
+                {
+                    PrepareBuildSummary summary = new PrepareBuildSummary();
+                    summary.setProjectGroupId( task.getProjectGroupId() );
+                    summary.setProjectGroupName( task.getProjectGroupName() );
+                    summary.setScmRootId( task.getProjectScmRootId() );
+                    summary.setScmRootAddress( task.getScmRootAddress() );
+                    summary.setHashCode( task.getHashCode() );
+
+                    prepareBuildQueues.add( summary );
+                }
+            }
+            catch ( BuildManagerException e )
+            {
+                addActionError( e.getMessage() );
+                return ERROR;
+            }
+
+            try
+            {
                 // queued builds
                 Map<String, List<BuildProjectTask>> builds =
                     getContinuum().getBuildsManager().getProjectsInBuildQueues();
@@ -449,6 +498,51 @@
         return SUCCESS;
     }
 
+    public String removePrepareBuildEntry()
+        throws Exception
+    {
+        try
+        {
+            checkManageQueuesAuthorization();
+        }
+        catch ( AuthorizationRequiredException authzE )
+        {
+            addActionError( authzE.getMessage() );
+            return REQUIRES_AUTHORIZATION;
+        }
+        catch ( AuthenticationRequiredException e )
+        {
+            addActionError( e.getMessage() );
+            return REQUIRES_AUTHENTICATION;
+        }
+
+        getContinuum().getBuildsManager().removeProjectFromPrepareBuildQueue( projectGroupId,
scmRootId );
+        return SUCCESS;
+    }
+
+    public String removePrepareBuildEntries()
+        throws Exception
+    {
+        try
+        {
+            checkManageQueuesAuthorization();
+        }
+        catch ( AuthorizationRequiredException authzE )
+        {
+            addActionError( authzE.getMessage() );
+            return REQUIRES_AUTHORIZATION;
+        }
+        catch ( AuthenticationRequiredException e )
+        {
+            addActionError( e.getMessage() );
+            return REQUIRES_AUTHENTICATION;
+        }
+
+        getContinuum().getBuildsManager().removeProjectsFromPrepareBuildQueueWithHashCodes(

+            listToIntArray( this.selectedPrepareBuildTaskHashCodes ) );
+        return SUCCESS;
+    }
+
     public String cancelDistributedBuild()
         throws Exception
     {
@@ -726,7 +820,7 @@
         this.checkoutsInQueue = checkoutsInQueue;
     }
 
-    public List<DistributedPrepareBuildSummary> getCurrentDistributedPrepareBuilds()
+    public List<PrepareBuildSummary> getCurrentDistributedPrepareBuilds()
     {
         return currentDistributedPrepareBuilds;
     }
@@ -736,7 +830,7 @@
         return currentDistributedBuilds;
     }
 
-    public List<DistributedPrepareBuildSummary> getDistributedPrepareBuildQueues()
+    public List<PrepareBuildSummary> getDistributedPrepareBuildQueues()
     {
         return distributedPrepareBuildQueues;
     }
@@ -745,7 +839,17 @@
     {
         return distributedBuildQueues;
     }
-    
+
+    public List<PrepareBuildSummary> getCurrentPrepareBuilds()
+    {
+        return currentPrepareBuilds;
+    }
+
+    public List<PrepareBuildSummary> getPrepareBuildQueues()
+    {
+        return prepareBuildQueues;
+    }
+
     public String getBuildAgentUrl()
     {
         return buildAgentUrl;

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/mdo/view-models.mdo Wed May
20 01:38:08 2009
@@ -495,13 +495,13 @@
       </fields>
     </class>    
     <class>
-      <name>DistributedPrepareBuildSummary</name>
+      <name>PrepareBuildSummary</name>
       <version>1.0.0+</version>
       <fields>
         <field>
           <name>buildAgentUrl</name>
           <version>1.0.0</version>
-          <required>true</required>
+          <required>false</required>
           <description>URL of the build agent</description>
           <type>String</type>
         </field>

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed May 20 01:38:08 2009
@@ -865,7 +865,7 @@
 # Page: Queues
 # ----------------------------------------------------------------------
 buildQueue.page.title = Continuum - Build Queue
-buildQueue.section.title = Continuum - Build Queue
+buildQueue.section.title = Build Queue
 buildQueue.empty = Build Queue is empty
 buildQueue.currentTask.section.title = Current Build
 buildQueue.currentTask.buildQueue = Build Queue
@@ -880,6 +880,13 @@
 checkoutQueue.section.title = Checkout Queue
 checkoutQueue.empty = Checkout Queue is empty
 checkoutQueue.removeEntries = Cancel Entries
+prepareBuildQueue.currentTask.section.title = Current Prepare Build
+prepareBuildQueue.section.title = Prepare Build Queue
+prepareBuildQueue.table.projectGroupName = Project Group
+prepareBuildQueue.table.scmRootAddress = SCM Root URL
+prepareBuildQueue.empty = Prepare Build Queue is empty
+prepareBuildQueue.no.currentTasks = No current prepare build
+prepareBuildQueue.removeEntries = Cancel Entries
 
 # ----------------------------------------------------------------------
 # Page: Build Queue
@@ -1149,21 +1156,23 @@
 # Page: View Distributed Build
 # ----------------------------------------------------------------------
 distributedBuilds.page.title = Continuum - View Distributed Builds
-distributedBuilds.currentPrepareBuild.section.title = Current Prepare Builds
-distributedBuilds.currentBuild.section.title = Current Builds
-distributedBuilds.prepareBuildQueue.section.title = Prepare Build Queues
-distributedBuilds.buildQueue.section.title = Build Queues
+distributedBuilds.currentPrepareBuild.section.title = Current Prepare Build
+distributedBuilds.currentBuild.section.title = Current Build
+distributedBuilds.prepareBuildQueue.section.title = Prepare Build Queue
+distributedBuilds.buildQueue.section.title = Build Queue
 distributedPrepareBuild.table.projectGroupName = Project Group Name
-distributedPrepareBuild.table.scmRootAddress = Scm Root Address
+distributedPrepareBuild.table.scmRootAddress = SCM Root URL
 distributedPrepareBuild.table.buildAgentUrl = Build Agent URL
-distributedPrepareBuilds.empty = No Prepare Builds
-distributedPrepareBuilds.removeEntries = Cancel Prepare Builds
+distributedPrepareBuilds.empty = Prepare Build Queue is empty
+distributedPrepareBuilds.no.currentTasks = No current prepare build
+distributedPrepareBuilds.removeEntries = Cancel Entries
 distributedBuild.table.projectName = Project Name
 distributedBuild.table.buildDefinitionLabel = Build Definition Label
 distributedBuild.table.projectGroupName = Project Group Name
 distributedBuild.table.buildAgentUrl = Build Agent URL
-distributedBuilds.empty = No Builds
-distributedBuilds.removeEntries = Cancel Builds
+distributedBuilds.empty = Build Queue is empty
+distributedBuilds.no.currentTasks = No current build
+distributedBuilds.removeEntries = Cancel Entries
 
 # ----------------------------------------------------------------------
 # Page: Delete BuildAgentGroup

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/struts.xml Wed
May 20 01:38:08 2009
@@ -818,6 +818,18 @@
         <param name="actionName">displayQueues</param>
       </result>      
     </action>    
+
+    <action name="removePrepareBuildEntry" class="queues" method="removePrepareBuildEntry">
+	  <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>
+    </action>
+
+    <action name="removePrepareBuildEntries" class="queues" method="removePrepareBuildEntries">
+      <result name="success" type="redirect-action">
+        <param name="actionName">displayQueues</param>
+      </result>
+    </action>
     
     <action name="cancelDistributedBuild" class="queues" method="cancelDistributedBuild">
       <result name="success" type="redirect-action">

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
Wed May 20 01:38:08 2009
@@ -30,7 +30,87 @@
       <meta http-equiv="refresh" content="60"/>
     </head>
     <body>
-      <s:form id="removeForm" action="none" method="post">
+      <s:form id="prepareBuildForm" action="none" method="post">
+      	<div id="h3">
+          <h3><s:text name="prepareBuildQueue.currentTask.section.title"/></h3>
+          <c:if test="${not empty currentPrepareBuilds}">
+            <s:set name="currentPrepareBuilds" value="currentPrepareBuilds" scope="request"/>
+            <ec:table items="currentPrepareBuilds"
+                      var="currentPrepareBuild"
+                      showExports="false"
+                      showPagination="false"
+                      showStatusBar="false"
+                      sortable="false"
+                      filterable="false">
+              <ec:row>
+                <ec:column property="projectGroupName" title="prepareBuildQueue.table.projectGroupName"/>
+                <ec:column property="scmRootAddress" title="prepareBuildQueue.table.scmRootAddress"/>
+              </ec:row>
+            </ec:table>
+          </c:if>
+          <c:if test="${empty currentPrepareBuilds}">
+            <s:text name="prepareBuildQueue.no.currentTasks"/>
+          </c:if>
+        </div>
+      </s:form>
+       
+      <s:form id="removePrepareBuildForm" action="removePrepareBuildEntries.action" method="post">
+        <div id="h3">
+          <h3>
+            <s:text name="prepareBuildQueue.section.title"/>
+          </h3>
+          <c:if test="${not empty prepareBuildQueues}">
+            <s:set name="prepareBuildQueues" value="prepareBuildQueues" scope="request"/>
+            <ec:table items="prepareBuildQueues"
+                      var="prepareBuildQueue"
+                      showExports="false"
+                      showPagination="false"
+                      showStatusBar="false"
+                      sortable="false"
+                      filterable="false">
+              <ec:row>
+                <redback:ifAuthorized permission="continuum-manage-queues">
+                  <ec:column alias="selectedPrepareBuildTaskHashCodes" title="&nbsp;"
style="width:5px" filterable="false" sortable="false" width="1%" headerCell="selectAll">
+                    <input type="checkbox" name="selectedPrepareBuildTaskHashCodes" value="${pageScope.prepareBuildQueue.hashCode}"
/>
+                  </ec:column>             
+                </redback:ifAuthorized>
+                <ec:column property="projectGroupName" title="prepareBuildQueue.table.projectGroupName"/>
+                <ec:column property="scmRootAddress" title="prepareBuildQueue.table.scmRootAddress"/>
+                <ec:column property="cancelEntry" title="&nbsp;" width="1%">
+                  <redback:ifAuthorized permission="continuum-manage-queues">
+                    <s:url id="cancelUrl" action="removePrepareBuildEntry" method="removePrepareBuildEntry"
namespace="/">
+                      <s:param name="projectGroupId">${pageScope.prepareBuildQueue.projectGroupId}</s:param>
+                      <s:param name="scmRootId">${pageScope.prepareBuildQueue.scmRootId}</s:param>
+                    </s:url>
+                    <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif'
includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>"
border="0"></s:a>
+                  </redback:ifAuthorized>
+                  <redback:elseAuthorized>
+                    <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>"
alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+                  </redback:elseAuthorized>
+                </ec:column>
+              </ec:row>
+            </ec:table>
+          </c:if>
+        </div>
+        <c:if test="${not empty prepareBuildQueues}">
+          <div class="functnbar3">
+            <table>
+              <tbody>
+                <tr>
+                  <td>
+                    <input type="button" name="remove-prepare-build-queues" value="<s:text
name="prepareBuildQueue.removeEntries"/>" onclick="document.forms.removePrepareBuildForm.submit();"
/> 
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </c:if>
+        <c:if test="${empty prepaerBuildQueues}">
+          <s:text name="prepareBuildQueue.empty"/>
+        </c:if>
+      </s:form>
+      
+      <s:form id="buildQueueForm" action="none" method="post">
         <div id="h3">
           <h3>
             <s:text name="buildQueue.currentTask.section.title"/>
@@ -71,7 +151,9 @@
             <s:text name="buildQueue.no.currentTaks" />
           </c:if>
         </div>
-        
+      </s:form>
+      
+      <s:form id="removeBuildForm" action="removeBuildQueueEntries!removeBuildEntries.action"
method="post">
         <div id="h3">
           <h3>
             <s:text name="buildQueue.section.title"/>
@@ -127,16 +209,17 @@
               <tbody>
                 <tr>
                   <td>
-                    <input type="submit" value="<s:text name="buildQueue.removeEntries"/>"
-                           onclick="$('removeForm').action='removeBuildQueueEntries!removeBuildEntries.action';$('removeForm').submit();"
/>
+                    <input type="button" value="<s:text name="buildQueue.removeEntries"/>"
onclick="document.forms.removeBuildForm.submit();" />
                   </td>
                 </tr>
               </tbody>
             </table>
           </div>
         </c:if>
-                
-        <!-- checkout queue -->
+      </s:form>
+
+      <s:form id="checkoutForm" action="none" method="post">
+        <%-- checkout queue --%>
         <div id="h3">
           <h3>
             <s:text name="checkoutQueue.currentTask.section.title"/>
@@ -176,7 +259,9 @@
             <s:text name="checkoutQueue.no.currentTaks" />
           </c:if>
         </div>
+      </s:form>
         
+      <s:form id="removeCheckoutForm" action="removeCheckoutQueueEntries!removeCheckoutEntries.action"
method="post">
         <div id="h3">
           <h3>
             <s:text name="checkoutQueue.section.title"/>
@@ -228,8 +313,7 @@
                 <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();"
/>
+                    <input type="submit" value="<s:text name="checkoutQueue.removeEntries"/>"
onclick="document.forms.removeCheckoutForm.submit();" />
                     </redback:ifAuthorized>
                   </td>
                 </tr>

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp?rev=776516&r1=776515&r2=776516&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/viewDistributedBuilds.jsp
Wed May 20 01:38:08 2009
@@ -56,7 +56,7 @@
             </ec:table>
           </c:if>
           <c:if test="${empty currentDistributedPrepareBuilds}">
-            <s:text name="distributedPrepareBuilds.empty"/>
+            <s:text name="distributedPrepareBuilds.no.currentTasks"/>
           </c:if>
         </div>
         <div id="h3">
@@ -90,7 +90,7 @@
             </ec:table>
           </c:if>
           <c:if test="${empty currentDistributedBuilds}">
-            <s:text name="distributedBuilds.empty"/>
+            <s:text name="distributedBuilds.no.currentTasks"/>
           </c:if>
         </div>
       </form>
@@ -147,6 +147,9 @@
             </table>
           </div>
         </c:if>
+        <c:if test="${empty distributedPrepareBuildQueues}">
+          <s:text name="distributedPrepareBuilds.empty"/>
+        </c:if>
       </form>
       <form id="removeBuildForm" action="removeDistributedBuildEntries.action" method="post">
         <div id="h3">
@@ -202,6 +205,9 @@
             </table>
           </div>
         </c:if>
+        <c:if test="${empty distributedBuildQueues}">
+          <s:text name="distributedBuilds.empty"/>
+        </c:if>
       </form>
     </body>
   </s:i18n>



Mime
View raw message