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"