Author: wesleyhales
Date: 2008-03-03 22:18:08 -0500 (Mon, 03 Mar 2008)
New Revision: 10188
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/admin.jsp
Removed:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/admin.jsp
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/master.css
Log:
gave the admin portlet some love - still more to give
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-04
01:21:56 UTC (rev 10187)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-04
03:18:08 UTC (rev 10188)
@@ -35,6 +35,7 @@
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletURL;
+import javax.portlet.PortletRequestDispatcher;
import java.io.IOException;
import java.io.PrintWriter;
@@ -106,10 +107,15 @@
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
+ //PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("admin/admin.jsp");
+ //rd.include(request, response);
+
// Use an alias
PortletApplicationRegistry registry =
(PortletApplicationRegistry)getPortletContext().getAttribute("PortletApplicationDeployer");
//
+
+
for (ManagedPortletApplication application :
registry.getManagedPortletApplications())
{
PortletURL url = resp.createActionURL();
@@ -124,8 +130,23 @@
String startURL = url.toString();
//
- writer.print("<ul><li>Application " + application.getId()
+ " " + application.getStatus() +
- " <a href=\"" + startURL +
"\">Start</a> <a href=\"" + stopURL +
"\">Stop</a></li><ul>");
+ //writer.print("<ul><li>Application " +
application.getId() + " " + application.getStatus() +
+ // " <a href=\"" + startURL +
"\">Start</a> <a href=\"" + stopURL +
"\">Stop</a></li><ul>");
+ writer.print("<table class=\"admin-table\">");
+ writer.print("" +
+ " <tr>\n" +
+ " <td class=\"admin-app-header\"
colspan=\"3\"><h3>Application</h3></td>\n" +
+ " </tr>\n" +
+ " <tr class=\"admin-cat-header\">\n" +
+ " <td>ID</td>\n" +
+ " <td>Status</td>\n" +
+ " <td></td>\n" +
+ " </tr>" +
+ " <tr>\n" +
+ " <td>" + application.getId() +
"</td>\n" +
+ " <td>" + application.getStatus() +
"</td>\n" +
+ " <td><a href=\"" + startURL +
"\">Start</a> | <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
+ " </tr>");
//
for (ManagedPortletFilter filter : application.getManagedPortletFilters())
@@ -141,8 +162,24 @@
startURL = url.toString();
//
- writer.print("<li>Filter " + filter.getId() + " " +
filter.getStatus() + " <a href=\"" +
- startURL + "\">Start</a> <a href=\"" +
stopURL + "\">Stop</a></li>");
+ //writer.print("<li>Filter " + filter.getId() + " "
+ filter.getStatus() + " <a href=\"" +
+ // startURL + "\">Start</a> <a href=\"" +
stopURL + "\">Stop</a></li>");
+
+ writer.print("" +
+ " <tr>\n" +
+ " <td class=\"admin-filter-header\"
colspan=\"3\"><h3>Filter</h3></td>\n" +
+ " </tr>\n" +
+ //" <tr class=\"admin-cat-header\">\n" +
+ //" <td>ID</td>\n" +
+ //" <td>Status</td>\n" +
+ //" <td></td>\n" +
+ //" </tr>" +
+ " <tr>\n" +
+ " <td>" + filter.getId() + "</td>\n"
+
+ " <td>" + filter.getStatus() +
"</td>\n" +
+ " <td><a href=\"" + startURL +
"\">Start</a> | <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
+ " </tr>");
+
}
//
@@ -159,14 +196,37 @@
startURL = url.toString();
//
- writer.print("<li>Container " + container.getId() + "
" + container.getStatus() + " <a href=\"" +
- startURL + "\">Start</a> <a href=\"" +
stopURL + "\">Stop</a></li>");
+ //writer.print("<li>Container " + container.getId() + "
" + container.getStatus() + " <a href=\"" +
+ // startURL + "\">Start</a> <a href=\"" +
stopURL + "\">Stop</a></li>");
+
+ writer.print("" +
+ " <tr>\n" +
+ " <td class=\"admin-container-header\"
colspan=\"3\"><h3>Container</h3></td>\n" +
+ " </tr>\n" +
+ //" <tr class=\"admin-cat-header\">\n" +
+ //" <td>ID</td>\n" +
+ //" <td>Status</td>\n" +
+ //" <td></td>\n" +
+ //" </tr>" +
+ " <tr>\n" +
+ " <td>" + container.getId() +
"</td>\n" +
+ " <td>" + container.getStatus() +
"</td>\n" +
+ " <td><a href=\"" + startURL +
"\">Start</a> | <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
+ " </tr>");
}
- writer.print("</ul></ul>");
+ writer.print("</table>");
}
//
writer.close();
}
+
}
+
+ /*protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
+ {
+ PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("admin/admin.jsp");
+ rd.include(request, response);
+ }*/
+//}
Copied: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/admin.jsp
(from rev 10183,
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/admin.jsp)
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/admin.jsp
(rev 0)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/admin.jsp 2008-03-04
03:18:08 UTC (rev 10188)
@@ -0,0 +1,14 @@
+<%@ page contentType="text/html" %>
+<%@ page language="java" %>
+<%@ taglib prefix="jbp" tagdir="/WEB-INF/tags/portal" %>
+<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
+<%@ page isELIgnored="false" %>
+
+<%@ include file="/layouts/header.jsp" %>
+
+<portal:page>
+
+ <jbp:portlet name="AdminPortlet"
applicationName="simple-portal"/>
+
+</portal:page>
+<%@ include file="/layouts/footer.jsp" %>
\ No newline at end of file
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/master.css
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/master.css 2008-03-04
01:21:56 UTC (rev 10187)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/master.css 2008-03-04
03:18:08 UTC (rev 10188)
@@ -373,4 +373,36 @@
div#container div#content div.wiki-content p {
padding: 5px;
+}
+
+/*-------------------------------------Admin*/
+
+.admin-table {
+ width: 100%;
+ margin: 15px 0 0 0;
+}
+
+.admin-table td.admin-app-header {
+ background-color: #999999;
+}
+
+.admin-table td.admin-filter-header {
+ background-color: #cccccc;
+}
+
+.admin-table td.admin-container-header {
+ background-color: #dddddd;
+}
+
+.admin-table td.admin-container-header h3{
+ color: #999;
+}
+
+.admin-table tr.admin-cat-header td{
+ border-bottom: 1px solid #cccccc;
+ width: 33%;
+}
+
+.admin-table tr.admin-cat-header td{
+ font-weight: bold
}
\ No newline at end of file
Deleted: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/admin.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/admin.jsp 2008-03-04
01:21:56 UTC (rev 10187)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/demo/admin.jsp 2008-03-04
03:18:08 UTC (rev 10188)
@@ -1,14 +0,0 @@
-<%@ page contentType="text/html" %>
-<%@ page language="java" %>
-<%@ taglib prefix="xportal" tagdir="/WEB-INF/tags/portal" %>
-<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
-<%@ page isELIgnored="false" %>
-
-<%@ include file="/layouts/header.jsp" %>
-
-<portal:page>
-
- <xportal:portlet name="AdminPortlet"
applicationName="simple-portal"/>
-
-</portal:page>
-<%@ include file="/layouts/footer.jsp" %>
\ No newline at end of file
Show replies by date