geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r705134 - in /geronimo/server/trunk/plugins/console/plugin-portlets/src/main: java/org/apache/geronimo/console/car/AssemblyListHandler.java webapp/WEB-INF/view/car/assemblylist.jsp webapp/WEB-INF/view/car/list.jsp
Date Thu, 16 Oct 2008 03:54:13 GMT
Author: linsun
Date: Wed Oct 15 20:54:12 2008
New Revision: 705134

URL: http://svn.apache.org/viewvc?rev=705134&view=rev
Log:
reorganize code a bit and enable hover plugin to show desp of the plugin

Modified:
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/list.jsp

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java?rev=705134&r1=705133&r2=705134&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
Wed Oct 15 20:54:12 2008
@@ -119,8 +119,10 @@
     }
     
     private void listPlugins(RenderRequest request, PluginInstaller pluginInstaller, PluginListType
data, List<String> appList) {
-        List<PluginInfoBean> plugins = new ArrayList<PluginInfoBean>();
-
+        List<PluginInfoBean> sysPlugins = new ArrayList<PluginInfoBean>();
+        List<PluginInfoBean> appPlugins = new ArrayList<PluginInfoBean>();
+        List<PluginInfoBean> groupPlugins = new ArrayList<PluginInfoBean>();
+        
         for (PluginType metadata: data.getPlugin()) {
 
             // ignore plugins which have no artifacts defined
@@ -137,6 +139,10 @@
                 plugin.setPlugin(metadata);
                 plugin.setPluginArtifact(pluginArtifact);
                 
+                if (metadata.isPluginGroup() != null && metadata.isPluginGroup())
{
+                    plugin.setIsPluginGroup(true);
+                }
+                
                 //determine if the plugin is a system plugin or application plugin
                 ArtifactType artifact = pluginArtifact.getModuleId();
                 String configId = artifact.getGroupId() + "/" + artifact.getArtifactId()
+ "/" 
@@ -144,21 +150,28 @@
                 for (String app : appList) {
                     if (app.equals(configId)) {
                         plugin.setIsSystemPlugin(false);
-                    }
+                        appPlugins.add(plugin);
+                    } 
                 }
                 
                 if (metadata.isPluginGroup() != null && metadata.isPluginGroup())
{
-                    plugin.setIsPluginGroup(true);
+                    groupPlugins.add(plugin);
+                }
+                
+                if (plugin.getIsSystemPlugin()) {
+                    sysPlugins.add(plugin);
                 }
-
-                plugins.add(plugin);
             }
         }
         
         // sort the plugin list based on the selected table column
-        sortPlugins(plugins, request);
+        sortPlugins(appPlugins, request);
+        sortPlugins(sysPlugins, request);
+        sortPlugins(groupPlugins, request);
 
         // save everything in the request
-        request.setAttribute("plugins", plugins);
+        request.setAttribute("appPlugins", appPlugins);
+        request.setAttribute("sysPlugins", sysPlugins);
+        request.setAttribute("groupPlugins", groupPlugins);
     }
 }
\ No newline at end of file

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp?rev=705134&r1=705133&r2=705134&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
Wed Oct 15 20:54:12 2008
@@ -132,7 +132,7 @@
 
 
 <c:choose>
-<c:when test="${fn:length(plugins) < 1}">
+<c:when test="${fn:length(appPlugins) < 1 || fn:length(sysPlugins) < 1 }">
   <fmt:message key="car.list.noPlugins" />
   <p>
   <form>
@@ -179,6 +179,11 @@
 <c:choose>
 <c:when test="${type eq 'Application Centric'}">   
 <p>Filter by category: <input name="filterbyca" onkeyup="filterTables(this, 'appPlugin',
'sysPlugin')" type="text"></p>
+</c:when>
+<c:otherwise>
+<p>Filter by category: <input name="filterbyca" onkeyup="filterTables(this, 'groupPlugin',
'appPlugin', 'sysPlugin')" type="text"></p>
+</c:otherwise>
+</c:choose>
 
 <table id="reqPlugin" border="0" cellpadding="3">
 <tr>
@@ -190,10 +195,10 @@
   <th class="DarkBackground">${column}</th>
   </c:forEach>
 </tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:forEach var="plugin" items="${groupPlugins}" varStatus="status">
 <c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
 <c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${plugin.isPluginGroup && artifact.artifactId eq 'framework'}">
