java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/domain/rhnpackage/Package.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit ae632715f97f67a8443d9d17657fd4198f4eeac3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Tue Aug 20 17:25:00 2013 +0200
Allow Hibernate to distinguish packages with identical name,
arch and evr
diff --git a/java/code/src/com/redhat/rhn/domain/rhnpackage/Package.java b/java/code/src/com/redhat/rhn/domain/rhnpackage/Package.java
index 831b39f..0cbbb79 100644
--- a/java/code/src/com/redhat/rhn/domain/rhnpackage/Package.java
+++ b/java/code/src/com/redhat/rhn/domain/rhnpackage/Package.java
@@ -494,10 +494,10 @@ public class Package extends BaseDomainHelper {
public boolean equals(Object other) {
if (other instanceof Package) {
Package otherPack = (Package) other;
- return new EqualsBuilder().append(this.getPackageName(),
- otherPack.getPackageName()).append(this.getPackageArch(),
- otherPack.getPackageArch()).append(this.getPackageEvr(),
- this.getPackageEvr()).isEquals();
+ return new EqualsBuilder().append(this.getId(), otherPack.getId())
+ .append(this.getPackageName(), otherPack.getPackageName())
+ .append(this.getPackageArch(), otherPack.getPackageArch())
+ .append(this.getPackageEvr(), this.getPackageEvr()).isEquals();
}
return false;
}
@@ -508,8 +508,8 @@ public class Package extends BaseDomainHelper {
*/
@Override
public int hashCode() {
- return new HashCodeBuilder().append(this.getPackageName()).append(
- this.getPackageArch()).append(this.getPackageEvr()).toHashCode();
+ return new HashCodeBuilder().append(this.getId()).append(this.getPackageName())
+ .append(this.getPackageArch()).append(this.getPackageEvr()).toHashCode();
}
/**
10 years, 9 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/servlets/SessionFilter.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 1711c431413affa3a572ce764c4d2a4b1c6dadfe
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Aug 21 15:06:44 2013 +0200
998961 - do not touch the DB after a hibernate exception but correctly
close the session
prevents repeating:
ERROR: current transaction is aborted, commands ignored until end of transaction block
in the /var/lib/pgsql/data/pg_log/postgresql-*.log in case a DB
exception is thrown and the server remains unusable
diff --git a/java/code/src/com/redhat/rhn/frontend/servlets/SessionFilter.java b/java/code/src/com/redhat/rhn/frontend/servlets/SessionFilter.java
index 19a21b4..17f1914 100644
--- a/java/code/src/com/redhat/rhn/frontend/servlets/SessionFilter.java
+++ b/java/code/src/com/redhat/rhn/frontend/servlets/SessionFilter.java
@@ -91,10 +91,12 @@ private static final String ROLLBACK_MSG = "Error during transaction. Rolling ba
LOG.warn(msg, e);
}
}
+ else {
+ LoggingFactory.clearLogId();
+ }
}
finally {
// cleanup the session
- LoggingFactory.clearLogId();
HibernateFactory.closeSession();
}
}
10 years, 9 months
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.oracle | 5 -----
schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.postgresql | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
New commits:
commit 37e57b4d668868e2754009f7e6cd7d26419edca5
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Aug 21 14:59:30 2013 +0200
timestamps in oracle: don't shift the dates during schema upgrades
The dates / times as we have them in Oracle schema are already localized to
the time zone in which the database runs.
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.oracle
index da22f56..fe6dd00 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.oracle
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.oracle
@@ -2,7 +2,6 @@ declare
tz_shift interval day to second :=
from_tz(timestamp '2000-01-01 00:00:00', sessiontimezone) -
from_tz(timestamp '2000-01-01 00:00:00', 'UTC');
- update_stmt varchar2(4000);
begin
for tab in (
select distinct utc.table_name
@@ -13,17 +12,13 @@ begin
and utc.data_type = 'DATE'
order by utc.table_name
) loop
- update_stmt := 'update ' || tab.table_name || ' set ';
for col in (select column_name
from user_tab_columns
where table_name = tab.table_name
and data_type = 'DATE'
) loop
execute immediate 'alter table ' || tab.table_name || ' modify ' || col.column_name || ' timestamp with local time zone';
- update_stmt := update_stmt || col.column_name || '=' || col.column_name || '+ interval ''' || tz_shift || ''' day to second, ';
end loop;
- update_stmt := substr(update_stmt, 1, length(update_stmt)-2);
- execute immediate update_stmt;
end loop;
end;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.postgresql
index e7d8ad9..0828ed6 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.postgresql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/132-tables-timestamps.sql.postgresql
@@ -1,2 +1,2 @@
--- oracle equivalent source sha1 864b6d99d7c79e4037f469d8d9d403b58e643a8e
+-- oracle equivalent source sha1 5433d719c9cf65ac205feaf3eaa4149e23d90409
-- This file is intentionally left empty.
10 years, 9 months
Changes to 'refs/tags/spacewalk-java-2.1.24-1'
by Tomáš Kašpárek
Tag 'spacewalk-java-2.1.24-1' created by Tomas Kasparek <tkasparek(a)redhat.com> at 2013-08-21 12:47 +0000
Tagging package [spacewalk-java] version [2.1.24-1] in directory [java/].
Changes since spacewalk-schema-2.1.12-1:
Bo Maryniuk (1):
Perl to JSP port: SSM/Misc/Reboot
Tomas Kasparek (3):
fix checkstyle, C style for loop and ISE with no base channel
updating links to new java page
Automatic commit of package [spacewalk-java] release [2.1.24-1].
Tomas Lestach (4):
fix checkstyle
add arch to package listings on /rhn/errata/manage/AddPackages.do page
removing unused DEFAULT_USER and DEFAULT_PASSWORD
removing @Override annotation from method that isn't overriden
---
java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml | 10
java/code/src/com/redhat/rhn/common/messaging/MessageQueue.java | 56 +--
java/code/src/com/redhat/rhn/common/util/test/MethodUtilTest.java | 3
java/code/src/com/redhat/rhn/frontend/action/ssm/ProvisioningRemoteCommand.java | 1
java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java | 153 ++++++++++
java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootAction.java | 64 ++++
java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootEvent.java | 109 +++++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_de.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 29 +
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_es.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_fr.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_it.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ja.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ko.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ru.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_CN.xml | 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_TW.xml | 4
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 23 +
java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java | 3
java/code/webapp/WEB-INF/nav/ssm.xml | 7
java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp | 45 --
java/code/webapp/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp | 77 +++++
java/code/webapp/WEB-INF/struts-config.xml | 12
java/spacewalk-java.spec | 11
rel-eng/packages/spacewalk-java | 2
utils/spacewalk-common-channels | 2
27 files changed, 537 insertions(+), 110 deletions(-)
---
10 years, 9 months
java/spacewalk-java.spec rel-eng/packages
by Tomáš Kašpárek
java/spacewalk-java.spec | 11 ++++++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit d4390713080d4edb2d99dcbd9b4865a8ccaa9973
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Wed Aug 21 14:47:52 2013 +0200
Automatic commit of package [spacewalk-java] release [2.1.24-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 54a3886..87bb603 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: 2.1.23
+Version: 2.1.24
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -771,6 +771,15 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Aug 21 2013 Tomas Kasparek <tkasparek(a)redhat.com> 2.1.24-1
+- updating links to new java page
+- removing @Override annotation from method that isn't overriden
+- fix checkstyle, C style for loop and ISE with no base channel
+- Perl to JSP port: SSM/Misc/Reboot
+- add arch to package listings on /rhn/errata/manage/AddPackages.do page
+- fix checkstyle
+- Avoid testing callMethod on multiple qualifying methods
+
* Tue Aug 20 2013 Tomas Lestach <tlestach(a)redhat.com> 2.1.23-1
- Allow users to change the CSV separator
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 7517ac6..8803518 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-2.1.23-1 java/
+2.1.24-1 java/
10 years, 9 months
java/code
by Tomáš Kašpárek
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_de.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 2 +-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_es.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_fr.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_it.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ja.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ko.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ru.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_CN.xml | 4 ++--
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_TW.xml | 4 ++--
11 files changed, 21 insertions(+), 21 deletions(-)
New commits:
commit 8b3838be0990e2eb13f39bff4de30fe20de7d017
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Wed Aug 21 14:45:50 2013 +0200
updating links to new java page
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_de.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_de.xml
index 370c850..263a1a5 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_de.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_de.xml
@@ -6017,8 +6017,8 @@ für diese Berechtigung, mit Ausnahme des Verbrauchs der Standardorganisation.</
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">Hinzufügen oder Entfernen</a> von Add-On-Berechtigungen</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Löschen</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Neustarten</a> von Systemen</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Löschen</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Neustarten</a> von Systemen</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
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 bd160fa..54a8002 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
@@ -4408,7 +4408,7 @@ value for this entitlement, excluding the default organization's consumption.</s
<source><a href="/rhn/systems/ssm/misc/Index.do#entitle">Add or Remove</a> Add-On Entitlements</source>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_es.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_es.xml
index a370480..0492b1f 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_es.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_es.xml
@@ -6014,8 +6014,8 @@ para este derecho, excluyendo el consumo de la organización predeterminada.</ta
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">Añadir o retirar</a> Adición de derechos</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Borrar</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> sistemas</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Borrar</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> sistemas</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_fr.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_fr.xml
index 6455990..2c8bcb8 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_fr.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_fr.xml
@@ -6016,8 +6016,8 @@ pour ce droit d'accès, moins la consommation par défaut de l'organisation.</ta
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">Ajouter ou supprimer</a> des droits d'accès de modules complémentaires</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Supprimer</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Redémarrer</a> les systèmes</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Supprimer</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Redémarrer</a> les systèmes</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_it.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_it.xml
index 9d32ad5..a39f3d3 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_it.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_it.xml
@@ -6015,8 +6015,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">Aaggiungere o Rimuovere</a> gli Entitlement aggiuntivi</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Cancellare</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Riavviare</a> i sistemi</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Cancellare</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Riavviare</a> i sistemi</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ja.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ja.xml
index 3e88b5a..53f33f5 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ja.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ja.xml
@@ -6010,8 +6010,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target>アドオンのエンタイトルメントの <a href="/rhn/systems/ssm/misc/Index.do#entitle">追加または削除</a> を行います</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target>システムの <a href="/rhn/systems/ssm/DeleteConfirm.do">削除</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">再起動</a> を行います</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target>システムの <a href="/rhn/systems/ssm/DeleteConfirm.do">削除</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">再起動</a> を行います</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ko.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ko.xml
index 73fff37..d386ee8 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ko.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ko.xml
@@ -6014,8 +6014,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target>애드온 인타이틀먼트 <a href="/rhn/systems/ssm/misc/Index.do#entitle">추가 또는 삭제</a></target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target>시스템 <a href="/rhn/systems/ssm/DeleteConfirm.do">삭제</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">재부팅</a> </target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target>시스템 <a href="/rhn/systems/ssm/DeleteConfirm.do">삭제</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">재부팅</a> </target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml
index 764449b..560f67e 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml
@@ -6013,8 +6013,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">Adicionar ou Remover</a> Serviços Complementares</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> sistemas</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> sistemas</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ru.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ru.xml
index 6f22469..a9fc52b 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ru.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_ru.xml
@@ -6012,8 +6012,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">Добавление и удаление</a> доп. полномочий</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Удалить</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Перезапустить</a></target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">Удалить</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Перезапустить</a></target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_CN.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_CN.xml
index 96abfaa..a3b32fa 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_CN.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_CN.xml
@@ -6015,8 +6015,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">添加或者删除</a> 附加组件授权</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">删除</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">重启</a> 系统</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">删除</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">重启</a> 系统</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_TW.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_TW.xml
index 1b1b3db..fac0bbf 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_TW.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_zh_TW.xml
@@ -6012,8 +6012,8 @@ value for this entitlement, excluding the default organization's consumption.</s
<target><a href="/rhn/systems/ssm/misc/Index.do#entitle">新增或移除</a>外掛權利</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.deletereboot">
- <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">Reboot</a> systems</source>
- <target><a href="/rhn/systems/ssm/DeleteConfirm.do">刪除</a> / <a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems">重新啟動</a>系統</target>
+ <source><a href="/rhn/systems/ssm/DeleteConfirm.do">Delete</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">Reboot</a> systems</source>
+ <target><a href="/rhn/systems/ssm/DeleteConfirm.do">刪除</a> / <a href="/rhn/systems/ssm/misc/RebootSystem.do">重新啟動</a>系統</target>
</trans-unit>
<trans-unit id="ssm.overview.misc.migrate">
<source><a href="/rhn/systems/ssm/misc/Index.do#migrate">Migrate</a> systems to another organization</source>
10 years, 9 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/action/ssm/ProvisioningRemoteCommand.java | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 738586d2a4787a0232e83871850c953a2f08b8d2
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Aug 21 14:36:03 2013 +0200
removing @Override annotation from method that isn't overriden
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/ProvisioningRemoteCommand.java b/java/code/src/com/redhat/rhn/frontend/action/ssm/ProvisioningRemoteCommand.java
index 4e46125..926055e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/ssm/ProvisioningRemoteCommand.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/ProvisioningRemoteCommand.java
@@ -326,7 +326,6 @@ public class ProvisioningRemoteCommand extends RhnAction implements Listable {
/**
* {@inheritDoc}
*/
- @Override
public List<SystemOverview> getResult(RequestContext context) {
List<SystemOverview> dataset = new ArrayList<SystemOverview>();
List<SystemOverview> sysOvr = SystemManager.inSet(context.getLoggedInUser(),
10 years, 9 months
2 commits - java/code
by Tomáš Kašpárek
java/code/src/com/redhat/rhn/common/messaging/MessageQueue.java | 56 +--
java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java | 153 ++++++++++
java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootAction.java | 64 ++++
java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootEvent.java | 109 +++++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 27 +
java/code/src/com/redhat/rhn/manager/action/ActionManager.java | 23 +
java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java | 3
java/code/webapp/WEB-INF/nav/ssm.xml | 7
java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp | 45 --
java/code/webapp/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp | 77 +++++
java/code/webapp/WEB-INF/struts-config.xml | 12
11 files changed, 497 insertions(+), 79 deletions(-)
New commits:
commit c878a573ca2b40ae2cac42165d8839a70060015b
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Wed Aug 21 12:56:33 2013 +0200
fix checkstyle, C style for loop and ISE with no base channel
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java b/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java
index aff48e6..200c836 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java
@@ -139,14 +139,13 @@ public class RebootSystemAction
public List getResult(RequestContext context) {
List<SystemOverview> systems = SystemManager.inSet(context.getCurrentUser(),
RhnSetDecl.SYSTEMS.getLabel());
- for (int i = 0; i < systems.size(); i++) {
- SystemOverview systemOverview = systems.get(i);
+ for (Iterator<SystemOverview> itr = systems.iterator(); itr.hasNext();) {
+ SystemOverview systemOverview = itr.next();
systemOverview.setSelectable(1);
- systemOverview.setChannelLabels(SystemManager
- .lookupByIdAndUser(systemOverview.getId(),
- context.getCurrentUser())
- .getBaseChannel()
- .getName());
+ systemOverview.setChannelLabels(SystemManager.lookupByIdAndUser(systemOverview
+ .getId(), context.getCurrentUser()).getBaseChannel() == null ? null :
+ SystemManager.lookupByIdAndUser(systemOverview.getId(),
+ context.getCurrentUser()).getBaseChannel().getName());
}
return systems;
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 3176ba2..1dc362b 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1912,7 +1912,7 @@ public class ActionManager extends BaseManager {
* @param scheduler Logged in user
* @param server Server, which is going to be rebooted
* @param earliestAction Earliest date. If null, then date is current.
- * @return
+ * @return scheduled reboot action
*/
public static Action scheduleReboot(User scheduler,
Server server,
@@ -1927,5 +1927,5 @@ public class ActionManager extends BaseManager {
ActionFactory.save(action);
return action;
}
-
+
}
commit ea8e7b8e2af1ab8aa49eeb6b58bc29ca3bf50ea1
Author: Bo Maryniuk <bo(a)suse.de>
Date: Tue Aug 20 17:54:42 2013 +0200
Perl to JSP port: SSM/Misc/Reboot
diff --git a/java/code/src/com/redhat/rhn/common/messaging/MessageQueue.java b/java/code/src/com/redhat/rhn/common/messaging/MessageQueue.java
index 30eadb3..056f947 100644
--- a/java/code/src/com/redhat/rhn/common/messaging/MessageQueue.java
+++ b/java/code/src/com/redhat/rhn/common/messaging/MessageQueue.java
@@ -35,13 +35,14 @@ import com.redhat.rhn.frontend.events.SsmChangeChannelSubscriptionsAction;
import com.redhat.rhn.frontend.events.SsmChangeChannelSubscriptionsEvent;
import com.redhat.rhn.frontend.events.SsmDeleteServersAction;
import com.redhat.rhn.frontend.events.SsmDeleteServersEvent;
-import com.redhat.rhn.frontend.events.SsmPackagesAction;
import com.redhat.rhn.frontend.events.TraceBackAction;
import com.redhat.rhn.frontend.events.TraceBackEvent;
import com.redhat.rhn.frontend.events.UpdateErrataCacheAction;
import com.redhat.rhn.frontend.events.UpdateErrataCacheEvent;
import com.redhat.rhn.frontend.events.SsmInstallPackagesAction;
import com.redhat.rhn.frontend.events.SsmInstallPackagesEvent;
+import com.redhat.rhn.frontend.events.SsmSystemRebootAction;
+import com.redhat.rhn.frontend.events.SsmSystemRebootEvent;
import com.redhat.rhn.frontend.events.SsmVerifyPackagesAction;
import com.redhat.rhn.frontend.events.SsmVerifyPackagesEvent;
@@ -250,47 +251,44 @@ public class MessageQueue {
// If we develop a large set of MessageEvents we may want to
// refactor this block out into a class or method that
// reads in some configuration from an XML file somewhere
- TraceBackAction tbe = new TraceBackAction();
- MessageQueue.registerAction(tbe, TraceBackEvent.class);
- NewUserAction nua = new NewUserAction();
- MessageQueue.registerAction(nua, NewUserEvent.class);
+ MessageQueue.registerAction(new TraceBackAction(), TraceBackEvent.class);
+ MessageQueue.registerAction(new NewUserAction(), NewUserEvent.class);
// this is to update the errata cache without blocking the login
// for 40 seconds.
- UpdateErrataCacheAction ueca = new UpdateErrataCacheAction();
- MessageQueue.registerAction(ueca, UpdateErrataCacheEvent.class);
+ MessageQueue.registerAction(new UpdateErrataCacheAction(),
+ UpdateErrataCacheEvent.class);
// Used for asynchronusly restarting the satellite
- RestartSatelliteAction ra = new RestartSatelliteAction();
- MessageQueue.registerAction(ra, RestartSatelliteEvent.class);
+ MessageQueue.registerAction(new RestartSatelliteAction(),
+ RestartSatelliteEvent.class);
// Used to allow SSM child channel changes to be run asynchronously
- SsmChangeChannelSubscriptionsAction sccsa =
- new SsmChangeChannelSubscriptionsAction();
- MessageQueue.registerAction(sccsa, SsmChangeChannelSubscriptionsEvent.class);
+ MessageQueue.registerAction(new SsmChangeChannelSubscriptionsAction(),
+ SsmChangeChannelSubscriptionsEvent.class);
MessageQueue.registerAction(new SsmDeleteServersAction(),
- SsmDeleteServersEvent.class);
+ SsmDeleteServersEvent.class);
// Used to allow SSM package installs to be run asynchronously
- SsmPackagesAction ssmPackageInstallAction = new SsmInstallPackagesAction();
- MessageQueue.registerAction(ssmPackageInstallAction, SsmInstallPackagesEvent.class);
-
- SsmRemovePackagesAction ssmRpa = new SsmRemovePackagesAction();
- MessageQueue.registerAction(ssmRpa, SsmRemovePackagesEvent.class);
-
- SsmVerifyPackagesAction ssmVpa = new SsmVerifyPackagesAction();
- MessageQueue.registerAction(ssmVpa, SsmVerifyPackagesEvent.class);
-
- SsmPackagesAction ssmUpa = new SsmUpgradePackagesAction();
- MessageQueue.registerAction(ssmUpa, SsmUpgradePackagesEvent.class);
+ MessageQueue.registerAction(new SsmInstallPackagesAction(),
+ SsmInstallPackagesEvent.class);
+ MessageQueue.registerAction(new SsmRemovePackagesAction(),
+ SsmRemovePackagesEvent.class);
+ MessageQueue.registerAction(new SsmVerifyPackagesAction(),
+ SsmVerifyPackagesEvent.class);
+ MessageQueue.registerAction(new SsmUpgradePackagesAction(),
+ SsmUpgradePackagesEvent.class);
//Clone Errata into a channel
- CloneErrataAction cea = new CloneErrataAction();
- MessageQueue.registerAction(cea, CloneErrataEvent.class);
- NewCloneErrataAction ncea = new NewCloneErrataAction();
- MessageQueue.registerAction(ncea, NewCloneErrataEvent.class);
-
+ MessageQueue.registerAction(new CloneErrataAction(),
+ CloneErrataEvent.class);
+ MessageQueue.registerAction(new NewCloneErrataAction(),
+ NewCloneErrataEvent.class);
+
+ // Misc
+ MessageQueue.registerAction(new SsmSystemRebootAction(),
+ SsmSystemRebootEvent.class);
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java b/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java
new file mode 100644
index 0000000..aff48e6
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/ssm/RebootSystemAction.java
@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2013 SUSE
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+
+package com.redhat.rhn.frontend.action.ssm;
+
+import com.redhat.rhn.common.db.datasource.DataResult;
+import com.redhat.rhn.common.messaging.MessageQueue;
+import com.redhat.rhn.common.util.DatePicker;
+import com.redhat.rhn.domain.rhnset.RhnSet;
+import com.redhat.rhn.frontend.dto.SystemOverview;
+import com.redhat.rhn.frontend.events.SsmSystemRebootEvent;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnHelper;
+import com.redhat.rhn.frontend.struts.RhnListAction;
+import com.redhat.rhn.frontend.struts.RhnListSetHelper;
+import com.redhat.rhn.frontend.taglibs.list.ListTagHelper;
+import com.redhat.rhn.frontend.taglibs.list.TagHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+import com.redhat.rhn.manager.system.SystemManager;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.action.DynaActionForm;
+
+
+/**
+ * Reboot Systems in the SSM miscellaneous actions.
+ *
+ * @author Bo Maryniuk <bo(a)suse.de>
+ */
+public class RebootSystemAction
+ extends RhnListAction
+ implements Listable {
+
+ @Override
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm actionForm,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+ List result = this.getResult(context);
+ DynaActionForm form = (DynaActionForm) actionForm;
+ RhnSet set = RhnSetDecl.SSM_SYSTEMS_REBOOT.get(context.getCurrentUser());
+ RhnListSetHelper helper = new RhnListSetHelper(request);
+ String forwardPageId = RhnHelper.DEFAULT_FORWARD;
+ ActionMessages actionMessages = new ActionMessages();
+ ActionErrors actionErrors = new ActionErrors();
+
+ if (ListTagHelper.getListAction("systemList", request) != null) {
+ helper.execute(set, "systemList", result);
+ }
+
+ if (!set.isEmpty()) {
+ helper.syncSelections(set, result);
+ ListTagHelper.setSelectedAmount("systemList", set.size(), request);
+ }
+
+ request.setAttribute(RequestContext.PAGE_LIST, result);
+ ListTagHelper.bindSetDeclTo("systemList",
+ RhnSetDecl.SSM_SYSTEMS_REBOOT,
+ request);
+ request.setAttribute(RequestContext.PAGE_LIST, result);
+ request.setAttribute(ListTagHelper.PARENT_URL, request.getRequestURI());
+ TagHelper.bindElaboratorTo("systemList",
+ ((DataResult) result).getElaborator(),
+ request);
+
+ if ((request.getParameter("dispatch") != null) &&
+ (context.wasDispatched("installconfirm.jsp.confirm"))) {
+ List<Long> serverIdsToReboot = new ArrayList<Long>();
+ Iterator<Long> sysIds = set.getElementValues().iterator();
+ while (sysIds.hasNext()) {
+ serverIdsToReboot.add(sysIds.next());
+ }
+
+ if (!serverIdsToReboot.isEmpty()) {
+ // Make an event
+ MessageQueue.publish(new SsmSystemRebootEvent(
+ context.getLoggedInUser().getId(),
+ this.getStrutsDelegate().readDatePicker(form,
+ "date",
+ DatePicker.YEAR_RANGE_POSITIVE),
+ serverIdsToReboot));
+ actionMessages.add(
+ ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("ssm.misc.reboot.message.success.default"));
+
+ // Clear the selection from the form
+ set.clear();
+ RhnSetDecl.SSM_SYSTEMS_REBOOT.clear(context.getLoggedInUser());
+
+ forwardPageId = "confirm";
+ }
+ else {
+ actionErrors.add(
+ ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("ssm.misc.reboot.message.error.noselect"));
+ }
+ }
+
+ request.setAttribute("date", this.getStrutsDelegate().prepopulateDatePicker(
+ request, form, "date", DatePicker.YEAR_RANGE_POSITIVE));
+
+ this.getStrutsDelegate().saveMessages(request, actionMessages);
+ this.getStrutsDelegate().saveMessages(request, actionErrors);
+
+ return mapping.findForward(forwardPageId);
+ }
+
+
+ /**
+ * Get the dataset result.
+ *
+ * @param context Request context.
+ * @return List of SystemOverview objects.
+ */
+ @Override
+ public List getResult(RequestContext context) {
+ List<SystemOverview> systems = SystemManager.inSet(context.getCurrentUser(),
+ RhnSetDecl.SYSTEMS.getLabel());
+ for (int i = 0; i < systems.size(); i++) {
+ SystemOverview systemOverview = systems.get(i);
+ systemOverview.setSelectable(1);
+ systemOverview.setChannelLabels(SystemManager
+ .lookupByIdAndUser(systemOverview.getId(),
+ context.getCurrentUser())
+ .getBaseChannel()
+ .getName());
+ }
+
+ return systems;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootAction.java b/java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootAction.java
new file mode 100644
index 0000000..ef11f6b
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootAction.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2013 SUSE
+ *
+ * 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.events;
+
+import com.redhat.rhn.common.messaging.EventMessage;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.domain.user.UserFactory;
+import com.redhat.rhn.manager.action.ActionManager;
+import com.redhat.rhn.manager.rhnset.RhnSetDecl;
+import com.redhat.rhn.manager.ssm.SsmOperationManager;
+import com.redhat.rhn.manager.system.SystemManager;
+import org.apache.log4j.Logger;
+
+/**
+ * System Reboot action in the SSM/Miscellaneous.
+ *
+ * @author Bo Maryniuk <bo(a)suse.de>
+ */
+public class SsmSystemRebootAction extends AbstractDatabaseAction {
+ private static Logger log = Logger.getLogger(SsmSystemRebootAction.class);
+
+ @Override
+ protected void doExecute(EventMessage msg) {
+ SsmSystemRebootAction.log.debug("Scheduling systems reboot in SSM.");
+ SsmSystemRebootEvent event = (SsmSystemRebootEvent) msg;
+ User user = UserFactory.lookupById(event.getUserId());
+
+ try {
+ for (int i = 0; i < event.getServerIds().size(); i++) {
+ ActionManager.scheduleReboot(
+ user,
+ SystemManager.lookupByIdAndUser(event.getServerIds().get(i), user),
+ event.getEarliest());
+ }
+ }
+ catch (Exception e) {
+ SsmSystemRebootAction.log.error("Error scheduling systems reboot" +
+ " in SSM for the event: " + event, e);
+ }
+ finally {
+ SsmOperationManager.completeOperation(
+ user,
+ SsmOperationManager.createOperation(
+ user,
+ "ssm.misc.reboot.operationname",
+ RhnSetDecl.SSM_SYSTEMS_REBOOT.getLabel()
+ )
+ );
+ }
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootEvent.java b/java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootEvent.java
new file mode 100644
index 0000000..c0f085e
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/events/SsmSystemRebootEvent.java
@@ -0,0 +1,109 @@
+/**
+ * Copyright (c) 2013 SUSE
+ *
+ * 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.events;
+
+import com.redhat.rhn.common.messaging.EventMessage;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * SSM System Reboot scheduling event.
+ *
+ * @author Bo Maryniuk
+ */
+public class SsmSystemRebootEvent implements EventMessage {
+ private final Long userId;
+ private final Date earliest;
+ private final List<Long> serverIds;
+
+
+ /**
+ * Constructor.
+ *
+ * @param uid User ID
+ * @param scheduleDate Earliest possible schedule date.
+ * @param servers List of server IDs.
+ */
+ public SsmSystemRebootEvent(Long uid,
+ Date scheduleDate,
+ List<Long> servers) {
+ if (uid == null) {
+ throw new IllegalArgumentException("User ID cannot be null.");
+ }
+ else if (scheduleDate == null) {
+ throw new IllegalArgumentException("Earlies scheduled date cannot be null.");
+ }
+ else if (servers == null || servers.isEmpty()) {
+ throw new IllegalArgumentException("Server ID cannot be null or empty.");
+ }
+
+ this.userId = uid;
+ this.earliest = scheduleDate;
+ this.serverIds = servers;
+ }
+
+
+ /**
+ * Get user ID
+ *
+ * @return User ID
+ */
+ public Long getUserId() {
+ return userId;
+ }
+
+
+ /**
+ * Get the list of server IDs.
+ *
+ * @return List of server IDs
+ */
+ public List<Long> getServerIds() {
+ return serverIds;
+ }
+
+
+ /**
+ * Get the date of the scheduling for earliest possible time.
+ *
+ * @return Schedule date
+ */
+ public Date getEarliest() {
+ return earliest;
+ }
+
+
+ /**
+ * Convert this object to the java.lang.String
+ * @return String representation
+ */
+ @Override
+ public String toString() {
+ return String.format("SsmSystemRebootEvent[User: %s, Systems: %s]",
+ this.getUserId(),
+ this.getServerIds().size());
+ }
+
+
+ /**
+ * Represent the object in ASCII text.
+ * @return String representation
+ */
+ @Override
+ public String toText() {
+ return this.toString();
+ }
+}
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 9a1580a..bd160fa 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
@@ -4511,6 +4511,15 @@ value for this entitlement, excluding the default organization's consumption.</s
<context-group name="ctx">
<context context-type="sourcefile">/rhn/systems/ssm/misc/Index.do</context>
</context-group>
+ <trans-unit id="ssm.misc.index.tabs.hardware">
+ <source>Hardware</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.tabs.software">
+ <source>Software</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.index.tabs.migrate">
+ <source>Migrate</source>
+ </trans-unit>
<trans-unit id="ssm.misc.index.tabs.lock">
<source>Lock</source>
</trans-unit>
@@ -4526,7 +4535,6 @@ value for this entitlement, excluding the default organization's consumption.</s
<trans-unit id="ssm.misc.index.tabs.delete">
<source>Delete</source>
</trans-unit>
-
<trans-unit id="ssm.misc.index.profileupdates.header">
<source>System Profile Updates</source>
</trans-unit>
@@ -4611,6 +4619,22 @@ value for this entitlement, excluding the default organization's consumption.</s
<trans-unit id="ssm.misc.index.syspref.no">
<source>No</source>
</trans-unit>
+
+ <trans-unit id="ssm.misc.reboot.header">
+ <source>Reboot of the Systems</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.reboot.summary">
+ <source>Choose the systems you need to reboot and run action immediately or schedule it for later.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.reboot.operationname">
+ <source>Schedule Systems Reboot</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.reboot.message.success.default">
+ <source>Systems reboot has been scheduled.</source>
+ </trans-unit>
+ <trans-unit id="ssm.misc.reboot.message.error.noselect">
+ <source>Please select at least one system for reboot.</source>
+ </trans-unit>
<trans-unit id="ssm.misc.lockunlock.tabtitle">
<source>Lock/Unlock</source>
@@ -4655,7 +4679,6 @@ value for this entitlement, excluding the default organization's consumption.</s
<source>In order to lock a system, please specify the reason.</source>
</trans-unit>
</group>
-
<!-- == Systems == -->
<trans-unit id="overview.jsp.header">
<source>System Overview</source>
diff --git a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
index 090d373..3176ba2 100644
--- a/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
+++ b/java/code/src/com/redhat/rhn/manager/action/ActionManager.java
@@ -1905,4 +1905,27 @@ public class ActionManager extends BaseManager {
return action;
}
+
+ /**
+ * Schedule machine reboot.
+ *
+ * @param scheduler Logged in user
+ * @param server Server, which is going to be rebooted
+ * @param earliestAction Earliest date. If null, then date is current.
+ * @return
+ */
+ public static Action scheduleReboot(User scheduler,
+ Server server,
+ Date earliestAction) {
+ Action action = ActionManager.scheduleAction(scheduler,
+ server,
+ ActionFactory.TYPE_REBOOT,
+ ActionFactory.TYPE_REBOOT.getName(),
+ (earliestAction == null ?
+ new Date() :
+ earliestAction));
+ ActionFactory.save(action);
+ return action;
+ }
+
}
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 85a24f5..3eb1775 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java
@@ -399,6 +399,9 @@ public class RhnSetDecl {
public static final RhnSetDecl SSM_SYSTEMS_SET_LOCK = make(
"ssm_systems_set_lock", SetCleanup.NOOP);
+ public static final RhnSetDecl SSM_SYSTEMS_REBOOT = make(
+ "ssm_systems_reboot", SetCleanup.NOOP);
+
private SetCleanup cleanup;
private String label;
diff --git a/java/code/webapp/WEB-INF/nav/ssm.xml b/java/code/webapp/WEB-INF/nav/ssm.xml
index 0ae6aba..daf3db7 100644
--- a/java/code/webapp/WEB-INF/nav/ssm.xml
+++ b/java/code/webapp/WEB-INF/nav/ssm.xml
@@ -125,10 +125,11 @@
</rhn-tab>
<rhn-tab name="Misc" url="/rhn/systems/ssm/misc/Index.do">
- <rhn-tab name="Hardware" url="/rhn/systems/ssm/misc/HardwareRefresh.do"/>
- <rhn-tab name="Software" url="/rhn/systems/ssm/misc/SoftwareRefresh.do"/>
- <rhn-tab name="Migrate" url="/rhn/systems/ssm/MigrateSystems.do"/>
+ <rhn-tab name="ssm.misc.index.tabs.hardware" url="/rhn/systems/ssm/misc/HardwareRefresh.do"/>
+ <rhn-tab name="ssm.misc.index.tabs.software" url="/rhn/systems/ssm/misc/SoftwareRefresh.do"/>
+ <rhn-tab name="ssm.misc.index.tabs.migrate" url="/rhn/systems/ssm/MigrateSystems.do"/>
<rhn-tab name="ssm.misc.index.tabs.lockunlock" url="/rhn/systems/ssm/misc/LockUnlockSystem.do"/>
+ <rhn-tab name="ssm.misc.index.tabs.reboot" url="/rhn/systems/ssm/misc/RebootSystem.do" />
<rhn-tab name="ssm.misc.index.tabs.delete" url="/rhn/systems/ssm/DeleteConfirm.do"/>
<rhn-tab-url>/network/systems/ssm/misc/change_sys_pref_conf.pxt</rhn-tab-url>
<rhn-tab-url>/network/systems/ssm/misc/prof_conv_conf.pxt</rhn-tab-url>
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
index fa5d6e7..746b877 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/index.jsp
@@ -10,31 +10,6 @@
<%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
<a id="profiles"> </a>
-<h2><bean:message key="ssm.misc.index.profileupdates.header"/></h2>
-<div class="page-summary">
-<p><bean:message key="ssm.misc.index.profileupdates.summary"/></p>
-</div>
-<ul>
- <li><a href="/rhn/systems/ssm/misc/HardwareRefresh.do"><bean:message key="ssm.misc.index.profileupdates.hardware"/></a></li>
- <li><a href="/rhn/systems/ssm/misc/SoftwareRefresh.do"><bean:message key="ssm.misc.index.profileupdates.software"/></a></li>
-</ul>
-<br />
-
-<a id="migrate"> </a>
-<h2><bean:message key="ssm.misc.index.migrate.header"/></h2>
-
-<div class="page-summary">
-<p><bean:message key="ssm.misc.index.migrate.summary"/></p>
-
-</div>
-
-<ul>
- <li><a href="/rhn/systems/ssm/MigrateSystems.do"><bean:message key="ssm.misc.index.migrate.migrate"/></a></li>
-</ul>
-
-<br />
-
-<a id="profiles"> </a>
<h2><bean:message key="ssm.misc.index.csi.header"/></h2>
<div class="page-summary">
<p><bean:message key="ssm.misc.index.csi.summary"/></p>
@@ -45,26 +20,6 @@
</ul>
<br />
-<a id="reboot"> </a>
-<h2><bean:message key="ssm.misc.index.reboot.header"/></h2>
-<div class="page-summary">
-<p><bean:message key="ssm.misc.index.reboot.summary"/></p>
-</div>
-<ul>
- <li><a href="/network/systems/ssm/misc/reboot_systems.pxt?pxt:trap=rhn:empty_set&set_label=target_systems"><bean:message key="ssm.misc.index.reboot.header"/></a></li>
-</ul>
-<br />
-
-<a id="delete"> </a>
-<h2><bean:message key="ssm.misc.index.delete.header"/></h2>
-<div class="page-summary">
-<p><bean:message key="ssm.misc.index.delete.summary"/></p>
-</div>
-<ul>
- <li><a href="/rhn/systems/ssm/DeleteConfirm.do"><bean:message key="ssm.misc.index.delete.delete"/></a></li>
-</ul>
-<br />
-
<a id="entitle"> </a>
<h2><bean:message key="ssm.misc.index.entitle.header"/></h2>
<div class="page-summary">
diff --git a/java/code/webapp/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp
new file mode 100644
index 0000000..1ce41e7
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp
@@ -0,0 +1,77 @@
+<%--
+ Document : reboot-systems
+ Created on : Jul 16, 2013, 2:35:54 PM
+ Author : Bo Maryniuk <bo(a)suse.de>
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@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" %>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html:xhtml/>
+<html>
+ <body>
+ <%@ include file="/WEB-INF/pages/common/fragments/ssm/header.jspf" %>
+ <h2><bean:message key="ssm.misc.reboot.header" /></h2>
+ <p><bean:message key="ssm.misc.reboot.summary" /></p>
+
+ <rl:listset name="systemsListSet" legend="errata">
+ <rhn:csrf />
+ <rhn:submitted />
+ <rl:list width="100%"
+ dataset="pageList"
+ name="systemList"
+ styleclass="list"
+ alphabarcolumn="name">
+ <rl:decorator name="ElaborationDecorator"/>
+ <rl:decorator name="PageSizeDecorator"/>
+ <rl:decorator name="SelectableDecorator"/>
+
+ <rl:selectablecolumn value="${current.id}"
+ selected="${current.selected}"
+ disabled="${not current.selectable}"
+ styleclass="first-column"/>
+ <rl:column headerkey="systemlist.jsp.system" bound="false" sortattr="name" sortable="true">
+ <a href="/rhn/systems/details/Overview.do?sid=${current.id}">${current.name}</a>
+ </rl:column>
+ <rl:column headerkey="systemlist.jsp.channel" bound="false" sortattr="name" sortable="true" styleclass="last-column">
+ <a href="/rhn/channels/ChannelDetail.do?cid=${current.channelId}">${current.channelLabels}</a>
+ </rl:column>
+ <rl:column headerkey="systemlist.jsp.entitlement" bound="false" sortattr="name" sortable="true" styleclass="last-column">
+ <c:choose>
+ <c:when test="${!empty current.addOnEntitlementLevel}">
+ ${current.baseEntitlementLevel}, ${current.addOnEntitlementLevel}
+ </c:when>
+ <c:otherwise>
+ ${current.baseEntitlementLevel}
+ </c:otherwise>
+ </c:choose>
+ </rl:column>
+ </rl:list>
+ <div align="right">
+ <div align="left">
+ <p><bean:message key="installconfirm.jsp.widgetsummary"/></p>
+ <table class="details" align="center">
+ <tr>
+ <th><label for="radio_use_date_than"><bean:message key="confirm.jsp.than"/></label></th>
+ <td>
+ <jsp:include page="/WEB-INF/pages/common/fragments/date-picker.jsp">
+ <jsp:param name="widget" value="date"/>
+ </jsp:include>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <hr/>
+ <input type="submit" name="dispatch" value='<bean:message key="installconfirm.jsp.confirm"/>'/>
+ </div>
+ </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 d2c377f..240567e 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -5096,6 +5096,18 @@
<forward name="default"
path="/WEB-INF/pages/ssm/systems/misc/lock-unlock-system.jsp" />
</action>
+
+ <action path="/systems/ssm/misc/RebootSystem"
+ scope="request"
+ input="/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp"
+ type="com.redhat.rhn.frontend.action.ssm.RebootSystemAction"
+ name="ssmPreferencesForm"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="confirm"
+ path="/WEB-INF/pages/ssm/systems/misc/index.jsp" />
+ <forward name="default"
+ path="/WEB-INF/pages/ssm/systems/misc/reboot-system.jsp" />
+ </action>
<action path="/systems/ssm/misc/Index"
scope="request"
10 years, 9 months
utils/spacewalk-common-channels
by Tomas Lestach
utils/spacewalk-common-channels | 2 --
1 file changed, 2 deletions(-)
New commits:
commit a92b76742622ea93368496f3eafb794a589e6156
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Aug 21 12:50:06 2013 +0200
removing unused DEFAULT_USER and DEFAULT_PASSWORD
diff --git a/utils/spacewalk-common-channels b/utils/spacewalk-common-channels
index fd25c32..43edcd1 100755
--- a/utils/spacewalk-common-channels
+++ b/utils/spacewalk-common-channels
@@ -23,8 +23,6 @@ import re
from spacewalk.common.cli import getUsernamePassword, xmlrpc_login, xmlrpc_logout
DEFAULT_SERVER = "localhost"
-DEFAULT_USER = "spacewalk"
-DEFAULT_PASSWORD = "spacewalk"
DEFAULT_CONFIG = '/etc/rhn/spacewalk-common-channels.ini'
10 years, 9 months
2 commits - java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml | 10 ++++++----
java/code/src/com/redhat/rhn/common/util/test/MethodUtilTest.java | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit edffb17aa67edba1794fda2a016c189aa58cedfa
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Aug 21 11:31:00 2013 +0200
add arch to package listings on /rhn/errata/manage/AddPackages.do page
- not clear what architecture the package is of
- i686 and x86_64 look the same
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
index ae4f7f0..3d61289 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Package_queries.xml
@@ -649,14 +649,15 @@ ORDER BY UPPER(X.PACKAGE_NVRE)
<mode name="packages_available_to_errata_in_channel" class="com.redhat.rhn.frontend.dto.PackageOverview">
<query params="source_cid, target_eid">
SELECT P.id AS ID,
- PN.name || '-' || evr_t_as_vre_simple(PE.evr) AS PACKAGE_NVRE,
+ PN.name || '-' || evr_t_as_vre_simple(PE.evr) || '.' || PA.label AS PACKAGE_NVRE,
P.summary
FROM rhnPackageName PN, rhnPackageEVR PE, rhnPackage P,
- rhnChannelPackage CP
+ rhnChannelPackage CP, rhnPackageArch PA
WHERE CP.channel_id = :source_cid
AND CP.package_id = P.id
AND P.name_id = PN.id
AND P.evr_id = PE.id
+ AND PA.id = P.package_arch_id
AND NOT EXISTS (SELECT 1
FROM rhnErrataPackage EP
WHERE EP.errata_id = :target_eid
@@ -669,14 +670,15 @@ ORDER BY UPPER(PN.name || '-' || evr_t_as_vre_simple(PE.evr))
<mode name="packages_available_to_tmp_errata_in_channel" class="com.redhat.rhn.frontend.dto.PackageOverview">
<query params="source_cid, target_eid">
SELECT P.id AS ID,
- PN.name || '-' || evr_t_as_vre_simple(PE.evr) AS PACKAGE_NVRE,
+ PN.name || '-' || evr_t_as_vre_simple(PE.evr) || '.' || PA.label AS PACKAGE_NVRE,
P.summary
FROM rhnPackageName PN, rhnPackageEVR PE, rhnPackage P,
- rhnChannelPackage CP
+ rhnChannelPackage CP, rhnPackageArch PA
WHERE CP.channel_id = :source_cid
AND CP.package_id = P.id
AND P.name_id = PN.id
AND P.evr_id = PE.id
+ AND PA.id = P.package_arch_id
AND NOT EXISTS (SELECT 1
FROM rhnErrataPackagetmp EP
WHERE EP.errata_id = :target_eid
commit b433281a3decb5afd1c97fbddb8b796e224c20b3
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Aug 21 11:33:30 2013 +0200
fix checkstyle
diff --git a/java/code/src/com/redhat/rhn/common/util/test/MethodUtilTest.java b/java/code/src/com/redhat/rhn/common/util/test/MethodUtilTest.java
index a4272a6..781d330 100644
--- a/java/code/src/com/redhat/rhn/common/util/test/MethodUtilTest.java
+++ b/java/code/src/com/redhat/rhn/common/util/test/MethodUtilTest.java
@@ -98,7 +98,8 @@ public class MethodUtilTest extends RhnBaseTestCase {
}
public void testCallMethodWithTranslate() throws Exception {
- String teststr = (String)MethodUtil.callMethod(this, "nonStaticMethodWithTranslatedParameter",
+ String teststr = (String)MethodUtil.callMethod(this,
+ "nonStaticMethodWithTranslatedParameter",
new Object[] {"Y"});
assertEquals(TEST_STRING + true, teststr);
}
10 years, 9 months