Changes to 'refs/tags/spacewalk-java-1.9.79-1'
by Tomas Lestach
Tag 'spacewalk-java-1.9.79-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2013-02-28 20:25 +0000
Tagging package [spacewalk-java] version [1.9.79-1] in directory [java/].
Changes since spacewalk-backend-1.9.43-1:
Milan Zazrivec (4):
webui: <p/> instead of <br/>
abrt: add links to crash detail page
abrt: show full storage path for a crash
abrt: add missing colons
Tomas Lestach (8):
add package nevra for crash pages
fix checkstyle issues
add PackageManager.buildPackageNevra java doc
fix crash select on the SoftwareCrashes page
fix deleting a system crash
delete multiple software crashes by selecting them on webui
fix system crash file CVS export column translation
Automatic commit of package [spacewalk-java] release [1.9.79-1].
---
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 2
java/code/src/com/redhat/rhn/domain/server/Crash.java | 10 +++
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 8 +-
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java | 33 ++++++----
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java | 11 ++-
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java | 11 ++-
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java | 10 +--
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java | 5 -
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 3
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 15 +++-
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 31 +++++++++
java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java | 14 +++-
java/code/src/com/redhat/rhn/manager/system/CrashManager.java | 18 +++--
java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf | 10 ++-
java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf | 2
java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp | 2
java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp | 2
java/code/webapp/WEB-INF/pages/systems/crashes.jsp | 1
java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp | 4 -
java/code/webapp/WEB-INF/struts-config.xml | 2
java/spacewalk-java.spec | 22 ++++++
rel-eng/packages/spacewalk-java | 2
22 files changed, 167 insertions(+), 51 deletions(-)
---
10 years, 3 months
6 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 2
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java | 33 ++++++----
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java | 6 -
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 3
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 3
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 21 ++++--
java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java | 14 +++-
java/code/src/com/redhat/rhn/manager/system/CrashManager.java | 18 +++--
java/code/webapp/WEB-INF/pages/systems/crashes.jsp | 1
java/code/webapp/WEB-INF/struts-config.xml | 2
java/spacewalk-java.spec | 22 ++++++
rel-eng/packages/spacewalk-java | 2
12 files changed, 90 insertions(+), 37 deletions(-)
New commits:
commit 932aa9633667119754cf00377e714193b8bc0eac
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 21:25:25 2013 +0100
Automatic commit of package [spacewalk-java] release [1.9.79-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index c2b4831..4d17110 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.9.78
+Version: 1.9.79
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -678,6 +678,26 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Thu Feb 28 2013 Tomas Lestach <tlestach(a)redhat.com> 1.9.79-1
+- fix system crash file CVS export column translation
+- delete multiple software crashes by selecting them on webui
+- fix deleting a system crash
+- fix crash select on the SoftwareCrashes page
+- add PackageManager.buildPackageNevra java doc
+- fix checkstyle issues
+- add package nevra for crash pages
+- abrt: add missing colons
+- abrt: show full storage path for a crash
+- abrt: add links to crash detail page
+- webui: <p/> instead of <br/>
+- adding system headers for the crash pages
+- adding crash files on the crash detail page
+- introducing crash delete page
+- introducing crash details page
+- introducing crash list page
+- abrt: webui to set crashfile upload size
+- Purging %%changelog entries preceding Spacewalk 1.0, in active packages.
+
* Wed Feb 27 2013 Jan Pazdziora 1.9.78-1
- API doc build fix.
- abrt: fix exception number
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index f87635c..83f12b9 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.9.78-1 java/
+1.9.79-1 java/
commit da6740afa57063c81e1ee053f884512511369d21
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 21:12:32 2013 +0100
fix system crash file CVS export column translation
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 1e009e0..ae238f3 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
@@ -15800,6 +15800,9 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<trans-unit id="exportcolumn.filesize">
<source>File Size</source>
</trans-unit>
+ <trans-unit id="exportcolumn.path">
+ <source>Path</source>
+ </trans-unit>
</group>
<trans-unit id="virtualization.provision.first.jsp.no.profiles">
<source>No profiles currently available for kickstarting guests. Please <a href="/rhn/kickstart/CreateProfileWizard.do">create a new kickstart profile with a Virtualization Type other than none.</a></source>
commit 2945774f96db6eb97fa3a4a599f9c9ab17b6a3ff
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 20:08:11 2013 +0100
delete multiple software crashes by selecting them on webui
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java
index 7d5991b..42d3f7d 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.frontend.action.systems;
+import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.server.ServerFactory;
import com.redhat.rhn.domain.user.User;
@@ -24,12 +25,16 @@ import com.redhat.rhn.frontend.struts.RhnHelper;
import com.redhat.rhn.frontend.taglibs.list.helper.ListRhnSetHelper;
import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+import com.redhat.rhn.manager.system.CrashManager;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -51,25 +56,33 @@ public class SoftwareCrashesAction extends RhnAction implements Listable {
RequestContext context = new RequestContext(request);
context.copyParamToAttributes("sid");
- context.lookupAndBindServer();
+ Server server = context.lookupAndBindServer();
- ListRhnSetHelper helper = new ListRhnSetHelper(this, request, getSetDecl());
+ ListRhnSetHelper helper = new ListRhnSetHelper(this, request,
+ RhnSetDecl.setForSystemCrashes(server));
helper.execute();
if (helper.isDispatched()) {
- return handleSubmit(mapping, formIn, request, response);
+ return handleSubmit(mapping, context, server);
}
return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
protected ActionForward handleSubmit(ActionMapping mapping,
- ActionForm formIn, HttpServletRequest request,
- HttpServletResponse response) {
- return mapping.findForward("default");
- }
-
- protected RhnSetDecl getSetDecl() {
- return RhnSetDecl.SYSTEM_CRASHES;
+ RequestContext ctx, Server server) {
+ User user = ctx.getCurrentUser();
+ RhnSet set = RhnSetDecl.setForSystemCrashes(server).get(user);
+ // until we delete crash files from taskomatic, we have to delete them one by one
+ for (Iterator<Long> iter = RhnSetDecl.setForSystemCrashes(server).
+ get(user).getElementValues().iterator(); iter.hasNext();) {
+ CrashManager.deleteCrash(user, iter.next());
+ }
+ createSuccessMessage(ctx.getRequest(), "message.crashesdeleted",
+ Integer.toString(set.size()));
+ Map params = new HashMap();
+ params.put("sid", server.getId());
+ return getStrutsDelegate().forwardParams(mapping.findForward("delete"),
+ params);
}
/**
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 162a659..ca0c999 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -7523,6 +7523,9 @@ Follow this url to see the full list of inactive systems:
<trans-unit id="message.crashdeleted">
<source>Software crash {0} was successfully deleted.</source>
</trans-unit>
+ <trans-unit id="message.crashesdeleted">
+ <source>{0} software crashes were successfully deleted.</source>
+ </trans-unit>
<trans-unit id="kickstart.cobbler.profile.invalidvirt">
<source>Para-Virtualization is unsupported with the selected kickstart tree or distribution.</source>
</trans-unit>
diff --git a/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java b/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
index 553f071..905a416 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
@@ -18,6 +18,7 @@ import com.redhat.rhn.common.util.Asserts;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.rhnset.SetCleanup;
+import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.action.SetLabels;
import com.redhat.rhn.frontend.action.monitoring.ProbeSuiteHelper;
@@ -68,10 +69,6 @@ public class RhnSetDecl {
public static final RhnSetDecl CHANNELS_FOR_ERRATA = make(
"channels_for_errata", SetCleanup.UNOWNED_CHANNELS);
- // set of system crashes
- public static final RhnSetDecl SYSTEM_CRASHES = make(
- "crashes_for_system", SetCleanup.NOOP);
-
// set of errata by errata_id
public static final RhnSetDecl ERRATA = make("errata_list",
SetCleanup.ILLEGAL_ERRATA);
@@ -517,6 +514,15 @@ public class RhnSetDecl {
return make("package_clone_list" + chan.getId(), SetCleanup.NOOP);
}
+ /**
+ * get the set for system software crashes
+ * @param serv server passed in
+ * @return the Set descl
+ */
+ public static RhnSetDecl setForSystemCrashes(Server serv) {
+ return make("crashes_for_system" + serv.getId(), SetCleanup.NOOP);
+ }
+
public static final RhnSetDecl SYSTEM_NOTES = make("systems_notes",
SetCleanup.NOOP);
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 3290fd8..7702d39 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3608,6 +3608,8 @@
<set-property property="postRequiredIfSubmitted" value="true" />
<forward name="default"
path="/WEB-INF/pages/systems/crashes.jsp"/>
+ <forward name="delete"
+ path="/systems/details/SoftwareCrashes.do" redirect="true"/>
</action>
<action path="/systems/details/SoftwareCrashDetail"
commit c0a8fdfe8f89d0a02e344dbd3d25d07c9278b59b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 20:25:40 2013 +0100
fix deleting a system crash
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
index 829770a..c0f02bf 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
@@ -15,7 +15,6 @@
package com.redhat.rhn.frontend.action.systems;
import com.redhat.rhn.domain.server.Crash;
-import com.redhat.rhn.domain.server.CrashFactory;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
@@ -66,9 +65,8 @@ public class SoftwareCrashesDeleteAction extends RhnAction {
crash.getPackageEvrId(), crash.getPackageArchId()));
if (ctx.isSubmitted()) {
- String crashName = crash.getCrash();
- CrashFactory.delete(crash);
- createSuccessMessage(request, "message.crashdeleted", crashName);
+ CrashManager.deleteCrash(user, crashId);
+ createSuccessMessage(request, "message.crashdeleted", crash.getCrash());
Map params = new HashMap();
params.put("sid", crash.getServer().getId());
return getStrutsDelegate().forwardParams(mapping.findForward("delete"),
diff --git a/java/code/src/com/redhat/rhn/manager/system/CrashManager.java b/java/code/src/com/redhat/rhn/manager/system/CrashManager.java
index 14dc0c1..9bbfa7e 100644
--- a/java/code/src/com/redhat/rhn/manager/system/CrashManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/CrashManager.java
@@ -93,16 +93,18 @@ public class CrashManager extends BaseManager {
Crash crash = lookupCrashByUserAndId(user, crashId);
// FIXME: async deletion via taskomatic?
- File storageDir = new File(Config.get().getString("web.mount_point"),
- crash.getStoragePath());
-
- for (CrashFile cf : crash.getCrashFiles()) {
- File crashFile = new File(storageDir, cf.getFilename());
- if (crashFile.exists() && crashFile.isFile()) {
- crashFile.delete();
+ if (crash.getStoragePath() != null) {
+ File storageDir = new File(Config.get().getString("web.mount_point"),
+ crash.getStoragePath());
+
+ for (CrashFile cf : crash.getCrashFiles()) {
+ File crashFile = new File(storageDir, cf.getFilename());
+ if (crashFile.exists() && crashFile.isFile()) {
+ crashFile.delete();
+ }
}
+ storageDir.delete();
}
- storageDir.delete();
CrashFactory.delete(crash);
}
commit e88a01e9fbfa80b978ebb9f2964e464837d07954
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 19:31:55 2013 +0100
fix crash select on the SoftwareCrashes page
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index 3d3825c..866209d 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -1425,7 +1425,7 @@ ORDER BY PN.name, PE.evr
</query>
</mode>
-<mode name="list_server_software_crashes">
+<mode name="list_server_software_crashes" class="com.redhat.rhn.frontend.dto.SoftwareCrashDto">
<query params="server_id">
SELECT id,
crash,
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
index 908118e..ff13044 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
@@ -30,7 +30,6 @@
<rl:list
width="100%"
- name="crashesList"
styleclass="list"
emptykey="crashes.jsp.nocrashes"
alphabarcolumn="component">
commit 79a42ed68c57cd152f857f5de7cc72d3adc15398
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 19:58:00 2013 +0100
add PackageManager.buildPackageNevra java doc
+ fix the parameter naming
diff --git a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
index d2fbfd9..e31b298 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
@@ -1391,13 +1391,20 @@ public class PackageManager extends BaseManager {
}
}
- public static String buildPackageNevra(Long name_id, Long evr_id, Long arch_id) {
+ /**
+ * build package nevra out of the name, evr, arch identifiers
+ * @param nameId name id
+ * @param evrId evr id
+ * @param archId arch id
+ * @return nevra
+ */
+ public static String buildPackageNevra(Long nameId, Long evrId, Long archId) {
String nevra = "";
- if (name_id != null) {
- PackageName pn = PackageFactory.lookupPackageName(name_id);
+ if (nameId != null) {
+ PackageName pn = PackageFactory.lookupPackageName(nameId);
nevra += pn.getName();
- if (evr_id != null) {
- PackageEvr pevr = PackageEvrFactory.lookupPackageEvrById(evr_id);
+ if (evrId != null) {
+ PackageEvr pevr = PackageEvrFactory.lookupPackageEvrById(evrId);
if (pevr != null) {
nevra += "-" + pevr.getVersion() + "-" + pevr.getRelease();
if (!StringUtils.isEmpty(pevr.getEpoch())) {
@@ -1405,8 +1412,8 @@ public class PackageManager extends BaseManager {
}
}
}
- if (arch_id != null) {
- PackageArch pa = PackageFactory.lookupPackageArchById(arch_id);
+ if (archId != null) {
+ PackageArch pa = PackageFactory.lookupPackageArchById(archId);
if (pa != null) {
nevra += "." + pa.getLabel();
}
10 years, 3 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 8 +--
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java | 5 ++
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java | 11 +++-
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java | 10 ++--
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java | 5 +-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6 ++
java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java | 24 ++++++++++
java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf | 8 +++
8 files changed, 64 insertions(+), 13 deletions(-)
New commits:
commit 14ac03438e9ff3695b4ddab80fef7e94222d9402
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 17:47:39 2013 +0100
fix checkstyle issues
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
index 121939e..7f2988c 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -862,9 +862,9 @@ public class ServerFactory extends HibernateFactory {
}
/**
- * Looks up snapshot tag by tag name
- * @param tagName name of the tag
- * @return snapshot tag
+ * Lists software crashes for a server
+ * @param server of interest
+ * @return crash list
*/
public static List<SoftwareCrashDto> listServerSoftwareCrashes(Server server) {
SelectMode m = ModeFactory.getMode("System_queries",
@@ -874,4 +874,4 @@ public class ServerFactory extends HibernateFactory {
params.put("server_id", server.getId());
return m.execute(params);
}
-}
\ No newline at end of file
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
index 620400e..a2862d7 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
@@ -44,7 +44,7 @@ import javax.servlet.http.HttpServletResponse;
* SoftwareCrashesDetailsAction
* @version $Rev$
*/
-public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
+public class SoftwareCrashesDetailsAction extends RhnAction implements Listable {
public static final String CRASH_ID = "crid";
public static final String CRASH = "crash";
@@ -87,7 +87,8 @@ public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
for (Iterator iter = crash.getCrashFiles().iterator(); iter.hasNext();) {
CrashFile cf = (CrashFile) iter.next();
SoftwareCrashFileDto scDto = new SoftwareCrashFileDto(cf);
- scDto.setDownloadPath(DownloadManager.getCrashFileDownloadPath(cf, contextIn.getCurrentUser()));
+ scDto.setDownloadPath(DownloadManager.getCrashFileDownloadPath(cf,
+ contextIn.getCurrentUser()));
dr.add(scDto);
}
return dr;
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java
index 58f9c5d..b3ab8ee 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java
@@ -24,11 +24,11 @@ import java.util.Date;
*/
public class SoftwareCrashDto extends BaseDto {
- Long id;
- String crash;
- Long count;
- String component;
- Date modified;
+ private Long id;
+ private String crash;
+ private Long count;
+ private String component;
+ private Date modified;
/**
* @return Returns the id.
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java
index a5c3fed..a1d8f5b 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java
@@ -34,9 +34,10 @@ public class SoftwareCrashFileDto extends BaseDto {
private String downloadPath;
/**
- *
+ * Constructor
+ * @param cFile construct object according to crash file
*/
- public SoftwareCrashFileDto(CrashFile cFile ) {
+ public SoftwareCrashFileDto(CrashFile cFile) {
id = cFile.getId();
filename = cFile.getFilename();
path = cFile.getPath();
commit fbf1c2530b7b77964e238d0bf3aec9ae13826103
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 17:38:11 2013 +0100
add package nevra for crash pages
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
index 4ff08cf..829770a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
@@ -20,6 +20,7 @@ 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.struts.RhnHelper;
+import com.redhat.rhn.manager.rhnpackage.PackageManager;
import com.redhat.rhn.manager.system.CrashManager;
import org.apache.struts.action.ActionForm;
@@ -41,6 +42,7 @@ public class SoftwareCrashesDeleteAction extends RhnAction {
public static final String CRASH_ID = "crid";
public static final String CRASH = "crash";
+ public static final String CRASH_NEVRA = "crash_nevra";
public static final String SID = "sid";
@@ -59,6 +61,9 @@ public class SoftwareCrashesDeleteAction extends RhnAction {
request.setAttribute(CRASH_ID, crashId);
Crash crash = CrashManager.lookupCrashByUserAndId(user, crashId);
request.setAttribute(CRASH, crash);
+ request.setAttribute(CRASH_NEVRA,
+ PackageManager.buildPackageNevra(crash.getPackageNameId(),
+ crash.getPackageEvrId(), crash.getPackageArchId()));
if (ctx.isSubmitted()) {
String crashName = crash.getCrash();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
index ca855b7..620400e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
@@ -25,7 +25,9 @@ import com.redhat.rhn.frontend.struts.RhnHelper;
import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.download.DownloadManager;
+import com.redhat.rhn.manager.rhnpackage.PackageManager;
import com.redhat.rhn.manager.system.CrashManager;
+
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@@ -46,6 +48,7 @@ public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
public static final String CRASH_ID = "crid";
public static final String CRASH = "crash";
+ public static final String CRASH_NEVRA = "crash_nevra";
public static final String SID = "sid";
/** {@inheritDoc} */
@@ -64,6 +67,9 @@ public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
Crash crash = CrashManager.lookupCrashByUserAndId(user, crashId);
request.setAttribute(CRASH, crash);
+ request.setAttribute(CRASH_NEVRA,
+ PackageManager.buildPackageNevra(crash.getPackageNameId(),
+ crash.getPackageEvrId(), crash.getPackageArchId()));
ListHelper helper = new ListHelper(this, request);
helper.execute();
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 10327bc..1e009e0 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
@@ -16339,6 +16339,12 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="crashes.jsp.nevra">
+ <source>Package</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="crashes.jsp.crash">
<source>Crash</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
index 2656870..d2fbfd9 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnpackage/PackageManager.java
@@ -1390,4 +1390,28 @@ public class PackageManager extends BaseManager {
throw new IncompatibleArchException(channel.getChannelArch(), archNonCompat);
}
}
+
+ public static String buildPackageNevra(Long name_id, Long evr_id, Long arch_id) {
+ String nevra = "";
+ if (name_id != null) {
+ PackageName pn = PackageFactory.lookupPackageName(name_id);
+ nevra += pn.getName();
+ if (evr_id != null) {
+ PackageEvr pevr = PackageEvrFactory.lookupPackageEvrById(evr_id);
+ if (pevr != null) {
+ nevra += "-" + pevr.getVersion() + "-" + pevr.getRelease();
+ if (!StringUtils.isEmpty(pevr.getEpoch())) {
+ nevra += ":" + pevr.getEpoch();
+ }
+ }
+ }
+ if (arch_id != null) {
+ PackageArch pa = PackageFactory.lookupPackageArchById(arch_id);
+ if (pa != null) {
+ nevra += "." + pa.getLabel();
+ }
+ }
+ }
+ return nevra;
+ }
}
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
index 7e05dea..71e086c 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
@@ -9,6 +9,14 @@
</tr>
<tr>
<th>
+ <bean:message key="crashes.jsp.nevra"/>:
+ </th>
+ <td>
+ <c:out value="${crash_nevra}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
<bean:message key="crashes.jsp.crashcount"/>:
</th>
<td>
10 years, 3 months
java/code
by Milan Zazrivec
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ac334ab650574fb63188e888672fbf6313c7557d
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Feb 28 17:44:33 2013 +0100
abrt: add missing colons
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 f99493c..10327bc 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
@@ -16316,19 +16316,19 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
</context-group>
</trans-unit>
<trans-unit id="sdc.details.overview.crashes.lastreport">
- <source>Last Report</source>
+ <source>Last Report:</source>
<context-group name="ctx">
<context context-type="sourcefile">/systems/details/Overview.do</context>
</context-group>
</trans-unit>
<trans-unit id="sdc.details.overview.crashes.uniquecrashcount">
- <source>Unique Crash Count</source>
+ <source>Unique Crash Count:</source>
<context-group name="ctx">
<context context-type="sourcefile">/systems/details/Overview.do</context>
</context-group>
</trans-unit>
<trans-unit id="sdc.details.overview.crashes.totalcrashcount">
- <source>Total Crash Count</source>
+ <source>Total Crash Count:</source>
<context-group name="ctx">
<context context-type="sourcefile">/systems/details/Overview.do</context>
</context-group>
10 years, 3 months
java/code
by Milan Zazrivec
java/code/src/com/redhat/rhn/domain/server/Crash.java | 10 ++++++++++
java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 17d05a1fd33ccc7c18bf0bde392d546bbb7ab12d
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Feb 28 17:35:16 2013 +0100
abrt: show full storage path for a crash
diff --git a/java/code/src/com/redhat/rhn/domain/server/Crash.java b/java/code/src/com/redhat/rhn/domain/server/Crash.java
index 732bd34..e18f8e5 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Crash.java
+++ b/java/code/src/com/redhat/rhn/domain/server/Crash.java
@@ -15,6 +15,8 @@
package com.redhat.rhn.domain.server;
+import com.redhat.rhn.common.conf.Config;
+import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.domain.BaseDomainHelper;
import java.util.Date;
@@ -327,6 +329,14 @@ public class Crash extends BaseDomainHelper {
}
/**
+ * Get the crash absolute storage path.
+ * @return Returns the crash storage path.
+ */
+ public String getAbsStoragePath() {
+ return Config.get().getString(ConfigDefaults.MOUNT_POINT) + "/" + storagePath;
+ }
+
+ /**
* Returns the created date.
* @return the created date.
*/
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
index fd506aa..7e05dea 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
@@ -76,7 +76,7 @@
<bean:message key="crashes.jsp.storagepath"/>:
</th>
<td>
- <c:out value="${crash.storagePath}"/>
+ <c:out value="${crash.absStoragePath}"/>
</td>
</tr>
<tr>
10 years, 3 months
java/code
by Milan Zazrivec
java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf | 2 ++
java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 8f46ea6cc45189cb26fd3bce6963a41ae8b22821
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Feb 28 17:15:10 2013 +0100
abrt: add links to crash detail page
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf
index 375c0f6..d193a0f 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_listdisplay.jspf
@@ -129,7 +129,9 @@
<bean:message key="none.message"/>
</c:when>
<c:otherwise>
+ <a href="/rhn/systems/details/SoftwareCrashes.do?sid=${current.id}">
<c:out value="${current.totalCrashCount}" escapeXml="false"/>
+ </a>
</c:otherwise>
</c:choose>
</rl:column>
diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp b/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
index cfdc4ab..758a86e 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/overview.jsp
@@ -364,11 +364,11 @@
<c:otherwise>
<tr>
<th><bean:message key="sdc.details.overview.crashes.uniquecrashcount"/></th>
- <td><c:out value="${system.crashCount.uniqueCrashCount}"/></td>
+ <td><a href="/rhn/systems/details/SoftwareCrashes.do?sid=${system.id}"><c:out value="${system.crashCount.uniqueCrashCount}"/></a></td>
</tr>
<tr>
<th><bean:message key="sdc.details.overview.crashes.totalcrashcount"/></th>
- <td><c:out value="${system.crashCount.totalCrashCount}"/></td>
+ <td><a href="/rhn/systems/details/SoftwareCrashes.do?sid=${system.id}"><c:out value="${system.crashCount.totalCrashCount}"/></a></td>
</tr>
<tr>
<th><bean:message key="sdc.details.overview.crashes.lastreport"/></th>
10 years, 3 months
java/code
by Milan Zazrivec
java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp | 2 +-
java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2053347e22b8dede4925ebc3e2a50c28ec2e9843
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Feb 28 17:01:22 2013 +0100
webui: <p/> instead of <br/>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
index 45aa023..4c71082 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
@@ -9,7 +9,7 @@
<body>
<%@ include file="/WEB-INF/pages/common/fragments/systems/system-header.jspf" %>
- <br/>
+ <p/>
<rhn:toolbar base="h1" img="/img/icon_bug.gif" imgAlt="info.alt.img">
${fn:escapeXml(crash.crash)}
</rhn:toolbar>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
index 6af767e..8f8f07a 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
@@ -11,7 +11,7 @@
<%@ include file="/WEB-INF/pages/common/fragments/systems/system-header.jspf" %>
- <br/>
+ <p/>
<rhn:toolbar base="h1" img="/img/icon_bug.gif" imgAlt="info.alt.img"
deletionUrl="SoftwareCrashDelete.do?crid=${crid}&sid=${sid}"
deletionType="crash">
10 years, 3 months
Changes to 'refs/tags/spacewalk-backend-1.9.43-1'
by Jan Pazdziora
Tag 'spacewalk-backend-1.9.43-1' created by Jan Pazdziora <jpazdziora(a)redhat.com> at 2013-02-28 15:56 +0000
Tagging package [spacewalk-backend] version [1.9.43-1] in directory [backend/].
Changes since spacewalk-backend-1.9.42-1:
Jan Pazdziora (2):
Init CFG only if it was not yet.
Automatic commit of package [spacewalk-backend] release [1.9.43-1].
Milan Zazrivec (2):
spacewalk-abrt: use absolute paths
spacewalk-abrt: remodel dump dir location logic
Tomas Lestach (5):
introducing crash list page
introducing crash details page
introducing crash delete page
adding crash files on the crash detail page
adding system headers for the crash pages
---
backend/server/rhnSQL/__init__.py | 3
backend/spacewalk-backend.spec | 5
client/tools/spacewalk-abrt/src/bin/spacewalk-abrt | 12
client/tools/spacewalk-abrt/src/spacewalk_abrt/abrt.py | 18 -
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 12
java/code/src/com/redhat/rhn/domain/server/CrashFile.java | 1
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 17 +
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java | 84 +++++
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java | 75 ++++
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java | 89 +++++
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java | 110 +++++++
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java | 151 ++++++++++
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 15
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 150 +++++++++
java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java | 4
java/code/webapp/WEB-INF/nav/system_detail.xml | 6
java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf | 90 +++++
java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp | 39 ++
java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp | 77 +++++
java/code/webapp/WEB-INF/pages/systems/crashes.jsp | 90 +++++
java/code/webapp/WEB-INF/struts-config.xml | 32 ++
rel-eng/packages/spacewalk-backend | 2
22 files changed, 1062 insertions(+), 20 deletions(-)
---
10 years, 3 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Jan Pazdziora
backend/server/rhnSQL/__init__.py | 3 ++-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit bb2153a4dcc32d0c9de9ebea53e8f15dc9fef513
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Feb 28 16:56:30 2013 +0100
Automatic commit of package [spacewalk-backend] release [1.9.43-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 18d2157..8d10d58 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.9.42
+Version: 1.9.43
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -638,6 +638,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu Feb 28 2013 Jan Pazdziora 1.9.43-1
+- Init CFG only if it was not yet.
+
* Thu Feb 28 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.9.42-1
- reverted --db-only removal
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 991d409..6b107d6 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.9.42-1 backend/
+1.9.43-1 backend/
commit 70a4fe599ee593dd0fa86fc549906c12f869e42a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Feb 28 16:56:08 2013 +0100
Init CFG only if it was not yet.
diff --git a/backend/server/rhnSQL/__init__.py b/backend/server/rhnSQL/__init__.py
index 5b03dbf..b2d10c6 100644
--- a/backend/server/rhnSQL/__init__.py
+++ b/backend/server/rhnSQL/__init__.py
@@ -81,7 +81,8 @@ def initDB(backend=None, host=None, port=None, username=None,
"""
if backend is None:
- initCFG('server')
+ if CFG is None or not CFG.is_initialized():
+ initCFG('server')
backend = CFG.DB_BACKEND
host = CFG.DB_HOST
port = CFG.DB_PORT
10 years, 3 months
5 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 12
java/code/src/com/redhat/rhn/domain/server/CrashFile.java | 1
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 17 +
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java | 84 +++++
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java | 75 ++++
java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java | 89 +++++
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java | 110 +++++++
java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java | 151 ++++++++++
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 15
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 150 +++++++++
java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java | 4
java/code/webapp/WEB-INF/nav/system_detail.xml | 6
java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf | 90 +++++
java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp | 39 ++
java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp | 77 +++++
java/code/webapp/WEB-INF/pages/systems/crashes.jsp | 90 +++++
java/code/webapp/WEB-INF/struts-config.xml | 32 ++
17 files changed, 1040 insertions(+), 2 deletions(-)
New commits:
commit bf17d080a31d0991068426b5826605d2c8fb3629
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 15:21:19 2013 +0100
adding system headers for the crash pages
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
index c60adbd..4ff08cf 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
@@ -41,6 +41,8 @@ public class SoftwareCrashesDeleteAction extends RhnAction {
public static final String CRASH_ID = "crid";
public static final String CRASH = "crash";
+ public static final String SID = "sid";
+
/** {@inheritDoc} */
public ActionForward execute(ActionMapping mapping,
@@ -50,6 +52,8 @@ public class SoftwareCrashesDeleteAction extends RhnAction {
RequestContext ctx = new RequestContext(request);
User user = ctx.getCurrentUser();
+ ctx.lookupAndBindServer();
+ ctx.copyParamToAttributes(SID);
Long crashId = ctx.getParamAsLong(CRASH_ID);
request.setAttribute(CRASH_ID, crashId);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
index b0ef1fd..ca855b7 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
@@ -46,6 +46,7 @@ public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
public static final String CRASH_ID = "crid";
public static final String CRASH = "crash";
+ public static final String SID = "sid";
/** {@inheritDoc} */
public ActionForward execute(ActionMapping mapping,
@@ -55,6 +56,8 @@ public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
RequestContext ctx = new RequestContext(request);
User user = ctx.getCurrentUser();
+ ctx.lookupAndBindServer();
+ ctx.copyParamToAttributes(SID);
Long crashId = ctx.getParamAsLong(CRASH_ID);
request.setAttribute(CRASH_ID, crashId);
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
index ac90114..45aa023 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
@@ -7,6 +7,9 @@
<html:html xhtml="true">
<body>
+<%@ include file="/WEB-INF/pages/common/fragments/systems/system-header.jspf" %>
+
+ <br/>
<rhn:toolbar base="h1" img="/img/icon_bug.gif" imgAlt="info.alt.img">
${fn:escapeXml(crash.crash)}
</rhn:toolbar>
@@ -25,6 +28,7 @@
<div align="right">
<hr/>
<html:hidden property="crid" value="${crid}"/>
+ <html:hidden property="sid" value="${sid}"/>
<html:submit property="delete_button">
<bean:message key="crashes.jsp.delete"/>
</html:submit>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
index bdd1bac..6af767e 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
@@ -8,8 +8,12 @@
<html:html xhtml="true">
<body>
+
+<%@ include file="/WEB-INF/pages/common/fragments/systems/system-header.jspf" %>
+
+ <br/>
<rhn:toolbar base="h1" img="/img/icon_bug.gif" imgAlt="info.alt.img"
- deletionUrl="SoftwareCrashDelete.do?crid=${crid}"
+ deletionUrl="SoftwareCrashDelete.do?crid=${crid}&sid=${sid}"
deletionType="crash">
${fn:escapeXml(crash.crash)}
</rhn:toolbar>
@@ -66,6 +70,7 @@
exportColumns="filename,path,filesize,modified"
header="${crash.crash}"/>
<html:hidden property="crid" value="${crid}"/>
+ <html:hidden property="sid" value="${sid}"/>
</rl:listset>
</body>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
index 48e9b3e..908118e 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
@@ -45,7 +45,7 @@
<rl:column headerkey="crashes.jsp.crash" bound="false"
sortattr="crash"
sortable="true">
- <a href="/rhn/systems/details/SoftwareCrashDetail.do?crid=${current.id}">
+ <a href="/rhn/systems/details/SoftwareCrashDetail.do?crid=${current.id}&sid=${sid}">
${current.crash}
</a>
</rl:column>
commit dfeb56eab8243a385fcdeca1a834b099fd687fe1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 28 10:39:31 2013 +0100
adding crash files on the crash detail page
diff --git a/java/code/src/com/redhat/rhn/domain/server/CrashFile.java b/java/code/src/com/redhat/rhn/domain/server/CrashFile.java
index 85849f4..6cf1fd2 100644
--- a/java/code/src/com/redhat/rhn/domain/server/CrashFile.java
+++ b/java/code/src/com/redhat/rhn/domain/server/CrashFile.java
@@ -16,7 +16,6 @@
package com.redhat.rhn.domain.server;
import com.redhat.rhn.domain.BaseDomainHelper;
-
import java.util.Date;
/**
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
index 57b0f74..b0ef1fd 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
@@ -14,15 +14,26 @@
*/
package com.redhat.rhn.frontend.action.systems;
+import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.domain.server.Crash;
+import com.redhat.rhn.domain.server.CrashFile;
import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.dto.SoftwareCrashFileDto;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.struts.RhnHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+import com.redhat.rhn.manager.download.DownloadManager;
import com.redhat.rhn.manager.system.CrashManager;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -31,7 +42,7 @@ import javax.servlet.http.HttpServletResponse;
* SoftwareCrashesDetailsAction
* @version $Rev$
*/
-public class SoftwareCrashesDetailsAction extends RhnAction {
+public class SoftwareCrashesDetailsAction extends RhnAction implements Listable{
public static final String CRASH_ID = "crid";
public static final String CRASH = "crash";
@@ -51,6 +62,25 @@ public class SoftwareCrashesDetailsAction extends RhnAction {
Crash crash = CrashManager.lookupCrashByUserAndId(user, crashId);
request.setAttribute(CRASH, crash);
+ ListHelper helper = new ListHelper(this, request);
+ helper.execute();
+
return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
+
+ /** {@inheritDoc} */
+ public List getResult(RequestContext contextIn) {
+ User user = contextIn.getCurrentUser();
+ Long crashId = contextIn.getParamAsLong(CRASH_ID);
+ Crash crash = CrashManager.lookupCrashByUserAndId(user, crashId);
+ DataResult<SoftwareCrashFileDto> dr = new DataResult<SoftwareCrashFileDto>(
+ new ArrayList<SoftwareCrashFileDto>());
+ for (Iterator iter = crash.getCrashFiles().iterator(); iter.hasNext();) {
+ CrashFile cf = (CrashFile) iter.next();
+ SoftwareCrashFileDto scDto = new SoftwareCrashFileDto(cf);
+ scDto.setDownloadPath(DownloadManager.getCrashFileDownloadPath(cf, contextIn.getCurrentUser()));
+ dr.add(scDto);
+ }
+ return dr;
+ }
}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java
new file mode 100644
index 0000000..a5c3fed
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashFileDto.java
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) 2013 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.dto;
+
+import com.redhat.rhn.common.util.StringUtil;
+import com.redhat.rhn.domain.server.CrashFile;
+
+import java.util.Date;
+
+
+/**
+ * SoftwareCrashFileDto
+ * @version $Rev$
+ */
+public class SoftwareCrashFileDto extends BaseDto {
+
+ private Long id;
+ private String filename;
+ private String path;
+ private long filesize;
+ private Date modified;
+ private String downloadPath;
+
+ /**
+ *
+ */
+ public SoftwareCrashFileDto(CrashFile cFile ) {
+ id = cFile.getId();
+ filename = cFile.getFilename();
+ path = cFile.getPath();
+ filesize = cFile.getFilesize();
+ modified = cFile.getModified();
+ }
+
+
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+
+
+ /**
+ * @param idIn The id to set.
+ */
+ public void setId(Long idIn) {
+ id = idIn;
+ }
+
+
+ /**
+ * @return Returns the filename.
+ */
+ public String getFilename() {
+ return filename;
+ }
+
+
+ /**
+ * @param filenameIn The filename to set.
+ */
+ public void setFilename(String filenameIn) {
+ filename = filenameIn;
+ }
+
+
+ /**
+ * @return Returns the path.
+ */
+ public String getPath() {
+ return path;
+ }
+
+
+ /**
+ * @param pathIn The path to set.
+ */
+ public void setPath(String pathIn) {
+ path = pathIn;
+ }
+
+
+ /**
+ * @return Returns the filesize.
+ */
+ public long getFilesize() {
+ return filesize;
+ }
+
+
+ /**
+ * @param filesizeIn The filesize to set.
+ */
+ public void setFilesize(long filesizeIn) {
+ filesize = filesizeIn;
+ }
+
+
+ /**
+ * @return Returns the modified.
+ */
+ public Date getModified() {
+ return modified;
+ }
+
+
+ /**
+ * @param modifiedIn The modified to set.
+ */
+ public void setModified(Date modifiedIn) {
+ modified = modifiedIn;
+ }
+
+
+ /**
+ * @return Returns the downloadPath.
+ */
+ public String getDownloadPath() {
+ return downloadPath;
+ }
+
+
+ /**
+ * @param downloadPathIn The downloadPath to set.
+ */
+ public void setDownloadPath(String downloadPathIn) {
+ downloadPath = downloadPathIn;
+ }
+
+
+ /**
+ * Get a display friendly version of the file size
+ * @return the size
+ */
+ public String getFilesizeString() {
+ return StringUtil.displayFileSize(getFilesize());
+ }
+}
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 f0adeac..f99493c 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
@@ -15794,6 +15794,12 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<trans-unit id="exportcolumn.count">
<source>Crash Count</source>
</trans-unit>
+ <trans-unit id="exportcolumn.filename">
+ <source>File Name</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.filesize">
+ <source>File Size</source>
+ </trans-unit>
</group>
<trans-unit id="virtualization.provision.first.jsp.no.profiles">
<source>No profiles currently available for kickstarting guests. Please <a href="/rhn/kickstart/CreateProfileWizard.do">create a new kickstart profile with a Virtualization Type other than none.</a></source>
@@ -16369,6 +16375,12 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="crashes.jsp.nocrashfiles">
+ <source>There are no crash files associated with this software crash.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="crashes.jsp.details">
<source>Software Crash Details</source>
<context-group name="ctx">
@@ -16393,6 +16405,66 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="crashes.jsp.path">
+ <source>Path</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.analyzer">
+ <source>Analyzer</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.cmdline">
+ <source>Command Line</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.executable">
+ <source>Executable</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.kernel">
+ <source>Kernel</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.reason">
+ <source>Reason</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.username">
+ <source>Username</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.storagepath">
+ <source>Storage Path</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.filename">
+ <source>Filename</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.filesize">
+ <source>File Size</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="sdc.details.migrate.header">
<source>Migrate System Between Organizations</source>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
index e42499c..fd506aa 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
@@ -17,6 +17,70 @@
</tr>
<tr>
<th>
+ <bean:message key="crashes.jsp.path"/>:
+ </th>
+ <td>
+ <c:out value="${crash.path}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.analyzer"/>:
+ </th>
+ <td>
+ <c:out value="${crash.analyzer}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.cmdline"/>:
+ </th>
+ <td>
+ <c:out value="${crash.cmdline}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.executable"/>:
+ </th>
+ <td>
+ <c:out value="${crash.executable}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.kernel"/>:
+ </th>
+ <td>
+ <c:out value="${crash.kernel}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.reason"/>:
+ </th>
+ <td>
+ <c:out value="${crash.reason}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.username"/>:
+ </th>
+ <td>
+ <c:out value="${crash.username}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.storagepath"/>:
+ </th>
+ <td>
+ <c:out value="${crash.storagePath}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
<bean:message key="lastModified"/>:
</th>
<td>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
index 55537e1..bdd1bac 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
@@ -1,5 +1,6 @@
<%@ 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://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
@@ -20,5 +21,52 @@
<%@ include file="/WEB-INF/pages/common/fragments/systems/crash_details.jspf" %>
+<hr/>
+
+<rl:listset name="crashFileList">
+ <rhn:csrf />
+ <rl:list
+ width="100%"
+ styleclass="list"
+ emptykey="crashes.jsp.nocrashfiles"
+ alphabarcolumn="filename">
+
+ <rl:decorator name="PageSizeDecorator"/>
+
+ <rl:column headerkey="crashes.jsp.filename" bound="false"
+ sortattr="filename"
+ sortable="true"
+ filterattr="filename">
+ <a href="${current.downloadPath}">
+ ${current.filename}
+ </a>
+ </rl:column>
+
+ <rl:column headerkey="crashes.jsp.path" bound="false"
+ sortattr="path"
+ sortable="true">
+ ${current.path}
+ </rl:column>
+
+ <rl:column headerkey="crashes.jsp.filesize" bound="false"
+ sortattr="filesize"
+ sortable="true">
+ ${current.filesizeString}
+ </rl:column>
+
+ <rl:column headerkey="lastModified" bound="false"
+ styleclass="last-column thin-column"
+ sortattr="modifiedObject"
+ sortable="true">
+ ${current.modified}
+ </rl:column>
+ </rl:list>
+ <rl:csv
+ name="crashFileList"
+ exportColumns="filename,path,filesize,modified"
+ header="${crash.crash}"/>
+ <html:hidden property="crid" value="${crid}"/>
+</rl:listset>
+
</body>
</html:html>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
index c253b25..48e9b3e 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
@@ -72,7 +72,10 @@
</rl:list>
<html:hidden property="sid" value="${sid}"/>
- <rhn:submitted />
+ <rl:csv
+ name="crashesList"
+ exportColumns="crash,count,component,modified"
+ header="${system.name}"/>
<div align="right">
<hr />
@@ -80,11 +83,6 @@
<bean:message key="crashes.jsp.delete.button"/>
</html:submit>
</div>
-
- <rl:csv
- name="crashesList"
- exportColumns="crash,count,component,modified"
- header="${system.name}"/>
<rhn:submitted/>
</rl:listset>
commit dd6b9d2bc668b405530d11c8b308c68ac205136b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 27 15:43:23 2013 +0100
introducing crash delete page
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
new file mode 100644
index 0000000..c60adbd
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDeleteAction.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2013 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.server.Crash;
+import com.redhat.rhn.domain.server.CrashFactory;
+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.struts.RhnHelper;
+import com.redhat.rhn.manager.system.CrashManager;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * SoftwareCrashesDeleteAction
+ * @version $Rev$
+ */
+public class SoftwareCrashesDeleteAction extends RhnAction {
+
+ public static final String CRASH_ID = "crid";
+ public static final String CRASH = "crash";
+
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ RequestContext ctx = new RequestContext(request);
+ User user = ctx.getCurrentUser();
+
+ Long crashId = ctx.getParamAsLong(CRASH_ID);
+ request.setAttribute(CRASH_ID, crashId);
+ Crash crash = CrashManager.lookupCrashByUserAndId(user, crashId);
+ request.setAttribute(CRASH, crash);
+
+ if (ctx.isSubmitted()) {
+ String crashName = crash.getCrash();
+ CrashFactory.delete(crash);
+ createSuccessMessage(request, "message.crashdeleted", crashName);
+ Map params = new HashMap();
+ params.put("sid", crash.getServer().getId());
+ return getStrutsDelegate().forwardParams(mapping.findForward("delete"),
+ params);
+ }
+
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 3dff61e..162a659 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -7520,6 +7520,9 @@ Follow this url to see the full list of inactive systems:
<trans-unit id="message.scheduledisabled">
<source>Please set frequency for the new schedule.</source>
</trans-unit>
+ <trans-unit id="message.crashdeleted">
+ <source>Software crash {0} was successfully deleted.</source>
+ </trans-unit>
<trans-unit id="kickstart.cobbler.profile.invalidvirt">
<source>Para-Virtualization is unsupported with the selected kickstart tree or distribution.</source>
</trans-unit>
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 c4a6033..f0adeac 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
@@ -16381,6 +16381,18 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="crashes.jsp.delete">
+ <source>Delete Software Crash</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.delete.summary">
+ <source>Software Crash will be deleted.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="sdc.details.migrate.header">
<source>Migrate System Between Organizations</source>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
new file mode 100644
index 0000000..e42499c
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/crash_details.jspf
@@ -0,0 +1,26 @@
+ <table class="details">
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.component"/>:
+ </th>
+ <td>
+ <c:out value="${crash.component}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.crashcount"/>:
+ </th>
+ <td>
+ <c:out value="${crash.count}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="lastModified"/>:
+ </th>
+ <td>
+ <c:out value="${crash.modified}"/>
+ </td>
+ </tr>
+ </table>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
new file mode 100644
index 0000000..ac90114
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdelete.jsp
@@ -0,0 +1,35 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
+<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+
+
+<html:html xhtml="true">
+<body>
+ <rhn:toolbar base="h1" img="/img/icon_bug.gif" imgAlt="info.alt.img">
+ ${fn:escapeXml(crash.crash)}
+ </rhn:toolbar>
+ <h2><bean:message key="crashes.jsp.delete"/></h2>
+
+<div class="page-summary">
+ <p><bean:message key="crashes.jsp.delete.summary"/></p>
+</div>
+
+<form method="POST" name="rhn_list" action="/rhn/systems/details/SoftwareCrashDelete.do">
+ <rhn:csrf />
+ <rhn:submitted/>
+
+ <%@ include file="/WEB-INF/pages/common/fragments/systems/crash_details.jspf" %>
+
+ <div align="right">
+ <hr/>
+ <html:hidden property="crid" value="${crid}"/>
+ <html:submit property="delete_button">
+ <bean:message key="crashes.jsp.delete"/>
+ </html:submit>
+ </div>
+</form>
+
+</body>
+</html:html>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
index 0fb55d0..55537e1 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
@@ -18,32 +18,7 @@
<p><bean:message key="crashes.jsp.details.summary"/></p>
</div>
- <table class="details">
- <tr>
- <th>
- <bean:message key="crashes.jsp.component"/>:
- </th>
- <td>
- <c:out value="${crash.component}"/>
- </td>
- </tr>
- <tr>
- <th>
- <bean:message key="crashes.jsp.crashcount"/>:
- </th>
- <td>
- <c:out value="${crash.count}"/>
- </td>
- </tr>
- <tr>
- <th>
- <bean:message key="lastModified"/>:
- </th>
- <td>
- <c:out value="${crash.modified}"/>
- </td>
- </tr>
- </table>
+<%@ include file="/WEB-INF/pages/common/fragments/systems/crash_details.jspf" %>
</body>
</html:html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 335a340..3290fd8 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3620,6 +3620,18 @@
path="/WEB-INF/pages/systems/crashdetail.jsp"/>
</action>
+ <action path="/systems/details/SoftwareCrashDelete"
+ scope="request"
+ input="/WEB-INF/pages/systems/crashdelete.jsp"
+ type="com.redhat.rhn.frontend.action.systems.SoftwareCrashesDeleteAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <set-property property="postRequiredIfSubmitted" value="true" />
+ <forward name="default"
+ path="/WEB-INF/pages/systems/crashdelete.jsp"/>
+ <forward name="delete"
+ path="/systems/details/SoftwareCrashes.do" redirect="true"/>
+ </action>
+
<action path="/systems/details/groups/ListRemove"
scope="request"
type="com.redhat.rhn.frontend.action.systems.groups.ListRemoveGroupsAction"
commit e51dc8b29d0ba110ad2133ae7be00ad2230dc6df
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 27 14:43:23 2013 +0100
introducing crash details page
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
new file mode 100644
index 0000000..57b0f74
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesDetailsAction.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2013 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.server.Crash;
+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.struts.RhnHelper;
+import com.redhat.rhn.manager.system.CrashManager;
+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;
+
+
+/**
+ * SoftwareCrashesDetailsAction
+ * @version $Rev$
+ */
+public class SoftwareCrashesDetailsAction extends RhnAction {
+
+ public static final String CRASH_ID = "crid";
+ public static final String CRASH = "crash";
+
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ RequestContext ctx = new RequestContext(request);
+ User user = ctx.getCurrentUser();
+
+ Long crashId = ctx.getParamAsLong(CRASH_ID);
+ request.setAttribute(CRASH_ID, crashId);
+
+ Crash crash = CrashManager.lookupCrashByUserAndId(user, crashId);
+ request.setAttribute(CRASH, crash);
+
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index f7d0e86..3dff61e 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -2400,6 +2400,12 @@ available for this kickstart profile to function properly.
<context context-type="sourcefile">/rhn/systems/details/packages/profiles/CompareProfiles.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="toolbar.delete.crash">
+ <source>delete software crash</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SoftwareCrashDetail.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="message.unscheduled.system">
<source><strong>{0}</strong> unscheduled for <strong>{1}</strong> system.</source>
<context-group name="ctx">
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 70dcbbf..c4a6033 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
@@ -16369,6 +16369,18 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="crashes.jsp.details">
+ <source>Software Crash Details</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.details.summary">
+ <source>Below are the Software Crash details.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="sdc.details.migrate.header">
<source>Migrate System Between Organizations</source>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
new file mode 100644
index 0000000..0fb55d0
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/systems/crashdetail.jsp
@@ -0,0 +1,49 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
+<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+
+
+<html:html xhtml="true">
+<body>
+ <rhn:toolbar base="h1" img="/img/icon_bug.gif" imgAlt="info.alt.img"
+ deletionUrl="SoftwareCrashDelete.do?crid=${crid}"
+ deletionType="crash">
+ ${fn:escapeXml(crash.crash)}
+ </rhn:toolbar>
+ <h2><bean:message key="crashes.jsp.details"/></h2>
+
+<div class="page-summary">
+ <p><bean:message key="crashes.jsp.details.summary"/></p>
+</div>
+
+ <table class="details">
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.component"/>:
+ </th>
+ <td>
+ <c:out value="${crash.component}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="crashes.jsp.crashcount"/>:
+ </th>
+ <td>
+ <c:out value="${crash.count}"/>
+ </td>
+ </tr>
+ <tr>
+ <th>
+ <bean:message key="lastModified"/>:
+ </th>
+ <td>
+ <c:out value="${crash.modified}"/>
+ </td>
+ </tr>
+ </table>
+
+</body>
+</html:html>
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
index 63d4e5b..c253b25 100644
--- a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
@@ -45,7 +45,9 @@
<rl:column headerkey="crashes.jsp.crash" bound="false"
sortattr="crash"
sortable="true">
- ${current.crash}
+ <a href="/rhn/systems/details/SoftwareCrashDetail.do?crid=${current.id}">
+ ${current.crash}
+ </a>
</rl:column>
<rl:column headerkey="crashes.jsp.crashcount" bound="false"
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 7fb3c01..335a340 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3610,6 +3610,16 @@
path="/WEB-INF/pages/systems/crashes.jsp"/>
</action>
+ <action path="/systems/details/SoftwareCrashDetail"
+ scope="request"
+ input="/WEB-INF/pages/systems/crashdetail.jsp"
+ type="com.redhat.rhn.frontend.action.systems.SoftwareCrashesDetailsAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <set-property property="postRequiredIfSubmitted" value="true" />
+ <forward name="default"
+ path="/WEB-INF/pages/systems/crashdetail.jsp"/>
+ </action>
+
<action path="/systems/details/groups/ListRemove"
scope="request"
type="com.redhat.rhn.frontend.action.systems.groups.ListRemoveGroupsAction"
commit 3274b83198093276f02f73e352a5a596ab812434
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 25 14:42:21 2013 +0100
introducing crash list page
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index 0df02fe..3d3825c 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -1425,6 +1425,18 @@ ORDER BY PN.name, PE.evr
</query>
</mode>
+<mode name="list_server_software_crashes">
+ <query params="server_id">
+SELECT id,
+ crash,
+ count,
+ component,
+ modified
+ FROM rhnServerCrash
+ WHERE server_id = :server_id
+ </query>
+</mode>
+
<callable-mode name="delete_server">
<query params="server_id">
{ call delete_server(:server_id) }
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
index dc1cb52..121939e 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -26,6 +26,7 @@ import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnpackage.PackageEvrFactory;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.HistoryEvent;
+import com.redhat.rhn.frontend.dto.SoftwareCrashDto;
import com.redhat.rhn.frontend.xmlrpc.ChannelSubscriptionException;
import com.redhat.rhn.manager.rhnset.RhnSetDecl;
import com.redhat.rhn.manager.system.UpdateBaseChannelCommand;
@@ -859,4 +860,18 @@ public class ServerFactory extends HibernateFactory {
.uniqueResult();
return retval;
}
-}
+
+ /**
+ * Looks up snapshot tag by tag name
+ * @param tagName name of the tag
+ * @return snapshot tag
+ */
+ public static List<SoftwareCrashDto> listServerSoftwareCrashes(Server server) {
+ SelectMode m = ModeFactory.getMode("System_queries",
+ "list_server_software_crashes");
+ Map params = new HashMap();
+ // params.put("org_id", user.getOrg().getId());
+ params.put("server_id", server.getId());
+ return m.execute(params);
+ }
+}
\ No newline at end of file
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java
new file mode 100644
index 0000000..7d5991b
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SoftwareCrashesAction.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2013 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.server.Server;
+import com.redhat.rhn.domain.server.ServerFactory;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.dto.SoftwareCrashDto;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.struts.RhnHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListRhnSetHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+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 java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * SoftwareCrashesAction
+ * @version $Rev$
+ */
+public class SoftwareCrashesAction extends RhnAction implements Listable {
+
+ /**
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ RequestContext context = new RequestContext(request);
+ context.copyParamToAttributes("sid");
+ context.lookupAndBindServer();
+
+ ListRhnSetHelper helper = new ListRhnSetHelper(this, request, getSetDecl());
+ helper.execute();
+ if (helper.isDispatched()) {
+ return handleSubmit(mapping, formIn, request, response);
+ }
+
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+
+ protected ActionForward handleSubmit(ActionMapping mapping,
+ ActionForm formIn, HttpServletRequest request,
+ HttpServletResponse response) {
+ return mapping.findForward("default");
+ }
+
+ protected RhnSetDecl getSetDecl() {
+ return RhnSetDecl.SYSTEM_CRASHES;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<SoftwareCrashDto> getResult(RequestContext contextIn) {
+ User user = contextIn.getCurrentUser();
+ Long serverId = contextIn.getParamAsLong("sid");
+ Server server = ServerFactory.lookupByIdAndOrg(serverId, user.getOrg());
+ return ServerFactory.listServerSoftwareCrashes(server);
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java
new file mode 100644
index 0000000..58f9c5d
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SoftwareCrashDto.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2013 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.dto;
+
+import com.redhat.rhn.common.localization.LocalizationService;
+
+import java.util.Date;
+
+/**
+ * SoftwareCrashDto
+ * @version $Rev$
+ */
+public class SoftwareCrashDto extends BaseDto {
+
+ Long id;
+ String crash;
+ Long count;
+ String component;
+ Date modified;
+
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+
+ /**
+ * @param idIn The id to set.
+ */
+ public void setId(Long idIn) {
+ id = idIn;
+ }
+
+ /**
+ * @return Returns the crash.
+ */
+ public String getCrash() {
+ return crash;
+ }
+
+ /**
+ * @param crashIn The crash to set.
+ */
+ public void setCrash(String crashIn) {
+ crash = crashIn;
+ }
+
+ /**
+ * @return Returns the count.
+ */
+ public Long getCount() {
+ return count;
+ }
+
+ /**
+ * @param countIn The count to set.
+ */
+ public void setCount(Long countIn) {
+ count = countIn;
+ }
+
+ /**
+ * @return Returns the component.
+ */
+ public String getComponent() {
+ return component;
+ }
+
+ /**
+ * @param componentIn The component to set.
+ */
+ public void setComponent(String componentIn) {
+ component = componentIn;
+ }
+
+ /**
+ * @return Returns the modified string.
+ */
+ public String getModified() {
+ return LocalizationService.getInstance().formatDate(modified);
+ }
+
+ /**
+ * @return Returns the modified sort object.
+ */
+ public Date getModifiedObject() {
+ return modified;
+ }
+
+ /**
+ * @param modifiedIn The modified to set.
+ */
+ public void setModified(Date modifiedIn) {
+ modified = modifiedIn;
+ }
+
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index d4f0a16..f7d0e86 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -781,6 +781,12 @@
<context context-type="sourcefile">Navigation Menu</context>
</context-group>
</trans-unit>
+ <trans-unit id="Software Crashes">
+ <source>Software Crashes</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">Navigation Menu</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="Status">
<source>Status</source>
<context-group name="ctx">
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 93abeb8..70dcbbf 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
@@ -15782,6 +15782,18 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<trans-unit id="exportcolumn.score">
<source>Score</source>
</trans-unit>
+ <trans-unit id="exportcolumn.crash">
+ <source>Scratch</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.component">
+ <source>Component</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.modified">
+ <source>Modified</source>
+ </trans-unit>
+ <trans-unit id="exportcolumn.count">
+ <source>Crash Count</source>
+ </trans-unit>
</group>
<trans-unit id="virtualization.provision.first.jsp.no.profiles">
<source>No profiles currently available for kickstarting guests. Please <a href="/rhn/kickstart/CreateProfileWizard.do">create a new kickstart profile with a Virtualization Type other than none.</a></source>
@@ -16315,6 +16327,48 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
<context context-type="sourcefile">/systems/details/Overview.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="crashes.jsp.crashcount">
+ <source>Crash Count</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.crash">
+ <source>Crash</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.crashes">
+ <source>Software System Crashes</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.component">
+ <source>Component</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.delete.button">
+ <source>Delete Crash(es)</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/systems/details/SoftwareCrashes.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.summary">
+ <source>Software crashes reported for this system.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="crashes.jsp.nocrashes">
+ <source>There are no software crashes reported for this system.</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/details/SystemChannels.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="sdc.details.migrate.header">
<source>Migrate System Between Organizations</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java b/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
index da1a683..553f071 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
@@ -68,6 +68,10 @@ public class RhnSetDecl {
public static final RhnSetDecl CHANNELS_FOR_ERRATA = make(
"channels_for_errata", SetCleanup.UNOWNED_CHANNELS);
+ // set of system crashes
+ public static final RhnSetDecl SYSTEM_CRASHES = make(
+ "crashes_for_system", SetCleanup.NOOP);
+
// set of errata by errata_id
public static final RhnSetDecl ERRATA = make("errata_list",
SetCleanup.ILLEGAL_ERRATA);
diff --git a/java/code/webapp/WEB-INF/nav/system_detail.xml b/java/code/webapp/WEB-INF/nav/system_detail.xml
index ec5b11a..3782cc0 100644
--- a/java/code/webapp/WEB-INF/nav/system_detail.xml
+++ b/java/code/webapp/WEB-INF/nav/system_detail.xml
@@ -84,6 +84,12 @@
<rhn-tab name="Software Channels" acl="system_feature(ftr_package_updates)">
<rhn-tab-url>/rhn/systems/details/SystemChannels.do</rhn-tab-url>
</rhn-tab>
+
+ <rhn-tab name="Software Crashes">
+ <rhn-tab-url>/rhn/systems/details/SoftwareCrashes.do</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/details/SoftwareCrashDetail.do</rhn-tab-url>
+ <rhn-tab-url>/rhn/systems/details/SoftwareCrashDelete.do</rhn-tab-url>
+ </rhn-tab>
</rhn-tab>
<rhn-tab name="Configuration" acl="system_feature(ftr_config)" url="/rhn/systems/details/configuration/Overview.do" node-id="selected_configfiles">
diff --git a/java/code/webapp/WEB-INF/pages/systems/crashes.jsp b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
new file mode 100644
index 0000000..63d4e5b
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/systems/crashes.jsp
@@ -0,0 +1,90 @@
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
+<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
+<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
+
+<html:xhtml/>
+<html>
+<head>
+ <meta name="name" value="System Details" />
+</head>
+<body>
+
+<%@ include file="/WEB-INF/pages/common/fragments/systems/system-header.jspf" %>
+
+<h2>
+ <img src="/img/icon_bug.gif"
+ alt="<bean:message key='crashes.jsp.crashes' />" />
+ <bean:message key="crashes.jsp.crashes"/>
+</h2>
+
+ <div class="page-summary">
+ <p>
+ <bean:message key="crashes.jsp.summary"/>
+ </p>
+ </div>
+
+<rl:listset name="crashesList">
+ <rhn:csrf />
+
+ <rl:list
+ width="100%"
+ name="crashesList"
+ styleclass="list"
+ emptykey="crashes.jsp.nocrashes"
+ alphabarcolumn="component">
+
+ <rl:decorator name="PageSizeDecorator"/>
+ <rl:decorator name="SelectableDecorator"/>
+
+ <rl:selectablecolumn value="${current.selectionKey}"
+ selected="${current.selected}"
+ styleclass="first-column"/>
+
+ <rl:column headerkey="crashes.jsp.crash" bound="false"
+ sortattr="crash"
+ sortable="true">
+ ${current.crash}
+ </rl:column>
+
+ <rl:column headerkey="crashes.jsp.crashcount" bound="false"
+ sortattr="count"
+ sortable="true">
+ ${current.count}
+ </rl:column>
+
+ <rl:column headerkey="crashes.jsp.component" bound="false"
+ sortattr="component"
+ sortable="true"
+ filterattr="component">
+ ${current.component}
+ </rl:column>
+
+ <rl:column headerkey="lastModified" bound="false"
+ styleclass="last-column thin-column"
+ sortattr="modifiedObject"
+ sortable="true">
+ ${current.modified}
+ </rl:column>
+ </rl:list>
+
+ <html:hidden property="sid" value="${sid}"/>
+ <rhn:submitted />
+
+ <div align="right">
+ <hr />
+ <html:submit property="dispatch">
+ <bean:message key="crashes.jsp.delete.button"/>
+ </html:submit>
+ </div>
+
+ <rl:csv
+ name="crashesList"
+ exportColumns="crash,count,component,modified"
+ header="${system.name}"/>
+ <rhn:submitted/>
+</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 0109798..7fb3c01 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -3600,6 +3600,16 @@
redirect="true"/>
</action>
+ <action path="/systems/details/SoftwareCrashes"
+ scope="request"
+ input="/WEB-INF/pages/systems/crashes.jsp"
+ type="com.redhat.rhn.frontend.action.systems.SoftwareCrashesAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <set-property property="postRequiredIfSubmitted" value="true" />
+ <forward name="default"
+ path="/WEB-INF/pages/systems/crashes.jsp"/>
+ </action>
+
<action path="/systems/details/groups/ListRemove"
scope="request"
type="com.redhat.rhn.frontend.action.systems.groups.ListRemoveGroupsAction"
10 years, 3 months