You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2010/01/28 00:32:04 UTC
svn commit: r903905 - in
/portals/jetspeed-2/applications/j2-admin/trunk/src/main:
java/org/apache/jetspeed/portlets/spaces/
resources/org/apache/jetspeed/portlets/spaces/
resources/org/apache/jetspeed/portlets/spaces/resources/ webapp/WEB-INF/
webapp/...
Author: taylor
Date: Wed Jan 27 23:32:03 2010
New Revision: 903905
URL: http://svn.apache.org/viewvc?rev=903905&view=rev
Log:
rewrote spaces and environments service from prototype to a full implementation
integrating with j2-admin now... (still ongoing)
moved psml templates out of /_user to /_template
started work on a spaces list admin portlet
Added:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesList.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/
portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/
portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-list.jsp
Removed:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/JetspeedNavigator.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/navigator.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces.vm
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/cache/cacheMonitor.jsp
portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java?rev=903905&r1=903904&r2=903905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpaceNavigator.java Wed Jan 27 23:32:03 2010
@@ -29,7 +29,6 @@
import org.apache.jetspeed.CommonPortletServices;
import org.apache.jetspeed.administration.PortalAdministration;
-import org.apache.jetspeed.page.PageManager;
import org.apache.jetspeed.request.RequestContext;
import org.apache.jetspeed.spaces.Space;
import org.apache.jetspeed.spaces.Spaces;
@@ -44,9 +43,11 @@
*/
public class SpaceNavigator extends GenericServletPortlet
{
- private Spaces spacesService;
+ public static final String NEW_SPACE_PATH_PREF = "newSpacePath";
+ public static final String NEW_SPACE_PATH_DEFAULT = "/spaces.psml";
+
+ private Spaces spacesService;
private PortalAdministration admin;
- protected PageManager pageManager;
public void init(PortletConfig config) throws PortletException
{
@@ -60,11 +61,6 @@
CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
if (null == admin) { throw new PortletException(
"Failed to find the Portal Administration on portlet initialization"); }
- pageManager = (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
- if (null == pageManager)
- {
- throw new PortletException("Failed to find the Page Manager on portlet initialization");
- }
}
@SuppressWarnings("unchecked")
@@ -159,12 +155,15 @@
if (navAction != null)
{
// TODO: make this link configurable. We need JetspeedLinks like in Jetspeed-1
- String path = admin.getPortalURL(actionRequest, actionResponse, "/Administrative/spaces.psml");
+ PortletMessaging.cancel(actionRequest, "SpaceList", "spaceChange");
+ String newSpacePath = actionRequest.getPreferences().getValue(NEW_SPACE_PATH_PREF, NEW_SPACE_PATH_DEFAULT);
+
+ String path = admin.getPortalURL(actionRequest, actionResponse, newSpacePath);
actionResponse.sendRedirect(path);
return;
}
}
-
+
protected Space getSpaceFromName(String spaceName)
{
List<Space> spaces = spacesService.listSpaces();
Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesList.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesList.java?rev=903905&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesList.java (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesList.java Wed Jan 27 23:32:03 2010
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ */
+package org.apache.jetspeed.portlets.spaces;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.spaces.Space;
+import org.apache.jetspeed.spaces.Spaces;
+import org.apache.portals.bridges.common.GenericServletPortlet;
+import org.apache.portals.messaging.PortletMessaging;
+
+/**
+ * Spaces List
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class SpacesList extends GenericServletPortlet
+{
+ private Spaces spacesService;
+
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ PortletContext context = getPortletContext();
+ spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
+ if (spacesService == null)
+ {
+ throw new PortletException(
+ "Could not get instance of portal spaces service component");
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void doView(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException
+ {
+ List<Space> spaces = (List<Space>)request.getPortletSession().getAttribute("spaces");
+ if (spaces == null)
+ {
+ spaces = spacesService.listSpaces();
+ request.getPortletSession().setAttribute("spaces", spaces);
+ }
+ request.setAttribute("spaces", spaces);
+ String space = (String)request.getPortletSession().getAttribute("space");
+ request.setAttribute("space", space);
+ try
+ {
+ super.doView(request, response);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ }
+ }
+
+ @Override
+ public void processAction(ActionRequest request, ActionResponse response)
+ throws PortletException, IOException
+ {
+ String target = request.getParameter("edit");
+ if (target != null)
+ {
+ PortletMessaging.publish(request, "SpaceList", "spaceChange", target);
+ }
+ else
+ {
+ target = request.getParameter("delete");
+ if (target != null)
+ {
+ //spacesService.removeSpace(null, target);
+ }
+ }
+ }
+
+}
\ No newline at end of file
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java?rev=903905&r1=903904&r2=903905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/SpacesManager.java Wed Jan 27 23:32:03 2010
@@ -17,7 +17,6 @@
package org.apache.jetspeed.portlets.spaces;
import java.io.IOException;
-import java.util.Locale;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -32,10 +31,9 @@
import org.apache.jetspeed.administration.PortalAdministration;
import org.apache.jetspeed.decoration.DecorationFactory;
import org.apache.jetspeed.om.folder.Folder;
-import org.apache.jetspeed.om.page.Fragment;
-import org.apache.jetspeed.om.portlet.GenericMetadata;
import org.apache.jetspeed.page.PageManager;
import org.apache.jetspeed.portlets.toolbox.ThemeBean;
+import org.apache.jetspeed.spaces.Space;
import org.apache.jetspeed.spaces.Spaces;
import org.apache.portals.bridges.common.GenericServletPortlet;
import org.apache.portals.messaging.PortletMessaging;
@@ -51,8 +49,8 @@
public class SpacesManager extends GenericServletPortlet
{
- private static final String DEFAULT_SPACE_TEMPLATE = "/_user/template-space";
- private static final String SPACE_TEMPLATE = "SpaceTemplate";
+ private static final String DEFAULT_SPACE_TEMPLATE = "/_template/space";
+ private static final String SPACE_TEMPLATE = "spaceTemplate";
private static Logger log = LoggerFactory.getLogger(SpacesManager.class);
@@ -95,7 +93,13 @@
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
- String tab = (String)request.getPortletSession().getAttribute("tab", PortletSession.PORTLET_SCOPE);
+ Space space = null;
+ String current = (String)PortletMessaging.receive(request, "SpaceList", "spaceChange");
+ if (current != null)
+ {
+ space = this.spacesService.lookupSpace(current);
+ }
+ String tab = (String)request.getPortletSession().getAttribute("tab", PortletSession.PORTLET_SCOPE);
if (tab == null)
{
tab = "portlets";
@@ -103,6 +107,7 @@
}
request.setAttribute("tab", tab);
request.setAttribute("themes", ThemeBean.retrieveThemes(request, decorationFactory));
+ request.setAttribute("space", space);
super.doView(request, response);
}
@@ -111,44 +116,33 @@
{
String name = scrapeParameter(actionRequest, "spaceName");
String title = scrapeParameter(actionRequest, "spaceTitle");
-// String description = scrapeParameter(actionRequest, "spaceDescription");
-// String URL = scrapeParameter(actionRequest, "spaceURL");
- String theme = scrapeParameter(actionRequest, "theme");
-// String share = scrapeParameter(actionRequest, "share");
-// String admin = scrapeParameter(actionRequest, "admin");
-// String dev = scrapeParameter(actionRequest, "dev");
-// String engineering = scrapeParameter(actionRequest, "engineering");
-
+ String description = scrapeParameter(actionRequest, "spaceDescription");
+ String theme = scrapeParameter(actionRequest, "theme");
if (name.length() > 0)
{
try
{
- String folderName = name.replace(' ', '_');
- String spacePath = "/" + folderName; // TODO: make this configurable
-
- String templateFolderPath = actionRequest.getPreferences().getValue(SPACE_TEMPLATE, DEFAULT_SPACE_TEMPLATE);
-
+ String spaceName = name.replace(' ', '_');
+ String templateFolderPath = actionRequest.getPreferences().getValue(SPACE_TEMPLATE, DEFAULT_SPACE_TEMPLATE);
if (!pageManager.folderExists(templateFolderPath))
{
throw new PortletException("Space template folder does not exist: " + templateFolderPath);
- }
-
+ }
Folder templateFolder = pageManager.getFolder(templateFolderPath);
- Folder spaceFolder = createSpaceFolder(spacePath, templateFolder, null);
-
- spaceFolder.setDefaultDecorator(theme, Fragment.LAYOUT);
- spaceFolder.setDefaultDecorator(theme, Fragment.PORTLET);
- GenericMetadata metadata = spaceFolder.getMetadata();
- metadata.addField(Locale.ENGLISH, "space-owner", actionRequest.getUserPrincipal().getName());
- spaceFolder.setTitle((title == null) ? name : title);
- pageManager.updateFolder(spaceFolder);
+ String owner = actionRequest.getUserPrincipal().getName();
+ Space space = spacesService.createSpace(spaceName, templateFolder, owner);
+ space.setTheme(theme);
+ space.setTitle((title == null) ? name : title);
+ space.setDescription((description == null) ? "" : description);
+ spacesService.storeSpace(space);
// TODO: remove publish to JetspeedNavigator when replaced/removed for Space+PageNavigator
- PortletMessaging.publish(actionRequest, "JetspeedNavigator", "spaceChange", name);
+ PortletMessaging.publish(actionRequest, "SpaceList", "spaceChange", name);
PortletMessaging.publish(actionRequest, "SpaceNavigator", "spaceChange", name);
PortletMessaging.publish(actionRequest, "PageNavigator", "spaceChange", name);
+
// redirect
- String path = admin.getPortalURL(actionRequest, actionResponse, spacePath);
+ String path = admin.getPortalURL(actionRequest, actionResponse, space.getPath());
actionResponse.sendRedirect(path);
}
catch (Exception e)
@@ -167,38 +161,4 @@
return param;
}
- private Folder createSpaceFolder(String spacePath, Folder templateFolder, String owner)
- {
- Folder spaceFolder = null;
- boolean found = false;
-
- try
- {
- spaceFolder = this.pageManager.getFolder(spacePath);
- found = (spaceFolder != null);
- }
- catch (Exception ignore)
- {
- }
-
- try
- {
- if (!found)
- {
- pageManager.deepCopyFolder(templateFolder, spacePath, owner);
- }
- else
- {
- pageManager.deepMergeFolder(templateFolder, spacePath, owner);
- }
-
- spaceFolder = pageManager.getFolder(spacePath);
- }
- catch (Exception e)
- {
- log.error("Failed to copy or merge folder.", e);
- }
-
- return spaceFolder;
- }
}
\ No newline at end of file
Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties?rev=903905&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/spaces/resources/SpacesResources.properties Wed Jan 27 23:32:03 2010
@@ -0,0 +1,25 @@
+# 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.
+#
+# $Id: CacheMonitorResources.properties 773302 2009-05-10 03:34:06Z taylor $
+#
+
+# DO NOT TRANSLATE & DO NOT INCLUDE IN L10N PROPERTIES FILE
+spaces.label.title=Title
+spaces.label.description=Description
+spaces.label.owner=Owner
+spaces.table.title=Spaces
+spaces.label.edit=Edit
+spaces.label.delete=Delete
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml?rev=903905&r1=903904&r2=903905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/portlet.xml Wed Jan 27 23:32:03 2010
@@ -559,7 +559,7 @@
</preference>
<preference>
<name>newUserTemplateDirectory</name>
- <value>/_user/template/</value>
+ <value>/_template/new-user/</value>
</preference>
<preference>
<name>subsiteRootFolder</name>
@@ -1218,7 +1218,7 @@
</preference>
<preference>
<name>newUserTemplateDirectory</name>
- <value>/_user/template</value>
+ <value>/_template/new-user/</value>
</preference>
<preference>
<name>requiredRole</name>
@@ -2090,7 +2090,7 @@
</preference>
<preference>
<name>newUserTemplateDirectory</name>
- <value>/_user/template-dev/</value>
+ <value>/_template/dev/</value>
</preference>
<preference>
<name>requiredRole</name>
@@ -2111,33 +2111,6 @@
</portlet-preferences>
</portlet>
- <portlet id="JetspeedNavigator">
- <description>Jetspeed spaces navigation management controller.</description>
- <portlet-name>JetspeedNavigator</portlet-name>
- <display-name>Jetspeed Navigator</display-name>
- <portlet-class>org.apache.jetspeed.portlets.spaces.JetspeedNavigator</portlet-class>
- <init-param>
- <name>ViewPage</name>
- <value>/WEB-INF/view/spaces/navigator.jsp</value>
- </init-param>
- <init-param>
- <name>portlet-icon</name>
- <value>lock.png</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>VIEW</portlet-mode>
- <portlet-mode>EDIT</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <portlet-info>
- <title>Jetspeed Navigator</title>
- <short-title>Navigator</short-title>
- <keywords>admin,spaces,space,navigator,pages,nav</keywords>
- </portlet-info>
- </portlet>
-
<portlet id="JetspeedToolbox">
<description>Jetspeed toolbox and portlet selection controller.</description>
<portlet-name>JetspeedToolbox</portlet-name>
@@ -2241,6 +2214,12 @@
<short-title>Spaces</short-title>
<keywords>admin,spaces,space,manager</keywords>
</portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>spaceTemplate</name>
+ <value>/_template/space/</value>
+ </preference>
+ </portlet-preferences>
</portlet>
<portlet id="SpaceNavigator">
@@ -2268,6 +2247,12 @@
<short-title>SpaceNavigator</short-title>
<keywords>admin,spaces,space,navigator,pages,nav</keywords>
</portlet-info>
+ <portlet-preferences>
+ <preference>
+ <name>newSpacePath</name>
+ <value>/spaces.psml</value>
+ </preference>
+ </portlet-preferences>
</portlet>
<portlet id="PageNavigator">
@@ -2293,6 +2278,27 @@
</portlet-info>
</portlet>
+ <portlet id="SpacesList">
+ <description>Jetspeed Spaces Administrative List.</description>
+ <portlet-name>SpacesList</portlet-name>
+ <display-name>Spaces List</display-name>
+ <portlet-class>org.apache.jetspeed.portlets.spaces.SpacesList</portlet-class>
+ <init-param>
+ <name>ViewPage</name>
+ <value>/WEB-INF/view/spaces/spaces-list.jsp</value>
+ </init-param>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+ <portlet-info>
+ <title>Spaces List</title>
+ <short-title>Spaces</short-title>
+ <keywords>admin,spaces,space,pages,list</keywords>
+ </portlet-info>
+ </portlet>
+
<portlet id="BreadcrumbMenu">
<description>Jetspeed Breadcrumb Menu widget</description>
<portlet-name>BreadcrumbMenu</portlet-name>
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/cache/cacheMonitor.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/cache/cacheMonitor.jsp?rev=903905&r1=903904&r2=903905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/cache/cacheMonitor.jsp (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/cache/cacheMonitor.jsp Wed Jan 27 23:32:03 2010
@@ -40,23 +40,23 @@
</tr>
<tr>
- <th class="portlet-section-subheader"><fmt:message key="cachemonitor.label.name"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.maxmemory"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.maxdisk"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.idle"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.live"/></td>
- <th class="portlet-section-subheader"> </td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.memsize"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.disksize"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.avgget"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.hits"/></td>
- <th class="portlet-section-subheader"style="text-align: right"><fmt:message key="cachemonitor.label.misses"/></td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.evictions"/></td>
- <th class="portlet-section-subheader"> </td>
- <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.inmemsize"/></td>
- <th class="portlet-section-subheader"> </td>
- <th class="portlet-section-subheader"> </td>
- <th class="portlet-section-subheader"> </td>
+ <th class="portlet-section-subheader"><fmt:message key="cachemonitor.label.name"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.maxmemory"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.maxdisk"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.idle"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.live"/></th>
+ <th class="portlet-section-subheader"> </th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.memsize"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.disksize"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.avgget"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.hits"/></th>
+ <th class="portlet-section-subheader"style="text-align: right"><fmt:message key="cachemonitor.label.misses"/></th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.evictions"/></th>
+ <th class="portlet-section-subheader"> </th>
+ <th class="portlet-section-subheader" style="text-align: right"><fmt:message key="cachemonitor.label.inmemsize"/></th>
+ <th class="portlet-section-subheader"> </th>
+ <th class="portlet-section-subheader"> </th>
+ <th class="portlet-section-subheader"> </thd>
</tr>
<%
NumberFormat pf = new DecimalFormat("##0.000");
Added: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-list.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-list.jsp?rev=903905&view=auto
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-list.jsp (added)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-list.jsp Wed Jan 27 23:32:03 2010
@@ -0,0 +1,55 @@
+<%--
+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.
+
+--%>
+<%@page contentType="text/html" %>
+<%@page import="java.util.List"%>
+<%@page import="org.apache.jetspeed.spaces.Space"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+<fmt:setBundle basename="org.apache.jetspeed.portlets.spaces.resources.SpacesResources" />
+<%
+ String current = ((String)renderRequest.getAttribute("space"));
+ List<Space> spaces = (List<Space>)renderRequest.getAttribute("spaces");
+%>
+<table width='100%'>
+ <tr>
+ <th class="portlet-section-subheader"><fmt:message key="spaces.label.title"/></th>
+ <th class="portlet-section-subheader"><fmt:message key="spaces.label.owner"/></th>
+ <th class="portlet-section-subheader" colspan="4"></th>
+ </tr>
+<%
+for (Space space : spaces)
+{
+ String style = (current != null && current.equals(space.getName())) ? "portlet-section-alternate" : "portlet-section-body";
+%>
+ <tr>
+ <td class="<%=style%>"><a href="<portlet:actionURL><portlet:param name='edit' value='<%=space.getName()%>'/></portlet:actionURL>"><%=space.getTitle()%></a></td>
+ <td class="<%=style%>"><%=space.getOwner()%></td>
+ <td class="<%=style%>"> </td>
+ <td class="<%=style%>"><a href="<portlet:actionURL><portlet:param name='edit' value='<%=space.getName()%>'/></portlet:actionURL>"><fmt:message key="spaces.label.edit"/></a></td>
+ <td class="<%=style%>"> </td>
+ <td class="<%=style%>"><a href="<portlet:actionURL><portlet:param name='delete' value='<%=space.getName()%>'/></portlet:actionURL>"><fmt:message key="spaces.label.delete"/></a></td>
+ </tr>
+<%
+}
+%>
+ <tr>
+ <th class="portlet-section-header" colspan="6"></th>
+ </tr>
+</table>
+
Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp?rev=903905&r1=903904&r2=903905&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/webapp/WEB-INF/view/spaces/spaces-manager.jsp Wed Jan 27 23:32:03 2010
@@ -36,10 +36,7 @@
//String tab = (String)renderRequest.getAttribute("tab");
%>
<form id='jsSpacesManagement' method="POST" action='<portlet:actionURL/>'>
-<table style="border-collapse: collapse; width: 600px; margin-top: 8px; float: left;">
- <tr>
- <th class="portlet-section-header" colspan="2">Add a Space...</th>
- </tr>
+<table width="100%">
<tr>
<td>
<table>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org