You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2005/12/12 02:19:54 UTC
svn commit: r356083 - in /geronimo/trunk/applications/console-standard/src:
java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
webapp/WEB-INF/view/configmanager/normal.jsp
Author: ammulder
Date: Sun Dec 11 17:19:53 2005
New Revision: 356083
URL: http://svn.apache.org/viewcvs?rev=356083&view=rev
Log:
Update the configuration list portlet (GERONIMO-1122)
Modified:
geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/configmanager/normal.jsp
Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=356083&r1=356082&r2=356083&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Sun Dec 11 17:19:53 2005
@@ -45,6 +45,9 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Collections;
public class ConfigManagerPortlet extends BasePortlet {
@@ -223,6 +226,13 @@
// in the unlikely event it does, just continue
}
}
+ Collections.sort(configInfo, new Comparator() {
+ public int compare(Object o1, Object o2) {
+ ConfigurationInfo ci1 = (ConfigurationInfo) o1;
+ ConfigurationInfo ci2 = (ConfigurationInfo) o2;
+ return ci1.getConfigID().toString().compareTo(ci2.getConfigID().toString());
+ }
+ });
renderRequest.setAttribute("configurations", configInfo);
messageInstalled = configInfo.size() == 0 ? "No modules found of this type<br /><br />"
: "";
Modified: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/configmanager/normal.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/configmanager/normal.jsp?rev=356083&r1=356082&r2=356083&view=diff
==============================================================================
--- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/configmanager/normal.jsp (original)
+++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/view/configmanager/normal.jsp Sun Dec 11 17:19:53 2005
@@ -1,21 +1,36 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<portlet:defineObjects/>
-<table width="100%">
- <br />${messageInstalled} ${messageStatus}
- <c:forEach var="configInfo" items="${configurations}">
- <tr>
- <td width="100">${configInfo.state}</td>
- <td width="100">
-<c:if test="${configInfo.state.running}"><a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="stop"/></portlet:actionURL>">Stop</a></c:if>
-<c:if test="${configInfo.state.stopped}"><a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="start"/></portlet:actionURL>">Start</a></c:if>
-<c:if test="${configInfo.state.failed}"><a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="stop"/></portlet:actionURL>">Stop</a></c:if>
- </td>
- <td width="100">
- <a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="uninstall"/></portlet:actionURL>">Uninstall</a>
- </td>
- <td>${configInfo.configID}</td>
- </tr>
- </c:forEach>
+<br />
+<br />
+<table width="100%">
+ <tr class="DarkBackground">
+ <th align="left"> Component Name</th><th> State</th><th align="center" colspan="2">Commands</th>
+ </tr>
+ <c:set var="backgroundClass" value='MediumBackground'/>
+ <c:forEach var="configInfo" items="${configurations}">
+ <c:choose>
+ <c:when test="${backgroundClass == 'MediumBackground'}" >
+ <c:set var="backgroundClass" value='LightBackground'/>
+ </c:when>
+ <c:otherwise>
+ <c:set var="backgroundClass" value='MediumBackground'/>
+ </c:otherwise>
+ </c:choose>
+ <tr>
+ <td class="${backgroundClass}"> ${configInfo.configID}</td>
+ <td width="100" class="${backgroundClass}"> ${configInfo.state}</td>
+ <td width="100" class="${backgroundClass}">
+<c:if test="${configInfo.state.running}"> <a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="stop"/></portlet:actionURL>">Stop</a></c:if>
+<c:if test="${configInfo.state.stopped}"> <a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="start"/></portlet:actionURL>">Start</a></c:if>
+<c:if test="${configInfo.state.failed}"> <a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="stop"/></portlet:actionURL>">Stop</a></c:if>
+ </td>
+ <td width="100" class="${backgroundClass}">
+ <a href="<portlet:actionURL><portlet:param name="configId" value="${configInfo.configID}"/><portlet:param name="action" value="uninstall"/></portlet:actionURL>">Uninstall</a>
+ </td>
+ </tr>
+ </c:forEach>
</table>
+
+<p>${messageInstalled} ${messageStatus}</p>