geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject 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
Date Mon, 12 Dec 2005 01:19:54 GMT
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">&nbsp;Component Name</th><th>&nbsp;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}">&nbsp;${configInfo.configID}</td>
+        <td width="100" class="${backgroundClass}">&nbsp;${configInfo.state}</td>
+        <td width="100" class="${backgroundClass}">
+<c:if test="${configInfo.state.running}">&nbsp;<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}">&nbsp;<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}">&nbsp;<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>



Mime
View raw message