java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 05b81e1da580d3d7be1af41cfa497acde43992f6
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 30 13:44:42 2010 +0200
checkstyle fix
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java b/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
index e3faef8..9b92c94 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
@@ -303,7 +303,7 @@ public class DataResult<T> extends ArrayList<T> implements List<T> {
/**
* override addAll to update also the private attributes
- * @param c collection to add
+ * @param dr data result to add
* @return if data resule was changed
*/
public boolean addDataResult(DataResult dr) {
13 years, 8 months
3 commits - java/code schema/spacewalk
by Tomas Lestach
java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java | 8 ++++----
java/code/src/com/redhat/rhn/common/db/datasource/SelectMode.java | 2 +-
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 2 +-
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 3 +++
java/code/src/com/redhat/rhn/taskomatic/task/threaded/TaskQueue.java | 4 +++-
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/050-rhnServerPackage_data.sql | 2 --
6 files changed, 12 insertions(+), 9 deletions(-)
New commits:
commit c122bd485b19c27b3338af682bbf50798bfef5f6
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 30 12:20:28 2010 +0200
627149 - do not return installtime via xmlrpc when not defined
instead of an upgrade script
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index e177500..8b9bc59 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -1195,7 +1195,7 @@ public class SystemHandler extends BaseHandler {
* #prop("string", "release")
* #prop("string", "epoch")
* #prop("string", "arch")
- * #prop("string", "installtime")
+ * #prop_desc("date", "installtime", "returned only if known")
* #struct_end()
* #array_end()
*/
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index 9019960..acca676 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -237,6 +237,9 @@ public class SystemManager extends BaseManager {
if (pkg.get("arch") == null) {
pkg.put("arch", LocalizationService.getInstance().getMessage("Unknown"));
}
+ if (pkg.get("installtime") == null) {
+ pkg.remove("installtime");
+ }
}
return pkgs;
}
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/050-rhnServerPackage_data.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/050-rhnServerPackage_data.sql
deleted file mode 100644
index d81b359..0000000
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/050-rhnServerPackage_data.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-UPDATE rhnServerPackage SET installtime = created WHERE installtime IS null;
-
commit 2d5555a812abeacab314d76c0112a6fbd1d00a90
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Aug 30 11:47:07 2010 +0200
better create a separate method than override an existing in this case
overriding broke numbering of list tag pages for several pages
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java b/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
index a94d68a..e3faef8 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/DataResult.java
@@ -306,10 +306,10 @@ public class DataResult<T> extends ArrayList<T> implements List<T> {
* @param c collection to add
* @return if data resule was changed
*/
- public boolean addAll(Collection c) {
- boolean changed = super.addAll(c);
- totalSize += c.size();
- end += c.size();
+ public boolean addDataResult(DataResult dr) {
+ boolean changed = super.addAll(dr);
+ totalSize += dr.size();
+ end += dr.size();
start = totalSize - end;
return changed;
}
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/SelectMode.java b/java/code/src/com/redhat/rhn/common/db/datasource/SelectMode.java
index a46c67d..fec892b 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/SelectMode.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/SelectMode.java
@@ -136,7 +136,7 @@ public class SelectMode extends BaseMode {
inClause.size() - subStart : CachedStatement.BATCH_SIZE;
List subClause = inClause.subList(subStart, subStart + subLength);
DataResult subDr = getQuery().execute(parameters, subClause, this);
- toReturn.addAll(subDr);
+ toReturn.addDataResult(subDr);
subStart += subLength;
}
return toReturn;
commit 3a3b1a97895cd2db8fd2c219f4a1654338181a22
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Aug 27 15:42:37 2010 +0200
do not log if queue is empty for queue tasks
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/threaded/TaskQueue.java b/java/code/src/com/redhat/rhn/taskomatic/task/threaded/TaskQueue.java
index b74d22a..3590aba 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/threaded/TaskQueue.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/threaded/TaskQueue.java
@@ -112,7 +112,9 @@ public class TaskQueue {
setupQueue();
List candidates = queueDriver.getCandidates();
queueSize = candidates.size();
- queueDriver.getLogger().info("In the queue: " + queueSize);
+ if (queueSize > 0) {
+ queueDriver.getLogger().info("In the queue: " + queueSize);
+ }
while (candidates.size() > 0 && queueDriver.canContinue()) {
Object candidate = candidates.remove(0);
QueueWorker worker = queueDriver.makeWorker(candidate);
13 years, 8 months
Changes to 'refs/tags/rhn-client-tools-1.2.4-1'
by Michael Mraka
Tag 'rhn-client-tools-1.2.4-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-08-30 09:55 +0000
Tagging package [rhn-client-tools] version [1.2.4-1] in directory [client/rhel/rhn-client-tools/].
Changes since spacewalk-schema-1.2.8-1:
Colin Coe (3):
Fix hardware page
624377 - restore original functionality and information
529232 - add 'no base' and 'ignore missing' options to kickstart
Michael Mraka (4):
559797 - fixed configuration file name
made filename formating consistent with other man pages
updated timestamp
Automatic commit of package [rhn-client-tools] release [1.2.4-1].
Partha Aji (1):
Removed unnecessary NVLs from a config query
aysabzevar (1):
l10n: Updates to Persian (fa) translation
---
client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8 | 4
client/rhel/rhn-client-tools/man/en/rhn_check.8 | 2
client/rhel/rhn-client-tools/man/en/rhn_register.8 | 4
client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 | 4
client/rhel/rhn-client-tools/man/en/spacewalk-channel.8 | 2
client/rhel/rhn-client-tools/man/en/up2date.5 | 4
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +
client/rhel/yum-rhn-plugin/po/fa.po | 47 ++++------
java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 21 +---
java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.hbm.xml | 2
java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java | 32 ++++++
java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml | 7 +
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 12 ++
java/code/src/com/redhat/rhn/frontend/action/kickstart/EditPackagesAction.java | 33 ++++++-
java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java | 47 +++++-----
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 14 ++
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 9 +
java/code/webapp/WEB-INF/pages/kickstart/assignedpackages.jsp | 47 +++++-----
java/code/webapp/WEB-INF/pages/systems/sdc/hardware.jsp | 40 +++++++-
java/code/webapp/WEB-INF/struts-config.xml | 2
rel-eng/packages/rhn-client-tools | 2
schema/spacewalk/common/tables/rhnKSData.sql | 8 +
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/052-rhnKSData-nobase.sql | 25 +++++
23 files changed, 280 insertions(+), 94 deletions(-)
---
13 years, 8 months
client/rhel rel-eng/packages
by Michael Mraka
client/rhel/rhn-client-tools/rhn-client-tools.spec | 6 +++++-
rel-eng/packages/rhn-client-tools | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 271a1b3c93a214b7387ac33c26eb61ffc456c970
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 30 11:55:16 2010 +0200
Automatic commit of package [rhn-client-tools] release [1.2.4-1].
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index 7fc6ec6..c773bd7 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -4,7 +4,7 @@ Group: System Environment/Base
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
URL: https://fedorahosted.org/spacewalk
Name: rhn-client-tools
-Version: 1.2.3
+Version: 1.2.4
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -281,6 +281,10 @@ make -f Makefile.rhn-client-tools test
%endif
%changelog
+* Mon Aug 30 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.2.4-1
+- 559797 - fixed configuration file name
+- Sort the available channels so that the listing is not random.
+
* Wed Aug 25 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.2.3-1
- 626822 - don't submit action result in cache only mode
diff --git a/rel-eng/packages/rhn-client-tools b/rel-eng/packages/rhn-client-tools
index 46627a2..5a801e0 100644
--- a/rel-eng/packages/rhn-client-tools
+++ b/rel-eng/packages/rhn-client-tools
@@ -1 +1 @@
-1.2.3-1 client/rhel/rhn-client-tools/
+1.2.4-1 client/rhel/rhn-client-tools/
13 years, 8 months
3 commits - client/rhel
by Michael Mraka
client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8 | 4 ++--
client/rhel/rhn-client-tools/man/en/rhn_check.8 | 2 +-
client/rhel/rhn-client-tools/man/en/rhn_register.8 | 4 ++--
client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 | 4 ++--
client/rhel/rhn-client-tools/man/en/spacewalk-channel.8 | 2 +-
client/rhel/rhn-client-tools/man/en/up2date.5 | 4 ++--
6 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 9ab65b38325e8c460c16979dc67a18492c1a0671
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 30 11:53:34 2010 +0200
updated timestamp
diff --git a/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8 b/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
index 771d313..8ea1ff4 100644
--- a/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
+++ b/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
@@ -14,7 +14,7 @@
.\" along with this man page; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
-.TH RHN-PROFILE-SYNC 8 "2010 July 8" "Linux" "Red Hat, Inc."
+.TH RHN-PROFILE-SYNC 8 "2010 August 30" "Linux" "Red Hat, Inc."
.SH NAME
rhn-profile-sync \- Update system information on Red Hat Network.
diff --git a/client/rhel/rhn-client-tools/man/en/rhn_check.8 b/client/rhel/rhn-client-tools/man/en/rhn_check.8
index cb1994d..34a7820 100644
--- a/client/rhel/rhn-client-tools/man/en/rhn_check.8
+++ b/client/rhel/rhn-client-tools/man/en/rhn_check.8
@@ -14,7 +14,7 @@
.\" along with this man page; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
-.TH "RHN_CHECK" "8" "2010 July 8" "Linux" "Red Hat, Inc."
+.TH "RHN_CHECK" "8" "2010 August 30" "Linux" "Red Hat, Inc."
.SH NAME
rhn_check \- Check for and execute queued actions on RHN.
diff --git a/client/rhel/rhn-client-tools/man/en/rhn_register.8 b/client/rhel/rhn-client-tools/man/en/rhn_register.8
index a328dd8..39a1941 100644
--- a/client/rhel/rhn-client-tools/man/en/rhn_register.8
+++ b/client/rhel/rhn-client-tools/man/en/rhn_register.8
@@ -14,7 +14,7 @@
.\" along with this man page; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
-.TH RHN_REGISTER 8 "2010 July 8" "Linux" "Red Hat, Inc."
+.TH RHN_REGISTER 8 "2010 August 30" "Linux" "Red Hat, Inc."
.SH NAME
rhn_register \- Connect to Red Hat Network.
diff --git a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
index 309225e..f8384ea 100644
--- a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
+++ b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
@@ -14,7 +14,7 @@
.\" along with this man page; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
-.TH RHNREG_KS 8 "2010 July 8" "Linux" "Red Hat, Inc."
+.TH RHNREG_KS 8 "2010 August 30" "Linux" "Red Hat, Inc."
.SH NAME
rhnreg_ks \- A program for non interactively registering systems to Red Hat Network.
diff --git a/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8 b/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
index f22c151..76ba8c2 100644
--- a/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
+++ b/client/rhel/rhn-client-tools/man/en/spacewalk-channel.8
@@ -14,7 +14,7 @@
.\" along with this man page; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
-.TH SPACEWALK-CHANNEL 8 "2010 July 8" "Linux" "Red Hat, Inc."
+.TH SPACEWALK-CHANNEL 8 "2010 August 30" "Linux" "Red Hat, Inc."
.SH NAME
spacewalk-channel \- Subscribe to or unsubscribe system from channel.
diff --git a/client/rhel/rhn-client-tools/man/en/up2date.5 b/client/rhel/rhn-client-tools/man/en/up2date.5
index 83d6a53..23b02a2 100644
--- a/client/rhel/rhn-client-tools/man/en/up2date.5
+++ b/client/rhel/rhn-client-tools/man/en/up2date.5
@@ -14,7 +14,7 @@
.\" along with this man page; if not, write to the Free Software
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
-.TH "UP2DATE" "5" "2010 July 8" "Linux" "Red Hat, Inc."
+.TH "UP2DATE" "5" "2010 August 30" "Linux" "Red Hat, Inc."
.SH NAME
up2date \- Configuration file for Red Hat Network client programs.
commit 6d4b6fac3e84fc656f38824e61af3b07d415b7e3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 30 11:50:42 2010 +0200
made filename formating consistent with other man pages
diff --git a/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8 b/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
index 095ce94..771d313 100644
--- a/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
+++ b/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
@@ -57,7 +57,7 @@ Show a help message and exit.
.SH FILES
-.IP /etc/sysconfig/rhn/up2date
+.IP \fI/etc/sysconfig/rhn/up2date\fP
The common configuration file used by RHN client programs.
.SH "SEE ALSO"
commit 7dc847bcdad42fb014a11d8e2325dff09ff68619
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Aug 30 11:47:17 2010 +0200
559797 - fixed configuration file name
diff --git a/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8 b/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
index 2350223..095ce94 100644
--- a/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
+++ b/client/rhel/rhn-client-tools/man/en/rhn-profile-sync.8
@@ -57,7 +57,7 @@ Show a help message and exit.
.SH FILES
-.IP /etc/sysconfig/rhn/update
+.IP /etc/sysconfig/rhn/up2date
The common configuration file used by RHN client programs.
.SH "SEE ALSO"
diff --git a/client/rhel/rhn-client-tools/man/en/rhn_register.8 b/client/rhel/rhn-client-tools/man/en/rhn_register.8
index ffa59c3..a328dd8 100644
--- a/client/rhel/rhn-client-tools/man/en/rhn_register.8
+++ b/client/rhel/rhn-client-tools/man/en/rhn_register.8
@@ -62,7 +62,7 @@ The digital server ID for this machine if the system has been registered onto
.B Red Hat Network.
This file does not exist otherwise.
.br
-.IP \fI/etc/sysconfig/rhn/update\fP
+.IP \fI/etc/sysconfig/rhn/up2date\fP
The common configuration file used by RHN client programs.
.SH "SEE ALSO"
diff --git a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8 b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
index 494a443..309225e 100644
--- a/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
+++ b/client/rhel/rhn-client-tools/man/en/rhnreg_ks.8
@@ -99,7 +99,7 @@ The digital server ID for this machine if the system has been registered onto
.B Red Hat Network.
This file does not exist otherwise.
.br
-.IP \fI/etc/sysconfig/rhn/update\fP
+.IP \fI/etc/sysconfig/rhn/up2date\fP
The common configuration file used by RHN client programs.
.SH "EXAMPLES"
diff --git a/client/rhel/rhn-client-tools/man/en/up2date.5 b/client/rhel/rhn-client-tools/man/en/up2date.5
index 030cd6f..83d6a53 100644
--- a/client/rhel/rhn-client-tools/man/en/up2date.5
+++ b/client/rhel/rhn-client-tools/man/en/up2date.5
@@ -76,7 +76,7 @@ the package, the package will not be installed.
.br
.SH FILES
-.IP \fI/etc/sysconfig/rhn/update\fP
+.IP \fI/etc/sysconfig/rhn/up2date\fP
The location of this configuration file
.SH "SEE ALSO"
13 years, 8 months
java/code schema/spacewalk
by Colin Coe
java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.hbm.xml | 2
java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java | 32 ++++++
java/code/src/com/redhat/rhn/frontend/action/kickstart/EditPackagesAction.java | 33 ++++++-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 14 ++
java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java | 9 +
java/code/webapp/WEB-INF/pages/kickstart/assignedpackages.jsp | 47 +++++-----
java/code/webapp/WEB-INF/struts-config.xml | 2
schema/spacewalk/common/tables/rhnKSData.sql | 8 +
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/052-rhnKSData-nobase.sql | 25 +++++
9 files changed, 151 insertions(+), 21 deletions(-)
New commits:
commit dc7f5e71f0d96987a116749bc0f8e775cf390205
Author: Colin Coe <coec(a)war.coesta.com>
Date: Sat Aug 28 21:34:39 2010 +0800
529232 - add 'no base' and 'ignore missing' options to kickstart
A minimal @base installation installs around 370 packages, with nobase checked
around 150 packages are installed.
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.hbm.xml b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.hbm.xml
index 334d8cd..7eb69f2 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.hbm.xml
@@ -32,6 +32,8 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<property name="isOrgDefault" column="is_org_default" not-null="true" type="yes_no" />
<property name="kernelParams" column="kernel_params" type="string" length="128" />
<property name="nonChrootPost" column="nonchrootpost" not-null="false" type="yes_no" />
+ <property name="noBase" column="no_base" not-null="false" type="yes_no" />
+ <property name="ignoreMissing" column="ignore_missing" not-null="false" type="yes_no" />
<property name="verboseUp2date" column="verboseup2date" not-null="false" type="yes_no" />
<property name="partitionDataBinary" column="partition_data" type="binary" />
<property name="cobblerId" column="cobbler_id" type="string" length="64" />
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
index 06721d2..a5510da 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
@@ -84,6 +84,8 @@ public class KickstartData {
private Set ips; // rhnKickstartIpRange
private Set<KickstartScript> scripts; // rhnKickstartScript
private KickstartDefaults kickstartDefaults;
+ private boolean noBase;
+ private boolean ignoreMissing;
private static final Pattern URL_REGEX =
Pattern.compile("--url\\s*(\\S+)", Pattern.CASE_INSENSITIVE);
@@ -120,6 +122,8 @@ public class KickstartData {
nonChrootPost = new Boolean(false);
childChannels = new HashSet();
kickstartType = TYPE_WIZARD;
+ noBase = new Boolean(false);
+ ignoreMissing = new Boolean(false);
}
/**
@@ -1411,6 +1415,34 @@ public class KickstartData {
}
/**
+ * @return Returns true if the base package group should be left off
+ */
+ public boolean getNoBase() {
+ return noBase;
+ }
+
+ /**
+ * @param noBaseIn the noBase to set
+ */
+ public void setNoBase(Boolean noBaseIn) {
+ this.noBase = noBaseIn;
+ }
+
+ /**
+ * @return Returns true if we should ignore missing packages
+ */
+ public boolean getIgnoreMissing() {
+ return ignoreMissing;
+ }
+
+ /**
+ * @param ignoreMissingIn the ignoreMissing to set
+ */
+ public void setIgnoreMissing(Boolean ignoreMissingIn) {
+ this.ignoreMissing = ignoreMissingIn;
+ }
+
+ /**
* Get the default virt bridge for this KickstartData object.
*
* @return String virt bridge (xenbr0, virbr0)
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/EditPackagesAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/EditPackagesAction.java
index b574384..e802c0f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/EditPackagesAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/EditPackagesAction.java
@@ -44,6 +44,8 @@ import javax.servlet.http.HttpServletResponse;
public class EditPackagesAction extends RhnAction {
private static final String PACKAGE_LIST = "packageList";
+ private static final String NO_BASE = "noBase";
+ private static final String IGNORE_MISSING = "ignoreMissing";
/**
* {@inheritDoc}
@@ -128,28 +130,55 @@ public class EditPackagesAction extends RhnAction {
}
form.set(PACKAGE_LIST, buf.toString());
}
+
+ form.set(NO_BASE, ksdata.getNoBase());
+ form.set(IGNORE_MISSING, ksdata.getIgnoreMissing());
form.set("submitted", Boolean.TRUE);
}
private void transferEdits(KickstartData ksdata, DynaActionForm form,
RequestContext ctx) {
+ ksdata.setNoBase(Boolean.TRUE.equals(form.get(NO_BASE)));
+ ksdata.setIgnoreMissing(Boolean.TRUE.equals(form.get(IGNORE_MISSING)));
+
// first clear the kickstart packages set
ksdata.clearKsPackages();
Set ksPackages = ksdata.getKsPackages();
String newPackages = form.getString(PACKAGE_LIST);
if (newPackages != null && newPackages.length() > 0) {
+ Boolean first = new Boolean(true);
for (StringTokenizer strtok = new StringTokenizer(newPackages, "\n");
strtok.hasMoreTokens();) {
- String pkg = strtok.nextToken();
+
+ // This is a hack but I can't think of a better way to do it
+ String pkg = null;
+ if (first && (!ksdata.getNoBase())) {
+ pkg = "@ Base";
+ PackageName pn = PackageFactory.lookupOrCreatePackageByName(pkg);
+ KickstartPackage kp = new KickstartPackage(ksdata, pn);
+ if (KickstartFactory.lookupKsPackageByKsDataAndPackageName(
+ ksdata, pn).isEmpty()) {
+ ksdata.addKsPackage(kp);
+ }
+ }
+ first = false;
+
+ pkg = strtok.nextToken();
pkg = pkg.trim();
if (pkg.length() == 0) {
continue;
}
+
+ // if noBase is checked and the current package is @base, ignore it
PackageName pn = PackageFactory.lookupOrCreatePackageByName(pkg);
- KickstartPackage kp = new KickstartPackage(ksdata, pn);
+ if ((pn.getName().toLowerCase().replaceAll("\\s", "")
+ .equals("@base")) && (ksdata.getNoBase())) {
+ continue;
+ }
+ KickstartPackage kp = new KickstartPackage(ksdata, pn);
if (KickstartFactory.lookupKsPackageByKsDataAndPackageName(
ksdata, pn).isEmpty()) {
ksdata.addKsPackage(kp);
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 3df47f0..9403f52 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
@@ -11470,6 +11470,20 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<context context-type="sourcefile">/rhn/kickstart/KickstartPackagesEdit.do</context>
</context-group>
</trans-unit>
+
+ <trans-unit id="kickstart.edit.pkgs.jsp.nobase">
+ <source>Don't install @Base package group</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/kickstart/KickstartPackagesEdit.do</context>
+ </context-group>
+ </trans-unit>
+
+ <trans-unit id="kickstart.edit.pkgs.jsp.ignoremissing">
+ <source>Ignore missing packages</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/kickstart/KickstartPackagesEdit.do</context>
+ </context-group>
+ </trans-unit>
<!-- Cobbler Snippet Entries -->
<group>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
index 01ff3f5..d1abb72 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java
@@ -69,6 +69,8 @@ public class KickstartFormatter {
private static final String NEWLINE = "\n";
private static final String SPACE = " ";
private static final String DEPS = "--resolvedeps";
+ private static final String NO_BASE = "--nobase";
+ private static final String IGNORE_MISSING = "--ignoremissing";
private static final String PACKAGES = "%packages";
private static final String INTERPRETER_OPT = "--interpreter";
private static final String NOCHROOT = "--nochroot";
@@ -403,6 +405,13 @@ public class KickstartFormatter {
private String getPackageOptions() {
// if kstree is > 2.1 then add the resolve deps, ignore other deps
String opts = this.ksdata.isRhel2() || this.ksdata.isRhel5OrGreater() ? "" : DEPS;
+
+ if (this.ksdata.getIgnoreMissing()) {
+ opts = opts + SPACE + IGNORE_MISSING;
+ }
+ if (this.ksdata.getNoBase()) {
+ opts = opts + SPACE + NO_BASE;
+ }
return PACKAGES + SPACE + opts + NEWLINE;
}
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/assignedpackages.jsp b/java/code/webapp/WEB-INF/pages/kickstart/assignedpackages.jsp
index 4d7fadf..2521379 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/assignedpackages.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/assignedpackages.jsp
@@ -23,27 +23,36 @@
<html:form method="post" action="/kickstart/KickstartPackagesEdit.do">
<html:hidden property="ksid" />
<html:hidden property="submitted" />
+ <table width="80%" class="details">
+ <tr>
+ <th><bean:message key="kickstart.edit.pkgs.jsp.nobase" />:</th>
+ <td><html:checkbox property="noBase" /></td>
+ </tr>
+ <tr>
+ <th width="40%"><bean:message key="kickstart.edit.pkgs.jsp.ignoremissing" />:</th>
+ <td><html:checkbox property="ignoreMissing" /></td>
+ </tr>
+ </table>
<table width="80%">
- <tr>
- <td>
- <table width="100%">
- <tr>
- <td align="right">
- <html:textarea style="text-align: left" property="packageList" rows="10" cols="80" tabindex="0" />
- </td>
- </tr>
- <tr>
- <td align="right">
- <input type="submit" value="<bean:message key="kickstart.edit.pkgs.submit.jsp.label" />" />
- </td>
- </tr>
- </table>
- </td>
- <td> </td>
- </tr>
- </table>
+ <tr>
+ <td>
+ <table width="100%">
+ <tr>
+ <td align="right">
+ <html:textarea style="text-align: left" property="packageList" rows="10" cols="80" tabindex="0" />
+ </td>
+ </tr>
+ <tr>
+ <td align="right">
+ <input type="submit" value="<bean:message key="kickstart.edit.pkgs.submit.jsp.label" />" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td> </td>
+ </tr>
+ </table>
</html:form>
</div>
</body>
</html:html>
-
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index eb2acd6..674b833 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -676,6 +676,8 @@
type="org.apache.struts.action.DynaActionForm">
<form-property name="ksid" type="java.lang.Long" />
<form-property name="packageList" type="java.lang.String" />
+ <form-property name="noBase" type="java.lang.Boolean" />
+ <form-property name="ignoreMissing" type="java.lang.Boolean" />
<form-property name="submitted" type="java.lang.Boolean" />
</form-bean>
diff --git a/schema/spacewalk/common/tables/rhnKSData.sql b/schema/spacewalk/common/tables/rhnKSData.sql
index b638b5a..d228baa 100644
--- a/schema/spacewalk/common/tables/rhnKSData.sql
+++ b/schema/spacewalk/common/tables/rhnKSData.sql
@@ -61,6 +61,14 @@ CREATE TABLE rhnKSData
DEFAULT ('N') NOT NULL
CONSTRAINT rhn_ks_nonchroot_post_ck
CHECK (nonchrootpost in ( 'Y' , 'N' )),
+ no_base CHAR(1)
+ DEFAULT ('N') NOT NULL
+ CONSTRAINT rhn_ks_nobase_ck
+ CHECK (no_base in ( 'Y' , 'N' )),
+ ignore_missing CHAR(1)
+ DEFAULT ('N') NOT NULL
+ CONSTRAINT rhn_ks_ignore_missing_ck
+ CHECK (ignore_missing in ( 'Y' , 'N' )),
created DATE
DEFAULT (sysdate) NOT NULL,
modified DATE
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/052-rhnKSData-nobase.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/052-rhnKSData-nobase.sql
new file mode 100644
index 0000000..f822104
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/052-rhnKSData-nobase.sql
@@ -0,0 +1,25 @@
+--
+-- Copyright (c) 2010 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.
+--
+
+alter table rhnKsData add (
+ no_base CHAR(1)
+ DEFAULT ('N') NOT NULL
+ CONSTRAINT rhn_ks_nobase_ck
+ CHECK (no_base in ( 'Y' , 'N' )),
+ ignore_missing CHAR(1)
+ DEFAULT ('N') NOT NULL
+ CONSTRAINT rhn_ks_ignore_missing_ck
+ CHECK (ignore_missing in ( 'Y' , 'N' ))
+);
13 years, 8 months
client/rhel
by Transifex System User
client/rhel/yum-rhn-plugin/po/fa.po | 47 ++++++++++++++++--------------------
1 file changed, 22 insertions(+), 25 deletions(-)
New commits:
commit b24d4c58b6c93176ab40510f19e24ad7f0640541
Author: aysabzevar <aysabzevar(a)fedoraproject.org>
Date: Sat Aug 28 00:42:53 2010 +0000
l10n: Updates to Persian (fa) translation
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/client/rhel/yum-rhn-plugin/po/fa.po b/client/rhel/yum-rhn-plugin/po/fa.po
index fd028d0..c44d659 100644
--- a/client/rhel/yum-rhn-plugin/po/fa.po
+++ b/client/rhel/yum-rhn-plugin/po/fa.po
@@ -1,16 +1,15 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# Ali Yousefi Sabzevar <aysabzevar(a)gmail.com>, 2010.
#
-#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: PACKAGE VERSION \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-10 11:49+0200\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-05-06 16:28+0200\n"
+"PO-Revision-Date: 2010-08-28 05:00+0330\n"
+"Last-Translator: Ali Yousefi Sabzevar <aysabzevar(a)gmail.com>\n"
"Language-Team: LANGUAGE <LL(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,64 +17,62 @@ msgstr ""
#: ../rhnplugin.py:47
msgid "There was an error communicating with RHN."
-msgstr ""
+msgstr "در ارتباط با شبکه ردهت خطایی وجود دارد."
#: ../rhnplugin.py:69
msgid "RHN support will be disabled."
-msgstr ""
+msgstr "پشتیبانی شبکه ردهت غیر فعال خواهد شد."
#. If non-root notify user RHN repo not accessible
#: ../rhnplugin.py:81
-msgid ""
-"*Note* Red Hat Network repositories are not listed below. You must run this "
-"command as root to access RHN repositories."
-msgstr ""
+msgid "*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories."
+msgstr "*توجه* مخازن شبکه ردهت در زیر نیامدهاند. شما باید این دستور را توسطکاربر ریشه اجرا کنید تا به مخازن شبکه ردهت دسترسی پیدا کنید."
#: ../rhnplugin.py:95
msgid "There was an error parsing the RHN proxy settings."
-msgstr ""
+msgstr "در تجزیه تنظیمات پروکسی شبکه ردهت مشکلی وجود دارد."
#: ../rhnplugin.py:106
msgid "Cleaning"
-msgstr ""
+msgstr "پاک سازی"
#: ../rhnplugin.py:112
msgid "Either --version, or no commands entered"
-msgstr ""
+msgstr "یا --version، یا هیچ دستوری وارد نشده"
#: ../rhnplugin.py:126
msgid "This system is not registered with RHN."
-msgstr ""
+msgstr "این سیستم توسط شبکه ردهت ثبت نشده است."
#: ../rhnplugin.py:131
msgid "RHN channel support will be disabled."
-msgstr ""
+msgstr "پشتیبانی کانال شبکه ردهت غیر فعال خواهد شد."
#: ../rhnplugin.py:135
msgid "This system is not subscribed to any channels."
-msgstr ""
+msgstr "این سیستم در هیچ کانالی عضو نیست."
#: ../rhnplugin.py:139
-msgid ""
-"This system may not be a registered to RHN. SystemId could not be acquired.\n"
-msgstr ""
+msgid "This system may not be a registered to RHN. SystemId could not be acquired.\n"
+msgstr "این سیستم نمیتواند در شبکه ردهت ثبت شود. مشخصات سیستم قابل دستیابی نیست.\n"
#: ../rhnplugin.py:213
msgid "Package profile information could not be sent."
-msgstr ""
+msgstr "اطلاعات نمایه بسته نمیتواند ارسال شود."
#. This is compensating for hosted/satellite returning back an error
#. message instructing RHEL5 clients to run "up2date --register"
#. bz: 438175
#: ../rhnplugin.py:220
msgid "Error Message:"
-msgstr ""
+msgstr "پیغام خطا:"
#: ../rhnplugin.py:221
msgid "Please run rhn_register as root on this client"
-msgstr ""
+msgstr "لطفا دستور rhn_register را توسط کاربر ریشه در این کامپیوتر اجرا کنید."
#: ../rhnplugin.py:298
#, python-format
msgid "Missing required login information for RHN: %s"
-msgstr ""
+msgstr "اطلاعات موردنیاز برای ورود به شبکه ردهت ناقص است %s"
+
13 years, 8 months
java/code
by Partha Aji
java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 21 ++++------
1 file changed, 9 insertions(+), 12 deletions(-)
New commits:
commit f7f3e189d88729f2d0fea552b1dd012ff6793a20
Author: Partha Aji <paji(a)redhat.com>
Date: Fri Aug 27 16:33:51 2010 -0400
Removed unnecessary NVLs from a config query
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
index c007ac1..f814f88 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml
@@ -1943,33 +1943,30 @@ SELECT CC.id AS ID,
<query name="elaborator_config_channel_file_dir_count">
SELECT CC.id AS ID,
- NVL( (
- SELECT COUNT(CF.id)
+ (SELECT COUNT(CF.id)
FROM rhnConfigFile CF
INNER JOIN rhnConfigRevision CR ON CR.id = CF.latest_config_revision_id
INNER JOIN rhnConfigFileType CFT ON CFT.ID = CR.CONFIG_FILE_TYPE_ID
WHERE CF.config_channel_id = CC.id
AND CF.latest_config_revision_id IS NOT NULL
- AND CFT.LABEL = 'file'
- ), 0) AS files_only_count,
- NVL( (
- SELECT COUNT(CF.id)
+ AND CFT.LABEL = 'file')
+ AS files_only_count,
+ (SELECT COUNT(CF.id)
FROM rhnConfigFile CF
INNER JOIN rhnConfigRevision CR ON CR.id = CF.latest_config_revision_id
INNER JOIN rhnConfigFileType CFT ON CFT.ID = CR.CONFIG_FILE_TYPE_ID
WHERE CF.config_channel_id = CC.id
AND CF.latest_config_revision_id IS NOT NULL
- AND CFT.LABEL = 'symlink'
- ), 0) AS symlinks_only_count,
- NVL( (
- SELECT COUNT(CF.id)
+ AND CFT.LABEL = 'symlink')
+ AS symlinks_only_count,
+ (SELECT COUNT(CF.id)
FROM rhnConfigFile CF
INNER JOIN rhnConfigRevision CR ON CR.id = CF.latest_config_revision_id
INNER JOIN rhnConfigFileType CFT ON CFT.ID = CR.CONFIG_FILE_TYPE_ID
WHERE CF.config_channel_id = CC.id
AND CF.latest_config_revision_id IS NOT NULL
- AND CFT.LABEL = 'directory'
- ), 0) AS dirs_only_count
+ AND CFT.LABEL = 'directory')
+ AS dirs_only_count
FROM rhnConfigChannel CC
WHERE CC.id IN (%s)
</query>
13 years, 8 months
2 commits - java/code
by Colin Coe
java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml | 7 +
java/code/src/com/redhat/rhn/domain/server/ServerFactory.java | 12 ++
java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java | 47 +++++-----
java/code/webapp/WEB-INF/pages/systems/sdc/hardware.jsp | 40 +++++++-
4 files changed, 82 insertions(+), 24 deletions(-)
New commits:
commit c5562a1153aa929fef027a99d94290313aa14432
Author: Colin Coe <coec(a)war.coesta.com>
Date: Fri Aug 27 23:34:29 2010 +0800
624377 - restore original functionality and information
diff --git a/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml b/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml
index 0551660..917b583 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml
@@ -35,7 +35,7 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<query name="Device.findStorageByServer">
<![CDATA[from com.redhat.rhn.domain.server.Device as t
- where t.server = :server and (t.deviceClass = 'HD' or t.deviceClass = 'FLOPPY')
+ where t.server = :server and t.deviceClass = 'HD'
order by t.device]]>
</query>
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 66e2c39..766c989 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -119,7 +119,7 @@ public class ServerFactory extends HibernateFactory {
/**
* Lookup all storage Devices associated with the server.
- * @param sid The server ID for the values you would like to lookup
+ * @param s The server for the values you would like to lookup
* @return List of devices
*/
public static List<Device> lookupStorageDevicesByServer(Server s) {
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java
index 9a716eb..c269d2e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java
@@ -103,7 +103,7 @@ public class SystemHardwareAction extends RhnAction {
request.setAttribute("system_ram", server.getRam());
request.setAttribute("system_swap", server.getSwap());
- StringBuffer dmiBios = new StringBuffer();
+ StringBuffer dmiBios = new StringBuffer();
if (server.getDmi().getBios() != null) {
if (server.getDmi().getBios().getVendor() != null &&
server.getDmi().getBios().getVendor() != "") {
@@ -149,7 +149,6 @@ public class SystemHardwareAction extends RhnAction {
}
request.setAttribute("network_interfaces", nicList2);
-// List<Device> hdd = new ArrayList();
List<String> hdd = new ArrayList();
List miscDevices = new ArrayList();
List videoDevices = new ArrayList();
@@ -182,7 +181,7 @@ public class SystemHardwareAction extends RhnAction {
device.put("device", d.getDevice());
device.put("driver", d.getDriver());
device.put("pcitype", d.getPcitype().toString());
- if ((d.getDeviceClass().equals("HD")) || (d.getDeviceClass().equals("FLOPPY"))) {
+ if (d.getDeviceClass().equals("HD")) {
continue;
}
else if (d.getDeviceClass().equals("VIDEO")) {
@@ -204,22 +203,8 @@ public class SystemHardwareAction extends RhnAction {
}
}
-// Collections.sort(hdd);
-// List storageDevices = new ArrayList();
-// for (Device hd : hdd) {
-//System.out.println("2 - Found storage device: " + hd);
-// Device d = server.getDevice(hd);
-// Map device = new HashMap();
-// device.put("description", d.getDescription());
-// device.put("device", d.getDevice());
-// device.put("bus", d.getBus());
-// storageDevices.add(device);
-// }
-
-// Collections.sort(hdd);
- List<Device> values = ServerFactory.lookupStorageDevicesByServer(server);
List storageDevices = new ArrayList();
- for (Device hd : values) {
+ for (Device hd : (List<Device>)ServerFactory.lookupStorageDevicesByServer(server)) {
Device d = hd;
Map device = new HashMap();
device.put("description", d.getDescription());
@@ -227,7 +212,7 @@ public class SystemHardwareAction extends RhnAction {
device.put("bus", d.getBus());
storageDevices.add(device);
}
-System.out.println("storageDevices.size() = " + storageDevices.size());
+
request.setAttribute("storageDevices", storageDevices);
request.setAttribute("videoDevices", videoDevices);
request.setAttribute("audioDevices", audioDevices);
commit 82727ccbf4e53c4bab2071e906d0b314a9b65732
Author: Colin Coe <colin.coe(a)gmail.com>
Date: Fri Aug 27 13:04:09 2010 +0800
Fix hardware page
diff --git a/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml b/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml
index 426561b..0551660 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/server/Device.hbm.xml
@@ -32,4 +32,11 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
insert="false" update="false"/>
</class>
+
+ <query name="Device.findStorageByServer">
+ <![CDATA[from com.redhat.rhn.domain.server.Device as t
+ where t.server = :server and (t.deviceClass = 'HD' or t.deviceClass = 'FLOPPY')
+ order by t.device]]>
+ </query>
+
</hibernate-mapping>
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 3ac38ac..66e2c39 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerFactory.java
@@ -118,6 +118,18 @@ public class ServerFactory extends HibernateFactory {
}
/**
+ * Lookup all storage Devices associated with the server.
+ * @param sid The server ID for the values you would like to lookup
+ * @return List of devices
+ */
+ public static List<Device> lookupStorageDevicesByServer(Server s) {
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("server", s);
+ return (List<Device>) singleton.listObjectsByNamedQuery(
+ "Device.findStorageByServer", params);
+ }
+
+ /**
* Get the Logger for the derived class so log messages show up on the
* correct class
*/
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java
index 1d5910d..9a716eb 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/sdc/SystemHardwareAction.java
@@ -19,6 +19,7 @@ import com.redhat.rhn.domain.action.ActionFactory;
import com.redhat.rhn.domain.server.CPU;
import com.redhat.rhn.domain.server.Device;
import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.server.ServerFactory;
import com.redhat.rhn.domain.server.NetworkInterface;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.struts.RequestContext;
@@ -102,10 +103,26 @@ public class SystemHardwareAction extends RhnAction {
request.setAttribute("system_ram", server.getRam());
request.setAttribute("system_swap", server.getSwap());
+ StringBuffer dmiBios = new StringBuffer();
+ if (server.getDmi().getBios() != null) {
+ if (server.getDmi().getBios().getVendor() != null &&
+ server.getDmi().getBios().getVendor() != "") {
+ dmiBios.append(server.getDmi().getBios().getVendor() + " ");
+ }
+ if (server.getDmi().getBios().getVersion() != null &&
+ server.getDmi().getBios().getVersion() != "") {
+ dmiBios.append(server.getDmi().getBios().getVersion() + " ");
+ }
+ if (server.getDmi().getBios().getRelease() != null &&
+ server.getDmi().getBios().getRelease() != "") {
+ dmiBios.append(server.getDmi().getBios().getRelease());
+ }
+ }
+
request.setAttribute("dmi_vendor", server.getDmi().getVendor());
request.setAttribute("dmi_system", server.getDmi().getSystem());
request.setAttribute("dmi_product", server.getDmi().getProduct());
- request.setAttribute("dmi_bios", server.getDmi().getBios());
+ request.setAttribute("dmi_bios", dmiBios.toString());
request.setAttribute("dmi_asset_tag", server.getDmi().getAsset());
request.setAttribute("dmi_board", server.getDmi().getBoard());
@@ -132,12 +149,7 @@ public class SystemHardwareAction extends RhnAction {
}
request.setAttribute("network_interfaces", nicList2);
- List<String> deviceList = new ArrayList();
- for (Device d : server.getDevices()) {
- deviceList.add(d.getDescription());
- }
- Collections.sort(deviceList);
-
+// List<Device> hdd = new ArrayList();
List<String> hdd = new ArrayList();
List miscDevices = new ArrayList();
List videoDevices = new ArrayList();
@@ -150,10 +162,12 @@ public class SystemHardwareAction extends RhnAction {
String desc = null;
String vendor = null;
- StringTokenizer st = new StringTokenizer(d.getDescription(), "|");
- vendor = st.nextToken();
- if (st.hasMoreTokens()) {
- desc = st.nextToken();
+ if (d.getDescription() != null) {
+ StringTokenizer st = new StringTokenizer(d.getDescription(), "|");
+ vendor = st.nextToken();
+ if (st.hasMoreTokens()) {
+ desc = st.nextToken();
+ }
}
if (desc != null) {
@@ -168,11 +182,8 @@ public class SystemHardwareAction extends RhnAction {
device.put("device", d.getDevice());
device.put("driver", d.getDriver());
device.put("pcitype", d.getPcitype().toString());
- if ((d.getDeviceClass().equals("HD")) ||
- (d.getDeviceClass().equals("FLOPPY"))) {
- if (d.getDevice() != null) {
- hdd.add(d.getDevice());
- }
+ if ((d.getDeviceClass().equals("HD")) || (d.getDeviceClass().equals("FLOPPY"))) {
+ continue;
}
else if (d.getDeviceClass().equals("VIDEO")) {
videoDevices.add(device);
@@ -193,17 +204,30 @@ public class SystemHardwareAction extends RhnAction {
}
}
- Collections.sort(hdd);
+// Collections.sort(hdd);
+// List storageDevices = new ArrayList();
+// for (Device hd : hdd) {
+//System.out.println("2 - Found storage device: " + hd);
+// Device d = server.getDevice(hd);
+// Map device = new HashMap();
+// device.put("description", d.getDescription());
+// device.put("device", d.getDevice());
+// device.put("bus", d.getBus());
+// storageDevices.add(device);
+// }
+
+// Collections.sort(hdd);
+ List<Device> values = ServerFactory.lookupStorageDevicesByServer(server);
List storageDevices = new ArrayList();
- for (String hd : hdd) {
- Device d = server.getDevice(hd);
+ for (Device hd : values) {
+ Device d = hd;
Map device = new HashMap();
device.put("description", d.getDescription());
device.put("device", d.getDevice());
device.put("bus", d.getBus());
storageDevices.add(device);
}
-
+System.out.println("storageDevices.size() = " + storageDevices.size());
request.setAttribute("storageDevices", storageDevices);
request.setAttribute("videoDevices", videoDevices);
request.setAttribute("audioDevices", audioDevices);
diff --git a/java/code/webapp/WEB-INF/pages/systems/sdc/hardware.jsp b/java/code/webapp/WEB-INF/pages/systems/sdc/hardware.jsp
index 1681d45..ec949aa 100644
--- a/java/code/webapp/WEB-INF/pages/systems/sdc/hardware.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/sdc/hardware.jsp
@@ -82,7 +82,7 @@
<c:if test="${empty dmi_asset_tag}" var="no_asset_tag"/>
<c:if test="${empty dmi_board}" var="no_board"/>
- <c:if test="${not (no_vendor or no_bios or no_system or no_product or no_asset_tag or no_board)}">
+ <c:if test="${!(empty dmi_vendor and empty dmi_bios and empty dmi_system and empty dmi_product and empty dmi_asset_tag and empty dmi_board)}">
<h2><bean:message key="sdc.details.hardware.dmi"/></h2>
<table class="details">
<tr>
@@ -175,15 +175,44 @@
</c:choose>
<tr class="${style_class}">
<td>${current.name}</td>
- <td>${current.ip}</td>
- <td>${current.netmask}</td>
- <td>${current.broadcast}</td>
- <td>${current.hwaddr}</td>
+ <c:choose>
+ <c:when test="${empty current.ip}">
+ <td><span class="no-details">(unknown)</span></td>
+ </c:when>
+ <c:otherwise>
+ <td>${current.ip}</td>
+ </c:otherwise>
+ </c:choose>
+ <c:choose>
+ <c:when test="${empty current.netmask}">
+ <td><span class="no-details">(unknown)</span></td>
+ </c:when>
+ <c:otherwise>
+ <td>${current.netmask}</td>
+ </c:otherwise>
+ </c:choose>
+ <c:choose>
+ <c:when test="${empty current.broadcast}">
+ <td><span class="no-details">(unknown)</span></td>
+ </c:when>
+ <c:otherwise>
+ <td>${current.broadcast}</td>
+ </c:otherwise>
+ </c:choose>
+ <c:choose>
+ <c:when test="${empty current.hwaddr}">
+ <td><span class="no-details">(unknown)</span></td>
+ </c:when>
+ <c:otherwise>
+ <td>${current.hwaddr}</td>
+ </c:otherwise>
+ </c:choose>
<td>${current.module}</td>
</tr>
</c:forEach>
</table>
+ <c:if test="${not empty videoDevices}">
<h2><bean:message key="sdc.details.hardware.storage"/></h2>
<table class="list" width="90%" cellspacing="0">
<thead>
@@ -213,6 +242,7 @@
</c:forEach>
</tbody>
</table>
+ </c:if>
<c:if test="${not empty videoDevices}">
<h2><bean:message key="sdc.details.hardware.video"/></h2>
13 years, 8 months
Changes to 'refs/tags/spacewalk-schema-1.2.8-1'
by Tomas Lestach
Tag 'spacewalk-schema-1.2.8-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2010-08-27 12:25 +0000
Tagging package [spacewalk-schema] version [1.2.8-1] in directory [schema/spacewalk/].
Changes since jabberd-selinux-1.4.9-1:
Tomas Lestach (2):
fix errata-cache-bunch template
Automatic commit of package [spacewalk-schema] release [1.2.8-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/oracle/data/rhnTaskoTemplate.sql | 7 +++++++
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/027-rhnTaskoTemplate_data.sql | 6 ++++++
4 files changed, 18 insertions(+), 2 deletions(-)
---
13 years, 8 months