java/code/src/com/redhat/rhn/frontend/action/tasko/DeleteScheduleAction.java | 54
+++++-----
java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java | 5
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 6 +
java/code/webapp/WEB-INF/pages/admin/bunchDetail.jsp | 2
java/spacewalk-java.spec | 7 +
rel-eng/packages/spacewalk-java | 2
6 files changed, 44 insertions(+), 32 deletions(-)
New commits:
commit ee9abbc9d273547de0658d64096029acc54dd5b7
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed May 11 11:46:23 2011 +0200
Automatic commit of package [spacewalk-java] release [1.5.27-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 3464954..3d2fbd9 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.5.26
+Version: 1.5.27
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -540,6 +540,11 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed May 11 2011 Tomas Lestach <tlestach(a)redhat.com> 1.5.27-1
+- 659138 - change jsp rendering when taskomatic is down (tlestach(a)redhat.com)
+- 659138 - skip code, if taskomatic is down (tlestach(a)redhat.com)
+- 659138 - fix emptykey message (tlestach(a)redhat.com)
+
* Tue May 10 2011 Tomas Lestach <tlestach(a)redhat.com> 1.5.26-1
- repo generation quick fix (tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index a60641a..5d545c1 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.5.26-1 java/
+1.5.27-1 java/
commit 9a49f75cb8fb467e5c11aae920d209b56c3288cc
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed May 11 11:45:18 2011 +0200
659138 - change jsp rendering when taskomatic is down
diff --git a/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
b/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
index ddac2ff..436e2b4 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/tasko/ScheduleDetailAction.java
@@ -76,6 +76,7 @@ public class ScheduleDetailAction extends RhnAction {
}
}
+ prepDropdowns(ctx);
if (!isSubmitted(form)) {
setupForm(request, form);
return getStrutsDelegate().forwardParams(
@@ -140,7 +141,6 @@ public class ScheduleDetailAction extends RhnAction {
private void setupForm(HttpServletRequest request, DynaActionForm form) {
RequestContext ctx = new RequestContext(request);
User loggedInUser = ctx.getLoggedInUser();
- prepDropdowns(ctx);
Long schid = ctx.getParamAsLong("schid");
if (schid != null) {
@@ -179,8 +179,7 @@ public class ScheduleDetailAction extends RhnAction {
}
}
catch (TaskomaticApiException e) {
- createErrorMessage(ctx.getRequest(),
- "repos.jsp.message.taskomaticdown", null);
+ // do not create error message, it was created before
}
ctx.getRequest().setAttribute("bunches", dropDown);
}
commit cffeafcab7a66f2cceb4423c40e515b9ab8085e3
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed May 11 10:59:00 2011 +0200
659138 - skip code, if taskomatic is down
the patch looks huge, but in fact, only 'if (scheduleName != null) {}' is
added
diff --git a/java/code/src/com/redhat/rhn/frontend/action/tasko/DeleteScheduleAction.java
b/java/code/src/com/redhat/rhn/frontend/action/tasko/DeleteScheduleAction.java
index c9f4a7c..9c4af32 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/tasko/DeleteScheduleAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/tasko/DeleteScheduleAction.java
@@ -59,36 +59,38 @@ public class DeleteScheduleAction extends RhnAction {
"repos.jsp.message.taskomaticdown", null);
}
String scheduleName = (String) schedule.get("job_label");
- String bunchName = (String) schedule.get("bunch");
- request.setAttribute("schedulename", scheduleName);
- request.setAttribute("bunch", bunchName);
- request.setAttribute("cronexpr",
schedule.get("cron_expr"));
- request.setAttribute("activetill",
schedule.get("active_till"));
- if (isActive(schedule)) {
- if (ctx.isSubmitted()) {
- try {
- tapi.unscheduleSatTask(scheduleName, loggedInUser);
- // there's not a good way to check
- // whether the bunch was unscheduled
- schedule = tapi.lookupScheduleByBunchAndLabel(loggedInUser,
- bunchName, scheduleName);
- if (schedule == null) {
- createSuccessMessage(request,
"message.scheduledeleted",
- scheduleName);
+ if (scheduleName != null) {
+ String bunchName = (String) schedule.get("bunch");
+ request.setAttribute("schedulename", scheduleName);
+ request.setAttribute("bunch", bunchName);
+ request.setAttribute("cronexpr",
schedule.get("cron_expr"));
+ request.setAttribute("activetill",
schedule.get("active_till"));
+ if (isActive(schedule)) {
+ if (ctx.isSubmitted()) {
+ try {
+ tapi.unscheduleSatTask(scheduleName, loggedInUser);
+ // there's not a good way to check
+ // whether the bunch was unscheduled
+ schedule = tapi.lookupScheduleByBunchAndLabel(loggedInUser,
+ bunchName, scheduleName);
+ if (schedule == null) {
+ createSuccessMessage(request,
"message.scheduledeleted",
+ scheduleName);
+ }
+ return getStrutsDelegate().forwardParams(
+ mapping.findForward("success"),
+ request.getParameterMap());
}
- return getStrutsDelegate().forwardParams(
- mapping.findForward("success"),
- request.getParameterMap());
- }
- catch (TaskomaticApiException e) {
- createErrorMessage(request,
- "repos.jsp.message.taskomaticdown", null);
+ catch (TaskomaticApiException e) {
+ createErrorMessage(request,
+ "repos.jsp.message.taskomaticdown", null);
+ }
}
}
- }
- else {
- createErrorMessage(request, "message.schedulenotactive",
scheduleName);
+ else {
+ createErrorMessage(request, "message.schedulenotactive",
scheduleName);
+ }
}
}
return getStrutsDelegate().forwardParams(
commit cd0f3a9be2c1e05d8530906cd735a8f35d68ad0d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed May 11 10:49:26 2011 +0200
659138 - fix emptykey message
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 1a3de55..14f72b9 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
@@ -22819,6 +22819,12 @@ given channel.</source>
<context
context-type="sourcefile">/rhn/admin/ScheduleDetail.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="schedule.jsp.noruns">
+ <source>There're no runs available.</source>
+ <context-group name="ctx">
+ <context
context-type="sourcefile">/rhn/admin/SatSchedules.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="schedules.jsp.introparagraph">
<source>Bellow is a list of defined schedules. A schedule defines
frequency, how often a predefined bunch shall be triggered.</source>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/admin/bunchDetail.jsp
b/java/code/webapp/WEB-INF/pages/admin/bunchDetail.jsp
index 3e5b704..12296a9 100644
--- a/java/code/webapp/WEB-INF/pages/admin/bunchDetail.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/bunchDetail.jsp
@@ -38,7 +38,7 @@
</div>
<br/>
<rl:list
- emptykey="assignedgroups.jsp.nogroups"
+ emptykey="schedule.jsp.noruns"
dataset="dataset" >
<rl:decorator name="PageSizeDecorator"/>