+<c:if test="${artifact.artifactId eq 'framework'}">
 <tr>
   <td class="${style}">
     <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}" CHECKED/>
@@ -202,7 +207,7 @@
     <a href='<portlet:actionURL>
     <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
     <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
+    </portlet:actionURL>' title="${plugin.description}">${plugin.name}</a>
   </td>
   <td class="${style}">${artifact.version}</td>
   <td class="${style}">${plugin.category}</td>
@@ -212,9 +217,10 @@
 </table>
 <br/>
 
-<table id="appPlugin" border="0" cellpadding="3">
+<c:if test="${type eq 'Function Centric'}">   
+<table id="groupPlugin" border="0" cellpadding="3">
 <tr>
-  <td colspan="4"><h4><fmt:message key="car.list.applicationPlugin"/></h4></td>
+  <td colspan="4"><h4><fmt:message key="car.list.PluginGroup"/></h4></td>
 </tr>
 <tr>
   <th class="DarkBackground">&nbsp;</th>
@@ -222,19 +228,21 @@
   <th class="DarkBackground">${column}</th>
   </c:forEach>
 </tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:forEach var="plugin" items="${groupPlugins}" varStatus="status">
 <c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
 <c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${!plugin.isSystemPlugin}">
+<c:if test="${artifact.artifactId ne 'framework'}">
 <tr>
   <td class="${style}">
-    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+    <input type="checkbox" name="plugin" 
+           title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"

+           value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
   </td>
   <td class="${style}">
     <a href='<portlet:actionURL>
     <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
     <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
+    </portlet:actionURL>' title="${plugin.description}">${plugin.name}</a>
   </td>
   <td class="${style}">${artifact.version}</td>
   <td class="${style}">${plugin.category}</td>
@@ -243,48 +251,11 @@
 </c:forEach>
 </table>
 <br/>
-
-<table id="sysPlugin" border="0" cellpadding="3">
-<tr>
-  <td colspan="5"><h4><fmt:message key="car.list.systemPlugin"/></h4></td>
-</tr>
-<tr>
-  <th class="DarkBackground">&nbsp;</th>
-  <c:forEach var="column" items="Name,Version,Category,ConfigId">
-  <th class="DarkBackground">${column}</th>
-  </c:forEach>
-</tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
-<c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
-<c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${plugin.isSystemPlugin && artifact.artifactId ne 'framework'}">
-<tr>
-  <td class="${style}">
-    <input type="checkbox" name="plugin" 
-           title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"

-           value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
-  </td>
-  <td class="${style}">
-    <a href='<portlet:actionURL>
-      <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
-      <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
-  </td>
-  <td class="${style}">${artifact.version}</td>
-  <td class="${style}">${plugin.category}</td>
-  <td class="${style}">${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}</td>
-</tr>
 </c:if>
-</c:forEach>
-</table>
-</c:when>
 
-<c:otherwise>
-<p>Filter by category: <input name="filterbyca" onkeyup="filterTables(this, 'groupPlugin',
'appPlugin', 'sysPlugin')" type="text"></p>
-
-<table id="reqPlugin" border="0" cellpadding="3">
+<table id="appPlugin" border="0" cellpadding="3">
 <tr>
-  <td colspan="4"><h4><fmt:message key="car.list.requiredPlugin"/></h4></td>
+  <td colspan="4"><h4><fmt:message key="car.list.applicationPlugin"/></h4></td>
 </tr>
 <tr>
   <th class="DarkBackground">&nbsp;</th>
@@ -292,42 +263,43 @@
   <th class="DarkBackground">${column}</th>
   </c:forEach>
 </tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:forEach var="plugin" items="${appPlugins}" varStatus="status">
 <c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
 <c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${plugin.isPluginGroup && artifact.artifactId eq 'framework'}">
 <tr>
   <td class="${style}">
-    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}" CHECKED/>
+    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
   </td>
   <td class="${style}">
     <a href='<portlet:actionURL>
     <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
     <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
+    </portlet:actionURL>' title="${plugin.description}">${plugin.name}</a>
   </td>
   <td class="${style}">${artifact.version}</td>
   <td class="${style}">${plugin.category}</td>
-</tr>
-</c:if>    
+</tr>   
 </c:forEach>
 </table>
 <br/>
 
-<table id="groupPlugin" border="0" cellpadding="3">
+<c:choose>
+<c:when test="${type eq 'Application Centric'}"> 
+<!-- sysPlugin for application centric mode, which includes plugin groups -->
+<table id="sysPlugin" border="0" cellpadding="3">
 <tr>
