java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java | 18 +++++-----
java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTagHelper.java | 4 +-
2 files changed, 12 insertions(+), 10 deletions(-)
New commits:
commit f39b978482b7a2aec7b364e87402b18056953356
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Sep 16 12:41:27 2010 -0400
633956 -fixing error popup on YourRhn when a warning or critical probe exists
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
index 559f9d9..a4311fa 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTag.java
@@ -749,15 +749,17 @@ public class ListTag extends BodyTagSupport {
ListTagUtil.write(pageContext, " alphaResult");
}
ListTagUtil.write(pageContext, "\" ");
- ListTagUtil.write(pageContext, "id=\"");
- ListTagUtil.write(pageContext, getRowRenderer().getRowId(getUniqueName(),
- getCurrentObject()));
- ListTagUtil.write(pageContext, "\" ");
- String style = getRowRenderer().getRowStyle(getCurrentObject());
- if (!StringUtils.isBlank(style)) {
- ListTagUtil.write(pageContext, "style=\"");
- ListTagUtil.write(pageContext, style);
+ if (getCurrentObject() != null) { //if we're rendering a non-item row (e.g. reflink)
+ ListTagUtil.write(pageContext, "id=\"");
+ ListTagUtil.write(pageContext, getRowRenderer().getRowId(getUniqueName(),
+ getCurrentObject()));
ListTagUtil.write(pageContext, "\" ");
+ String style = getRowRenderer().getRowStyle(getCurrentObject());
+ if (!StringUtils.isBlank(style)) {
+ ListTagUtil.write(pageContext, "style=\"");
+ ListTagUtil.write(pageContext, style);
+ ListTagUtil.write(pageContext, "\" ");
+ }
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTagHelper.java b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTagHelper.java
index 0f51f1a..a72ae88 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTagHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/ListTagHelper.java
@@ -272,14 +272,14 @@ public class ListTagHelper {
* @return the id representing the object
*/
public static String getObjectId(Object current) {
- String id;
+ String id = null;
if (current instanceof Selectable) {
id = ((Selectable)current).getSelectionKey();
}
else if (current instanceof Identifiable) {
id = String.valueOf(((Identifiable)current).getId());
}
- else {
+ if (id == null) {
id = String.valueOf(current.hashCode());
}
return id;
13 years, 7 months
Changes to 'refs/tags/spacewalk-java-1.2.41-1'
by Lukas Zapletal
Tag 'spacewalk-java-1.2.41-1' created by Lukas Zapletal <lzap+git(a)redhat.com> at 2010-09-16 14:23 +0000
Tagging package [spacewalk-java] version [1.2.41-1] in directory [java/].
Changes since rhnpush-5.5.5-1:
Justin Sherrill (1):
adding missing file from yesterdays commit
Lukas Zapletal (1):
Automatic commit of package [spacewalk-java] release [1.2.41-1].
---
java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchConfigRevisionException.java | 59 ++++++++++
java/spacewalk-java.spec | 12 +-
rel-eng/packages/spacewalk-java | 2
3 files changed, 71 insertions(+), 2 deletions(-)
---
13 years, 7 months
java/spacewalk-java.spec rel-eng/packages
by Lukas Zapletal
java/spacewalk-java.spec | 12 +++++++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 7a4922e1555412a2b78787dff344b4722cae98fc
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Thu Sep 16 16:23:29 2010 +0200
Automatic commit of package [spacewalk-java] release [1.2.41-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 9e9864a..6fdb72e 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -19,7 +19,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.2.40
+Version: 1.2.41
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -336,6 +336,16 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Thu Sep 16 2010 Lukas Zapletal 1.2.41-1
+- 595500 - added contents_enc64 param to createOrUpdatePath XMLAPI
+- making taskmoatic work with the rkbloom driver
+- 633535 - added RHEL 5 subrepos as well as stopped showing repos not valid for
+ a particular release
+- adding configchannel.lookupFileInfo() taking a revision id
+- implement <label> for form fields - systems/probes/edit.jsp
+- implement <label> for form fields - systems/systemsearch.jsp
+- 627920 - Added a larger config file icon for symlinks. Thanks to Joshua Roys.
+
* Tue Sep 14 2010 Justin Sherrill <jsherril(a)redhat.com> 1.2.40-1
- 630980 - fixing ise on package details page (jsherril(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index c7ab962..14e7e60 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.2.40-1 java/
+1.2.41-1 java/
13 years, 7 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchConfigRevisionException.java | 59 ++++++++++
1 file changed, 59 insertions(+)
New commits:
commit 9048aa1b514c350541d0df051d994bcb4c6183a2
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu Sep 16 10:00:44 2010 -0400
adding missing file from yesterdays commit
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchConfigRevisionException.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchConfigRevisionException.java
new file mode 100644
index 0000000..716ea46
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/NoSuchConfigRevisionException.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2009--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.
+ */
+
+/*
+ * AUTOMATICALLY GENERATED FILE, DO NOT EDIT.
+ */
+package com.redhat.rhn.frontend.xmlrpc;
+
+import com.redhat.rhn.FaultException;
+
+/**
+ * no such config revision
+ * <p>
+
+ *
+ * @version definition($Rev: 76724 $)/template($Rev: 67725 $)
+ */
+public class NoSuchConfigRevisionException extends FaultException {
+
+
+ /////////////////////////
+ // Constructors
+ /////////////////////////
+ /**
+ * Constructor
+ */
+ public NoSuchConfigRevisionException() {
+ super(-1028 , "noSuchConfigRevision" , "No such config revision");
+ // begin member variable initialization
+ }
+
+ /**
+ * Constructor
+ * @param cause the cause (which is saved for later retrieval
+ * by the Throwable.getCause() method). (A null value is
+ * permitted, and indicates that the cause is nonexistent or
+ * unknown.)
+ */
+ public NoSuchConfigRevisionException(Throwable cause) {
+ super(-1028 , "noSuchConfigRevision" , "No such config revision" , cause);
+ // begin member variable initialization
+ }
+
+ /////////////////////////
+ // Getters/Setters
+ /////////////////////////
+}
13 years, 7 months
Changes to 'refs/tags/rhnpush-5.5.5-1'
by Michael Mraka
Tag 'rhnpush-5.5.5-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-09-16 09:53 +0000
Tagging package [rhnpush] version [5.5.5-1] in directory [client/tools/rhnpush/].
Changes since spacewalk-java-1.2.40-1:
Jan Pazdziora (1):
Remove the cvs targets.
Justin Sherrill (5):
adding configchannel.lookupFileInfo() taking a revision id
633535 - added RHEL 5 subrepos as well as stopped showing repos not valid for a particular release
checkstyle fix
629986 - updating channels last synced time from spacewalk-repo-sync commandline
making taskmoatic work with the rkbloom driver
Lukas Zapletal (1):
595500 - added contents_enc64 param to createOrUpdatePath XMLAPI
Michael Mraka (6):
sequence used for rhnUserMessageStatus ids should be also removed
600347 - use getPackageChecksumBySession() only for servers which support it
_push_package_v2() is there since satellite 3.7, let's remove old upload way
fixed indentation
600347 - added sat<540 compatibility functions
Automatic commit of package [rhnpush] release [5.5.5-1].
Milan Zazrivec (4):
use standard perl dbi in update_monitoring_scout
initCFG('server') before initDB
unify embedded database upgrades
need_oracle_9i_10g_upgrade is no longer needed
Miroslav Suchý (2):
implement <label> for form fields - systems/systemsearch.jsp
implement <label> for form fields - systems/probes/edit.jsp
Partha Aji (2):
627920 - Added a larger config file icon for symlinks. Thanks to Joshua Roys
Cleanedup old/proted/unused config queries and updated the one for snapshot
---
backend/satellite_tools/reposync.py | 10
backend/satellite_tools/satComputePkgHeaders.py | 2
branding/img/link-config.png |binary
client/tools/rhnpush/rhnpush.py | 62
client/tools/rhnpush/rhnpush.spec | 5
client/tools/rhnpush/uploadLib.py | 33
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 1
java/code/src/com/redhat/rhn/domain/kickstart/RepoInfo.java | 18
java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartSoftwareEditAction.java | 7
java/code/src/com/redhat/rhn/frontend/configuration/tags/ConfigFileTag.java | 14
java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java | 49
java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/XmlRpcConfigChannelHelper.java | 14
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigRevisionSerializer.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java | 2
java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/KickstartEditCommand.java | 3
java/code/src/com/redhat/rhn/manager/kickstart/KickstartWizardHelper.java | 2
java/code/src/com/redhat/rhn/taskomatic/core/SchedulerKernel.java | 5
java/code/webapp/WEB-INF/pages/common/fragments/configuration/files/header.jspf | 4
java/code/webapp/WEB-INF/pages/systems/probes/edit.jsp | 20
java/code/webapp/WEB-INF/pages/systems/systemsearch.jsp | 16
rel-eng/packages/rhnpush | 2
rel-eng/tito.props | 7
schema/spacewalk/upgrade/spacewalk-schema-1.1-to-spacewalk-schema-1.2/081-rhnUserMessageStatus-drop-table.sql | 1
spacewalk/setup/lib/Spacewalk/Setup.pm | 65 -
spacewalk/setup/share/oracle/upgrade-db-10g.sh | 72 -
spacewalk/setup/share/oracle/upgrade-db.sh | 34
spacewalk/setup/share/upgrade/rhn-update-monitoring.pl | 10
spacewalk/setup/spacewalk-setup.spec | 1
web/conf/rhn_web.conf | 2
web/html/nav/system_detail.xml | 2
web/modules/rhn/RHN/DB/ConfigRevision.pm | 39
web/modules/rhn/RHN/DB/DataSource/xml/config_queries.xml | 625 ----------
web/modules/sniglets/Sniglets/ListView/FileList.pm | 208 ---
web/modules/sniglets/Sniglets/Lists.pm | 4
35 files changed, 280 insertions(+), 1064 deletions(-)
---
13 years, 7 months
client/tools rel-eng/packages
by Michael Mraka
client/tools/rhnpush/rhnpush.spec | 5 ++++-
rel-eng/packages/rhnpush | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 4326f11e8fa7f5e07e726c7be70fe30d11992aee
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 16 11:53:53 2010 +0200
Automatic commit of package [rhnpush] release [5.5.5-1].
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index e960014..6f0c147 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -5,7 +5,7 @@ Summary: Common programs needed to be installed on the RHN servers/proxies
Group: Applications/System
License: GPLv2
URL: http://fedorahosted.org/spacewalk
-Version: 5.5.4
+Version: 5.5.5
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -50,6 +50,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/solaris2mpm.8*
%changelog
+* Thu Sep 16 2010 Michael Mraka <michael.mraka(a)redhat.com> 5.5.5-1
+- 600347 - added sat<540 compatibility functions
+
* Fri Jul 16 2010 Michael Mraka <michael.mraka(a)redhat.com> 5.5.4-1
- removed dead code
diff --git a/rel-eng/packages/rhnpush b/rel-eng/packages/rhnpush
index bacf112..6290396 100644
--- a/rel-eng/packages/rhnpush
+++ b/rel-eng/packages/rhnpush
@@ -1 +1 @@
-5.5.4-1 client/tools/rhnpush/
+5.5.5-1 client/tools/rhnpush/
13 years, 7 months
4 commits - client/tools
by Michael Mraka
client/tools/rhnpush/rhnpush.py | 62 +++++++++-----------------------------
client/tools/rhnpush/uploadLib.py | 33 ++++++++++++++++++++
2 files changed, 48 insertions(+), 47 deletions(-)
New commits:
commit e8536c9726ee10f0bfccb478e106006e0bd2ea8a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 16 10:18:23 2010 +0200
600347 - added sat<540 compatibility functions
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 6faf7fa..7b57d84 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -691,6 +691,19 @@ def getPackageChecksum(server, username, password, info):
def getSourcePackageChecksum(server, username, password, info):
return call(server.packages.getSourcePackageChecksum, username, password, info)
+# for backward compatibility with satellite <5.4.0
+def getPackageMD5sumBySession(server, session_string, info):
+ return call(server.packages.getPackageMD5sumBySession, session_string, info)
+
+def getSourcePackageMD5sumBySession(server, session_string, info):
+ return call(server.packages.getSourcePackageMD5sumBySession, session_string, info)
+
+def getPackageMD5sum(server, username, password, info):
+ return call(server.packages.getPackageMD5sum, username, password, info)
+
+def getSourcePackageMD5sum(server, username, password, info):
+ return call(server.packages.getSourcePackageMD5sum, username, password, info)
+
def getServer(uri, proxy=None, username=None, password=None, ca_chain=None):
s = rpclib.Server(uri, proxy=proxy, username=username, password=password)
commit c9cb518ced8ec4f25267ed38ea2f50d5ec407438
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 16 09:31:29 2010 +0200
fixed indentation
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 6bf84f5..6faf7fa 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -702,18 +702,18 @@ def exists_getPackageChecksumBySession(server):
""" check whether server supports getPackageChecksumBySession function"""
ret = True
try:
- raw_call(server.packages.getPackageChecksumBySession, '', {})
+ raw_call(server.packages.getPackageChecksumBySession, '', {})
except rpclib.Fault, e:
if e.faultCode == -33:
# Fault -33: session token is invalid
- # i.e. function exists but we supplied wrong data
- pass
- elif e.faultCode == -1:
- # Fault -1: function invalid
- ret = False
- else:
- # pass through anything else
- raise
+ # i.e. function exists but we supplied wrong data
+ pass
+ elif e.faultCode == -1:
+ # Fault -1: function invalid
+ ret = False
+ else:
+ # pass through anything else
+ raise
return ret
# compare two package [n,v,r,e] tuples
commit bd63d1e69ad32276318a251f791b9604b6b6508a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Sep 15 23:45:20 2010 +0200
_push_package_v2() is there since satellite 3.7, let's remove old upload way
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 4a1010b..f8af13c 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -583,10 +583,7 @@ class UploadClass(uploadLib.UploadClass):
raise UploadError("ERROR: %s: unsigned rpm (use --nosig to force)"% package)
try:
- if self.ping_status == 200:
- ret = self._push_package_v2(package, FileChecksumType, FileChecksum)
- else:
- ret = self._push_package_xmlrpc(package, h, packaging)
+ ret = self._push_package_v2(package, FileChecksumType, FileChecksum)
except UploadError, e:
ret, diff_level, pdict = e.args[:3]
severities = {
@@ -659,45 +656,6 @@ class UploadClass(uploadLib.UploadClass):
return ret
- def _push_package_xmlrpc(self, package, header, packaging):
- self.warn(1, "Using XMLRPC")
- if self.options.source:
- ret = None
- else:
- ret = {}
- for tag in ('name', 'version', 'release', 'epoch', 'arch'):
- val = header[tag]
- if val is None:
- val = ''
- ret[tag] = val
-
- bits = open(package, "r").read()
- hash = {
- 'package' : bits,
- 'channels' : self.channels,
- 'packaging' : packaging,
- }
- if self.orgId == '' or self.orgId > 0:
- hash['orgId'] = self.orgId
- if self.force:
- hash['force'] = 4
-
- #2/3/06 wregglej 173287 Added check to see if we can use session tokens.
- if self.new_sat_test():
- #12/22/05 wregglej 173287 Changed the XMLRPC call to the session-based version.
- retval = uploadLib.call(self.server.packages.uploadPackageBySession, self.session.getSessionString(),
- hash)
- else:
- retval = uploadLib.call(self.server.packages.uploadPackage, self.username, self.password, hash)
-
- if retval == 0:
- # OK
- return ret
- if type(retval) in (type(()), type([])) and len(retval) == 2:
- (pdict, diffLevel) = retval
- raise UploadError(ret, diffLevel, pdict)
- return None
-
class UploadError(Exception):
pass
commit 87432d2dca2b7df5292237426fe3e604a17d3bc6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Sep 16 11:48:21 2010 +0200
600347 - use getPackageChecksumBySession() only for servers which support it
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 695dea0..4a1010b 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -536,17 +536,27 @@ class UploadClass(uploadLib.UploadClass):
# computing checksum and other info is expensive process and session
# could have expired.Make sure its re-authenticated.
self.authenticate()
- checksum_data = uploadLib.getPackageChecksumBySession(self.server, self.session.getSessionString(), info)
+ if uploadLib.exists_getPackageChecksumBySession(self.server):
+ checksum_data = uploadLib.getPackageChecksumBySession(self.server, self.session.getSessionString(), info)
+ else:
+ # old server only md5 capable
+ checksum_data = uploadLib.getPackageMD5sumBySession(self.server, self.session.getSessionString(), info)
else:
- checksum_data = uploadLib.getPackageChecksum(self.server, self.username, self.password, info)
+ # even older server without session authentication
+ checksum_data = uploadLib.getPackageMD5sum(self.server, self.username, self.password, info)
else:
if self.new_sat_test():
# computing checksum and other info is expensive process and session
# could have expired.Make sure its re-authenticated.
self.authenticate()
- checksum_data = uploadLib.getSourcePackageChecksumBySession(self.server, self.session.getSessionString(), info)
+ if uploadLib.exists_getPackageChecksumBySession(self.server):
+ checksum_data = uploadLib.getSourcePackageChecksumBySession(self.server, self.session.getSessionString(), info)
+ else:
+ # old server only md5 capable
+ checksum_data = uploadLib.getSourcePackageMD5sumBySession(self.server, self.session.getSessionString(), info)
else:
- checksum_data = uploadLib.getSourcePackageChecksum(self.server, self.username, self.password, info)
+ # even older server without session authentication
+ checksum_data = uploadLib.getSourcePackageMD5sum(self.server, self.username, self.password, info)
return (checksum_data, pkg_hash, digest_hash)
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 6f6f177..6bf84f5 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -649,6 +649,9 @@ def call(function, *params):
return ret
+def raw_call(function, *params):
+ return function(*params)
+
def parseXMLRPCfault(fault):
if not isinstance(fault, rpclib.Fault):
@@ -695,6 +698,23 @@ def getServer(uri, proxy=None, username=None, password=None, ca_chain=None):
s.add_trusted_cert(ca_chain)
return s
+def exists_getPackageChecksumBySession(server):
+ """ check whether server supports getPackageChecksumBySession function"""
+ ret = True
+ try:
+ raw_call(server.packages.getPackageChecksumBySession, '', {})
+ except rpclib.Fault, e:
+ if e.faultCode == -33:
+ # Fault -33: session token is invalid
+ # i.e. function exists but we supplied wrong data
+ pass
+ elif e.faultCode == -1:
+ # Fault -1: function invalid
+ ret = False
+ else:
+ # pass through anything else
+ raise
+ return ret
# compare two package [n,v,r,e] tuples
def packageCompare(pkg1, pkg2, is_mpm=None):
13 years, 7 months
java/code
by Lukas Zapletal
java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java | 2 +
java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/XmlRpcConfigChannelHelper.java | 14 ++++++++++
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigRevisionSerializer.java | 1
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java | 2 +
4 files changed, 19 insertions(+)
New commits:
commit f771ac7d4a544a07d853549fa4194fd7020b732a
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Sep 15 16:20:13 2010 +0200
595500 - added contents_enc64 param to createOrUpdatePath XMLAPI
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
index 9d7d8d6..b82a67e 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java
@@ -248,6 +248,7 @@ public class ConfigChannelHandler extends BaseHandler {
* #prop_desc("string","contents",
* "Contents of the file (text or base64 encoded if binary).
* (ignored for directories)")
+ * #prop_desc("boolean","contents_enc64", "Identifies base64 encoded content (default: disabled).")
* #prop_desc("string", "owner", "Owner of the file/directory.")
* #prop_desc("string", "group", "Group name of the file/directory.")
* #prop_desc("string", "permissions",
@@ -275,6 +276,7 @@ public class ConfigChannelHandler extends BaseHandler {
// confirm that the user only provided valid keys in the map
Set<String> validKeys = new HashSet<String>();
validKeys.add(ConfigRevisionSerializer.CONTENTS);
+ validKeys.add(ConfigRevisionSerializer.CONTENTS_ENC64);
validKeys.add(ConfigRevisionSerializer.OWNER);
validKeys.add(ConfigRevisionSerializer.GROUP);
validKeys.add(ConfigRevisionSerializer.PERMISSIONS);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/XmlRpcConfigChannelHelper.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/XmlRpcConfigChannelHelper.java
index 1d541f5..c7c004a 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/XmlRpcConfigChannelHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/XmlRpcConfigChannelHelper.java
@@ -30,10 +30,12 @@ import com.redhat.rhn.manager.configuration.file.DirectoryData;
import com.redhat.rhn.manager.configuration.file.SymlinkData;
import com.redhat.rhn.manager.configuration.file.TextFileData;
+import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import java.io.ByteArrayInputStream;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -113,12 +115,24 @@ public class XmlRpcConfigChannelHelper {
if (ConfigFileType.file().equals(type)) {
if (data.get(ConfigRevisionSerializer.CONTENTS) instanceof String) {
String content = (String)data.get(ConfigRevisionSerializer.CONTENTS);
+ if (data.containsKey(ConfigRevisionSerializer.CONTENTS_ENC64)) {
+ try {
+ content = new String(Base64.decodeBase64(content.getBytes("UTF-8")), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ String msg = "Following errors were encountered " +
+ "when creating the config file.\n" + e.getMessage();
+ throw new FaultException(1023, "ConfgFileError", msg);
+ }
+ }
form = new TextFileData();
((TextFileData)form).setContents(content);
}
else {
byte[] content = (byte[])data.get(ConfigRevisionSerializer.CONTENTS);
if (content != null) {
+ if (data.containsKey(ConfigRevisionSerializer.CONTENTS_ENC64)) {
+ content = Base64.decodeBase64(content);
+ }
form = new BinaryFileData(new ByteArrayInputStream(content),
content.length);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigRevisionSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigRevisionSerializer.java
index 6955341..1c0bfa0 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigRevisionSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigRevisionSerializer.java
@@ -64,6 +64,7 @@ import redstone.xmlrpc.XmlRpcSerializer;
public class ConfigRevisionSerializer implements XmlRpcCustomSerializer {
public static final String CONTENTS = "contents";
+ public static final String CONTENTS_ENC64 = "contents_enc64";
public static final String PATH = "path";
public static final String TARGET_PATH = "target_path";
public static final String OWNER = "owner";
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java
index fdde269..bee673d 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/config/ServerConfigHandler.java
@@ -133,6 +133,7 @@ public class ServerConfigHandler extends BaseHandler {
* #prop_desc("string","contents",
* "Contents of the file (text or base64 encoded if binary).
* (ignored for directories)")
+ * #prop_desc("boolean","contents_enc64", "Identifies base64 encoded content (default: disabled).")
* #prop_desc("string","owner", "Owner of the file/directory.")
* #prop_desc("string","group", "Group name of the file/directory.")
* #prop_desc("string","permissions",
@@ -167,6 +168,7 @@ public class ServerConfigHandler extends BaseHandler {
// confirm that the user only provided valid keys in the map
Set<String> validKeys = new HashSet<String>();
validKeys.add(ConfigRevisionSerializer.CONTENTS);
+ validKeys.add(ConfigRevisionSerializer.CONTENTS_ENC64);
validKeys.add(ConfigRevisionSerializer.OWNER);
validKeys.add(ConfigRevisionSerializer.GROUP);
validKeys.add(ConfigRevisionSerializer.PERMISSIONS);
13 years, 7 months
web/html web/modules
by Partha Aji
web/html/nav/system_detail.xml | 2
web/modules/rhn/RHN/DB/ConfigRevision.pm | 39
web/modules/rhn/RHN/DB/DataSource/xml/config_queries.xml | 625 ---------------
web/modules/sniglets/Sniglets/ListView/FileList.pm | 208 ----
web/modules/sniglets/Sniglets/Lists.pm | 4
5 files changed, 35 insertions(+), 843 deletions(-)
New commits:
commit e8b0ad2b9c56c313b546c5e597578e9583f0f157
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Sep 15 19:37:52 2010 -0400
Cleanedup old/proted/unused config queries and updated the one for snapshot
diff --git a/web/html/nav/system_detail.xml b/web/html/nav/system_detail.xml
index 5f5b69e..6f44a83 100644
--- a/web/html/nav/system_detail.xml
+++ b/web/html/nav/system_detail.xml
@@ -82,7 +82,7 @@
</rhn-tab>
- <rhn-tab name="Configuration" acl="system_feature(ftr_config)" url="/rhn/systems/details/configuration/Overview.do" node-id="selected_configfiles">
+ <rhn-tab name="Configuration" acl="system_feature(ftr_config)" url="/rhn/systems/details/configuration/Overview.do">
<rhn-tab-directory>/rhn/systems/details/configuration</rhn-tab-directory>
diff --git a/web/modules/rhn/RHN/DB/ConfigRevision.pm b/web/modules/rhn/RHN/DB/ConfigRevision.pm
index 9cf3f0e..5b9f6e2 100644
--- a/web/modules/rhn/RHN/DB/ConfigRevision.pm
+++ b/web/modules/rhn/RHN/DB/ConfigRevision.pm
@@ -31,7 +31,7 @@ our @ISA = qw/RHN::SimpleStruct/;
our @core_fields = qw/id revision config_file_id config_content_id
config_info_id delim_start delim_end created
modified username groupname filemode latest_id latest path
- md5sum file_size org_id config_channel_id filetype selinux_ctx/;
+ md5sum file_size org_id config_channel_id filetype selinux_ctx symlink_target_filename_id/;
our @transient_fields = qw/__contents__ is_binary/;
our @simple_struct_fields = (@core_fields, @transient_fields);
@@ -47,14 +47,18 @@ SELECT
CI.username,
CI.groupname,
CI.filemode,
+ CI.selinux_ctx,
+ CI.symlink_target_filename_id,
CFN.path,
CC.org_id,
CC.id config_channel_id,
Csum.checksum md5sum,
- CCon.file_size,
+ coalesce(CCon.file_size, 0),
(SELECT CFt.latest_config_revision_id FROM rhnConfigFile CFt WHERE CFT.id = CR.config_file_id) LATEST_ID,
CCon.is_binary,
- CFT.name as filetype
+ CFT.name as filetype,
+ CCon.delim_start,
+ CCon.delim_end
FROM rhnConfigInfo CI,
rhnConfigFileName CFN,
rhnConfigContent CCon,
@@ -67,10 +71,10 @@ SELECT
AND CI.id = CR.config_info_id
AND CF.id = CR.config_file_id
AND CFN.id = CF.config_file_name_id
- AND CCon.id = CR.config_content_id
+ AND CCon.id = CR.config_content_id (+)
AND CC.id = CF.config_channel_id
AND CFT.id = CR.config_file_type_id
- AND CCon.checksum_id = Csum.id
+ AND CCon.checksum_id = Csum.id (+)
EOS
my $sth = $dbh->prepare($query);
$sth->execute_h(id => $params{id});
@@ -95,7 +99,8 @@ EOS
sub create_config_contents {
my $class = shift;
my $contents = shift;
-
+ my $delim_start = shift;
+ my $delim_end = shift;
use Digest::MD5 qw/md5_hex/;
my $md5sum = md5_hex($contents);
@@ -105,13 +110,13 @@ sub create_config_contents {
INSERT INTO rhnConfigContent
(id, checksum_id, file_size, contents, delim_start, delim_end)
VALUES
- (rhn_confcontent_id_seq.nextval, lookup_checksum('md5', :md5sum), :file_size, :contents, '{|', '|}')
+ (rhn_confcontent_id_seq.nextval, lookup_checksum('md5', :md5sum), :file_size, :contents, :delim_start, :delim_end)
RETURNING id INTO :ccid
EOS
my $ccid;
$sth->execute_h(ccid => \$ccid, md5sum => $md5sum, file_size => length($contents),
- contents => $dbh->encode_blob($contents, "contents"));
+ contents => $dbh->encode_blob($contents, "contents"), delim_start => $delim_start, delim_end => $delim_end);
$dbh->commit;
return $ccid;
@@ -124,7 +129,7 @@ sub getFileTypeId {
#make sure we're in lowercase
$filetype =~ tr/A-Z/a-z/;
- if ($filetype ne "file" and $filetype ne "directory") {
+ if ($filetype ne "file" and $filetype ne "directory" and $filetype ne "symlink") {
#default to file for now...
$filetype = "file";
}
@@ -155,14 +160,22 @@ sub commit {
if (defined $self->id) {
die "Unable to commit a ConfigRevision with an existing ID; make a new revision";
}
-
+ my $ftype = $self->filetype || 'file';
my $dbh = RHN::DB->connect;
- my $ciid = $dbh->call_function('lookup_config_info', $self->username, $self->groupname, $self->filemode, $self->selinux_ctx, undef);
+ my $ciid;
+ if ($ftype eq 'symlink') {
+ $ciid = $dbh->call_function('lookup_config_info', $self->username, $self->groupname, $self->filemode, $self->selinux_ctx, $self->symlink_target_filename_id);
+ }
+ else {
+ $ciid = $dbh->call_function('lookup_config_info', $self->username, $self->groupname, $self->filemode, $self->selinux_ctx, undef);
+ }
+
my $ccid = $self->config_content_id;
my $cftid = getFileTypeId($self->filetype);
+;
- if (defined $self->__contents__) {
- $ccid = RHN::ConfigRevision->create_config_contents($self->__contents__);
+ if ($ftype eq 'file' and defined $self->__contents__) {
+ $ccid = RHN::ConfigRevision->create_config_contents($self->__contents__, $self->delim_start, $self->delim_end);
$self->config_content_id($ccid);
}
diff --git a/web/modules/rhn/RHN/DB/DataSource/xml/config_queries.xml b/web/modules/rhn/RHN/DB/DataSource/xml/config_queries.xml
index 0abc9be..167d892 100644
--- a/web/modules/rhn/RHN/DB/DataSource/xml/config_queries.xml
+++ b/web/modules/rhn/RHN/DB/DataSource/xml/config_queries.xml
@@ -1,134 +1,5 @@
<datasource_modes>
-<mode name="system_managed_config_latest_revisions">
- <query params="sid">
-SELECT DISTINCT CF.latest_config_revision_id,
- CFN.path,
- CF.id
- FROM rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnServerConfigChannel SCC
- WHERE SCC.server_id = :sid
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.config_file_name_id = CFN.id
- </query>
-</mode>
-
-<mode name="latest_files_in_namespace">
- <query params="ccid">
-SELECT CR.id, CFN.path, CR.revision, CCon.file_size,
- TO_CHAR(CCon.modified, 'YYYY-MM-DD HH24:MI:SS') AS MODIFIED,
- CFT.name AS FILETYPE
- FROM rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnConfigChannel CC,
- rhnConfigFileType CFT
- WHERE CC.id = :ccid
- AND CF.config_channel_id = CC.id
- AND CFN.id = CF.config_file_name_id
- AND CR.config_file_id = CF.id
- AND CR.config_content_id = CCon.id
- AND CF.latest_config_revision_id = CR.id
- AND CR.config_file_type_id = CFT.id
-ORDER BY CFN.path
- </query>
-</mode>
-
-<mode name="selected_files">
- <query params="user_id">
-SELECT CR.id, CFN.path, CR.revision,
- TO_CHAR(CCon.modified, 'YYYY-MM-DD HH24:MI:SS') AS MODIFIED,
- CFT.name AS FILETYPE
- FROM rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnSet S,
- rhnConfigFileType CFT
- WHERE CR.id = S.element
- AND S.user_id = :user_id
- AND S.label = 'selected_files'
- AND CFN.id = CF.config_file_name_id
- AND CR.config_file_id = CF.id
- AND CR.config_content_id = CCon.id
- AND CF.latest_config_revision_id = CR.id
- AND CR.config_file_type_id = CFT.id
-ORDER BY CFN.path
- </query>
-</mode>
-
-<mode name="files_in_sandbox">
- <query params="sid">
-SELECT CR.id,
- CFN.path,
- CR.revision,
- TO_CHAR(CCon.modified, 'YYYY-MM-DD HH24:MI:SS') AS CONTENTS_MODIFIED,
- TO_CHAR(CF.modified, 'YYYY-MM-DD HH24:MI:SS') AS UPLOADED_AT,
- NVL2(CCon.contents, DECODE(CCon.is_binary, 'Y', 'binary', 'text'), 'meta-data only') AS CONTENT_TYPE
- FROM rhnConfigInfo CI,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnConfigChannel CC,
- rhnServerConfigChannel SCC
- WHERE CC.confchan_type_id = (SELECT id FROM rhnConfigChannelType WHERE label = 'server_import')
- AND SCC.server_id = :sid
- AND SCC.config_channel_id = CC.id
- AND CF.config_channel_id = CC.id
- AND CFN.id = CF.config_file_name_id
- AND CR.config_file_id = CF.id
- AND CR.config_content_id = CCon.id
- AND CR.config_info_id = CI.id
- AND CF.latest_config_revision_id = CR.id
-ORDER BY CFN.path
- </query>
-</mode>
-
-<mode name="files_in_override">
- <query params="sid">
-SELECT CR.id, CFN.path, CR.revision,
- TO_CHAR(CCon.modified, 'YYYY-MM-DD HH24:MI:SS') AS MODIFIED,
- CFT.name AS FILETYPE
- FROM rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnConfigChannel CC,
- rhnServerConfigChannel SCC,
- rhnConfigFileType CFT
- WHERE CC.confchan_type_id = (SELECT id FROM rhnConfigChannelType WHERE label = 'local_override')
- AND SCC.server_id = :sid
- AND SCC.config_channel_id = CC.id
- AND CF.config_channel_id = CC.id
- AND CFN.id = CF.config_file_name_id
- AND CR.config_file_id = CF.id
- AND CR.config_content_id = CCon.id
- AND CF.latest_config_revision_id = CR.id
- AND CR.config_file_type_id = CFT.id
-ORDER BY CFN.path
- </query>
-</mode>
-
-<mode name="configfile_revisions">
- <query params="crid">
-SELECT CR.id,
- Csum.checksum md5sum,
- CR.revision,
- NVL2((SELECT 1 FROM rhnConfigFile CFt WHERE CFT.latest_config_revision_id = CR.id), 'Y', 'N') LATEST,
- TO_CHAR(CCon.created, 'YYYY-MM-DD HH24:MI:SS') AS CREATED
- FROM rhnConfigContent CCon, rhnConfigRevision CR, rhnConfigFile CF,
- rhnChecksum Csum
- WHERE CCon.id = CR.config_content_id
- AND CF.id = (SELECT config_file_id FROM rhnConfigRevision WHERE id = :crid)
- AND CF.id = CR.config_file_id
- AND CCon.checksum_id = Csum.id
-ORDER BY CR.revision DESC
- </query>
-</mode>
-
<mode name="configfiles_for_system">
<query params="sid">
SELECT CR.id AS ID,
@@ -136,7 +7,7 @@ SELECT CR.id AS ID,
CFN.path,
CR.revision,
NVL2((SELECT 1 FROM rhnConfigFile CFt WHERE CFT.latest_config_revision_id = CR.id), 'Y', 'N') LATEST,
- TO_CHAR(CCon.created, 'YYYY-MM-DD HH24:MI:SS') AS CREATED,
+ TO_CHAR(coalesce(CCon.created, CF.created), 'YYYY-MM-DD HH24:MI:SS') AS CREATED,
CASE CCT.label WHEN 'local_override' THEN '(system override)' ELSE CC.name END AS CONFIG_CHANNEL_NAME,
CC.label AS CONFIG_CHANNEL_LABEL,
CC.id AS CONFIG_CHANNEL_ID,
@@ -160,11 +31,11 @@ SELECT CR.id AS ID,
AND CF.config_file_name_id = CFN.id
AND CF.config_channel_id = CC.id
AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
+ AND CR.config_content_id = CCon.id (+)
AND CF.latest_config_revision_id = CR.id
AND CCT.label in ('normal', 'local_override')
AND CR.config_file_type_id = CFT.id
- AND CCon.checksum_id = Csum.id
+ AND CCon.checksum_id = Csum.id(+)
ORDER BY CCT.priority, SCC.position
</query>
<elaborator params="sid" multiple="t">
@@ -198,323 +69,6 @@ ORDER BY SCC.position
</elaborator>
</mode>
-<mode name="configfiles_for_system_diff">
- <query params="sid">
-SELECT CR.id AS ID,
- Csum.checksum md5sum,
- CFN.path,
- CR.revision,
- NVL2((SELECT 1 FROM rhnConfigFile CFt WHERE CFT.latest_config_revision_id = CR.id), 'Y', 'N') LATEST,
- TO_CHAR(CCon.created, 'YYYY-MM-DD HH24:MI:SS') AS CREATED,
- CASE CCT.label WHEN 'local_override' THEN '(system override)' ELSE CC.name END AS CONFIG_CHANNEL_NAME,
- CC.label AS CONFIG_CHANNEL_LABEL,
- CC.id AS CONFIG_CHANNEL_ID,
- SCC.position AS RANK,
- CFN.id as CONFIG_FILE_NAME_ID,
- CCT.label as type,
- CCT.priority as type_priority,
- CFT.name as FILETYPE
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC,
- rhnConfigFileType CFT,
- rhnChecksum Csum
- WHERE SCC.server_id = :sid
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.id = CR.config_file_id
- AND CF.config_file_name_id = CFN.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CF.latest_config_revision_id = CR.id
- AND CCT.label in ('normal', 'local_override')
- AND CR.config_file_type_id = CFT.id
- AND NOT CFT.label = 'directory'
- AND CCon.checksum_id = Csum.id
-ORDER BY CCT.priority, SCC.position
- </query>
- <elaborator params="sid" multiple="t">
-SELECT DISTINCT CR_orig.id AS ID,
- CR.id AS CRID,
- CR.revision,
- CC.name AS CONFIG_CHANNEL,
- CC.label AS CONFIG_CHANNEL_LABEL,
- CC.id AS CONFIG_CHANNEL_ID,
- SCC.position AS RANK
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigFile CF_Orig,
- rhnConfigFile CF,
- rhnConfigRevision CR_orig,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC
- WHERE 1=1
- AND SCC.server_id = :sid
- AND SCC.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCT.label in ('normal', 'local_override')
- AND SCC.config_channel_id = CF.config_channel_id
- AND CR_orig.id IN (%s)
- AND CF.config_channel_id != CF_orig.config_channel_id
- AND CF.config_file_name_id = CF_orig.config_file_name_id
- AND CF.latest_config_revision_id = CR.id
- AND CF.id = CR.config_file_id
- AND CF_Orig.id = CR_Orig.config_file_id
-ORDER BY SCC.position
- </elaborator>
-</mode>
-
-<mode name="ssm_configfile_revisions">
- <query params="user_id">
-SELECT SCC.server_id,
- CR.id AS ID,
- Csum.checksum md5sum,
- CFN.path,
- CR.revision,
- NVL2((SELECT 1 FROM rhnConfigFile CFt WHERE CFT.latest_config_revision_id = CR.id), 'Y', 'N') LATEST,
- TO_CHAR(CCon.created, 'YYYY-MM-DD HH24:MI:SS') AS CREATED,
- CASE CCT.label WHEN 'local_override' THEN '(system override)' ELSE CC.name END AS CONFIG_CHANNEL_NAME,
- CC.label AS CONFIG_CHANNEL_LABEL,
- CC.id AS CONFIG_CHANNEL_ID,
- SCC.position AS RANK,
- CFN.id as CONFIG_FILE_NAME_ID,
- CCT.label as type,
- CCT.priority as type_priority
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC,
- rhnChecksum Csum
- WHERE SCC.server_id IN (
- SELECT DISTINCT S.id
- FROM rhnServer S,
- rhnSet ST,
- rhnUserServerPerms USP
- WHERE USP.user_id = :user_id
- AND ST.user_id = :user_id
- AND ST.label = 'system_list'
- AND USP.server_id = ST.element
- AND rhn_server.system_service_level(USP.server_id, 'provisioning') > 0
- AND USP.server_id = S.id
- )
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.id = CR.config_file_id
- AND CF.config_file_name_id = CFN.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CF.latest_config_revision_id = CR.id
- AND CCT.label in ('normal', 'local_override')
- AND CFN.id IN (
- SELECT element
- FROM rhnSet
- WHERE label = 'selected_configfiles_ssm'
- AND USER_ID = :user_id
- )
- AND CCon.checksum_id = Csum.id
- ORDER BY SCC.server_id, CCT.priority, SCC.position
- </query>
-</mode>
-
-
-<mode name="configfiles_for_ssm">
- <query params="user_id">
-SELECT DISTINCT CFN.id, CFN.path, CF.ID AS cfid, CFT.name as TYPE
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC,
- rhnConfigFileType CFT
- WHERE 1=1
- AND SCC.server_id IN (
- SELECT DISTINCT S.id
- FROM rhnServer S,
- rhnSet ST,
- rhnUserServerPerms USP
- WHERE USP.user_id = :user_id
- AND ST.user_id = :user_id
- AND ST.label = 'system_list'
- AND USP.server_id = ST.element
- AND rhn_server.system_service_level(USP.server_id, 'provisioning') > 0
- AND USP.server_id = S.id
- )
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.id = CR.config_file_id
- AND CF.config_file_name_id = CFN.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CF.latest_config_revision_id = CR.id
- AND CCT.label in ('normal', 'local_override')
- AND CR.config_file_type_id = CFT.id
-ORDER BY CFN.path
- </query>
- <elaborator params="user_id">
-SELECT CFN.id, count(DISTINCT SCC.server_id) AS system_count
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC
- WHERE 1=1
- AND SCC.server_id IN (
- SELECT DISTINCT S.id
- FROM rhnServer S,
- rhnSet ST,
- rhnUserServerPerms USP
- WHERE USP.user_id = :user_id
- AND ST.user_id = :user_id
- AND ST.label = 'system_list'
- AND USP.server_id = ST.element
- AND rhn_server.system_service_level(USP.server_id, 'provisioning') > 0
- AND USP.server_id = S.id
- )
- AND CFN.id IN (%s)
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.id = CR.config_file_id
- AND CF.config_file_name_id = CFN.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CF.latest_config_revision_id = CR.id
- AND CCT.label in ('normal', 'local_override')
- GROUP BY CFN.id
- </elaborator>
-</mode>
-
-<mode name="configfiles_for_ssm_diff">
- <query params="user_id">
-SELECT DISTINCT CFN.id, CFN.path, CF.ID AS cfid, CFT.name as TYPE
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC,
- rhnConfigFileType CFT
- WHERE 1=1
- AND SCC.server_id IN (
- SELECT DISTINCT S.id
- FROM rhnServer S,
- rhnSet ST,
- rhnUserServerPerms USP
- WHERE USP.user_id = :user_id
- AND ST.user_id = :user_id
- AND ST.label = 'system_list'
- AND USP.server_id = ST.element
- AND rhn_server.system_service_level(USP.server_id, 'provisioning') > 0
- AND USP.server_id = S.id
- )
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.id = CR.config_file_id
- AND CF.config_file_name_id = CFN.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CF.latest_config_revision_id = CR.id
- AND CCT.label in ('normal', 'local_override')
- AND CR.config_file_type_id = CFT.id
- AND NOT CFT.label = 'directory'
-ORDER BY CFN.path
- </query>
- <elaborator params="user_id">
-SELECT CFN.id, count(DISTINCT SCC.server_id) AS system_count
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigContent CCon,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnServerConfigChannel SCC
- WHERE 1=1
- AND SCC.server_id IN (
- SELECT DISTINCT S.id
- FROM rhnServer S,
- rhnSet ST,
- rhnUserServerPerms USP
- WHERE USP.user_id = :user_id
- AND ST.user_id = :user_id
- AND ST.label = 'system_list'
- AND USP.server_id = ST.element
- AND rhn_server.system_service_level(USP.server_id, 'provisioning') > 0
- AND USP.server_id = S.id
- )
- AND CFN.id IN (%s)
- AND SCC.config_channel_id = CF.config_channel_id
- AND CF.id = CR.config_file_id
- AND CF.config_file_name_id = CFN.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CF.latest_config_revision_id = CR.id
- AND CCT.label in ('normal', 'local_override')
- GROUP BY CFN.id
- </elaborator>
-</mode>
-
-<mode name="selected_configfiles">
- <query params="set_label, user_id">
-SELECT CR.id,
- Csum.checksum md5sum,
- CFN.path,
- CR.revision,
- NVL2((SELECT 1 FROM rhnConfigFile CFt WHERE CFT.latest_config_revision_id = CR.id), 'Y', 'N') LATEST,
- TO_CHAR(CCon.created, 'YYYY-MM-DD HH24:MI:SS') AS CREATED,
- CASE CCT.label WHEN 'local_override' THEN '(system override)' ELSE CC.name END AS CONFIG_CHANNEL_NAME,
- CC.label AS CONFIG_CHANNEL_LABEL,
- CC.id AS CONFIG_CHANNEL_ID
- FROM rhnConfigChannelType CCT,
- rhnConfigChannel CC,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigContent CCon,
- rhnConfigRevision CR,
- rhnSet S,
- rhnChecksum Csum
- WHERE S.user_id = :user_id
- AND S.label = :set_label
- AND S.element = CR.id
- AND CR.config_file_id = CF.id
- AND CF.config_channel_id = CC.id
- AND CC.confchan_type_id = CCT.id
- AND CCon.id = CR.config_content_id
- AND CCT.label IN ('normal', 'local_override')
- AND CFN.id = CF.config_file_name_id
- AND CCon.checksum_id = Csum.id
-ORDER BY CFN.path
- </query>
-</mode>
-
-<mode name="configfilenames_for_import">
- <query params="">
---dummy query
- </query>
-</mode>
-
-<mode name="selected_configfilenames">
- <query params="set_label, user_id">
-SELECT CFN.id, CFN.path
- FROM rhnSet S, rhnConfigFileName CFN
- WHERE S.user_id = :user_id
- AND S.label = :set_label
- AND S.element = CFN.id
-ORDER BY CFN.path
- </query>
-</mode>
-
<mode name="configfiles_for_snapshot">
<query params="ss_id">
SELECT DISTINCT
@@ -524,10 +78,10 @@ SELECT DISTINCT
CFN.path,
CR.revision,
CR.id AS REVISION_ID,
- CR.delim_start,
- CR.delim_end,
+ CCon.delim_start,
+ CCon.delim_end,
CF.config_channel_id,
- TO_CHAR(CCon.created, 'YYYY-MM-DD HH24:MI:SS') AS CREATED
+ TO_CHAR(coalesce(CCon.created, CF.created), 'YYYY-MM-DD HH24:MI:SS') AS CREATED
FROM rhnConfigContent CCon,
rhnConfigFileName CFN,
rhnConfigFile CF,
@@ -536,125 +90,15 @@ SELECT DISTINCT
rhnChecksumView Csum
WHERE SCR.snapshot_id = :ss_id
AND SCR.config_revision_id = CR.id
- AND CR.config_content_id = CCon.id
+ AND CR.config_content_id = CCon.id (+)
AND CR.config_file_id = CF.id
AND CF.config_file_name_id = CFN.id
- AND CCon.checksum_id = Csum.id
+ AND CCon.checksum_id = Csum.id (+)
ORDER BY CFN.path
</query>
</mode>
-<mode name="configfiles_for_user">
- <query params="org_id, user_id">
-SELECT DISTINCT CFN.id, CFN.path
- FROM rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigChannel CC
- WHERE CC.org_id = :org_id
- AND CF.config_channel_id = CC.id
- AND rhn_config_channel.get_user_file_access(CF.id, :user_id) = 1
- AND CF.config_file_name_id = CFN.id
-ORDER BY UPPER(CFN.path)
- </query>
- <elaborator params="org_id, user_id">
-SELECT CFN.id,
- count(CF.config_channel_id) AS config_channel_count
- FROM rhnConfigFileName CFN, rhnConfigFile CF, rhnConfigChannel CC
- WHERE CFN.id IN (%s)
- AND CFN.id = CF.config_file_name_id
- AND CF.config_channel_id = CC.id
- AND CC.org_id = :org_id
- AND rhn_config_channel.get_user_chan_access(CC.id, :user_id) = 1
-GROUP BY CFN.id
- </elaborator>
-</mode>
-
-<mode name="revisions_of_configfile">
- <query params="crid">
-SELECT CR.id,
- CR.revision,
- CCon.is_binary
- FROM rhnConfigContent CCon,
- rhnConfigRevision CR,
- rhnConfigFile CF
- WHERE CF.id = (SELECT CR2.config_file_id FROM rhnConfigRevision CR2 WHERE CR2.id = :crid)
- AND CR.config_file_id = CF.id
- AND CCon.id = CR.config_content_id
-ORDER BY CR.revision
- </query>
-</mode>
-
-<mode name="org_configfile_size_totals">
- <query params="org_id">
-SELECT CFN.id AS id,
- CFN.path,
- CC.name AS CONFIG_CHANNEL_NAME,
- CC.label AS CONFIG_CHANNEL_LABEL,
- CC.id AS CONFIG_CHANNEL_ID,
- CF.latest_config_revision_id,
- LCR.revision AS latest_config_revision,
- SUM(CCon.file_size) AS total_file_size
- FROM rhnConfigContent CCon,
- rhnConfigRevision CR,
- rhnConfigRevision LCR,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigChannel CC
- WHERE CC.org_id = :org_id
- AND CF.config_channel_id = CC.id
- AND CFN.id = CF.config_file_name_id
- AND LCR.id = CF.latest_config_revision_id
- AND CR.config_file_id = CF.id
- AND CCon.id = CR.config_content_id
-GROUP BY CFN.id, CFN.path, CC.name, CC.label, CC.id, CF.latest_config_revision_id, LCR.revision
-ORDER BY total_file_size DESC
- </query>
-</mode>
-
-<mode name="config_action_failures">
- <query params="sid, aid">
-SELECT CFN.path,
- CR.id,
- CR.revision,
- ACR.id AS ACTION_REVISION_ID,
- CFF.name AS FAILURE_REASON
- FROM rhnConfigFileFailure CFF,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnActionConfigRevision ACR
- WHERE ACR.action_id = :aid
- AND ACR.server_id = :sid
- AND ACR.config_revision_id = CR.id
- AND CR.config_file_id = CF.id
- AND CF.config_file_name_id = CFN.id
- AND ACR.failure_id = CFF.id
-ORDER BY UPPER(CFN.path)
- </query>
-</mode>
-
-<mode name="config_action_non_failures">
- <query params="sid, aid">
-SELECT CFN.path,
- CR.id,
- CR.revision,
- ACR.id AS ACTION_REVISION_ID
- FROM rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnActionConfigRevision ACR
- WHERE ACR.action_id = :aid
- AND ACR.server_id = :sid
- AND ACR.failure_id IS NULL
- AND ACR.config_revision_id = CR.id
- AND CR.config_file_id = CF.id
- AND CF.config_file_name_id = CFN.id
-ORDER BY UPPER(CFN.path)
- </query>
-</mode>
-
-
<mode name="config_action_revisions">
<query params="aid, sid">
SELECT CFN.path,
@@ -701,59 +145,6 @@ ORDER BY UPPER(CFN.path)
</query>
</mode>
-
-<mode name="diff_action_info">
- <query params="sid, hid">
-SELECT ACR.id,
- ACR.id AS ACTION_REVISION_ID,
- CR.id AS REVISION_ID,
- CR.revision,
- CFN.id AS NAME_ID,
- CFN.path,
- rhn_config_channel.action_diff_revision_status(ACR.id) AS STATUS,
- CFF.name AS FAILURE_REASON
- FROM rhnConfigFileFailure CFF,
- rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnActionConfigRevision ACR
- WHERE ACR.server_id = :sid
- AND ACR.action_id = :hid
--- AND rhn_config_channel.action_diff_revision_status(ACR.id) = 'Differences exist'
- AND CR.id = ACR.config_revision_id
- AND CR.config_file_id = CF.id
- AND CF.config_file_name_id = CFN.id
- AND ACR.failure_id = CFF.id (+)
-ORDER BY CFN.path
- </query>
-</mode>
-
-
-<mode name="diff_action_differences">
- <query params="sid, hid">
-SELECT ACR.id,
- ACR.id AS ACTION_REVISION_ID,
- CR.id AS REVISION_ID,
- CR.revision,
- CFN.id AS NAME_ID,
- CFN.path,
- rhn_config_channel.action_diff_revision_status(ACR.id) AS STATUS
- FROM rhnConfigFileName CFN,
- rhnConfigFile CF,
- rhnConfigRevision CR,
- rhnActionConfigRevision ACR
- WHERE ACR.server_id = :sid
- AND ACR.action_id = :hid
- AND rhn_config_channel.action_diff_revision_status(ACR.id) = 'Differences exist'
- AND CR.id = ACR.config_revision_id
- AND CR.config_file_id = CF.id
- AND CF.config_file_name_id = CFN.id
-ORDER BY CFN.path
- </query>
-</mode>
-
-
-
<mode name="upload_action_status">
<query params="sid, aid">
SELECT CFN.path,
diff --git a/web/modules/sniglets/Sniglets/ListView/FileList.pm b/web/modules/sniglets/Sniglets/ListView/FileList.pm
index bc4731f..52feebd 100644
--- a/web/modules/sniglets/Sniglets/ListView/FileList.pm
+++ b/web/modules/sniglets/Sniglets/ListView/FileList.pm
@@ -37,74 +37,14 @@ sub list_of { return "files" }
sub _register_modes {
-
- Sniglets::ListView::List->add_mode(-mode => "diff_action_info",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "diff_action_differences",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "config_action_failures",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "config_action_non_failures",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
Sniglets::ListView::List->add_mode(-mode => "package_files",
-datasource => RHN::DataSource::General->new);
- Sniglets::ListView::List->add_mode(-mode => "selected_files",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
- Sniglets::ListView::List->add_mode(-mode => "latest_files_in_namespace",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
- Sniglets::ListView::List->add_mode(-mode => "files_in_sandbox",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
- Sniglets::ListView::List->add_mode(-mode => "files_in_override",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "configfile_revisions",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "configfiles_for_system",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"),
- -provider => \&configfiles_for_system_provider);
-
- Sniglets::ListView::List->add_mode(-mode => "configfiles_for_system_diff",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"),
- -provider => \&configfiles_for_system_provider);
-
- Sniglets::ListView::List->add_mode(-mode => "configfiles_for_ssm",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"),
- -provider => \&configfiles_for_ssm);
-
- Sniglets::ListView::List->add_mode(-mode => "configfiles_for_ssm_diff",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"),
- -provider => \&configfiles_for_ssm);
Sniglets::ListView::List->add_mode(-mode => "configfiles_for_snapshot",
-datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "configfiles_for_user",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "selected_configfiles",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "selected_configfilenames",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"));
-
- Sniglets::ListView::List->add_mode(-mode => "configfilenames_for_import",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"),
- -provider => \&configfilenames_for_import_provider);
-
- Sniglets::ListView::List->add_mode(-mode => "org_configfile_size_totals",
- -datasource => new RHN::DataSource::Simple(-querybase => "config_queries"),
- );
}
-my %type_icon = ('Directory' => '/img/folder-config-sm.png',
- 'File' => '/img/file-config-sm.png');
-
sub row_callback {
my $self = shift;
my $row = shift;
@@ -126,157 +66,9 @@ sub row_callback {
$row->{CHECKSUM} = "<tt>(Directory)</tt>";
}
}
-
- if ($self->datasource->mode eq 'latest_files_in_namespace' or
- $self->datasource->mode eq 'selected_files' or
- $self->datasource->mode eq 'configfiles_for_ssm' or
- $self->datasource->mode eq 'configfiles_for_system' or
- $self->datasource->mode eq 'files_in_override') {
- my $type = $row->{FILETYPE};
- # If type is a directory, we need to add a trailing "/" to the filename
- if (defined $type and $type eq 'Directory') {
- $row->{PATH} .= "/";
- }
- if (defined $type) {
- # Show corresponding image before the path
- $row->{PATH} = "<img src=\"" . $type_icon{$type} ."\" alt=\"" . $type . "\" /> " . $row->{PATH};
- }
- }
-
return $row;
}
-sub configfiles_for_system_provider {
- my $self = shift;
- my $pxt = shift;
-
- my $ds = $self->datasource;
- my %params = $self->lookup_params($pxt, $ds->required_params);
- my $data = $ds->execute_query(%params);
-
- $data = resolve_ordered_paths($data);
- $data = $self->filter_data($data);
- my $alphabar = $self->init_alphabar($data);
-
- my $all_ids = [ map { $_->{ID} } @{$data} ];
- $self->all_ids($all_ids);
-
- $data = $ds->slice_data($data, $self->lower, $self->upper);
- $data = $ds->elaborate($data, %params);
-
- my $sid = $pxt->param('sid');
-
- foreach my $row (@$data) {
- Sniglets::ListView::List::escape_row($row);
-
- $row->{OVERRIDES} = ' ';
-
- if ($row->{__data__}) {
-
- my @overrides;
-
- if ($sid) {
- my $rev_link = sprintf("/rhn/configuration/file/FileDetails.do?sid=%d&crid=", $sid);
- my $chan_link = sprintf("/rhn/configuration/ChannelFiles.do?ccid=");
- @overrides = map { PXT::HTML->link($rev_link . $_->{CRID}, "Revision " . $_->{REVISION})
- . " from " .
- PXT::HTML->link($chan_link . $_->{CONFIG_CHANNEL_ID}, $_->{CONFIG_CHANNEL})
- } @{$row->{__data__}};
- }
- else {
- my $cf_url = '/rhn/configuration/file/FileDetails.do?crid=';
- my $ns_url = '/rhn/configuration/ChannelOverview.do?ccid=';
- @overrides = map { PXT::HTML->link($cf_url . $_->{CRID}, "Revision " . $_->{REVISION})
- . " from " .
- PXT::HTML->link($ns_url . $_->{CONFIG_CHANNEL_ID}, $_->{CONFIG_CHANNEL})
- } @{$row->{__data__}};
- }
-
- $row->{OVERRIDES} = join("<br />\n", @overrides);
- }
- }
-
- return (data => $data,
- all_ids => $all_ids,
- alphabar => $alphabar);
-}
-
-sub configfiles_for_ssm {
- my $self = shift;
- my $pxt = shift;
-
- my $ds = $self->datasource;
- my %params = $self->lookup_params($pxt, $ds->required_params);
- my $data = $ds->execute_query(%params);
-
- $data = resolve_ordered_paths($data);
- $data = $self->filter_data($data);
- my $alphabar = $self->init_alphabar($data);
-
- my $all_ids = [ map { $_->{ID} } @{$data} ];
- $self->all_ids($all_ids);
-
- $data = $ds->slice_data($data, $self->lower, $self->upper);
- $data = $ds->elaborate($data, %params);
-
- return (data => $data,
- all_ids => $all_ids,
- alphabar => $alphabar);
-}
-
-
-sub configfilenames_for_import_provider {
- my $self = shift;
- my $pxt = shift;
-
- my $ds = new RHN::DataSource::Simple(-querybase => "config_queries", -mode => 'configfiles_for_system');
- my %params = $self->lookup_params($pxt, $ds->required_params);
- my $sys_data = $ds->execute_query(%params);
- $sys_data = resolve_ordered_paths($sys_data);
-
- my $data = [ map { { ID => $_->{CONFIG_FILE_NAME_ID},
- PATH => $_->{PATH},
- } } @{$sys_data} ];
-
- $ds = new RHN::DataSource::Simple(-querybase => "config_queries", -mode => 'selected_configfilenames');
- my $selected_files = $ds->execute_query(-user_id => $pxt->user->id, -set_label => 'selected_configfilenames');
-
- my %exists = map { ($_->{ID}, 1) } @{$data};
-
- foreach my $row (@{$selected_files}) {
- unless ($exists{$row->{ID}}) {
- $exists{$row->{ID}} = 1;
- push @{$data}, $row;
- }
- }
-
- $data = [ sort { $a->{PATH} cmp $b->{PATH} } @{$data} ];
-
- $data = $self->filter_data($data);
- my $alphabar = $self->init_alphabar($data);
-
- my $all_ids = [ map { $_->{ID} } @{$data} ];
- $self->all_ids($all_ids);
-
- $data = $ds->slice_data($data, $self->lower, $self->upper);
-
- return (data => $data,
- all_ids => $all_ids,
- alphabar => $alphabar);
-}
-
-# given a set of file data, find the latest occurence of each path.
-sub resolve_ordered_paths {
- my $data = shift;
-
- my %seen;
-
- $data = [ sort { $a->{PATH} cmp $b->{PATH} }
- grep { not $seen{$_->{PATH}}++ } @{$data} ];
-
- return $data;
-}
-
# Overrides the List.pm implementation. We don't want the alphabar to
# appear when displaying files.
sub render_alphabar {
diff --git a/web/modules/sniglets/Sniglets/Lists.pm b/web/modules/sniglets/Sniglets/Lists.pm
index 6bb15eb..f79f182 100644
--- a/web/modules/sniglets/Sniglets/Lists.pm
+++ b/web/modules/sniglets/Sniglets/Lists.pm
@@ -196,10 +196,6 @@ my %node_set = (system_package_list => 'removable_package_list',
remove_errata_packages => 'packages_to_remove',
add_errata_packages => 'packages_to_add',
clone_channel_errata => 'errata_clone_actions',
- selected_configfiles => 'selected_configfiles',
- selected_configfiles_ssm => 'selected_configfiles_ssm',
- selected_configfilenames => 'selected_configfilenames',
- selected_namespaces => 'selected_namespaces',
packages_for_system_sync => 'packages_for_system_sync',
);
13 years, 7 months
java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 1 +
java/code/src/com/redhat/rhn/taskomatic/core/SchedulerKernel.java | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit abba4cce64087207d8c923559a2cf224115aa7b0
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed Sep 15 16:07:57 2010 -0400
making taskmoatic work with the rkbloom driver
diff --git a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
index 41eb599..837ae83 100644
--- a/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
+++ b/java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java
@@ -162,6 +162,7 @@ public class ConfigDefaults {
public static final String DB_HOST = "db_host";
public static final String DB_PORT = "db_port";
public static final String DB_PROTO = "hibernate.connection.driver_proto";
+ public static final String DB_CLASS = "hibernate.connection.driver_class";
public static final String LOOKUP_EXCEPT_SEND_EMAIL = "lookup_exception_email";
diff --git a/java/code/src/com/redhat/rhn/taskomatic/core/SchedulerKernel.java b/java/code/src/com/redhat/rhn/taskomatic/core/SchedulerKernel.java
index b4970bc..e89bad8 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/core/SchedulerKernel.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/core/SchedulerKernel.java
@@ -73,7 +73,10 @@ public class SchedulerKernel {
if (ConfigDefaults.get().isOracle()) {
props.setProperty("org.quartz.jobStore.driverDelegateClass",
"org.quartz.impl.jdbcjobstore.oracle.OracleDelegate");
- props.setProperty(ds + ".driver", "oracle.jdbc.driver.OracleDriver");
+
+ String driver = Config.get().getString(ConfigDefaults.DB_CLASS,
+ "oracle.jdbc.driver.OracleDriver");
+ props.setProperty(ds + ".driver", driver);
String dbUrl = dbProto + ":@";
if (dbProto.contains("thin")) {
13 years, 7 months