Hello all,
Attached are three patches to fix some little issues in some of my
previously submitted code. The first adds one more place to display
"Symlink" instead of a text file. The second and third fix little UI
nits with audit reviewing - empty sections can now be marked as
"reviewed" and machine pagination is fixed. Please apply to master.
Thanks,
Joshua Roys
>From ec51ddfb242e2d20abfa13cb23fa477055f2a60f Mon Sep 17 00:00:00 2001
From: Joshua Roys <[email protected]>
Date: Tue, 15 Sep 2009 09:11:28 -0400
Subject: [PATCH 1/3] Display 'File Type' as 'Symlink' in file details
---
.../frontend/strings/jsp/StringResource_en_US.xml | 6 ++++++
.../fragments/configuration/files/details.jspf | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
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 86a1734..155164d 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
@@ -14122,6 +14122,12 @@ centrally-managed configuration channel, {2}; below is
a list of systems you may
<context
context-type="sourcefile">/rhn/configuration/file/FileDetails.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="filedetails.details.jspf.symlink">
+<source>Symlink</source>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/configuration/file/FileDetails.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="filedetails.manage_header.jspf.label">
<source>{0} from channel <a href="{2}">{1}</a></source>
<context-group name="ctx">
diff --git
a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/details.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/details.jspf
index 2eb5dda..02515d5 100644
---
a/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/details.jspf
+++
b/java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/details.jspf
@@ -76,6 +76,9 @@
<c:when test="${revision.directory}">
<bean:message key="filedetails.details.jspf.directory" />
</c:when>
+ <c:when test="${revision.symlink}">
+ <bean:message key="filedetails.details.jspf.symlink" />
+ </c:when>
<c:otherwise>
<rhn:require acl="config_channel_editable(${channel.id})"
mixins="com.redhat.rhn.common.security.acl.ConfigAclHandler">
--
1.6.4
>From 8d349d79068bfcd1a2829a344345f582eac24daf Mon Sep 17 00:00:00 2001
From: Joshua Roys <[email protected]>
Date: Tue, 1 Sep 2009 11:58:11 -0400
Subject: [PATCH 2/3] Make reviewing empty audit sections possible
---
.../frontend/action/audit/AuditSearchAction.java | 12 ++++++++++--
.../frontend/strings/jsp/StringResource_en_US.xml | 6 ++++++
java/code/webapp/WEB-INF/pages/audit/auditview.jsp | 2 +-
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
b/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
index 7adefe6..074aab9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/audit/AuditSearchAction.java
@@ -193,6 +193,7 @@ public class AuditSearchAction extends RhnAction {
// if we have to process the DatePickers, it means that the user
// entered a time, which means it's probably not a reviewable
// section
+ unrev = true;
request.setAttribute("unreviewable", "true");
}
else if (!submitted && request.getParameter("machine") != null) {
@@ -216,8 +217,15 @@ public class AuditSearchAction extends RhnAction {
result = AuditManager.getAuditLogs(autypes, machine, start, end);
if (result == null) {
- amsgs.add(ActionMessages.GLOBAL_MESSAGE,
- new ActionMessage("No results found!", false));
+ if (!unrev) {
+ // we need to be able to mark reviewable sections as
+ // 'reviewed' even if they're empty
+ result = new LinkedList();
+ }
+ else {
+ amsgs.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("No results found!", false));
+ }
}
// check to see if this section has been reviewed
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 155164d..279a9dc 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
@@ -3483,6 +3483,12 @@ button below, and <b>will be unable to log back
in</b>.</source>
<context context-type="sourcefile">/rhn/audit/Search.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="auditview.jsp.norecords">
+<source>No audit records found!</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/audit/Search.do</context>
+ </context-group>
+ </trans-unit>
<!-- == ERRATA == -->
<trans-unit id="erratalist.jsp.noerrata">
diff --git a/java/code/webapp/WEB-INF/pages/audit/auditview.jsp
b/java/code/webapp/WEB-INF/pages/audit/auditview.jsp
index f0672e0..73a83ba 100644
--- a/java/code/webapp/WEB-INF/pages/audit/auditview.jsp
+++ b/java/code/webapp/WEB-INF/pages/audit/auditview.jsp
@@ -203,7 +203,7 @@
<c:set var="resultList" value="${requestScope.result}" />
<rl:listset name="auditList">
- <rl:list dataset="resultList">
+ <rl:list dataset="resultList" emptykey="auditview.jsp.norecords">
<rl:column sortable="false"
bound="false"
headertext="Serial#"
--
1.6.4
>From b13f2df89a6e2912e783722a6b4b9508911910e1 Mon Sep 17 00:00:00 2001
From: Joshua Roys <[email protected]>
Date: Tue, 1 Sep 2009 13:02:40 -0400
Subject: [PATCH 3/3] Fix audit machine listing/pagination
---
.../com/redhat/rhn/manager/audit/AuditManager.java | 2 +-
java/code/webapp/WEB-INF/pages/audit/machine.jsp | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
index 51a2ed4..9e11d01 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/AuditManager.java
@@ -309,7 +309,7 @@ public class AuditManager /* extends BaseManager */ {
Pattern fnregex = Pattern.compile("audit-(\\d+)-(\\d+).parsed");
// if machineName is null, look up all review sections by recursion
- if (machineName == null) {
+ if (machineName == null || machineName.length() == 0) {
dr = null;
for (AuditMachineDto aumachine : getMachines()) {
diff --git a/java/code/webapp/WEB-INF/pages/audit/machine.jsp
b/java/code/webapp/WEB-INF/pages/audit/machine.jsp
index ef3430f..bd6a7e6 100644
--- a/java/code/webapp/WEB-INF/pages/audit/machine.jsp
+++ b/java/code/webapp/WEB-INF/pages/audit/machine.jsp
@@ -63,6 +63,8 @@
</span>
</rl:column>
</rl:list>
+
+ <input type="hidden" name="machine" value="${machine}" />
</rl:listset>
</body>
--
1.6.4
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel