You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2009/05/15 06:42:04 UTC
svn commit: r775001 - in
/continuum/branches/continuum-1.3.x/continuum-webapp/src/main:
java/org/apache/maven/continuum/web/action/admin/
java/org/apache/maven/continuum/web/bean/ webapp/WEB-INF/jsp/admin/
Author: evenisse
Date: Fri May 15 04:42:04 2009
New Revision: 775001
URL: http://svn.apache.org/viewvc?rev=775001&view=rev
Log:
[CONTINUUM-2197] Add select all in the queue page and replace basic html tables by extremecomponents tables
Added:
continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java (with props)
continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java (with props)
continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java (with props)
Modified:
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/webapp/WEB-INF/jsp/admin/buildQueueView.jsp
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=775001&r1=775000&r2=775001&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 Fri May 15 04:42:04 2009
@@ -20,7 +20,6 @@
*/
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -39,6 +38,8 @@
import org.apache.maven.continuum.project.ContinuumProjectState;
import org.apache.maven.continuum.security.ContinuumRoleConstants;
import org.apache.maven.continuum.web.action.ContinuumActionSupport;
+import org.apache.maven.continuum.web.bean.BuildProjectQueue;
+import org.apache.maven.continuum.web.bean.CheckoutQueue;
import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
import org.apache.maven.continuum.web.model.DistributedBuildSummary;
@@ -76,13 +77,13 @@
private String projectName;
- private Map<String, BuildProjectTask> currentBuildProjectTasks = new HashMap<String, BuildProjectTask>();
+ private List<BuildProjectQueue> currentBuildProjectTasks = new ArrayList<BuildProjectQueue>();
- private Map<String, CheckOutTask> currentCheckoutTasks = new HashMap<String, CheckOutTask>();
+ private List<CheckoutQueue> currentCheckoutTasks = new ArrayList<CheckoutQueue>();
- private Map<String, List<BuildProjectTask>> buildsInQueue = new HashMap<String, List<BuildProjectTask>>();
+ private List<BuildProjectQueue> buildsInQueue = new ArrayList<BuildProjectQueue>();
- private Map<String, List<CheckOutTask>> checkoutsInQueue = new HashMap<String, List<CheckOutTask>>();
+ private List<CheckoutQueue> checkoutsInQueue = new ArrayList<CheckoutQueue>();
/**
* @plexus.requirement
@@ -247,7 +248,10 @@
for ( String key : keySet )
{
BuildProjectTask buildTask = currentBuilds.get( key );
- currentBuildProjectTasks.put( key, buildTask );
+ BuildProjectQueue queue = new BuildProjectQueue();
+ queue.setName( key );
+ queue.setTask( buildTask );
+ currentBuildProjectTasks.add( queue );
}
}
catch ( BuildManagerException e )
@@ -264,12 +268,13 @@
Set<String> keySet = builds.keySet();
for ( String key : keySet )
{
- List<BuildProjectTask> buildTasks = new ArrayList<BuildProjectTask>();
for ( BuildProjectTask task : builds.get( key ) )
{
- buildTasks.add( task );
+ BuildProjectQueue queue = new BuildProjectQueue();
+ queue.setName( key );
+ queue.setTask( task );
+ buildsInQueue.add( queue );
}
- buildsInQueue.put( key, buildTasks );
}
}
catch ( BuildManagerException e )
@@ -286,7 +291,10 @@
for ( String key : keySet )
{
CheckOutTask checkoutTask = currentCheckouts.get( key );
- currentCheckoutTasks.put( key, checkoutTask );
+ CheckoutQueue queue = new CheckoutQueue();
+ queue.setName( key );
+ queue.setTask( checkoutTask );
+ currentCheckoutTasks.add( queue );
}
}
catch ( BuildManagerException e )
@@ -303,12 +311,13 @@
Set<String> keySet = checkouts.keySet();
for ( String key : keySet )
{
- List<CheckOutTask> checkoutTasks = new ArrayList<CheckOutTask>();
for ( CheckOutTask task : checkouts.get( key ) )
{
- checkoutTasks.add( task );
+ CheckoutQueue queue = new CheckoutQueue();
+ queue.setName( key );
+ queue.setTask( task );
+ checkoutsInQueue.add( queue );
}
- checkoutsInQueue.put( key, checkoutTasks );
}
}
catch ( BuildManagerException e )
@@ -586,42 +595,42 @@
this.selectedCheckOutTaskHashCodes = selectedCheckOutTaskHashCodes;
}
- public Map<String, BuildProjectTask> getCurrentBuildProjectTasks()
+ public List<BuildProjectQueue> getCurrentBuildProjectTasks()
{
return currentBuildProjectTasks;
}
- public void setCurrentBuildProjectTasks( Map<String, BuildProjectTask> currentBuildProjectTasks )
+ public void setCurrentBuildProjectTasks( List<BuildProjectQueue> currentBuildProjectTasks )
{
this.currentBuildProjectTasks = currentBuildProjectTasks;
}
- public Map<String, CheckOutTask> getCurrentCheckoutTasks()
+ public List<CheckoutQueue> getCurrentCheckoutTasks()
{
return currentCheckoutTasks;
}
- public void setCurrentCheckoutTasks( Map<String, CheckOutTask> currentCheckoutTasks )
+ public void setCurrentCheckoutTasks( List<CheckoutQueue> currentCheckoutTasks )
{
this.currentCheckoutTasks = currentCheckoutTasks;
}
- public Map<String, List<BuildProjectTask>> getBuildsInQueue()
+ public List<BuildProjectQueue> getBuildsInQueue()
{
return buildsInQueue;
}
- public void setBuildsInQueue( Map<String, List<BuildProjectTask>> buildsInQueue )
+ public void setBuildsInQueue( List<BuildProjectQueue> buildsInQueue )
{
this.buildsInQueue = buildsInQueue;
}
- public Map<String, List<CheckOutTask>> getCheckoutsInQueue()
+ public List<CheckoutQueue> getCheckoutsInQueue()
{
return checkoutsInQueue;
}
- public void setCheckoutsInQueue( Map<String, List<CheckOutTask>> checkoutsInQueue )
+ public void setCheckoutsInQueue( List<CheckoutQueue> checkoutsInQueue )
{
this.checkoutsInQueue = checkoutsInQueue;
}
Added: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java?rev=775001&view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java Fri May 15 04:42:04 2009
@@ -0,0 +1,42 @@
+package org.apache.maven.continuum.web.bean;
+
+/*
+ * 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.
+ */
+
+import org.apache.continuum.taskqueue.BuildProjectTask;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class BuildProjectQueue
+ extends Queue
+{
+ private BuildProjectTask task;
+
+ public BuildProjectTask getTask()
+ {
+ return task;
+ }
+
+ public void setTask( BuildProjectTask task )
+ {
+ this.task = task;
+ }
+}
Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/BuildProjectQueue.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java?rev=775001&view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java Fri May 15 04:42:04 2009
@@ -0,0 +1,42 @@
+package org.apache.maven.continuum.web.bean;
+
+/*
+ * 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.
+ */
+
+import org.apache.continuum.taskqueue.CheckOutTask;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class CheckoutQueue
+ extends Queue
+{
+ private CheckOutTask task;
+
+ public CheckOutTask getTask()
+ {
+ return task;
+ }
+
+ public void setTask( CheckOutTask task )
+ {
+ this.task = task;
+ }
+}
Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/CheckoutQueue.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java?rev=775001&view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java Fri May 15 04:42:04 2009
@@ -0,0 +1,39 @@
+package org.apache.maven.continuum.web.bean;
+
+/*
+ * 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.
+ */
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class Queue
+{
+ private String name;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+}
Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/bean/Queue.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
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=775001&r1=775000&r2=775001&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 Fri May 15 04:42:04 2009
@@ -34,102 +34,91 @@
<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> </th>
- </tr>
- <c:forEach var="element" items="${currentBuildProjectTasks}">
- <tr>
- <td width="20%">${element.key}</td>
- <td width="20%">
- <s:url id="viewUrl" action="buildResults">
- <s:param name="projectId">${element.value.projectId}</s:param>
+ </h3>
+ <c:if test="${not empty currentBuildProjectTasks}">
+ <s:set name="currentBuildProjectTasks" value="currentBuildProjectTasks" scope="request"/>
+ <ec:table items="currentBuildProjectTasks"
+ var="queue"
+ showExports="false"
+ showPagination="false"
+ showStatusBar="false"
+ sortable="false"
+ filterable="false">
+ <ec:row>
+ <ec:column property="name" title="buildQueue.currentTask.buildQueue" width="29%"/>
+ <ec:column property="projectUrl" title="buildQueue.currentTask.projectName" width="50%">
+ <s:url id="viewUrl" action="buildResults">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
+ </s:url>
+ <s:a href="%{viewUrl}">${queue.task.projectName}</s:a>
+ </ec:column>
+ <ec:column property="task.buildDefinitionLabel" title="buildQueue.currentTask.buildDefinition" width="19%"/>
+ <ec:column property="cancelAction" title=" " width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
</s:url>
- <s:a href="%{viewUrl}">${element.value.projectName}</s:a>
- </td>
- <td width="29%">${element.value.buildDefinitionLabel}</td>
- <td width="1%">
- <redback:ifAuthorized permission="continuum-manage-queues">
- <s:url id="cancelUrl" action="cancelCurrentBuildTask" method="cancelCurrent" namespace="/">
- <s:param name="projectId">${element.value.projectId}</s:param>
- </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>
+ <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ </redback:ifAuthorized>
+ <redback:elseAuthorized>
+ <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+ </redback:elseAuthorized>
+ </ec:column>
+ </ec:row>
+ </ec:table>
+ </c:if>
+ <c:if test="${empty currentBuildProjectTasks}">
+ <s:text name="buildQueue.no.currentTaks" />
+ </c:if>
</div>
<div id="h3">
<h3>
<s:text name="buildQueue.section.title"/>
</h3>
- <table width="100%">
- <s:if test="%{buildsInQueue != null}">
- <tbody>
- <tr>
+ <c:if test="${not empty buildsInQueue}">
+ <s:set name="buildsInQueue" value="buildsInQueue" scope="request"/>
+ <ec:table items="buildsInQueue"
+ var="queue"
+ showExports="false"
+ showPagination="false"
+ showStatusBar="false"
+ sortable="false"
+ filterable="false">
+ <ec:row>
<redback:ifAuthorized permission="continuum-manage-queues">
- <th> </th>
+ <ec:column alias="selectedBuildTaskHashCodes" title=" " style="width:5px" filterable="false" sortable="false" headerCell="selectAll">
+ <input type="checkbox" name="selectedBuildTaskHashCodes" value="${queue.task.hashCode}" />
+ </ec:column>
</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> </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>
- </td>
- <td width="29%">${element.key}</td>
- <td width="50%">
- <s:url id="viewUrl" action="buildResults">
- <s:param name="projectId">${buildTask.projectId}</s:param>
- </s:url>
- <s:a href="%{viewUrl}">${buildTask.projectName}</s:a>
- </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>
+ <ec:column property="name" title="buildQueue.currentTask.buildQueue" width="29%"/>
+ <ec:column property="projectUrl" title="buildQueue.currentTask.projectName" width="50%">
+ <s:url id="viewUrl" action="buildResults">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
+ </s:url>
+ <s:a href="%{viewUrl}">${queue.task.projectName}</s:a>
+ </ec:column>
+ <ec:column property="task.buildDefinitionLabel" title="buildQueue.currentTask.buildDefinition" width="19%"/>
+ <ec:column property="cancelAction" title=" " width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="removeBuildQueueEntry" method="remove" namespace="/">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
+ <s:param name="buildDefinitionId">${queue.task.buildDefinitionId}</s:param>
+ <s:param name="trigger">${queue.task.trigger}</s:param>
+ <s:param name="projectName">${queue.task.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>
+ </ec:column>
+ </ec:row>
+ </ec:table>
+ </c:if>
+ <c:if test="${empty buildsInQueue}">
+ <s:text name="buildQueue.empty"/>
+ </c:if>
</div>
<c:if test="${not empty buildsInQueue}">
<div class="functnbar3">
@@ -151,94 +140,85 @@
<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> </th>
- </tr>
- <c:forEach var="element" items="${currentCheckoutTasks}">
- <tr>
- <td width="30%">${element.key}</td>
- <td width="69%">
- <s:url id="viewUrl" action="projectView">
- <s:param name="projectId">${element.value.projectId}</s:param>
- </s:url>
- <s:a href="%{viewUrl}">${element.value.projectName}</s:a>
- </td>
- <td width="1%">
+ <c:if test="${not empty currentCheckoutTasks}">
+ <s:set name="currentCheckoutTasks" value="currentCheckoutTasks" scope="request"/>
+ <ec:table items="currentCheckoutTasks"
+ var="queue"
+ showExports="false"
+ showPagination="false"
+ showStatusBar="false"
+ sortable="false"
+ filterable="false">
+ <ec:row>
+ <ec:column property="name" title="checkoutQueue.currentTask.buildQueue" width="29%"/>
+ <ec:column property="projectUrl" title="checkoutQueue.currentTask.projectName" width="69%">
+ <s:url id="viewUrl" action="projectView">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
+ </s:url>
+ <s:a href="%{viewUrl}">${queue.task.projectName}</s:a>
+ </ec:column>
+ <ec:column property="cancelAction" title=" " 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:param name="projectId">${queue.task.projectId}</s:param>
</s:url>
<s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
</redback:ifAuthorized>
<redback:elseAuthorized>
<img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
</redback:elseAuthorized>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </s:if>
- <s:else>
- <s:text name="checkoutQueue.no.currentTaks" />
- </s:else>
- </table>
+ </ec:column>
+ </ec:row>
+ </ec:table>
+ </c:if>
+ <c:if test="${empty currentCheckoutTasks}">
+ <s:text name="checkoutQueue.no.currentTaks" />
+ </c:if>
</div>
<div id="h3">
<h3>
<s:text name="checkoutQueue.section.title"/>
</h3>
- <table width="100%">
- <s:if test="%{checkoutsInQueue != null}">
- <tbody>
- <tr>
+ <c:if test="${not empty checkoutsInQueue}">
+ <s:set name="checkoutsInQueue" value="checkoutsInQueue" scope="request"/>
+ <ec:table items="checkoutsInQueue"
+ var="queue"
+ showExports="false"
+ showPagination="false"
+ showStatusBar="false"
+ sortable="false"
+ filterable="false">
+ <ec:row>
<redback:ifAuthorized permission="continuum-manage-queues">
- <th> </th>
+ <ec:column alias="selectedCheckOutTaskHashCodes" title=" " style="width:5px" filterable="false" sortable="false" headerCell="selectAll">
+ <input type="checkbox" name="selectedCheckOutTaskHashCodes" value="${queue.task.hashCode}" />
+ </ec:column>
</redback:ifAuthorized>
- <th><s:text name="checkoutQueue.currentTask.buildQueue"/></th>
- <th><s:text name="checkoutQueue.currentTask.projectName"/></th>
- <th> </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%">
- <s:url id="viewUrl" action="projectView">
- <s:param name="projectId">${checkoutTask.projectId}</s:param>
- </s:url>
- <s:a href="%{viewUrl}">${checkoutTask.projectName}</s:a>
- </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>
+ <ec:column property="name" title="checkoutQueue.currentTask.buildQueue" width="29%"/>
+ <ec:column property="projectUrl" title="checkoutQueue.currentTask.projectName" width="69%">
+ <s:url id="viewUrl" action="projectView">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
+ </s:url>
+ <s:a href="%{viewUrl}">${queue.task.projectName}</s:a>
+ </ec:column>
+ <ec:column property="cancelAction" title=" " width="1%">
+ <redback:ifAuthorized permission="continuum-manage-queues">
+ <s:url id="cancelUrl" action="removeCheckoutQueueEntry" method="removeCheckout" namespace="/">
+ <s:param name="projectId">${queue.task.projectId}</s:param>
+ </s:url>
+ <s:a href="%{cancelUrl}"><img src="<s:url value='/images/cancelbuild.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0"></s:a>
+ </redback:ifAuthorized>
+ <redback:elseAuthorized>
+ <img src="<s:url value='/images/cancelbuild_disabled.gif' includeParams="none"/>" alt="<s:text name='cancel'/>" title="<s:text name='cancel'/>" border="0">
+ </redback:elseAuthorized>
+ </ec:column>
+ </ec:row>
+ </ec:table>
+ </c:if>
+ <c:if test="${empty checkoutsInQueue}">
+ <s:text name="checkoutQueue.empty" />
+ </c:if>
</div>
<c:if test="${not empty checkoutsInQueue}">
<div class="functnbar3">