java/code/src/com/redhat/rhn/frontend/action/GenericIndexAction.java
| 45 +
java/code/src/com/redhat/rhn/frontend/action/ssm/MiscIndexAction.java
| 75 +++
java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
| 109 ++++
java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
| 105 ++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
| 247 ++++++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/schedule/ScheduleHandler.java
| 31 +
java/code/src/com/redhat/rhn/manager/action/ActionManager.java
| 16
java/code/webapp/WEB-INF/includes/header.jsp
| 2
java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
| 2
java/code/webapp/WEB-INF/nav/ssm.xml
| 8
java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
| 85 +++
java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
| 129 +++++
java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
| 49 +
java/code/webapp/WEB-INF/pages/ssm/systems/ssmswrefresh.jsp
| 40 +
java/code/webapp/WEB-INF/struts-config.xml
| 51 ++
web/html/nav/sitenav-authenticated.xml
| 2
web/html/nav/ssm.xml
| 8
web/html/network/systems/ssm/index.pxt
| 6
18 files changed, 995 insertions(+), 15 deletions(-)
New commits:
commit 463e791079ff598bd8e0940412c622c634175711
Author: Colin Coe <coec(a)war.coesta.com>
Date: Thu Sep 30 06:02:28 2010 +0800
Fix Javadoc comment
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 92af29c..8e8bdb3 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1561,7 +1561,7 @@ public class ActionManager extends BaseManager {
}
/**
- * Schedule a KickstartAction against a system
+ * Schedule a scheduleRebootAction against a system
* @param scheduler User scheduling the action.
* @param srvr Server for which the action affects.
* @param earliestAction Date run the Action
commit b61dd51a2603db835afb7080e6669d204fe99afa
Author: Colin Coe <coec(a)war.coesta.com>
Date: Thu Sep 30 06:01:33 2010 +0800
Fix checkstyle errors
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
index 1aa6380..7cf8e68 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
@@ -14,7 +14,6 @@
*/
package com.redhat.rhn.frontend.action.systems;
-import com.redhat.rhn.domain.action.Action;
import com.redhat.rhn.domain.action.ActionFactory;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.rhnset.RhnSet;
@@ -79,13 +78,13 @@ public class SSMUpdateSoftwareProfileConfirm extends RhnAction
implements Listab
(List) null, ActionFactory.TYPE_PACKAGES_REFRESH_LIST, now,
serverIds);
ActionFactory.save(a);
ActionMessages msg = new ActionMessages();
- String profile_str = "profiles";
- if (set.size() == 1) {
- profile_str = "profile";
+ String profileStr = "profiles";
+ if (set.size() == 1) {
+ profileStr = "profile";
}
msg.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("ssm.sw.systems.confirmmessage",
set.size(),
- profile_str));
+ new ActionMessage("ssm.sw.systems.confirmmessage",
set.size(),
+ profileStr));
getStrutsDelegate().saveMessages(request, msg);
return getStrutsDelegate().forwardParams(
mapping.findForward("success"), params);
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 788285e..92af29c 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1587,6 +1587,20 @@ public class ActionManager extends BaseManager {
}
/**
+ * Schedule a scheduleHardwareRefreshAction against a system or systems
+ * @param scheduler User scheduling the action.
+ * @param earliestAction Date run the Action
+ * @param srvr Server(s) for which the action affects.
+ * @return Currently scheduled KickstartAction
+ */
+ public static Action scheduleHardwareRefreshAction(User scheduler, Date
earliestAction,
+ Set<Long> serverIds) {
+ return scheduleAction(scheduler, ActionFactory.TYPE_HARDWARE_REFRESH_LIST,
+ ActionFactory.TYPE_HARDWARE_REFRESH_LIST.getName(), earliestAction,
+ serverIds);
+ }
+
+ /**
* Schedules all Errata for the given system.
* @param scheduler Person scheduling the action.
* @param srvr Server whose errata is going to be scheduled.
commit d3eca5d8d05906a6236a3821e8fbba97f56acabe
Author: Colin Coe <coec(a)war.coesta.com>
Date: Thu Sep 30 06:01:12 2010 +0800
Hardware Refresh - Create only one action
Update the hardware refresh to create a single action with all servers
rather than one action for each server
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
index a043aa0..3985d6d 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
@@ -18,7 +18,6 @@ import com.redhat.rhn.domain.action.Action;
import com.redhat.rhn.domain.action.ActionFactory;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.rhnset.RhnSetElement;
-import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
@@ -35,9 +34,11 @@ import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.DynaActionForm;
import java.util.Date;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -65,24 +66,30 @@ public class SSMUpdateHardwareProfileConfirm extends RhnAction
implements Listab
if (isSubmitted(daForm)) {
Iterator it = set.iterator();
+ Set<Long> serverIds = new HashSet<Long>();
+// Long serverIds[] = new Long[set.size()];
+// Integer i = 0;
while (it.hasNext()) {
Long sid = ((RhnSetElement)it.next()).getElement();
- Server server = SystemManager.lookupByIdAndUser(sid, user);
- Date now = new Date();
- Action a = ActionManager.scheduleHardwareRefreshAction(user, server,
now);
- ActionFactory.save(a);
+ serverIds.add(sid);
+// Server server = SystemManager.lookupByIdAndUser(sid, user);
+// serverIds[i] = sid;
+// i++;
}
+ Date now = new Date();
+
+ Action a = ActionManager.scheduleHardwareRefreshAction(user, now,
serverIds);
+ ActionFactory.save(a);
ActionMessages msg = new ActionMessages();
- String profile_str = "profiles";
- if (set.size() == 1) {
- profile_str = "profile";
+ String profileStr = "profiles";
+ if (set.size() == 1) {
+ profileStr = "profile";
}
msg.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("ssm.hw.systems.confirmmessage",
set.size(),
- profile_str));
+ new ActionMessage("ssm.hw.systems.confirmmessage",
set.size(),
+ profileStr));
getStrutsDelegate().saveMessages(request, msg);
-// getStrutsDelegate().saveMessage("ssm.hw.systems.confirmmessage",
-// context.getRequest());
+
return getStrutsDelegate().forwardParams(
mapping.findForward("success"), params);
}
commit a5b2e6aeb8f1adfc1c40d448b306ce048d3b75fd
Author: Colin Coe <coec(a)war.coesta.com>
Date: Tue Sep 28 21:17:01 2010 +0800
Package Refresh - Create only one action
Update the package refresh to create a single action with all servers
rather than one action for each server
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
index aaab99f..1aa6380 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
@@ -36,9 +36,11 @@ import org.apache.struts.action.ActionMessages;
import org.apache.struts.action.DynaActionForm;
import java.util.Date;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -66,15 +68,16 @@ public class SSMUpdateSoftwareProfileConfirm extends RhnAction
implements Listab
if (isSubmitted(daForm)) {
Iterator it = set.iterator();
+ Set<Long> serverIds = new HashSet<Long>();
while (it.hasNext()) {
Long sid = ((RhnSetElement)it.next()).getElement();
+ serverIds.add(sid);
Server server = SystemManager.lookupByIdAndUser(sid, user);
- Date now = new Date();
- PackageAction a = (PackageAction)
ActionManager.schedulePackageAction(user,
- (List) null, ActionFactory.TYPE_PACKAGES_REFRESH_LIST,
- now, server);
- ActionFactory.save(a);
}
+ Date now = new Date();
+ PackageAction a = (PackageAction) ActionManager.schedulePackageAction(user,
+ (List) null, ActionFactory.TYPE_PACKAGES_REFRESH_LIST, now,
serverIds);
+ ActionFactory.save(a);
ActionMessages msg = new ActionMessages();
String profile_str = "profiles";
if (set.size() == 1) {
commit 83ec5e635165f1a63481689767299723c3d3ead6
Author: Colin Coe <coec(a)war.coesta.com>
Date: Tue Sep 28 20:48:07 2010 +0800
Port SSM Package Refresh Page
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
new file mode 100644
index 0000000..aaab99f
--- /dev/null
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateSoftwareProfileConfirm.java
@@ -0,0 +1,103 @@
+/**
+ * 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.systems;
+
+import com.redhat.rhn.domain.action.Action;
+import com.redhat.rhn.domain.action.ActionFactory;
+import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
+import com.redhat.rhn.domain.rhnset.RhnSet;
+import com.redhat.rhn.domain.rhnset.RhnSetElement;
+import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+import com.redhat.rhn.manager.action.ActionManager;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+import com.redhat.rhn.manager.system.SystemManager;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.action.DynaActionForm;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * SSMUpdateSoftwareProfileConfirm
+ * @version $Rev$
+ */
+public class SSMUpdateSoftwareProfileConfirm extends RhnAction implements Listable {
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+
+ User user = context.getLoggedInUser();
+ RhnSet set = RhnSetDecl.SYSTEMS.get(user);
+ request.setAttribute("system_count", set.size());
+ DynaActionForm daForm = (DynaActionForm)formIn;
+ Map params = makeParamMap(request);
+
+ if (isSubmitted(daForm)) {
+ Iterator it = set.iterator();
+ while (it.hasNext()) {
+ Long sid = ((RhnSetElement)it.next()).getElement();
+ Server server = SystemManager.lookupByIdAndUser(sid, user);
+ Date now = new Date();
+ PackageAction a = (PackageAction)
ActionManager.schedulePackageAction(user,
+ (List) null, ActionFactory.TYPE_PACKAGES_REFRESH_LIST,
+ now, server);
+ ActionFactory.save(a);
+ }
+ ActionMessages msg = new ActionMessages();
+ String profile_str = "profiles";
+ if (set.size() == 1) {
+ profile_str = "profile";
+ }
+ msg.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("ssm.sw.systems.confirmmessage",
set.size(),
+ profile_str));
+ getStrutsDelegate().saveMessages(request, msg);
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("success"), params);
+ }
+
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("default"), params);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext contextIn) {
+ return SystemManager.inSet(contextIn.getLoggedInUser(),
+ RhnSetDecl.SYSTEMS.getLabel());
+ }
+
+}
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 b925d1d..e8f485d 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
@@ -5483,7 +5483,7 @@ value for this entitlement, excluding the default organization's
consumption.</s
<!-- SSM Hardware Refresh -->
<group>
<context-group name="ctx">
- <context
context-type="sourcefile">/rhn/systems/ssm/HardwareRefresh.do
pages</context>
+ <context
context-type="sourcefile">/rhn/systems/ssm/misc/HardwareRefresh.do</context>
</context-group>
<trans-unit id="ssm.hw.systems.header">
<source>Confirm Hardware Profiles Refresh</source>
@@ -5494,7 +5494,7 @@ value for this entitlement, excluding the default organization's
consumption.</s
<trans-unit id="ssm.hw.systems.summary.empty">
<source>No systems are selected.</source>
</trans-unit>
- <trans-unit id="ssm.hw.systems.confirmbutton">
+ <trans-unit id="ssm.hw.systems.confirmbutton">
<source>Confirm refresh</source>
</trans-unit>
<trans-unit id="ssm.hw.systems.confirmmessage">
@@ -5502,6 +5502,28 @@ value for this entitlement, excluding the default
organization's consumption.</s
</trans-unit>
</group>
+ <!-- SSM Software Refresh -->
+ <group>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/systems/ssm/misc/SoftwareRefresh.do</context>
+ </context-group>
+ <trans-unit id="ssm.sw.systems.header">
+ <source>Confirm Package Profiles Refresh</source>
+ </trans-unit>
+ <trans-unit id="ssm.sw.systems.summary">
+ <source>You will schedule a package profile update of the {0} you have
selected.</source>
+ </trans-unit>
+ <trans-unit id="ssm.sw.systems.summary.empty">
+ <source>No systems are selected.</source>
+ </trans-unit>
+ <trans-unit id="ssm.sw.systems.confirmbutton">
+ <source>Confirm refresh</source>
+ </trans-unit>
+ <trans-unit id="ssm.sw.systems.confirmmessage">
+ <source>{0} package {1} will be refreshed.</source>
+ </trans-unit>
+ </group>
+
<group>
<context-group name="ctx">
<context
context-type="sourcefile">/rhn/systems/ssm/misc/Index.do</context>
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index 4b2e8ed..48266d2 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -121,7 +121,7 @@
<rhn-tab name="Misc">
<rhn-tab-url>/rhn/systems/ssm/misc/Index.do</rhn-tab-url>
<rhn-tab-url>/rhn/systems/ssm/HardwareRefresh.do</rhn-tab-url>
- <rhn-tab-url>/network/systems/ssm/misc/pkg_prof_update_conf.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/SoftwareRefresh.do</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/prof_conv_conf.pxt</rhn-tab-url>
<rhn-tab-url>/rhn/systems/ssm/DeleteConfirm.do</rhn-tab-url>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
index bc6751a..d4a6b12 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
@@ -16,7 +16,7 @@
</div>
<ul>
<li><a
href="/rhn/systems/ssm/misc/HardwareRefresh.do"><bean:message
key="ssm.misc.index.profileupdates.hardware"/></a></li>
- <li><a
href="/network/systems/ssm/misc/pkg_prof_update_conf.pxt"><bean:message
key="ssm.misc.index.profileupdates.software"/></a></li>
+ <li><a
href="/rhn/systems/ssm/misc/SoftwareRefresh.do"><bean:message
key="ssm.misc.index.profileupdates.software"/></a></li>
</ul>
<br />
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/ssmswrefresh.jsp
b/java/code/webapp/WEB-INF/pages/ssm/systems/ssmswrefresh.jsp
new file mode 100644
index 0000000..25de759
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/ssmswrefresh.jsp
@@ -0,0 +1,40 @@
+<%@ 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.sw.systems.header" />
+ </h2>
+ <c:choose>
+ <c:when test="${system_count > 0}">
+ <c:choose>
+ <c:when test="${system_count == 1}">
+ <p><bean:message key="ssm.sw.systems.summary"
arg0="${system_count} system"/></p>
+ </c:when>
+ <c:otherwise>
+ <p><bean:message key="ssm.sw.systems.summary"
arg0="${system_count} systems"/></p>
+ </c:otherwise>
+ </c:choose>
+ </c:when>
+ <c:otherwise>
+ <p><bean:message key="ssm.sw.systems.summary.empty"
/></p>
+ </c:otherwise>
+ </c:choose>
+
+ <html:form action="/systems/ssm/misc/SoftwareRefresh.do">
+ <html:hidden property="submitted" value="true"/>
+ <div align="right">
+ <html:submit>
+ <bean:message key="ssm.sw.systems.confirmbutton"/>
+ </html:submit>
+ </div>
+ </html:form>
+
+ </body>
+</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index b4e4ccf..d9473eb 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3095,6 +3095,18 @@
path="/systems/ssm/misc/Index.do"
redirect="true"/>
</action>
+ <action path="/systems/ssm/misc/SoftwareRefresh"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/ssmswrefresh.jsp"
+ name="submittedForm"
+
type="com.redhat.rhn.frontend.action.systems.SSMUpdateSoftwareProfileConfirm"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/ssmswrefresh.jsp"/>
+ <forward name="success"
+ path="/systems/ssm/misc/Index.do"
redirect="true"/>
+ </action>
+
<!--System Details Configuration -->
<action path="/systems/details/configuration/Overview"
scope="request"
diff --git a/web/html/nav/ssm.xml b/web/html/nav/ssm.xml
index efaca0c..50ba162 100644
--- a/web/html/nav/ssm.xml
+++ b/web/html/nav/ssm.xml
@@ -106,7 +106,7 @@
<rhn-tab name="Misc">
<rhn-tab-url>/rhn/systems/ssm/misc/Index.do</rhn-tab-url>
<rhn-tab-url>/rhn/systems/ssm/HardwareRefresh.do</rhn-tab-url>
- <rhn-tab-url>/network/systems/ssm/misc/pkg_prof_update_conf.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/SoftwareRefresh.do</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/prof_conv_conf.pxt</rhn-tab-url>
<rhn-tab-url>/rhn/systems/ssm/DeleteConfirm.do</rhn-tab-url>
commit c3b1785b0e5c89f76926a188882055a3a2978768
Author: Colin Coe <coec(a)war.coesta.com>
Date: Tue Sep 21 21:21:41 2010 +0800
Simple fixes
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index a27522a..4b2e8ed 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -119,7 +119,7 @@
</rhn-tab>
<rhn-tab name="Misc">
- <rhn-tab-url>/network/systems/ssm/misc/index.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/misc/Index.do</rhn-tab-url>
<rhn-tab-url>/rhn/systems/ssm/HardwareRefresh.do</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/pkg_prof_update_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
diff --git a/web/html/nav/ssm.xml b/web/html/nav/ssm.xml
index b45e825..efaca0c 100644
--- a/web/html/nav/ssm.xml
+++ b/web/html/nav/ssm.xml
@@ -104,7 +104,7 @@
</rhn-tab>
<rhn-tab name="Misc">
- <rhn-tab-url>/network/systems/ssm/misc/index.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/misc/Index.do</rhn-tab-url>
<rhn-tab-url>/rhn/systems/ssm/HardwareRefresh.do</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/pkg_prof_update_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
diff --git a/web/html/network/systems/ssm/index.pxt
b/web/html/network/systems/ssm/index.pxt
index 1105bf3..7851318 100644
--- a/web/html/network/systems/ssm/index.pxt
+++ b/web/html/network/systems/ssm/index.pxt
@@ -115,9 +115,9 @@
<td>
<p>
Update <a
- href="/network/systems/ssm/misc/index.pxt#profiles">hardware/package
+ href="/rhn/systems/ssm/misc/index.do#profiles">hardware/package
profiles</a> and <a
- href="/network/systems/ssm/misc/index.pxt#sysprefs">system
+ href="/rhn/systems/ssm/misc/index.do#sysprefs">system
preferences</a>
<br />
<rhn-require acl="org_entitlement(rhn_provisioning)">
@@ -125,7 +125,7 @@ Update <a
</rhn-require>
<rhn-require acl="user_role(org_admin);org_entitlement(rhn_provisioning) or
org_entitlement(rhn_monitor)">
- <a href="/network/systems/ssm/misc/index.pxt#entitle">Add or
Remove</a> Add-On Entitlements<br />
+ <a href="/rhn/systems/ssm/misc/index.do#entitle">Add or
Remove</a> Add-On Entitlements<br />
</rhn-require>
<a
href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> /
<a
href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a>
commit 6dd2aeb4ee6b4683075c32a9abc7470b1fcf8fee
Author: Colin Coe <coec(a)war.coesta.com>
Date: Tue Sep 21 21:20:27 2010 +0800
Fix stupid error in HW Refresh page
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/MiscIndexAction.java
b/java/code/src/com/redhat/rhn/frontend/action/ssm/MiscIndexAction.java
new file mode 100644
index 0000000..0357c9b
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/MiscIndexAction.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2009--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.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+
+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;
+
+/**
+ * IndexAction extends RhnAction
+ * @version $Rev: 1 $
+ */
+public class MiscIndexAction extends RhnAction {
+
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ RequestContext context = new RequestContext(request);
+ DynaActionForm daForm = (DynaActionForm)formIn;
+
+ if (context.isSubmitted()) {
+/*
+ if
(!(daForm.getString("receive_notifications").equals("no_change")
&&
+
daForm.getString("include_in_daily_summary").equals("no_change")
&&
+
daForm.getString("auto_update").equals("no_change"))) {
+ System.out.println("noop");
+ if
(daForm.getString("receive_notifications").equals("yes")) {
+ request.setAttribute("notify", "yes");
+ }
+ else {
+ request.setAttribute("notify", "no");
+ }
+ if
(daForm.getString("include_in_daily_summary").equals("yes")) {
+ request.setAttribute("summary", "yes");
+ }
+ else {
+ request.setAttribute("summary", "no");
+ }
+ if (daForm.getString("auto_update").equals("yes")) {
+ request.setAttribute("update", "yes");
+ }
+ else {
+ request.setAttribute("update", "no");
+ }
+ }
+*/
+ return mapping.findForward("confirm");
+ }
+
+ return mapping.findForward("default");
+ }
+
+}
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
index 74aed30..a043aa0 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
@@ -30,15 +30,18 @@ import com.redhat.rhn.manager.system.SystemManager;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.action.DynaActionForm;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
/**
* SSMUpdateHardwareProfileConfirm
* @version $Rev$
@@ -57,8 +60,10 @@ public class SSMUpdateHardwareProfileConfirm extends RhnAction
implements Listab
User user = context.getLoggedInUser();
RhnSet set = RhnSetDecl.SYSTEMS.get(user);
request.setAttribute("system_count", set.size());
+ DynaActionForm daForm = (DynaActionForm)formIn;
+ Map params = makeParamMap(request);
- if (context.wasDispatched("ssm.hw.systems.confirmbutton")) {
+ if (isSubmitted(daForm)) {
Iterator it = set.iterator();
while (it.hasNext()) {
Long sid = ((RhnSetElement)it.next()).getElement();
@@ -67,12 +72,23 @@ public class SSMUpdateHardwareProfileConfirm extends RhnAction
implements Listab
Action a = ActionManager.scheduleHardwareRefreshAction(user, server,
now);
ActionFactory.save(a);
}
- getStrutsDelegate().saveMessage("ssm.hw.systems.confirmmessage",
- context.getRequest());
- return mapping.findForward("confirm");
+ ActionMessages msg = new ActionMessages();
+ String profile_str = "profiles";
+ if (set.size() == 1) {
+ profile_str = "profile";
+ }
+ msg.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("ssm.hw.systems.confirmmessage",
set.size(),
+ profile_str));
+ getStrutsDelegate().saveMessages(request, msg);
+// getStrutsDelegate().saveMessage("ssm.hw.systems.confirmmessage",
+// context.getRequest());
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("success"), params);
}
- return mapping.findForward("default");
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("default"), params);
}
/**
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 b1eaa15..b925d1d 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
@@ -5483,7 +5483,7 @@ value for this entitlement, excluding the default organization's
consumption.</s
<!-- SSM Hardware Refresh -->
<group>
<context-group name="ctx">
- <context
context-type="sourcefile">/rhn/systems/ssm/*wareRefresh.do
pages</context>
+ <context
context-type="sourcefile">/rhn/systems/ssm/HardwareRefresh.do
pages</context>
</context-group>
<trans-unit id="ssm.hw.systems.header">
<source>Confirm Hardware Profiles Refresh</source>
@@ -5497,8 +5497,108 @@ value for this entitlement, excluding the default
organization's consumption.</s
<trans-unit id="ssm.hw.systems.confirmbutton">
<source>Confirm refresh</source>
</trans-unit>
+ <trans-unit id="ssm.hw.systems.confirmmessage">
+ <source>{0} hardware {1} will be refreshed.</source>
+ </trans-unit>
</group>
+ <group>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/systems/ssm/misc/Index.do</context>
+ </context-group>
+
+ <trans-unit id="ssm.misc.index.profileupdates.header">
+ <source>System Profile Updates</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.profileupdates.summary">
+ <source>If you've changed hardware on your system or have manually
installed RPMs, and those changes are not appearing on Spacewalk, you need to schedule a
profile update.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.profileupdates.hardware">
+ <source>Update Hardware Profile</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.profileupdates.software">
+ <source>Update Software Profile</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.misc.index.csi.header">
+ <source>Custom System Information</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.csi.summary">
+ <source>You may set or remove values for custom information keys for
selected systems.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.csi.set">
+ <source>Set a custom value for selected systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.csi.remove">
+ <source>Remove a custom value from selected systems</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.misc.index.reboot.header">
+ <source>Reboot Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.reboot.summary">
+ <source>With Red Hat Enterprise Linux 3 or newer releases, Spacewalk
allows you to remotely reboot your systems.</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.misc.index.lock.header">
+ <source>Lock Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.lock.summary">
+ <source>Systems may be locked or unlocked. Locking prevents changes from
the Spacewalk website.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.lock.lock">
+ <source>Lock System Profiles</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.lock.unlock">
+ <source>Unlock System Profiles</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.misc.index.delete.header">
+ <source>Delete Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.delete.summary">
+ <source>Deletes all selected system profiles. All information about these
systems will be removed.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.delete.delete">
+ <source>Delete System Profiles</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.misc.index.entitle.header">
+ <source>Add Or Remove Add-On Entitlements</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.entitle.summary">
+ <source>Please use the <a
href="/rhn/systems/SystemEntitlements.do">System Entitlements
Page</a> to manage your system's entitlement levels.</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.misc.index.syspref.header">
+ <source>System Preferences</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.summary">
+ <source>You may edit the preferences for all your selected systems
here.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.notify">
+ <source>Receive Notifications of Updates/Errata</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.dailysummary">
+ <source>Include system in Daily Summary</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.update">
+ <source>Automatic application of relevant errata</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.preference">
+ <source>Preference</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.yes">
+ <source>Yes</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.no">
+ <source>No</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.syspref.nochange">
+ <source>No Change</source>
+ </trans-unit>
+ </group>
+
<!-- == Systems == -->
<trans-unit id="overview.jsp.header">
<source>System Overview</source>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
new file mode 100644
index 0000000..bc6751a
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
@@ -0,0 +1,129 @@
+<%@ taglib
uri="http://java.sun.com/jsp/jstl/core" prefix="c"
%>
+<%@ taglib
uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib
uri="http://rhn.redhat.com/tags/list" prefix="rl"
%>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-html"
prefix="html" %>
+
+<html:xhtml/>
+<html>
+<body>
+<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
+
+<a id="profiles"> </a>
+<h2><bean:message
key="ssm.misc.index.profileupdates.header"/></h2>
+<div class="page-summary">
+<p><bean:message
key="ssm.misc.index.profileupdates.summary"/></p>
+</div>
+<ul>
+ <li><a
href="/rhn/systems/ssm/misc/HardwareRefresh.do"><bean:message
key="ssm.misc.index.profileupdates.hardware"/></a></li>
+ <li><a
href="/network/systems/ssm/misc/pkg_prof_update_conf.pxt"><bean:message
key="ssm.misc.index.profileupdates.software"/></a></li>
+</ul>
+<br />
+
+<a id="profiles"> </a>
+<h2><bean:message key="ssm.misc.index.csi.header"/></h2>
+<div class="page-summary">
+<p><bean:message key="ssm.misc.index.csi.summary"/></p>
+</div>
+<ul>
+ <li><a
href="/network/systems/ssm/misc/choose_value_to_set.pxt"><bean:message
key="ssm.misc.index.csi.set"/></a></li>
+ <li><a
href="/network/systems/ssm/misc/choose_value_to_remove.pxt"><bean:message
key="ssm.misc.index.csi.remove"/></a></li>
+</ul>
+<br />
+
+<a id="reboot"> </a>
+<h2><bean:message key="ssm.misc.index.reboot.header"/></h2>
+<div class="page-summary">
+<p><bean:message key="ssm.misc.index.reboot.summary"/></p>
+</div>
+<ul>
+ <li><a
href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems"><bean:message
key="ssm.misc.index.reboot.header"/></a></li>
+</ul>
+<br />
+
+<a id="delete"> </a>
+<h2><bean:message key="ssm.misc.index.lock.header"/></h2>
+
+<div class="page-summary">
+<p><bean:message key="ssm.misc.index.lock.summary"/></p>
+</div>
+<ul>
+ <li><a
href="/network/systems/ssm/misc/lock_systems_conf.pxt"><bean:message
key="ssm.misc.index.lock.lock"/></a></li>
+ <li><a
href="/network/systems/ssm/misc/unlock_systems_conf.pxt"><bean:message
key="ssm.misc.index.lock.unlock"/></a></li>
+</ul>
+<br />
+
+<a id="delete"> </a>
+<h2><bean:message key="ssm.misc.index.delete.header"/></h2>
+<div class="page-summary">
+<p><bean:message key="ssm.misc.index.delete.summary"/></p>
+</div>
+<ul>
+ <li><a href="/rhn/systems/ssm/DeleteConfirm.do"><bean:message
key="ssm.misc.index.delete.delete"/></a></li>
+</ul>
+<br />
+
+<a id="entitle"> </a>
+<h2><bean:message key="ssm.misc.index.entitle.header"/></h2>
+<div class="page-summary">
+ <p>
+ <strong><bean:message
key="ssm.misc.index.entitle.summary"/></strong>
+ </p>
+</div>
+
+<a id="sysprefs"> </a><h2><bean:message
key="ssm.misc.index.syspref.header"/></h2>
+<div class="page-summary">
+<p><bean:message key="ssm.misc.index.syspref.summary"/></p>
+</div>
+
+<form action="/network/systems/ssm/misc/change_sys_pref_conf.pxt"
method="post">
+
+ <table width="96%" cellspacing="0" cellpadding="0"
class="list" align="center">
+ <thead>
+ <tr>
+ <th align="left">Preference</th>
+ <th width="5%">Yes</th>
+ <th width="5%">No</th>
+
+ <th width="5%">No Change</th>
+ </tr>
+ </thead>
+
+ <tr class="list-row-odd">
+ <td class="first-column"><bean:message
key="ssm.misc.index.syspref.notify"/></td>
+ <td align="center"><input type="radio"
name="receive_notifications" value="set" /></td>
+ <td align="center"><input type="radio"
name="receive_notifications" value="unset" /></td>
+
+ <td class="last-column" align="center"><input
type="radio" name="receive_notifications" value="do_nothing"
checked="1" /></td>
+ </tr>
+
+ <tr class="list-row-even">
+ <td class="first-column"><bean:message
key="ssm.misc.index.syspref.dailysummary"/></td>
+ <td align="center"><input type="radio"
name="include_in_daily_summary" value="set" /></td>
+ <td align="center"><input type="radio"
name="include_in_daily_summary" value="unset" /></td>
+ <td class="last-column" align="center"><input
type="radio" name="include_in_daily_summary"
value="do_nothing" checked="1" /></td>
+ </tr>
+
+ <tr class="list-row-odd">
+ <td class="first-column"><bean:message
key="ssm.misc.index.syspref.update"/></td>
+ <td align="center"><input type="radio"
name="auto_update" value="set" /></td>
+ <td align="center"><input type="radio"
name="auto_update" value="unset" /></td>
+ <td class="last-column" align="center"><input
type="radio" name="auto_update" value="do_nothing"
checked="1" /></td>
+ </tr>
+
+ </table>
+
+ <div align="right">
+ <hr />
+
+ <input type="submit" name="sscd_change_system_prefs"
value="Change Preferences" />
+ <input type="hidden" name="do_nothing_redir"
value="index.pxt" />
+ <input type="hidden" name="pxt:trap"
value="rhn:ssm_change_system_prefs_cb" />
+ </div>
+
+</form>
+
+
+
+</body>
+</html>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
b/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
index 765041e..6601896 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
@@ -27,11 +27,23 @@
</c:otherwise>
</c:choose>
+<%--
+ <html:form method="post"
action="/systems/ssm/misc/HardwareRefresh.do">
+--%>
+ <html:form action="/systems/ssm/misc/HardwareRefresh.do">
+ <html:hidden property="submitted" value="true"/>
+ <div align="right">
+ <html:submit>
+ <bean:message key="ssm.hw.systems.confirmbutton"/>
+ </html:submit>
+ </div>
+ </html:form>
+<%--
<div align="right">
<hr />
- <input type ="submit" name="dispatch"
value="${rhn:localize('ssm.hw.systems.confirmbutton')}"/>
+ <input type="submit" name="dispatch"
value="${rhn:localize('ssm.hw.systems.confirmbutton')}"/>
</div>
-
+--%>
</body>
</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index 6917809..b4e4ccf 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1020,6 +1020,14 @@
<form-property name="submitted"
type="java.lang.Boolean"/>
</form-bean>
+ <form-bean name="ssmPreferencesForm"
+ type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm"
>
+ <form-property name="notify" type="java.lang.String"/>
+ <form-property name="summary" type="java.lang.String"/>
+ <form-property name="update" type="java.lang.String"/>
+ <form-property name="submitted"
type="java.lang.Boolean"/>
+ </form-bean>
+
<form-bean name="targetSystemsForm"
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm" >
<form-property name="use_date"
type="java.lang.Boolean"/>
@@ -3075,15 +3083,16 @@
path="/ssm/ViewAllLog.do" redirect="true"/>
</action>
- <action path="/systems/ssm/HardwareRefresh"
+ <action path="/systems/ssm/misc/HardwareRefresh"
scope="request"
input="/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp"
+ name="submittedForm"
type="com.redhat.rhn.frontend.action.systems.SSMUpdateHardwareProfileConfirm"
className="com.redhat.rhn.frontend.struts.RhnActionMapping">
<forward name="default"
path="/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp"/>
- <forward name="confirm"
- path="/ssm/ViewAllLog.do" redirect="true"/>
+ <forward name="success"
+ path="/systems/ssm/misc/Index.do"
redirect="true"/>
</action>
<!--System Details Configuration -->
@@ -4413,6 +4422,17 @@
<forward name="default"
path="/WEB-INF/pages/configuration/ssm/enablesummary.jsp"/>
</action>
+
+ <action path="/systems/ssm/misc/Index"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/misc/index.jsp"
+ type="com.redhat.rhn.frontend.action.ssm.MiscIndexAction"
+ name="ssmPreferencesForm"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/misc/index.jsp" />
+ </action>
+
<!-- ===== END SSM ===== -->
<action path="/monitoring/config/notification/Methods"
commit c047a5c029b554ded63f5114efedd28d20c9ca4f
Author: Colin Coe <coec(a)war.coesta.com>
Date: Mon Sep 20 20:27:34 2010 +0800
Fix stupid error in HW Refresh stanza
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index 195892b..6917809 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3083,7 +3083,7 @@
<forward name="default"
path="/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp"/>
<forward name="confirm"
- path="/ssm/ViewAllLog.do" redirect="true"/> -
+ path="/ssm/ViewAllLog.do" redirect="true"/>
</action>
<!--System Details Configuration -->
commit 30b9d12d93007baf1e90b41a2a6fe87f94bf8220
Author: Colin Coe <colin.coe(a)gmail.com>
Date: Fri Sep 10 07:04:31 2010 +0800
Port /network/systems/ssm/index.pxt
diff --git a/java/code/src/com/redhat/rhn/frontend/action/GenericIndexAction.java
b/java/code/src/com/redhat/rhn/frontend/action/GenericIndexAction.java
new file mode 100644
index 0000000..5bd2524
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/GenericIndexAction.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2009--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;
+
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+// Simple generic Index Action
+
+/**
+ * IndexAction extends RhnAction
+ * @version $Rev: 1 $
+ */
+public class GenericIndexAction extends RhnAction {
+
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ RequestContext requestContext = new RequestContext(request);
+
+ return mapping.findForward("default");
+ }
+}
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 19c31b5..b1eaa15 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
@@ -5353,6 +5353,113 @@ value for this entitlement, excluding the default
organization's consumption.</s
</context-group>
</trans-unit>
+<!-- SSM Overview -->
+ <group>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/ssm/Index.do</context>
+ </context-group>
+
+ <trans-unit id="ssm.overview.header">
+ <source>Overview</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.summary">
+ <source>Welcome to the System Set Manager. This interface will allow you
to easily work with large numbers of systems in the @@PRODUCT_NAME@@.</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.summary2">
+ <source>The following tabs aid you in a number of tasks:</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.systems">
+ <source>Systems</source>
+ </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>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.errata">
+ <source>Errata</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.errata.schedule">
+ <source><a
href="/network/systems/ssm/errata/index.pxt?pxt:trap=rhn:empty_set&set_label=errata_list">Schedule
errata updates</a> relevant to selected systems</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.packages">
+ <source>Packages</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.packages.upgrade">
+ <source><a
href="/rhn/ssm/PackageUpgrade.do">Upgrade</a> / <a
href="/rhn/ssm/PackageInstall.do">Install</a> / <a
href="/rhn/ssm/PackageRemove.do">Remove</a> / <a
href="/rhn/ssm/PackageVerify.do">Verify</a>
packages</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.groups">
+ <source>Groups</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.groups.create">
+ <source><a
href="/network/systems/ssm/groups/create.pxt">Create</a>
and <a
href="/network/systems/ssm/groups/index.pxt#manage">manage</a>
groups</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.channels">
+ <source>Channels</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.channels.memberships">
+ <source>Manage systems' <a
href="/rhn/channel/ssm/ChildSubscriptions.do">channel
memberships</a></source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.channels.subscriptions">
+ <source>Manage systems' <a
href="/rhn/systems/ssm/config/Subscribe.do">config channel
subscriptions</a></source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.channels.deploy">
+ <source><a
href="/rhn/systems/ssm/config/Deploy.do">Deploy</a> /
<a href="/rhn/systems/ssm/config/Diff.do">Diff</a>
config channels</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.provisioning">
+ <source>Provisioning</source>
+ </trans-unit>
+
+
+ <trans-unit id="ssm.overview.provisioning.kickstart">
+ <source><a
href="/rhn/systems/ssm/kickstart/KickstartableSystems.do">Kickstart</a>
systems</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.provisioning.rollback">
+ <source><a
href="/network/systems/ssm/provisioning/tag_systems.pxt">Tag</a>
systems for <a
href="/network/systems/ssm/provisioning/rollback.pxt">snapshot
rollback</a></source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.provisioning.remotecommands">
+ <source>Run <a
href="/network/systems/ssm/provisioning/remote_command.pxt">remote
commands</a></source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.misc">
+ <source>Misc</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.misc.updateprofiles">
+ <source>Update <a
+ href="/network/systems/ssm/misc/index.pxt#profiles">hardware/package
+ profiles</a> and <a
href="/network/systems/ssm/misc/index.pxt#sysprefs">system
+ preferences</a></source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.misc.customvalues">
+ <source><a
href="/network/systems/ssm/misc/choose_value_to_set.pxt">Set</a>
and <a
href="/network/systems/ssm/misc/choose_value_to_remove.pxt">remove</a>
custom values for selected systems</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.misc.entitlements">
+ <source><a
href="/network/systems/ssm/misc/index.pxt#entitle">Add or
Remove</a> Add-On Entitlements</source>
+ </trans-unit>
+
+ <trans-unit id="ssm.overview.misc.deletereboot">
+ <source><a
href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> /
<a
href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a>
systems</source>
+ </trans-unit>
+ </group>
+
<!-- SSM System list-->
<group>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/includes/header.jsp
b/java/code/webapp/WEB-INF/includes/header.jsp
index 9a09ecb..db273aa 100644
--- a/java/code/webapp/WEB-INF/includes/header.jsp
+++ b/java/code/webapp/WEB-INF/includes/header.jsp
@@ -69,7 +69,7 @@
<span id="header_selcount">
<rhn:setdisplay user="${requestScope.session.user}"/>
</span>
- <a class="button"
href="/network/systems/ssm/index.pxt">
+ <a class="button" href="/rhn/ssm/index.do">
<bean:message key="manage"/>
</a>
<%--
diff --git a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
index 1cc4f2e..91af90d 100644
--- a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
+++ b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
@@ -56,7 +56,7 @@
<rhn-tab-directory>/network/systems/groups</rhn-tab-directory>
<rhn-tab-url>/rhn/systems/SystemGroupList.do</rhn-tab-url>
</rhn-tab>
- <rhn-tab name="System Set Manager"
url="/network/systems/ssm/index.pxt"
acl="org_entitlement(sw_mgr_enterprise)">
+ <rhn-tab name="System Set Manager" url="/rhn/ssm/index.do"
acl="org_entitlement(sw_mgr_enterprise)">
<rhn-tab-directory>/rhn/systems/ssm</rhn-tab-directory>
<rhn-tab-directory>/rhn/ssm</rhn-tab-directory>
<rhn-tab name="ssm.nav.status" url="/rhn/ssm/ViewAllLog.do"
acl="org_entitlement(sw_mgr_enterprise)">
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index 59c5559..a27522a 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<rhn-navi-tree label="ssm" invisible="1"
title-depth="1">
- <rhn-tab name="Overview" url="/network/systems/ssm/index.pxt"
/>
+ <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>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
new file mode 100644
index 0000000..d526a85
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
@@ -0,0 +1,85 @@
+<%@ taglib
uri="http://java.sun.com/jsp/jstl/core" prefix="c"
%>
+<%@ taglib
uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib
uri="http://rhn.redhat.com/tags/list" prefix="rl"
%>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean" %>
+<%@ taglib
uri="http://jakarta.apache.org/struts/tags-html"
prefix="html" %>
+
+<html:xhtml/>
+<html>
+<body>
+<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
+
+<h2><bean:message key="ssm.overview.header"/></h2>
+
+
+<table class="ssm-overview" align="center">
+<div class="page-summary">
+ <p><bean:message key="ssm.overview.summary"/></p>
+ <p><bean:message key="ssm.overview.summary2"/></p>
+</div>
+ <tr>
+ <td><img src="/img/rhn-icon-system.gif" alt=<bean:message
key="ssm.overview.systems" /></td>
+ <th><b><bean:message
key="ssm.overview.systems"/>:</b></th>
+ <td><bean:message key="ssm.overview.systems.list"/></td>
+ </tr>
+
+ <tr>
+ <td><img src="/img/rhn-icon-errata.gif" alt="Errata"
/></td>
+ <th><b><bean:message
key="ssm.overview.errata"/></b></th>
+ <td><bean:message
key="ssm.overview.errata.schedule"/></td>
+ </tr>
+
+ <tr>
+ <td><img src="/img/rhn-icon-packages.gif"
alt="<bean:message key="ssm.overview.packages"/>"
/></td>
+ <th><b><bean:message
key="ssm.overview.packages"/></b></th>
+ <td><bean:message
key="ssm.overview.packages.upgrade"/></td>
+ </tr>
+
+ <tr>
+ <td><img src="/img/rhn-icon-system_group.gif"
alt="<bean:message key="ssm.overview.groups"/>"
/></td>
+ <th><b><bean:message
key="ssm.overview.groups"/></b></th>
+ <td><bean:message
key="ssm.overview.groups.create"/></td>
+ </tr>
+
+ <tr>
+ <td><img src="/img/rhn-icon-channels.gif"
alt="<bean:message key="ssm.overview.channels"/>"
/></td>
+ <th><b><bean:message
key="ssm.overview.channels"/></b></th>
+ <td>
+ <p>
+ <bean:message key="ssm.overview.channels.memberships"/><br
/>
+ <bean:message key="ssm.overview.channels.subscriptions"/><br
/>
+ <bean:message key="ssm.overview.channels.deploy"/><br />
+ </p>
+ </td>
+ </tr>
+
+ <tr>
+ <td><img src="/img/rhn-kickstart_profile.gif"
alt="<bean:message key="ssm.overview.provisioning"/>"
/></td>
+ <th><b><bean:message
key="ssm.overview.provisioning"/></b></th>
+ <td>
+ <p>
+ <bean:message key="ssm.overview.provisioning.kickstart"/><br
/>
+ <bean:message key="ssm.overview.provisioning.rollback"/><br
/>
+ <bean:message
key="ssm.overview.provisioning.remotecommands"/><br />
+ </p>
+ </td>
+ </tr>
+
+ <tr>
+ <td><img src="/img/rhn-icon-form.gif" alt="<bean:message
key="ssm.overview.misc"/>" /></td>
+ <th><b><bean:message
key="ssm.overview.misc"/>:</b></th>
+ <td>
+ <p>
+ <bean:message key="ssm.overview.misc.updateprofiles"/><br />
+ <bean:message key="ssm.overview.misc.customvalues"/><br />
+ <bean:message key="ssm.overview.misc.entitlements"/><br />
+ <bean:message key="ssm.overview.misc.deletereboot"/><br />
+ </p>
+ </td>
+ </tr>
+
+</table>
+
+
+</body>
+</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index b89e2e9..195892b 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -4090,6 +4090,13 @@
<!-- ===== SYSTEM SET MANAGER ===== -->
+ <action path="/ssm/index"
+ scope="request"
+ type="com.redhat.rhn.frontend.action.GenericIndexAction">
+ <forward name="default"
path="/WEB-INF/pages/ssm/ssmindex.jsp"/>
+ </action>
+
+
<!-- SSM\Channels -->
<action path="/channel/ssm/ChildSubscriptions"
scope="request"
diff --git a/web/html/nav/sitenav-authenticated.xml
b/web/html/nav/sitenav-authenticated.xml
index 6948884..2ef404b 100644
--- a/web/html/nav/sitenav-authenticated.xml
+++ b/web/html/nav/sitenav-authenticated.xml
@@ -44,7 +44,7 @@
<rhn-tab-directory>/network/systems/groups</rhn-tab-directory>
<rhn-tab-url>/rhn/systems/SystemGroupList.do</rhn-tab-url>
</rhn-tab>
- <rhn-tab name="System Set Manager"
url="/network/systems/ssm/index.pxt"
acl="org_entitlement(sw_mgr_enterprise)">
+ <rhn-tab name="System Set Manager" url="/rhn/ssm/index.do"
acl="org_entitlement(sw_mgr_enterprise)">
<rhn-tab-directory>/network/systems/ssm</rhn-tab-directory>
<rhn-tab name="Status" url="/rhn/ssm/ViewAllLog.do"
acl="org_entitlement(sw_mgr_enterprise)"/>
</rhn-tab>
diff --git a/web/html/nav/ssm.xml b/web/html/nav/ssm.xml
index 2c5a6af..b45e825 100644
--- a/web/html/nav/ssm.xml
+++ b/web/html/nav/ssm.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<rhn-navi-tree label="ssm" invisible="1"
title-depth="1">
- <rhn-tab name="Overview" url="/network/systems/ssm/index.pxt"
/>
+ <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>
commit bab3df8839a17a3f15e44a59f7505e5fd6ebc577
Author: Colin Coe <coec(a)war.coesta.com>
Date: Mon Sep 20 20:20:37 2010 +0800
Implement schedule.archiveActions
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/schedule/ScheduleHandler.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/schedule/ScheduleHandler.java
index c863675..4849f17 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/schedule/ScheduleHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/schedule/ScheduleHandler.java
@@ -291,4 +291,35 @@ public class ScheduleHandler extends BaseHandler {
return 1;
}
+
+ /**
+ * Archive all actions in the given list.
+ * @param sessionKey The sessionkey for the session containing the logged in user.
+ * @param actionIds The list of ids for actions to archive.
+ * @return Returns a integer 1 on success
+ * @throws FaultException A FaultException is thrown if one of the actions provided
+ * is invalid.
+ *
+ * @xmlrpc.doc Archive all actions in the given list.
+ * @xmlrpc.param #session_key()
+ * @xmlrpc.param #array_single("int", "action id")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int archiveActions(String sessionKey, List<Integer> actionIds)
+ throws FaultException {
+
+ // Get the logged in user
+ User user = getLoggedInUser(sessionKey);
+
+ for (Integer actionId : actionIds) {
+ Action action = ActionManager.lookupAction(user, new Long(actionId));
+ if (action != null) {
+ action.setArchived(new Long(1));
+ }
+ }
+ return 1;
+ }
+
}
+
+
commit e2869b88568c5a312088cf0aba885d8f6d7dc9c0
Author: Colin Coe <colin.coe(a)gmail.com>
Date: Thu Sep 16 13:16:18 2010 +0800
Port HW refresh page
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
new file mode 100644
index 0000000..74aed30
--- /dev/null
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/SSMUpdateHardwareProfileConfirm.java
@@ -0,0 +1,86 @@
+/**
+ * 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.systems;
+
+import com.redhat.rhn.domain.action.Action;
+import com.redhat.rhn.domain.action.ActionFactory;
+import com.redhat.rhn.domain.rhnset.RhnSet;
+import com.redhat.rhn.domain.rhnset.RhnSetElement;
+import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+import com.redhat.rhn.manager.action.ActionManager;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+import com.redhat.rhn.manager.system.SystemManager;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * SSMUpdateHardwareProfileConfirm
+ * @version $Rev$
+ */
+public class SSMUpdateHardwareProfileConfirm extends RhnAction implements Listable {
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+
+ User user = context.getLoggedInUser();
+ RhnSet set = RhnSetDecl.SYSTEMS.get(user);
+ request.setAttribute("system_count", set.size());
+
+ if (context.wasDispatched("ssm.hw.systems.confirmbutton")) {
+ Iterator it = set.iterator();
+ while (it.hasNext()) {
+ Long sid = ((RhnSetElement)it.next()).getElement();
+ Server server = SystemManager.lookupByIdAndUser(sid, user);
+ Date now = new Date();
+ Action a = ActionManager.scheduleHardwareRefreshAction(user, server,
now);
+ ActionFactory.save(a);
+ }
+ getStrutsDelegate().saveMessage("ssm.hw.systems.confirmmessage",
+ context.getRequest());
+ return mapping.findForward("confirm");
+ }
+
+ return mapping.findForward("default");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext contextIn) {
+ return SystemManager.inSet(contextIn.getLoggedInUser(),
+ RhnSetDecl.SYSTEMS.getLabel());
+ }
+
+}
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 5154b98..19c31b5 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
@@ -5373,6 +5373,24 @@ value for this entitlement, excluding the default
organization's consumption.</s
</trans-unit>
</group>
+ <!-- SSM Hardware Refresh -->
+ <group>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/systems/ssm/*wareRefresh.do
pages</context>
+ </context-group>
+ <trans-unit id="ssm.hw.systems.header">
+ <source>Confirm Hardware Profiles Refresh</source>
+ </trans-unit>
+ <trans-unit id="ssm.hw.systems.summary">
+ <source>You will schedule a hardware profile update of the {0} you have
selected.</source>
+ </trans-unit>
+ <trans-unit id="ssm.hw.systems.summary.empty">
+ <source>No systems are selected.</source>
+ </trans-unit>
+ <trans-unit id="ssm.hw.systems.confirmbutton">
+ <source>Confirm refresh</source>
+ </trans-unit>
+ </group>
<!-- == Systems == -->
<trans-unit id="overview.jsp.header">
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index e44d39a..59c5559 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -120,7 +120,7 @@
<rhn-tab name="Misc">
<rhn-tab-url>/network/systems/ssm/misc/index.pxt</rhn-tab-url>
- <rhn-tab-url>/network/systems/ssm/misc/hw_prof_update_conf.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/HardwareRefresh.do</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/pkg_prof_update_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/prof_conv_conf.pxt</rhn-tab-url>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
b/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
new file mode 100644
index 0000000..765041e
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp
@@ -0,0 +1,37 @@
+<%@ 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.hw.systems.header" />
+ </h2>
+ <c:choose>
+ <c:when test="${system_count > 0}">
+ <c:choose>
+ <c:when test="${system_count == 1}">
+ <p><bean:message key="ssm.hw.systems.summary"
arg0="${system_count} system"/></p>
+ </c:when>
+ <c:otherwise>
+ <p><bean:message key="ssm.hw.systems.summary"
arg0="${system_count} systems"/></p>
+ </c:otherwise>
+ </c:choose>
+ </c:when>
+ <c:otherwise>
+ <p><bean:message key="ssm.hw.systems.summary.empty"
/></p>
+ </c:otherwise>
+ </c:choose>
+
+ <div align="right">
+ <hr />
+ <input type ="submit" name="dispatch"
value="${rhn:localize('ssm.hw.systems.confirmbutton')}"/>
+ </div>
+
+
+ </body>
+</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index f7138ba..b89e2e9 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3074,6 +3074,18 @@
<forward name="confirm"
path="/ssm/ViewAllLog.do" redirect="true"/>
</action>
+
+ <action path="/systems/ssm/HardwareRefresh"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp"
+
type="com.redhat.rhn.frontend.action.systems.SSMUpdateHardwareProfileConfirm"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/ssmhwrefresh.jsp"/>
+ <forward name="confirm"
+ path="/ssm/ViewAllLog.do" redirect="true"/> -
+ </action>
+
<!--System Details Configuration -->
<action path="/systems/details/configuration/Overview"
scope="request"
diff --git a/web/html/nav/ssm.xml b/web/html/nav/ssm.xml
index 9f9bb4f..2c5a6af 100644
--- a/web/html/nav/ssm.xml
+++ b/web/html/nav/ssm.xml
@@ -105,7 +105,7 @@
<rhn-tab name="Misc">
<rhn-tab-url>/network/systems/ssm/misc/index.pxt</rhn-tab-url>
- <rhn-tab-url>/network/systems/ssm/misc/hw_prof_update_conf.pxt</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/ssm/HardwareRefresh.do</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/pkg_prof_update_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/prof_conv_conf.pxt</rhn-tab-url>