-  <td colspan="4"><h4><fmt:message key="car.list.PluginGroup"/></h4></td>
+  <td colspan="5"><h4><fmt:message key="car.list.systemPlugin"/></h4></td>
 </tr>
 <tr>
   <th class="DarkBackground">&nbsp;</th>
-  <c:forEach var="column" items="Name,Version,Category">
+  <c:forEach var="column" items="Name,Version,Category,ConfigId">
   <th class="DarkBackground">${column}</th>
   </c:forEach>
 </tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:forEach var="plugin" items="${sysPlugins}" varStatus="status">
 <c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
 <c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${plugin.isPluginGroup && artifact.artifactId ne 'framework'}">
+<c:if test="${artifact.artifactId ne 'framework'}">
 <tr>
   <td class="${style}">
     <input type="checkbox" name="plugin" 
@@ -336,50 +308,20 @@
   </td>
   <td class="${style}">
     <a href='<portlet:actionURL>
-    <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
-    <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
-  </td>
-  <td class="${style}">${artifact.version}</td>
-  <td class="${style}">${plugin.category}</td>
-</tr>
-</c:if>    
-</c:forEach>
-</table>
-<br/>
-
-<table id="appPlugin" border="0" cellpadding="3">
-<tr>
-  <td colspan="4"><h4><fmt:message key="car.list.applicationPlugin"/></h4></td>
-</tr>
-<tr>
-  <th class="DarkBackground">&nbsp;</th>
-  <c:forEach var="column" items="Name,Version,Category">
-  <th class="DarkBackground">${column}</th>
-  </c:forEach>
-</tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
-<c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
-<c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${!plugin.isSystemPlugin}">
-<tr>
-  <td class="${style}">
-    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
-  </td>
-  <td class="${style}">
-    <a href='<portlet:actionURL>
-    <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
-    <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
+      <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+      <portlet:param name="mode" value="assemblyView-before"/>
+    </portlet:actionURL>' title="${plugin.description}">${plugin.name}</a>
   </td>
   <td class="${style}">${artifact.version}</td>
   <td class="${style}">${plugin.category}</td>
+  <td class="${style}">${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}</td>
 </tr>
-</c:if>    
+</c:if>
 </c:forEach>
 </table>
-<br/>
-
+</c:when>
+<c:otherwise>
+<!-- sysPlugin for function centric mode, which doesn't include plugin group -->
 <table id="sysPlugin" border="0" cellpadding="3">
 <tr>
   <td colspan="5"><h4><fmt:message key="car.list.systemPlugin"/></h4></td>
@@ -390,10 +332,10 @@
   <th class="DarkBackground">${column}</th>
   </c:forEach>
 </tr>
-<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:forEach var="plugin" items="${sysPlugins}" varStatus="status">
 <c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
 <c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
-<c:if test="${plugin.isSystemPlugin && !plugin.isPluginGroup}">
+<c:if test="${!plugin.isPluginGroup}">
 <tr>
   <td class="${style}">
     <input type="checkbox" name="plugin" 
@@ -404,7 +346,7 @@
     <a href='<portlet:actionURL>
       <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
       <portlet:param name="mode" value="assemblyView-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
+    </portlet:actionURL>' title="${plugin.description}">${plugin.name}</a>
   </td>
   <td class="${style}">${artifact.version}</td>
   <td class="${style}">${plugin.category}</td>
@@ -416,7 +358,6 @@
 </c:otherwise>
 </c:choose>
 
-
     <input type="submit" value='<fmt:message key="car.common.assemble"/>' onclick="if(!checkAllVal('plugin')){return
false;}else return true;"/>
     <input type="submit" value='<fmt:message key="consolebase.common.cancel"/>'
onclick="history.go(-1); return false;" />
 

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/list.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/list.jsp?rev=705134&r1=705133&r2=705134&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/list.jsp
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/list.jsp
Wed Oct 15 20:54:12 2008
@@ -78,7 +78,7 @@
       <portlet:param name="repo-pass" value="${repopass}"/>
       <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
       <portlet:param name="mode" value="viewForDownload-before"/>
-    </portlet:actionURL>'>${plugin.name}</a>
+    </portlet:actionURL>' title="${plugin.description}">${plugin.name}</a>
   </td>
   <td class="${style}">${artifact.version}</td>
   <td class="${style}">${plugin.category}</td>



Mime
View raw message