java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java |
69 ++++++++++
java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java |
8 -
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml |
18 ++
java/code/webapp/WEB-INF/nav/ssm.xml |
3
java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp |
29 ++++
java/code/webapp/WEB-INF/struts-config.xml |
11 +
web/html/nav/ssm.xml |
2
7 files changed, 132 insertions(+), 8 deletions(-)
New commits:
commit d3a660234af5df3d3775aea60d523c25e8126858
Author: Colin Coe <coec(a)war.coesta.com>
Date: Sat Oct 2 20:59:35 2010 +0800
Port /network/systems/ssm/system_list.pxt
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java
b/java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java
new file mode 100644
index 0000000..489bebd
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/ListSystemsAction.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2010 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.action.ssm;
+
+import com.redhat.rhn.domain.rhnset.RhnSet;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.action.systems.SystemListSetupAction;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.DynaActionForm;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * ListSystemsAction
+ * @version $Rev$
+ */
+public class ListSystemsAction extends RhnAction {
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+
+ RequestContext rctx = new RequestContext(request);
+ User user = rctx.getLoggedInUser();
+
+ if (context.wasDispatched("ssm.list.systems.confirmbutton")) {
+ RhnSet set = RhnSetDecl.SYSTEMS.get(context.getLoggedInUser());
+
+ DynaActionForm daForm = (DynaActionForm)formIn;
+
+ // Logic to remove hosts from SSM goes here
+
+ return mapping.findForward("confirm");
+ }
+
+ new SystemListSetupAction().execute(mapping, formIn, request, response);
+// ListHelper helper = new ListHelper(this, request);
+// helper.setListName("systemList");
+// helper.setDataSetName("pageList");
+// helper.execute();
+
+ return mapping.findForward("default");
+ }
+}
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
index ac87677..e030d38 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemGroupListSetupAction.java
@@ -165,13 +165,13 @@ public class SystemGroupListSetupAction extends RhnAction {
* TODO: make this an ActionForward
*/
try {
- response.sendRedirect("/network/systems/ssm/system_list.pxt");
+ response.sendRedirect("/rhn/systems/ssm/ListSystems.do");
}
catch (IOException exc) {
// This really shouldn't happen, but just in case, log and
// return.
LOG.error("IOException when trying to redirect to " +
- "/network/systems/ssm/system_list.pxt", exc);
+ "/rhn/systems/ssm/ListSystems.do", exc);
}
return null;
@@ -237,13 +237,13 @@ public class SystemGroupListSetupAction extends RhnAction {
* TODO: make this an ActionForward
*/
try {
- response.sendRedirect("/network/systems/ssm/system_list.pxt");
+ response.sendRedirect("/rhn/systems/ssm/ListSystems.do");
}
catch (IOException exc) {
// This really shouldn't happen, but just in case, log and
// return.
LOG.error("IOException when trying to redirect to " +
- "/network/systems/ssm/system_list.pxt", exc);
+ "/rhn/systems/ssm/ListSystems.do", exc);
}
return null;
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index beb458f..768934e 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5376,7 +5376,7 @@ value for this entitlement, excluding the default organization's
consumption.</s
</trans-unit>
<trans-unit id="ssm.overview.systems.list">
- <source><a
href="/network/systems/ssm/system_list.pxt">List the
systems</a> you have selected to work with</source>
+ <source><a
href="/rhn/systems/ssm/ListSystems.do">List the systems</a>
you have selected to work with</source>
</trans-unit>
<trans-unit id="ssm.overview.errata">
@@ -5460,6 +5460,19 @@ value for this entitlement, excluding the default
organization's consumption.</s
</trans-unit>
</group>
+<!-- SSM System List -->
+ <group>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/systems/ssm/ListSystems.do</context>
+ </context-group>
+ <trans-unit id="ssm.list.systems.header">
+ <source>Selected Systems List</source>
+ </trans-unit>
+ <trans-unit id="ssm.list.systems.summary">
+ <source><p>Below are your selected systems. All actions
taken within this interface will apply only to the relevant systems in this
set.</p><p>To remove systems from the current set, un-check
those systems to be removed.</p></source>
+ </trans-unit>
+ </group>
+
<!-- SSM System Migration -->
<group>
<context-group name="ctx">
@@ -5476,7 +5489,8 @@ value for this entitlement, excluding the default organization's
consumption.</s
</trans-unit>
</group>
- <!-- SSM System list-->
+
+ <!-- SSM System Delete Confirm-->
<group>
<context-group name="ctx">
<context
context-type="sourcefile">/rhn/systems/ssm/DeleteConfirm.do</context>
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index 48266d2..4c9a5c7 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -2,7 +2,8 @@
<rhn-navi-tree label="ssm" invisible="1"
title-depth="1">
<rhn-tab name="Overview" url="/rhn/ssm/index.do" />
<rhn-tab name="Systems">
- <rhn-tab-url>/network/systems/ssm/system_list.pxt</rhn-tab-url>
+<!-- <rhn-tab-url>/network/systems/ssm/system_list.pxt</rhn-tab-url>
-->
+ <rhn-tab-url>/rhn/systems/ssm/ListSystems.do</rhn-tab-url>
</rhn-tab>
<rhn-tab name="Errata"
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp
b/java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp
new file mode 100644
index 0000000..f3f0528
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/list.jsp
@@ -0,0 +1,29 @@
+<%@ taglib
uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib
uri="http://java.sun.com/jsp/jstl/core" prefix="c"
%>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-html"
prefix="html" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean" %>
+<%@ taglib
uri="http://rhn.redhat.com/tags/list" prefix="rl"
%>
+
+<html:xhtml/>
+<html>
+<body>
+<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
+<h2>
+ <bean:message key="ssm.list.systems.header" />
+</h2>
+<p><bean:message key="ssm.list.systems.summary" /></p>
+<%--
+<c:set var="notSelectable" value="true"/>
+<c:set var="showLastCheckin" value="true"/>
+<c:set var="noPackages" value="true"/>
+<c:set var="noErrata" value="true"/>
+--%>
+
+<rl:listset name="systemListSet" legend="system">
+ <%@ include
file="/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf" %>
+</rl:listset>
+
+
+</body>
+</html>
+
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index dfd0fee..f872e86 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3113,6 +3113,17 @@
path="/systems/ssm/misc/Index.do"
redirect="true"/>
</action>
+ <action path="/systems/ssm/ListSystems"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/list.jsp"
+ type="com.redhat.rhn.frontend.action.ssm.ListSystemsAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/list.jsp"/>
+ <forward name="confirm"
+ path="/systems/ssm/ListSystems.do"
redirect="true"/>
+ </action>
+
<action path="/systems/ssm/MigrateSystems"
scope="request"
input="/WEB-INF/pages/ssm/systems/ssmdeleteconfirm.jsp"
diff --git a/web/html/nav/ssm.xml b/web/html/nav/ssm.xml
index 50ba162..12f464b 100644
--- a/web/html/nav/ssm.xml
+++ b/web/html/nav/ssm.xml
@@ -2,7 +2,7 @@
<rhn-navi-tree label="ssm" invisible="1"
title-depth="1">
<rhn-tab name="Overview" url="/rhn/ssm/index.do" />
<rhn-tab name="Systems">
- <rhn-tab-url>/network/systems/ssm/system_list.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/ListSystems.do</rhn-tab-url>
</rhn-tab>
<rhn-tab name="Errata"