geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1296582 - in /geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main: java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java webapp/WEB-INF/view/configmanager/normal.jsp
Date Sat, 03 Mar 2012 07:26:06 GMT
Author: xiaming
Date: Sat Mar  3 07:26:06 2012
New Revision: 1296582

URL: http://svn.apache.org/viewvc?rev=1296582&view=rev
Log:
GERONIMO-6189 Add virtual host info to web application, provided by xie zhi

Modified:
    geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
    geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp

Modified: geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=1296582&r1=1296581&r2=1296582&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
Sat Mar  3 07:26:06 2012
@@ -244,6 +244,10 @@ public class ConfigManagerPortlet extend
                                 if(entry.getKey().getNameProperty(NameFactory.J2EE_TYPE).equals(NameFactory.WEB_MODULE))
{
                                     details.getContextPaths().add((String)entry.getValue().getAttribute("contextPath"));
                                     details.setDisplayName(((WebAppInfo)entry.getValue().getAttribute("webAppInfo")).displayName);
+                                    if (null != entry.getValue().getAttribute("virtualServer")
+                                    		&& !"".equals(entry.getValue().getAttribute("virtualServer")))
{
+                                    	details.setVirtualServer((String)entry.getValue().getAttribute("virtualServer"));
+                                    }
                                 }
                             }
                         }
@@ -498,6 +502,7 @@ public class ConfigManagerPortlet extend
         //This flag is used to indicate whether it is the client side if the module is a
client application
         private boolean clientAppServerSide = false;
         private String displayName;
+        private String virtualServer;
 
         public ModuleDetails(Artifact configId, ConfigurationModuleType type, State state)
{
             this.configId = configId;
@@ -567,5 +572,14 @@ public class ConfigManagerPortlet extend
         public boolean isClientAppServerSide() {
             return this.clientAppServerSide;
         }
+
+        public String getVirtualServer() {
+           return virtualServer;
+       }
+
+       public void setVirtualServer(String virtualServer) {
+           this.virtualServer = virtualServer;
+       }
+     
     }
 }

Modified: geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp?rev=1296582&r1=1296581&r2=1296582&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
(original)
+++ geronimo/server/branches/3.0-beta/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
Sat Mar  3 07:26:06 2012
@@ -246,9 +246,16 @@ function toggleShowDependenciesMode() {
         <c:if test="${showWebInfo}">
             <td width="150">
             <c:if test="${moduleDetails.state.running}">
-            	<c:forEach var="contextPath" items="${moduleDetails.contextPaths}">
-            		<a href="${contextPath}">${contextPath}</a><br/>
-            	</c:forEach>
+                <c:forEach var="contextPath" items="${moduleDetails.contextPaths}">
+                    <c:choose>
+                        <c:when test="${null==moduleDetails.virtualServer||''==moduleDetails.virtualServer}">
+                            <a href="${contextPath}">${contextPath}</a><br/>
+                        </c:when>
+                        <c:when test="${null!=moduleDetails.virtualServer&&''!=moduleDetails.virtualServer}">
+                            <a href="${contextPath}" title="URL refer to http://${moduleDetails.virtualServer}:<port-number>${contextPath}">${contextPath}</a><br/>
+                        </c:when>
+                    </c:choose>
+                </c:forEach>
             </c:if>
             </td>
         </c:if>



Mime
View raw message