backend/satellite_tools/satsync.py
| 2
backend/satellite_tools/xmlDiskDumper.py
| 2
backend/satellite_tools/xmlSource.py
| 28
backend/spacewalk-backend.spec
| 7
branding/css/rhn-listview.css
| 39 +
client/rhel/rhn-client-tools/rhn-client-tools.spec
| 19
client/rhel/yum-rhn-plugin/po/ru.po
| 39 -
client/solaris/smartpm/smart/backends/solaris/loader.py
| 6
client/tools/rhncfg/actions/configfiles
| 3
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
| 1
java/code/src/com/redhat/rhn/domain/server/ServerGroup.hbm.xml
| 1
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
| 2
java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
| 4
java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
| 4
java/code/src/com/redhat/rhn/frontend/action/systems/duplicate/DuplicateSystemsCompareAction.java
| 51 +
java/code/src/com/redhat/rhn/frontend/action/user/BaseUserListSetupAction.java
| 65 --
java/code/src/com/redhat/rhn/frontend/action/user/UserListSetupAction.java
| 42 +
java/code/src/com/redhat/rhn/frontend/dto/SystemCompareDto.java
| 4
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
| 5
java/code/src/com/redhat/rhn/frontend/taglibs/list/row/ExpandableRowRenderer.java
| 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
| 55 -
java/code/src/com/redhat/rhn/frontend/xmlrpc/systemgroup/ServerGroupHandler.java
| 51 +
java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
| 77 ++
java/code/src/com/redhat/rhn/manager/system/SystemManager.java
| 7
java/code/webapp/WEB-INF/pages/admin/users/userlist.jsp
| 4
java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf
| 32 -
java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf
| 29
java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
| 120 ++-
java/code/webapp/WEB-INF/struts-config.xml
| 6
rel-eng/packages/spacewalk-backend
| 2
rel-eng/packages/spacewalk-utils
| 2
search-server/spacewalk-search/buildconf/exclude
| 2
search-server/spacewalk-search/scripts/src/java/com/redhat/satellite/search/index/docs/WebCrawl.java
| 304 ----------
search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/errata_handler.xml
| 2
search-server/spacewalk-search/src/java/com/redhat/satellite/search/scheduler/tasks/IndexDocumentsTask.java
| 140 ----
utils/spacewalk-utils.spec
| 16
36 files changed, 462 insertions(+), 713 deletions(-)
New commits:
commit 2675a5c0a804e5bb8d6dbcdb9ccb101d2bdf00ff
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Mon May 17 16:12:12 2010 -0400
adding dynaform for content source creation
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index c76b65d..cecdc4e 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -817,6 +817,12 @@
<form-property name="bootimage"
type="java.lang.String"/>
<form-property name="channelid"
type="java.lang.Long"/>
</form-bean>
+
+ <form-bean name="contentSourceForm"
+
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm">
+ <form-property name="url"
type="java.lang.String"/>
+ <form-property name="label"
type="java.lang.String"/>
+ </form-bean>
<form-bean name="cobblerSnippetsForm"
type="com.redhat.rhn.frontend.struts.ContentsForm">
commit 978f23cee8c2bce6f0a20373dbbe878f22ff845f
Merge: 6a44a28... 349fe7e...
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Mon May 17 14:52:54 2010 -0400
Merge branch 'master' into repo
commit 349fe7e5f5d2d5d3dbdc4dfc414be0943429b344
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Mon May 17 13:45:39 2010 -0400
563859 - fixing issue where adding errata to x86_64 channels would only get packages
of one arch, even if the errata had two (lib packages)
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
index 39cf779..2bcd769 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/ConfirmErrataAction.java
@@ -145,9 +145,11 @@ public class ConfirmErrataAction extends RhnListAction {
//if we are not using package association (and thus the queries aren't
handling
//arch solving, then we need to validate the packages
- List<PackageOverview> validList;
+ List<PackageOverview> validList = packageResult;
+ if (!packageAssoc) {
validList = validatePackages(packageResult,
currentChan);
+ }
storePackagesInSet(user, validList, currentChan);
commit c990d47b69337d119d5fa45752b29c845adae8d0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon May 17 16:35:32 2010 +0200
584780 - move the firstboot _gui.* files to rhn-setup-gnome.
They are not very useful in rhn-setup if rhn-setup-gnome is not
installed, anyway.
diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec
b/client/rhel/rhn-client-tools/rhn-client-tools.spec
index ab33c89..3128f7e 100644
--- a/client/rhel/rhn-client-tools/rhn-client-tools.spec
+++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec
@@ -227,17 +227,6 @@ make -f Makefile.rhn-client-tools test
%{_datadir}/rhn/up2date_client/tui.*
%{_datadir}/rhn/up2date_client/rhnreg_constants.*
-# firstboot is smart enough now to skip these modules
-# if the modules say to
-%{_datadir}/firstboot/modules/rhn_login_gui.*
-%{_datadir}/firstboot/modules/rhn_register_firstboot_gui_window.*
-%{_datadir}/firstboot/modules/rhn_start_gui.*
-%{_datadir}/firstboot/modules/rhn_choose_server_gui.*
-%{_datadir}/firstboot/modules/rhn_provide_certificate_gui.*
-%{_datadir}/firstboot/modules/rhn_create_profile_gui.*
-%{_datadir}/firstboot/modules/rhn_review_gui.*
-%{_datadir}/firstboot/modules/rhn_finish_gui.*
-
%files -n rhn-setup-gnome
%defattr(-,root,root,-)
%{_datadir}/rhn/up2date_client/messageWindow.*
@@ -251,6 +240,14 @@ make -f Makefile.rhn-client-tools test
%{_datadir}/icons/hicolor/32x32/apps/up2date.png
%{_datadir}/icons/hicolor/48x48/apps/up2date.png
%{_datadir}/applications/rhn_register.desktop
+%{_datadir}/firstboot/modules/rhn_login_gui.*
+%{_datadir}/firstboot/modules/rhn_register_firstboot_gui_window.*
+%{_datadir}/firstboot/modules/rhn_start_gui.*
+%{_datadir}/firstboot/modules/rhn_choose_server_gui.*
+%{_datadir}/firstboot/modules/rhn_provide_certificate_gui.*
+%{_datadir}/firstboot/modules/rhn_create_profile_gui.*
+%{_datadir}/firstboot/modules/rhn_review_gui.*
+%{_datadir}/firstboot/modules/rhn_finish_gui.*
%changelog
* Wed May 05 2010 Jan Pazdziora 1.1.3-1
commit 893f1d89a8350fcf34f0f56be9f0743332f73beb
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon May 17 14:06:39 2010 +0200
555659 - do not freak out when SUNW_PATCHID do not have SUN format
addressing:
File "/opt/redhat/rhn/solaris/usr/bin/up2date", line 236, in ?
main(sys.argv[1:])
File "/opt/redhat/rhn/solaris/usr/bin/up2date", line 209, in main
exitcode = iface.run(opts.command, opts.argv)
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/interfaces/up2date/interface.py",
line 209, in run
pkgs = self.getRHNPackages(latest=True)
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/interfaces/up2date/interface.py",
line 56, in getRHNPackages
if reload: self._ctrl.reloadChannels()
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/control.py",
line 375, in reloadChannels
self._cache.load()
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py",
line 78, in load
for info in self.getInfoList():
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py",
line 157, in getInfoList
info = parsePatchLine(entry.rstrip())
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py",
line 515, in parsePatchLine
info = createPatchInfo(patch, packages, requires, obsoletes, conflicts)
File
"/opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/loader.py",
line 550, in createPatchInfo
(name, prvversion) = m.groups()
AttributeError: 'NoneType' object has no attribute 'groups'
diff --git a/client/solaris/smartpm/smart/backends/solaris/loader.py
b/client/solaris/smartpm/smart/backends/solaris/loader.py
index 69ea490..4fb029a 100644
--- a/client/solaris/smartpm/smart/backends/solaris/loader.py
+++ b/client/solaris/smartpm/smart/backends/solaris/loader.py
@@ -547,7 +547,11 @@ def parsePatchData(text):
def createPatchInfo(patch, packages, requires, obsoletes, conflicts):
info = {"provides": [], "depends": [], "conflicts": [],
"upgrades": []}
m = PNAMERE.match(patch)
- (name, prvversion) = m.groups()
+ if m:
+ (name, prvversion) = m.groups()
+ else: # some custom patch with unkown format of SUNW_PATCHID, let fake up something
+ name = patch
+ prvversion = '1'
name = "patch-solaris-" + name
version = prvversion + "-1"
info["name"] = name
commit 9dcfecdaa2cd2dccfc41769883b47ca13ab1c96b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon May 17 13:52:04 2010 +0200
Automatic commit of package [spacewalk-utils] release [1.1.5-1].
diff --git a/rel-eng/packages/spacewalk-utils b/rel-eng/packages/spacewalk-utils
index 896d81f..9cfa944 100644
--- a/rel-eng/packages/spacewalk-utils
+++ b/rel-eng/packages/spacewalk-utils
@@ -1 +1 @@
-1.1.4-1 utils/
+1.1.5-1 utils/
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 508424f..e0b2ad4 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -1,7 +1,7 @@
%define rhnroot %{_prefix}/share/rhn
Name: spacewalk-utils
-Version: 1.1.4
+Version: 1.1.5
Release: 1%{?dist}
Summary: Utilities that may be run against a Spacewalk server.
@@ -69,6 +69,16 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon May 17 2010 Tomas Lestach <tlestach(a)redhat.com> 1.1.5-1
+- changing package description (tlestach(a)redhat.com)
+- do not check /etc/hosts file for actual hostname (tlestach(a)redhat.com)
+- check for presence of bootstrap files before modifying them
+ (tlestach(a)redhat.com)
+- fixed typo (tlestach(a)redhat.com)
+- set localhost instead of hostname to tnsnames.ora and listener.ora
+ (tlestach(a)redhat.com)
+- fixed a typo in the man page (tlestach(a)redhat.com)
+
* Tue Apr 27 2010 Tomas Lestach <tlestach(a)redhat.com> 1.1.4-1
- fixed Requires (tlestach(a)redhat.com)
- spacewalk-hostname-rename code cleanup (tlestach(a)redhat.com)
commit 7a4a8f079dc58f0f11bd7b8997ff47d48352eddf
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon May 17 13:48:41 2010 +0200
changing package description
since spacewalk-hostname-rename is part of this package, description isn't
correct
diff --git a/utils/spacewalk-utils.spec b/utils/spacewalk-utils.spec
index 9a300c7..508424f 100644
--- a/utils/spacewalk-utils.spec
+++ b/utils/spacewalk-utils.spec
@@ -35,9 +35,7 @@ Requires: spacewalk-config
Requires: spacewalk-setup
%description
-Generic utilities that may be run against a Spacewalk server. This package
-contains utilities that may be installed on a client and run against the
-server.
+Generic utilities that may be run against a Spacewalk server.
%prep
commit d6492c22f4708d669f2f11311ce54950e5be3f6d
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon May 17 12:21:16 2010 +0200
515637 - add newline at the end of file
sed on solaris cut last line, if it does not end with /n
diff --git a/client/tools/rhncfg/actions/configfiles
b/client/tools/rhncfg/actions/configfiles
index 9d49fd4..ce4e023 100644
--- a/client/tools/rhncfg/actions/configfiles
+++ b/client/tools/rhncfg/actions/configfiles
@@ -2,4 +2,5 @@ configfiles.mtime_upload(1)=1
configfiles.upload(1)=1
configfiles.deploy(1)=1
configfiles.diff(1)=1
-configfiles.base64_enc(1)=1
\ No newline at end of file
+configfiles.base64_enc(1)=1
+
commit e5bde463c47ea6e50bae0fc648b320fa9d24d4ed
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri May 14 18:17:16 2010 -0400
unit test fix
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
index 4636f3e..68f3016 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
@@ -432,7 +432,7 @@ public class ServerFactoryTest extends RhnBaseTestCase {
public void testGetChildChannels() throws Exception {
Server s1 = ServerTestUtils.createTestSystem(usr);
- assertNull(s1.getChildChannels());
+ assertTrue(s1.getChildChannels().isEmpty());
s1.addChannel(ChannelTestUtils.createChildChannel(usr, s1.getBaseChannel()));
s1.addChannel(ChannelTestUtils.createChildChannel(usr, s1.getBaseChannel()));
commit efe6610f5738956e4769dffd89a6dfc47d7d4cc1
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri May 14 17:32:06 2010 -0400
initializing variable within koan that is not initialized
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index c26d2e0..328d70c 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -188,6 +188,7 @@ def initiate_guest(kickstart_host, cobbler_system_name, virt_type,
name, mem_kb,
k.no_gfx = 1
k.add_reinstall_entry = None
k.kopts_override = None
+ k.virt_auto_boot = None
k.run()
# refresh current virtualization state on the server
commit b424ae753f36f844b1dd7aa30ca89cb4b98793ae
Author: Partha Aji <paji(a)redhat.com>
Date: Fri May 14 16:25:10 2010 -0400
Adding the correct checkstyle for inactive systems
diff --git a/branding/css/rhn-listview.css b/branding/css/rhn-listview.css
index ebb136b..f27c487 100644
--- a/branding/css/rhn-listview.css
+++ b/branding/css/rhn-listview.css
@@ -571,6 +571,11 @@ tr.alphaResult td.sortedCol {
background-color: #e4e4e4;
}
+.inactive {
+ background-color: #fef5ad;
+ margin-bottom: 5px;
+}
+
.compare-list .inactive {
background-color: #fef5ad;
margin-bottom: 5px;
diff --git
a/java/code/src/com/redhat/rhn/frontend/taglibs/list/row/ExpandableRowRenderer.java
b/java/code/src/com/redhat/rhn/frontend/taglibs/list/row/ExpandableRowRenderer.java
index 5e50127..24707cd 100644
--- a/java/code/src/com/redhat/rhn/frontend/taglibs/list/row/ExpandableRowRenderer.java
+++ b/java/code/src/com/redhat/rhn/frontend/taglibs/list/row/ExpandableRowRenderer.java
@@ -47,7 +47,7 @@ public class ExpandableRowRenderer extends RowRenderer {
else {
NetworkDto dto = (NetworkDto) current;
if (dto.getInactive() > 0) {
- return rowClasses[rowNum % rowClasses.length] + "
alphaResult";
+ return " inactive";
}
return rowClasses[rowNum % rowClasses.length];
}
commit 7cacc612569df36d2af6826ce2889755edcfc7b3
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Fri May 14 11:47:01 2010 -0400
576953 - fixing errata search case sensitivity and not searching on partial cve name
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
b/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
index f412422..0c2cced 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/ErrataSearchAction.java
@@ -574,9 +574,7 @@ public class ErrataSearchAction extends RhnAction {
return "(name:(" + query + ") filename:(" + query +
"))";
}
else if (OPT_CVE.equals(mode)) {
- if (query.trim().toLowerCase().indexOf("cve-") == -1) {
- query = "CVE-" + query;
- }
+ query = "%" + query.toLowerCase() + "%";
return "listErrataByCVE:(" + query + ")";
}
diff --git
a/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/errata_handler.xml
b/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/errata_handler.xml
index 7c6cece..6dc5f19 100644
---
a/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/errata_handler.xml
+++
b/search-server/spacewalk-search/src/config/com/redhat/satellite/search/db/errata_handler.xml
@@ -23,7 +23,7 @@
ac.org_id = wc.org_id and
ps.web_user_id = wc.id and
ps.id = #sessionId# and
- cve.name = #param0#
+ LOWER(cve.name) like #param0#
</select>
<select id="listErrataByIssueDateRange"
commit 7fbdf029cf8666a5033032755da3421af4c69f5a
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu May 13 15:03:17 2010 -0400
removing some dead code from the search server
diff --git a/search-server/spacewalk-search/buildconf/exclude
b/search-server/spacewalk-search/buildconf/exclude
index 7873251..e69de29 100644
--- a/search-server/spacewalk-search/buildconf/exclude
+++ b/search-server/spacewalk-search/buildconf/exclude
@@ -1,2 +0,0 @@
-**/WebCrawl.java
-**/IndexDocumentsTask.java
diff --git
a/search-server/spacewalk-search/scripts/src/java/com/redhat/satellite/search/index/docs/WebCrawl.java
b/search-server/spacewalk-search/scripts/src/java/com/redhat/satellite/search/index/docs/WebCrawl.java
deleted file mode 100644
index d656813..0000000
---
a/search-server/spacewalk-search/scripts/src/java/com/redhat/satellite/search/index/docs/WebCrawl.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/**
- * Copyright (c) 2008--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.
- */
-package com.redhat.satellite.search.index.docs;
-
-import org.apache.nutch.crawl.Injector;
-import org.apache.nutch.crawl.Generator;
-import org.apache.nutch.crawl.CrawlDb;
-import org.apache.nutch.crawl.LinkDb;
-import org.apache.nutch.fetcher.Fetcher;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.mapred.JobConf;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.nutch.parse.ParseSegment;
-import org.apache.nutch.indexer.DeleteDuplicates;
-import org.apache.nutch.indexer.IndexMerger;
-import org.apache.nutch.indexer.Indexer;
-import org.apache.nutch.util.HadoopFSUtil;
-import org.apache.nutch.util.NutchConfiguration;
-import org.apache.nutch.util.NutchJob;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Options;
-
-import org.apache.commons.cli.ParseException;
-
-import org.apache.log4j.Logger;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.io.IOException;
-
-
-/**
-Crawls a set of urls and indexes their content.
-Based off of nutch's crawl
- *
- * @version $Rev: $
- */
-public class WebCrawl {
- private static Logger log = Logger.getLogger(WebCrawl.class);
-
- private Configuration conf;
- private JobConf job;
- private String inputUrlFile;
- private String tmpCrawlDir;
- private String outputIndexDir;
-
- private int depth;
- private int threads;
- private long topN;
-
- /**
- * Constructor
- */
- public WebCrawl() {
- conf = NutchConfiguration.create();
- conf.addResource("crawl-tool.xml");
- job = new NutchJob(conf);
- threads = job.getInt("fetcher.threads.fetch", 10);
- depth = 5;
- topN = Long.MAX_VALUE;
- }
-
- /**
- * @return Returns the dir used to store tmp crawl data
- */
- public String getTmpCrawlDir() {
- return tmpCrawlDir;
- }
- /**
- * @param tmpCrawlDirIn the dir used to store tmp crawl data
- */
- public void setTmpCrawlDir(String tmpCrawlDirIn) {
- tmpCrawlDir = tmpCrawlDirIn;
- }
- /**
- * @return Returns the file used to seed the url crawl
- */
- public String getInputUrlFile() {
- return inputUrlFile;
- }
- /**
- * @param inputUrlFileIn file used to seed the url crawl
- */
- public void setInputUrlFile(String inputUrlFileIn) {
- inputUrlFile = inputUrlFileIn;
- }
- /**
- * @return Returns the dir to store the index of the crawled docs
- */
- public String getOutputIndexDir() {
- return outputIndexDir;
- }
- /**
- * @param outputIndexDirIn the dir to store the index of the crawled docs
- */
- public void setOutputIndexDir(String outputIndexDirIn) {
- outputIndexDir = outputIndexDirIn;
- }
- /**
- * @return Returns the maximum depth of recursion allowed
- */
- public int getDepth() {
- return depth;
- }
- /**
- * @param depthIn the maximum depth of recursion allowed
- */
- public void setDepth(int depthIn) {
- depth = depthIn;
- }
- /**
- * @return Returns the maximum number of fetcher threads used
- */
- public int getThreads() {
- return threads;
- }
- /**
- * @param threadsIn the maximum number of fetcher threads used
- */
- public void setThreads(int threadsIn) {
- threads = threadsIn;
- }
- /**
- * @return Returns the maximum number of "out links" to follow in any given
page
- */
- public long getTopN() {
- return topN;
- }
- /**
- * @param topNIn the maximum number of "out links" to follow in any given
page
- */
- public void setTopN(long topNIn) {
- topN = topNIn;
- }
-
- protected String getDate() {
- return new SimpleDateFormat("yyyyMMddHHmmss").format(
- new Date(System.currentTimeMillis()));
- }
-
- /**
- * Uses nutch to crawl a list of ulrs defined in "inputUrlFile"
- * Temporary scratch storage is held at "tmpCrawlDir"
- * The desired output is an index of crawled pages, stored at
"outputIndexDir"
- *
- * @return true when urls successfully crawled/indexed
- */
- @SuppressWarnings("deprecation")
- public boolean crawl() throws IOException {
- log.info("Performing crawl with following config options: ");
- log.info("inputUrlFile = " + inputUrlFile);
- log.info("tmpCrawlDir = " + tmpCrawlDir);
- log.info("outputIndexDir = " + outputIndexDir);
- log.info("threads = " + threads);
- log.info("depth = " + depth);
- log.info("topN = " + topN);
-
- Path inputPath = new Path(inputUrlFile);
- Path linkDb = new Path(tmpCrawlDir + "/linkdb");
- Path segments = new Path(tmpCrawlDir + "/segments");
- Path indexes = new Path(tmpCrawlDir + "/indexes");
- Path index = new Path(outputIndexDir);
- Path crawlDb = new Path(tmpCrawlDir + "/crawldb");
-
- Path tmpDir = job.getLocalPath("crawl" + Path.SEPARATOR + getDate());
- Injector injector = new Injector(conf);
- Generator generator = new Generator(conf);
- Fetcher fetcher = new Fetcher(conf);
- ParseSegment parseSegment = new ParseSegment(conf);
- CrawlDb crawlDbTool = new CrawlDb(conf);
- LinkDb linkDbTool = new LinkDb(conf);
- Indexer indexer = new Indexer(conf);
- DeleteDuplicates dedup = new DeleteDuplicates(conf);
- IndexMerger merger = new IndexMerger(conf);
-
- FileSystem fs = FileSystem.get(job);
-
- log.info("Create a new database (crawlDB) of link information");
- injector.inject(crawlDb, inputPath);
-
- for (int i = 0; i < depth; i++) {
- log.info("Generate a fetch list from info in the crawlDB.");
- Path segment = generator.generate(crawlDb, segments, -1, topN,
- System.currentTimeMillis());
- if (segment == null) {
- log.info("Stopping at depth = " + i + " instead of "
+ (depth - 1) +
- " - no more URLs to fetch.");
- break;
- }
- log.info("Fetch links");
- fetcher.fetch(segment, threads); // fetch it
- if (!Fetcher.isParsing(job)) {
- log.info("Parsing Segment");
- parseSegment.parse(segment); // parse it, if needed
- }
- Path[] p = new Path[1];
- p[0] = segment;
- log.info("Update CrawlDB");
- crawlDbTool.update(crawlDb, p, true, true); // update crawldb
- }
-
- linkDbTool.invert(linkDb, segments, true, true, false); // invert links
-
- // Delete old indexes
- if (fs.exists(indexes)) {
- log.info("Deleting old indexes: $indexes");
- fs.delete(indexes);
- }
-
- // Delete old index
- if (fs.exists(index)) {
- log.info("Deleting old merged index: $index");
- fs.delete(index);
- }
-
- // index, dedup & merge
- indexer.index(indexes, crawlDb, linkDb,
- fs.listPaths(segments, HadoopFSUtil.getPassAllFilter()));
-
- Path[] p = new Path[1];
- p[0] = indexes;
- dedup.dedup(p);
- merger.merge(fs.listPaths(indexes, HadoopFSUtil.getPassAllFilter()),
- index, tmpDir);
- log.info("Crawl finished");
- return true;
- }
-
-
- /**
- * Performs a web crawl:
- * @param args command line arguments
- */
- public static void main(String[] args) throws IOException {
-
- WebCrawl wCrawl = new WebCrawl();
-
- Options options = new Options();
- options.addOption("i", "inputUrlFile", true,
- "file holding 'urls' file to seed web page crawling");
- options.addOption("o", "outputDir", true, "temp crawl
output dir");
- options.addOption("x", "docsIndexDir", true, "docs index
output dir");
- options.addOption("t", "threads", true, "number of
threads");
- options.addOption("d", "depth", true, "depth to recurse
towards");
- options.addOption("n", "topN", true, "maximum number of
out links to follow");
- options.addOption("h", "help", false, "print help
message");
-
- CommandLineParser parser = new PosixParser();
- try {
- CommandLine line = parser.parse(options, args);
-
- if (line.hasOption("h")) {
- HelpFormatter formatter = new HelpFormatter();
- formatter.printHelp("WebCrawl", options);
- return;
- }
- if (line.hasOption("i")) {
- wCrawl.setInputUrlFile(line.getOptionValue("i"));
- }
- if (line.hasOption("x")) {
- wCrawl.setOutputIndexDir(line.getOptionValue("x"));
- }
- if (line.hasOption("o")) {
- wCrawl.setTmpCrawlDir(line.getOptionValue("o"));
- }
- if (line.hasOption("t")) {
- wCrawl.setThreads(Integer.parseInt(line.getOptionValue("t")));
- }
- if (line.hasOption("d)")) {
- wCrawl.setDepth(Integer.parseInt(line.getOptionValue("d")));
- }
- if (line.hasOption("n")) {
- wCrawl.setTopN(Integer.parseInt(line.getOptionValue("n")));
- }
-
- }
- catch (ParseException exp) {
- System.err.println("Parsing failed. Reason: " +
exp.getMessage());
- }
-
- if (!wCrawl.crawl()) {
- System.err.println("Error -- WebCrawl.crawl() Failed!");
- }
- }
-
-
-}
diff --git
a/search-server/spacewalk-search/src/java/com/redhat/satellite/search/scheduler/tasks/IndexDocumentsTask.java
b/search-server/spacewalk-search/src/java/com/redhat/satellite/search/scheduler/tasks/IndexDocumentsTask.java
deleted file mode 100644
index 9e36602..0000000
---
a/search-server/spacewalk-search/src/java/com/redhat/satellite/search/scheduler/tasks/IndexDocumentsTask.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Copyright (c) 2008--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.
- */
-package com.redhat.satellite.search.scheduler.tasks;
-
-import com.redhat.satellite.search.config.Configuration;
-import com.redhat.satellite.search.index.IndexManager;
-import com.redhat.satellite.search.scheduler.tasks.crawl.WebCrawl;
-
-import org.apache.log4j.Logger;
-
-import org.quartz.JobDataMap;
-import org.quartz.StatefulJob;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import java.io.File;
-import java.io.IOException;
-
-
-/**
- * Task to index help documents
- *
- * @version $Rev: $
- */
-public class IndexDocumentsTask implements StatefulJob {
- // We do _not_ want this task to run concurrently with itself,
- // therefore using StatefulJob.
- private static Logger log = Logger.getLogger(IndexDocumentsTask.class);
- public static final String TASK_REINDEX = new String("TASK.RE-INDEX");
- public static final String TASK_COMPLETE = new String("TASK.COMPLETE");
-
-
- /**
- * {@inheritDoc}
- */
- public void execute(JobExecutionContext ctx)
- throws JobExecutionException {
- JobDataMap jobData = ctx.getJobDetail().getJobDataMap();
- IndexManager indexManager = (IndexManager)
jobData.get("indexManager");
-
- String indexWorkDir = indexManager.getIndexWorkDir();
- if ((indexWorkDir == null) || (indexWorkDir.compareTo("") == 0)) {
- throw new JobExecutionException("indexWorkDir invalid");
- }
- File docsIndexDir = new File(indexWorkDir + File.separator +
- IndexManager.DOCS_INDEX_NAME);
- File indexCheck = new File(docsIndexDir, TASK_REINDEX);
- File success = new File(docsIndexDir, TASK_COMPLETE);
-
- boolean reindex = false;
-
- log.info("task running");
-
- if (!docsIndexDir.exists()) {
- // first time running, the index needs to be created from scratch
- log.info("Creating directory: " + docsIndexDir.getPath());
- if (!docsIndexDir.mkdirs()) {
- throw new JobExecutionException("Unable to create dir: " +
- docsIndexDir.getPath());
- }
- reindex = true;
- }
- else {
- // Will reindex if a TASK.RE-INDEX is present or
- // we don't see TASK.COMPLETE
- log.info("docsIndexDir<" + docsIndexDir + ">
exists");
- if (indexCheck.exists()) {
- log.info("Found (" + indexCheck.getPath() +
- "), Index needs to be updated.");
- reindex = true;
- }
- else if (!success.exists()) {
- log.info("Index exists, but it appears to be incomplete, missing
" +
- success.getPath());
- reindex = true;
- }
- }
-
- if (reindex) {
- //We need to communicate index is incomplete by removing the success file
-
- if (success.exists()) {
- if (!success.delete()) {
- throw new JobExecutionException("Unable to delete file: " +
- success.getPath());
- }
- }
- if ((indexCheck != null) && (indexCheck.exists())) {
- // cleanup the file which triggered the re-index
- if (!indexCheck.delete()) {
- throw new JobExecutionException("Unable to delete file: " +
- indexCheck.getPath());
- }
- }
- try {
- Configuration config =
(Configuration)jobData.get("configuration");
- if (!reIndexDocs(docsIndexDir.getPath(), config)) {
- log.error("Failed reindexing documents to : ");
- throw new JobExecutionException("Reindexing of Documents
failed.");
- }
- //Mark that docs have been indexed and are ready to be used.
- success.createNewFile();
- }
- catch (IOException e) {
- throw new JobExecutionException(e);
- }
- }
- }
-
- protected boolean reIndexDocs(String docsIndexDir, Configuration config)
- throws IOException {
-
- int threads = config.getInt("search.nutch.threads", 10);
- int depth = config.getInt("search.nutch.depth", 5);
- String inputUrlFile = config.getString("search.nutch.inputUrlFile",
"nutch/urls");
- String tmpCrawlDir = config.getString("search.nutch.tmpDir",
"/tmp/crawl_output");
-
- WebCrawl wCrawl = new WebCrawl();
- wCrawl.setDepth(depth);
- wCrawl.setInputUrlFile(inputUrlFile);
- wCrawl.setOutputIndexDir(docsIndexDir);
- wCrawl.setThreads(threads);
- wCrawl.setTmpCrawlDir(tmpCrawlDir);
-
- return wCrawl.crawl();
- }
-
-}
commit f741588baa67f20886d9426fd9525019a2c181eb
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri May 14 14:37:29 2010 +0200
Automatic commit of package [spacewalk-backend] release [1.1.13-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index a205a60..9178385 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.1.12
+Version: 1.1.13
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -632,6 +632,11 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Fri May 14 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.1.13-1
+- fixed performance issue in satellite-sync
+- update po files
+- l10n: russian added
+
* Tue May 04 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.1.12-1
- modified satellite-sync to new xml dumps
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 535a9bb..72946a2 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.1.12-1 backend/
+1.1.13-1 backend/
commit e8eab333afa277988a4a23635a3de5ac9441f742
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri May 14 14:28:44 2010 +0200
don't (re)link all packages just missing ones
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 17eea89..8c8adef 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -1728,7 +1728,7 @@ Please contact your RHN representative""" %
(generation, sat_cert.generation))
log(1, ["", messages.link_channel_packages])
package_collection = sync_handlers.PackageCollection()
uq_packages = {}
- for chn, package_ids in self._channel_packages.items():
+ for chn, package_ids in self._missing_channel_packages.items():
for pid in package_ids:
timestamp = package_collection.get_package_timestamp(pid)
package = package_collection.get_package(pid, timestamp)
commit cb2cf2fe6c0edf64f7e7e570bf4aa48e35802d0d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri May 14 11:44:35 2010 +0200
removed obsoleted code: at least since RHEL4 we always have unicode
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index ef2d30f..7901f13 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -26,8 +26,6 @@ from common import log_debug, Traceback, rhnFlags, CFG
from server.importlib import importLib, backendLib
-typesHasUnicode = hasattr(types, "UnicodeType")
-
# Terminology used throughout this file:
# Item: an atomic entity from the database's perspective.
# A channel, or a package, or an erratum is an item.
@@ -336,7 +334,7 @@ class BaseItem:
def _is_string(obj):
if isinstance(obj, types.StringType):
return 1
- if typesHasUnicode and isinstance(obj, types.UnicodeType):
+ if isinstance(obj, types.UnicodeType):
return 1
return 0
@@ -344,16 +342,12 @@ def _stringify(data):
# Accelerate the most common cases
if isinstance(data, types.StringType):
return data
- if typesHasUnicode:
- try: return data.encode('UTF8')
- except AttributeError: pass
+ try: return data.encode('UTF8')
+ except AttributeError: pass
return str(data)
def _dict_to_utf8(d):
# Convert the dictionary to have non-unocide key-value pairs
- if not typesHasUnicode:
- # Nothing to do
- return d
ret = {}
for k, v in d.items():
try: k = k.encode('UTF8')
commit 76c5af81470ae743f990d78cd722fc65d43bdfaa
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri May 14 11:34:14 2010 +0200
xml import optimization: 'key in dict' is 15% faster than
'dict.has_key(key)' and it's called 1000000 times during satellite-sync
diff --git a/backend/satellite_tools/xmlDiskDumper.py
b/backend/satellite_tools/xmlDiskDumper.py
index c4d326b..2e9f323 100644
--- a/backend/satellite_tools/xmlDiskDumper.py
+++ b/backend/satellite_tools/xmlDiskDumper.py
@@ -257,7 +257,7 @@ class ShortPackageDumper(Dumper):
if self.compression:
filename = filename + '.gz'
- if diskfiles.has_key(filename):
+ if filename in diskfiles:
# The file is on the disk
del diskfiles[filename]
else:
diff --git a/backend/satellite_tools/xmlSource.py b/backend/satellite_tools/xmlSource.py
index a82d9cb..ef2d30f 100644
--- a/backend/satellite_tools/xmlSource.py
+++ b/backend/satellite_tools/xmlSource.py
@@ -168,7 +168,7 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
self.container_dispatch[obj.container_name] = obj
def get_container(self, name):
- if not self.container_dispatch.has_key(name):
+ if name not in self.container_dispatch:
# Return a dummy container
c = ContainerHandler()
c.container_name = name
@@ -177,7 +177,7 @@ class BaseDispatchHandler(ContentHandler, ErrorHandler):
return self.container_dispatch[name]
def has_container(self, name):
- return self.container_dispatch.has_key(name)
+ return (name in self.container_dispatch)
# Overwrite the functions required by SAX
def setDocumentLocator(self, locator):
@@ -295,8 +295,8 @@ class BaseItem:
def populateFromAttributes(self, obj, sourceDict):
# Populates dict with items from sourceDict
for key, value in sourceDict.items():
- if not self.tagMap.has_key(key):
- if not obj.has_key(key):
+ if key not in self.tagMap:
+ if key not in obj:
# Unsupported key
continue
else:
@@ -322,10 +322,10 @@ class BaseItem:
obj[keys[0]] = element
continue
name = element.name
- if not obj.has_key(name) and not self.tagMap.has_key(name):
+ if name not in obj and name not in self.tagMap:
# Unsupported key
continue
- if self.tagMap.has_key(name):
+ if name in self.tagMap:
# Have to map this element
name = self.tagMap[name]
@@ -371,7 +371,7 @@ def addItem(classobj):
def _createItem(element):
# Creates an Item object from the specified element
- if not __itemDispatcher.has_key(element.name):
+ if element.name not in __itemDispatcher:
# No item processor
return None
item = __itemDispatcher[element.name]()
@@ -858,7 +858,7 @@ class ContainerHandler:
# Nothing to do with this object
return
- if item.has_key('error'):
+ if 'error' in item:
# Special case errors
log_debug(0, 'XML parser error: found "rhn-error" item: %s'
%
item['error'])
commit ccfcba8ade7cf3e257bd6458eea7cb88ee187c2e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 14 12:06:39 2010 +0200
588367 - introducing systemgroup.scheduleApplyErrataToActive API call
diff --git a/java/code/src/com/redhat/rhn/domain/server/ServerGroup.hbm.xml
b/java/code/src/com/redhat/rhn/domain/server/ServerGroup.hbm.xml
index f1f6763..046ca4c 100644
--- a/java/code/src/com/redhat/rhn/domain/server/ServerGroup.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/server/ServerGroup.hbm.xml
@@ -167,6 +167,7 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
</query>
<sql-query name="ServerGroup.lookupActiveServerIds">
+ <return-scalar type="long" column="id"/>
<![CDATA[
SELECT S.id
FROM rhnServerGroupMembers SGM
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 212fd50..90d054d 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
@@ -2605,7 +2605,8 @@ public class SystemHandler extends BaseHandler {
* @xmlrpc.returntype #return_int_success()
*/
public int scheduleApplyErrata(String sessionKey, Integer sid, List errataIds) {
- ErrataManager.applyErrataHelper(getLoggedInUser(sessionKey), sid, errataIds,
null);
+ ErrataManager.applyErrataHelper(getLoggedInUser(sessionKey), sid.longValue(),
+ errataIds, null);
return 1;
}
@@ -2625,10 +2626,10 @@ public class SystemHandler extends BaseHandler {
* @xmlrpc.param dateTime.iso8601 earliestOccurrence
* @xmlrpc.returntype #return_int_success()
*/
- public int scheduleApplyErrata(String sessionKey, Integer sid, List errataIds,
+ public int scheduleApplyErrata(String sessionKey, Integer sid, List errataIds,
Date earliestOccurrence) {
ErrataManager.applyErrataHelper(getLoggedInUser(sessionKey),
- sid, errataIds, earliestOccurrence);
+ sid.longValue(), errataIds, earliestOccurrence);
return 1;
}
diff --git
a/java/code/src/com/redhat/rhn/frontend/xmlrpc/systemgroup/ServerGroupHandler.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/systemgroup/ServerGroupHandler.java
index 2abaec8..4d4f7c6 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/systemgroup/ServerGroupHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/systemgroup/ServerGroupHandler.java
@@ -30,9 +30,11 @@ import com.redhat.rhn.frontend.xmlrpc.LookupServerGroupException;
import com.redhat.rhn.frontend.xmlrpc.ServerGroupAccessChangeException;
import com.redhat.rhn.frontend.xmlrpc.ServerNotInGroupException;
import com.redhat.rhn.frontend.xmlrpc.system.XmlRpcSystemHelper;
+import com.redhat.rhn.manager.errata.ErrataManager;
import com.redhat.rhn.manager.system.ServerGroupManager;
import java.util.ArrayList;
+import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -410,11 +412,14 @@ public class ServerGroupHandler extends BaseHandler {
*/
public List<Long> listActiveSystemsInGroup(String sessionKey, String
systemGroupName) {
User loggedInUser = getLoggedInUser(sessionKey);
+ return activeSystemsInGroup(loggedInUser, systemGroupName);
+ }
+
+ private List<Long> activeSystemsInGroup(User loggedInUser, String
systemGroupName) {
ServerGroup sg = lookup(systemGroupName, loggedInUser);
Long threshold = new Long(Config.get().getInt(
ConfigDefaults.SYSTEM_CHECKIN_THRESHOLD));
return ServerGroupManager.getInstance().listActiveServers(sg, threshold);
-
}
/**
@@ -466,5 +471,49 @@ public class ServerGroupHandler extends BaseHandler {
return listInactiveSystemsInGroup(sessionKey, systemGroupName,
threshold.intValue());
}
+
+ /**
+ * Schedules an action to apply errata updates to active systems from a group.
+ * @param sessionKey The user's session key.
+ * @param systemGroupName the system group
+ * @param errataIds List of errata IDs to apply (as Integers)
+ * @return 1 if successful, exception thrown otherwise
+ *
+ * @xmlrpc.doc Schedules an action to apply errata updates to active systems
+ * from a group.
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.param #param("string", "systemGroupName")
+ * @xmlrpc.param #array_single("int", "errataId")
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int scheduleApplyErrataToActive(String sessionKey, String systemGroupName,
+ List errataIds) {
+ return scheduleApplyErrataToActive(sessionKey, systemGroupName, errataIds,
null);
+ }
+ /**
+ * Schedules an action to apply errata updates to active systems from a group
+ * at a specified time.
+ * @param sessionKey The user's session key.
+ * @param systemGroupName the system group
+ * @param errataIds List of errata IDs to apply (as Integers)
+ * @param earliestOccurrence Earliest occurrence of the errata update
+ * @return 1 if successful, exception thrown otherwise
+ *
+ * @xmlrpc.doc Schedules an action to apply errata updates to active systems
+ * from a group at a given date/time.
+ * @xmlrpc.param #param("string", "sessionKey")
+ * @xmlrpc.param #param("string", "systemGroupName")
+ * @xmlrpc.param #array_single("int", "errataId")
+ * @xmlrpc.param dateTime.iso8601 earliestOccurrence
+ * @xmlrpc.returntype #return_int_success()
+ */
+ public int scheduleApplyErrataToActive(String sessionKey, String systemGroupName,
+ List<Integer> errataIds, Date earliestOccurrence)
{
+ User loggedInUser = getLoggedInUser(sessionKey);
+ List<Long> systemIds = activeSystemsInGroup(loggedInUser,
systemGroupName);
+ ErrataManager.applyErrataHelper(loggedInUser, systemIds, errataIds,
+ earliestOccurrence);
+ return 1;
+ }
}
diff --git a/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
b/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
index 3f45dd9..a347040 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
@@ -1345,39 +1345,69 @@ public class ErrataManager extends BaseManager {
* @param errataIds List of errata IDs to apply (as Integers)
* @param earliestOccurrence Earliest occurrence of the errata update
*/
- public static void applyErrataHelper(User loggedInUser, Integer sid, List errataIds,
+ public static void applyErrataHelper(User loggedInUser, Long sid, List errataIds,
Date earliestOccurrence) {
Server server = SystemManager.lookupByIdAndUser(new Long(sid.longValue()),
loggedInUser);
+ // check whether the whole errata list applicable to the system
+ checkApplicableErrata(loggedInUser, errataIds, sid);
+ // apply it
+ applyErrata(loggedInUser, errataIds, earliestOccurrence, sid);
+ }
+
+ /**
+ * Apply errata updates to a system list at a specified time.
+ * @param loggedInUser The logged in user
+ * @param systemIds list of system IDs
+ * @param errataIds List of errata IDs to apply (as Integers)
+ * @param earliestOccurrence Earliest occurrence of the errata update
+ */
+ public static void applyErrataHelper(User loggedInUser, List<Long> systemIds,
+ List<Integer> errataIds, Date
earliestOccurrence) {
+ // first check, whether the errata list is applicable to the whole system list
+ // if not, exception is thrown
+ for (Long sid : systemIds) {
+ checkApplicableErrata(loggedInUser, errataIds, sid);
+ }
+ // at this point all errata is applicable to all systems, so let's apply
+ for (Long sid : systemIds) {
+ applyErrata(loggedInUser, errataIds, earliestOccurrence, sid);
+ }
+ }
+ private static void checkApplicableErrata(User loggedInUser, List<Integer>
errataIds,
+ Long serverId) {
// Check to make sure the given errata are applicable to and unscheduled for the
// system in question. This catches three scenarios, errata that don't apply
to
// this system, are already scheduled, or don't exist in the first place.
// TODO: fail silently in some of these cases?
Set unscheduledErrataIds = new HashSet();
List unscheduledErrata = SystemManager.unscheduledErrata(loggedInUser,
- server.getId(), null);
+ serverId, null);
for (Iterator it = unscheduledErrata.iterator(); it.hasNext();) {
Errata e = (Errata)it.next();
- unscheduledErrataIds.add(new Integer(e.getId().intValue()));
+ unscheduledErrataIds.add(e.getId());
}
for (Iterator it = errataIds.iterator(); it.hasNext();) {
Integer currentId = (Integer)it.next();
- if (!unscheduledErrataIds.contains(currentId)) {
+ if (!unscheduledErrataIds.contains(currentId.longValue())) {
throw new InvalidErrataException();
}
}
-
- for (Iterator it = errataIds.iterator(); it.hasNext();) {
- Integer currentId = (Integer)it.next();
- Errata errata = ErrataManager.lookupErrata(new Long(currentId.longValue()),
- loggedInUser);
- Action update = ActionManager.createErrataAction(loggedInUser, errata);
- if (earliestOccurrence != null) {
- update.setEarliestAction(earliestOccurrence);
- }
- ActionManager.addServerToAction(server.getId(), update);
- ActionManager.storeAction(update);
- }
}
+
+ private static void applyErrata(User loggedInUser, List errataIds,
+ Date earliestOccurrence, Long serverId) {
+ for (Iterator it = errataIds.iterator(); it.hasNext();) {
+ Integer currentId = (Integer)it.next();
+ Errata errata = ErrataManager.lookupErrata(currentId.longValue(),
+ loggedInUser);
+ Action update = ActionManager.createErrataAction(loggedInUser, errata);
+ if (earliestOccurrence != null) {
+ update.setEarliestAction(earliestOccurrence);
+ }
+ ActionManager.addServerToAction(serverId, update);
+ ActionManager.storeAction(update);
+ }
+ }
}
commit 388a9248a06e9bc21f41af50b353416d6c0c1748
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu May 13 11:44:11 2010 +0200
588367 move applyErrataHelper to ErrataManager
to share the method
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 9c3ae09..212fd50 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
@@ -79,7 +79,6 @@ import com.redhat.rhn.frontend.xmlrpc.InvalidActionTypeException;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelListException;
import com.redhat.rhn.frontend.xmlrpc.InvalidEntitlementException;
-import com.redhat.rhn.frontend.xmlrpc.InvalidErrataException;
import com.redhat.rhn.frontend.xmlrpc.InvalidPackageException;
import com.redhat.rhn.frontend.xmlrpc.InvalidProfileLabelException;
import com.redhat.rhn.frontend.xmlrpc.InvalidSystemException;
@@ -2606,7 +2605,7 @@ public class SystemHandler extends BaseHandler {
* @xmlrpc.returntype #return_int_success()
*/
public int scheduleApplyErrata(String sessionKey, Integer sid, List errataIds) {
- applyErrataHelper(sessionKey, sid, errataIds, null);
+ ErrataManager.applyErrataHelper(getLoggedInUser(sessionKey), sid, errataIds,
null);
return 1;
}
@@ -2628,54 +2627,11 @@ public class SystemHandler extends BaseHandler {
*/
public int scheduleApplyErrata(String sessionKey, Integer sid, List errataIds,
Date earliestOccurrence) {
- applyErrataHelper(sessionKey, sid, errataIds, earliestOccurrence);
+ ErrataManager.applyErrataHelper(getLoggedInUser(sessionKey),
+ sid, errataIds, earliestOccurrence);
return 1;
}
-
- /**
- * Apply errata updates to a system at a specified time.
- * @param sessionKey The user's session key.
- * @param sid ID of the server
- * @param errataIds List of errata IDs to apply (as Integers)
- * @param earliestOccurrence Earliest occurrence of the errata update
- */
- private void applyErrataHelper(String sessionKey, Integer sid, List errataIds,
- Date earliestOccurrence) {
- User loggedInUser = getLoggedInUser(sessionKey);
- Server server = SystemManager.lookupByIdAndUser(new Long(sid.longValue()),
- loggedInUser);
-
- // Check to make sure the given errata are applicable to and unscheduled for the
- // system in question. This catches three scenarios, errata that don't apply
to
- // this system, are already scheduled, or don't exist in the first place.
- // TODO: fail silently in some of these cases?
- Set unscheduledErrataIds = new HashSet();
- List unscheduledErrata = SystemManager.unscheduledErrata(loggedInUser,
- server.getId(), null);
- for (Iterator it = unscheduledErrata.iterator(); it.hasNext();) {
- Errata e = (Errata)it.next();
- unscheduledErrataIds.add(new Integer(e.getId().intValue()));
- }
- for (Iterator it = errataIds.iterator(); it.hasNext();) {
- Integer currentId = (Integer)it.next();
- if (!unscheduledErrataIds.contains(currentId)) {
- throw new InvalidErrataException();
- }
- }
-
- for (Iterator it = errataIds.iterator(); it.hasNext();) {
- Integer currentId = (Integer)it.next();
- Errata errata = ErrataManager.lookupErrata(new Long(currentId.longValue()),
- loggedInUser);
- Action update = ActionManager.createErrataAction(loggedInUser, errata);
- if (earliestOccurrence != null) {
- update.setEarliestAction(earliestOccurrence);
- }
- ActionManager.addServerToAction(server.getId(), update);
- ActionManager.storeAction(update);
- }
- }
-
+
/**
* Compares the packages installed on two systems.
*
diff --git a/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
b/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
index a7ebfde..3f45dd9 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java
@@ -25,6 +25,7 @@ import com.redhat.rhn.common.hibernate.LookupException;
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.messaging.MessageQueue;
import com.redhat.rhn.common.security.PermissionException;
+import com.redhat.rhn.domain.action.Action;
import com.redhat.rhn.domain.channel.Channel;
import com.redhat.rhn.domain.channel.ChannelFactory;
import com.redhat.rhn.domain.errata.Bug;
@@ -36,6 +37,7 @@ import com.redhat.rhn.domain.errata.impl.PublishedClonedErrata;
import
com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.role.RoleFactory;
+import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.dto.ChannelOverview;
import com.redhat.rhn.frontend.dto.ErrataOverview;
@@ -44,11 +46,14 @@ import com.redhat.rhn.frontend.dto.PackageOverview;
import com.redhat.rhn.frontend.events.CloneErrataAction;
import com.redhat.rhn.frontend.events.CloneErrataEvent;
import com.redhat.rhn.frontend.listview.PageControl;
+import com.redhat.rhn.frontend.xmlrpc.InvalidErrataException;
import com.redhat.rhn.manager.BaseManager;
+import com.redhat.rhn.manager.action.ActionManager;
import com.redhat.rhn.manager.channel.ChannelManager;
import com.redhat.rhn.manager.errata.cache.ErrataCacheManager;
import com.redhat.rhn.manager.rhnset.RhnSetDecl;
import com.redhat.rhn.manager.rhnset.RhnSetManager;
+import com.redhat.rhn.manager.system.SystemManager;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
@@ -59,6 +64,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -1332,5 +1338,46 @@ public class ErrataManager extends BaseManager {
ErrataFactory.syncErrataDetails(cloned);
}
+ /**
+ * Apply errata updates to a system at a specified time.
+ * @param loggedInUser The logged in user
+ * @param sid ID of the server
+ * @param errataIds List of errata IDs to apply (as Integers)
+ * @param earliestOccurrence Earliest occurrence of the errata update
+ */
+ public static void applyErrataHelper(User loggedInUser, Integer sid, List errataIds,
+ Date earliestOccurrence) {
+ Server server = SystemManager.lookupByIdAndUser(new Long(sid.longValue()),
+ loggedInUser);
+ // Check to make sure the given errata are applicable to and unscheduled for the
+ // system in question. This catches three scenarios, errata that don't apply
to
+ // this system, are already scheduled, or don't exist in the first place.
+ // TODO: fail silently in some of these cases?
+ Set unscheduledErrataIds = new HashSet();
+ List unscheduledErrata = SystemManager.unscheduledErrata(loggedInUser,
+ server.getId(), null);
+ for (Iterator it = unscheduledErrata.iterator(); it.hasNext();) {
+ Errata e = (Errata)it.next();
+ unscheduledErrataIds.add(new Integer(e.getId().intValue()));
+ }
+ for (Iterator it = errataIds.iterator(); it.hasNext();) {
+ Integer currentId = (Integer)it.next();
+ if (!unscheduledErrataIds.contains(currentId)) {
+ throw new InvalidErrataException();
+ }
+ }
+
+ for (Iterator it = errataIds.iterator(); it.hasNext();) {
+ Integer currentId = (Integer)it.next();
+ Errata errata = ErrataManager.lookupErrata(new Long(currentId.longValue()),
+ loggedInUser);
+ Action update = ActionManager.createErrataAction(loggedInUser, errata);
+ if (earliestOccurrence != null) {
+ update.setEarliestAction(earliestOccurrence);
+ }
+ ActionManager.addServerToAction(server.getId(), update);
+ ActionManager.storeAction(update);
+ }
+ }
}
commit 431121654948136106530e5e4c3a8eae8085fd5b
Author: ypoyarko <ypoyarko(a)fedoraproject.org>
Date: Thu May 13 23:47:18 2010 +0000
l10n: Updates to Russian (ru) translation
Transmitted-via: Transifex (
translate.fedoraproject.org)
diff --git a/client/rhel/yum-rhn-plugin/po/ru.po b/client/rhel/yum-rhn-plugin/po/ru.po
index b65b62e..7d14e94 100644
--- a/client/rhel/yum-rhn-plugin/po/ru.po
+++ b/client/rhel/yum-rhn-plugin/po/ru.po
@@ -1,25 +1,26 @@
-# translation of ru.po to
+# translation of ru.po to
# translation of ru.po to
# This file is distributed under the same license as the PACKAGE package.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
-# Yulia Poyarkova <ypoyarko(a)redhat.com>, 2006.
#
+# Yulia <ypoyarko(a)redhat.com>, 2006, 2010.
msgid ""
msgstr ""
"Project-Id-Version: ru\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-06 16:28+0200\n"
-"PO-Revision-Date: 2006-11-29 09:24+1000\n"
-"Last-Translator: Yulia Poyarkova <ypoyarko(a)redhat.com>\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2010-05-14 09:01\n"
+"Last-Translator: Yulia <ypoyarko(a)redhat.com>\n"
+"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.9.1\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2
&& n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ../rhnplugin.py:47
msgid "There was an error communicating with RHN."
-msgstr "Ошибка обращения к RHN."
+msgstr "Ошибка при обращении к RHN."
#: ../rhnplugin.py:69
msgid "RHN support will be disabled."
@@ -30,23 +31,23 @@ msgstr "Поддержка RHN будет отключена."
msgid ""
"*Note* Red Hat Network repositories are not listed below. You must run this "
"command as root to access RHN repositories."
-msgstr ""
+msgstr "*Примечание* Этот список не содержит репозитории Red Hat Network. Чтобы
получить к ним доступ, выполните эту команду в режиме root."
#: ../rhnplugin.py:95
msgid "There was an error parsing the RHN proxy settings."
-msgstr "Ошибка обработки установок RHN proxy."
+msgstr "Ошибка при обработке настроек RHN proxy."
#: ../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 "Данная система не зарегистрирована в RHN."
+msgstr "Эта система не зарегистрирована в RHN."
#: ../rhnplugin.py:131
msgid "RHN channel support will be disabled."
@@ -54,29 +55,29 @@ msgstr "Поддержка каналов RHN будет отключена."
#: ../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 "Возможно, эта система не зарегистрирована в RHN. Не удалось получить
SystemID.\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 в режиме root на этом клиенте"
#: ../rhnplugin.py:298
#, python-format
msgid "Missing required login information for RHN: %s"
msgstr "Отсутствует необходимая информация для входа в RHN: %s"
+
commit 932f6de4f7d6f81f70f4d6d45c4166486fa06efb
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 13 18:30:20 2010 -0400
Added the dupe compare css and javascript magic
diff --git a/branding/css/rhn-listview.css b/branding/css/rhn-listview.css
index 4649bac..ebb136b 100644
--- a/branding/css/rhn-listview.css
+++ b/branding/css/rhn-listview.css
@@ -547,6 +547,40 @@ tr.alphaResult td.sortedCol {
background-position: left center;
}
+.compare-list .first-column {
+ border-right: 1px solid #C0C0C0;
+ background-color: #e4e4e4;
+ text-align: right;
+}
+
+.list-button-row,
+.list-button-row td {
+ background-color: #888 !important;
+ border-right: none !important;
+}
+
+.list-button-row td {
+ padding: 10px 5px;
+}
+
+.list-row-even .list-column-even {
+ background-color: #eee;
+}
+
+.list-row-odd .list-column-even {
+ background-color: #e4e4e4;
+}
+
+.compare-list .inactive {
+ background-color: #fef5ad;
+ margin-bottom: 5px;
+}
+
+.compare-list ul {
+ list-style: none outside !important;
+ padding: 0px;
+}
+
/** CSV download widget **/
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SystemCompareDto.java
b/java/code/src/com/redhat/rhn/frontend/dto/SystemCompareDto.java
index 43d6f08..bf883d3 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SystemCompareDto.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SystemCompareDto.java
@@ -62,13 +62,13 @@ public class SystemCompareDto {
* as the systems were added
* @return the last checkin dates
*/
- public List<String> getLastCheckinDates() {
+ public List<Item> getLastCheckinDates() {
LocalizationService ls = LocalizationService.getInstance();
List<String> ret = new LinkedList<String>();
for (Server server : servers) {
ret.add(ls.formatDate(server.getLastCheckin()));
}
- return ret;
+ return compare(ret);
}
/**
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 e55d92f..cc9d49e 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
@@ -5807,6 +5807,9 @@ value for this entitlement, excluding the default organization's
consumption.</s
<trans-unit id="Click Here To Hide">
<source>Click Here To Hide</source>
</trans-unit>
+ <trans-unit id="Click Here To Show">
+ <source>Click Here To Show</source>
+ </trans-unit>
<trans-unit id="Registration Date">
<source>Registration Date</source>
</trans-unit>
diff --git
a/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf
index e328aa5..c01b6e3 100644
---
a/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf
+++
b/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf
@@ -1,10 +1,29 @@
<%@ taglib
uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean" %>
<%@ taglib
uri="http://java.sun.com/jsp/jstl/core" prefix="c"
%>
- <c:forEach items="${items_list}" var="sublist">
- <td>
+ <td class="first-column"><bean:message
key="${key}"/></td>
+ <c:forEach items="${items_list}" var="sublist"
varStatus="loop">
+ <c:choose>
+ <c:when test ="${loop.count % 2 == 0}">
+ <c:set var ="style_class" value="list-column-even"/>
+ </c:when>
+ <c:otherwise>
+ <c:set var ="style_class" value="list-column-odd"/>
+ </c:otherwise>
+ </c:choose>
+
+ <c:if test = "${loop.last}">
+ <c:set var ="style_class" value="${style_class}
last-column"/>
+ </c:if>
+ <td class="${style_class} ">
<c:choose>
<c:when test ="${not empty sublist}">
- <c:forEach items="${sublist}" var="item">
+ <ul>
+ <c:forEach items="${sublist}" var="item"
varStatus="subloop">
+ <c:choose>
+ <c:when test="${item.similar}"><li
class="inactive"></c:when>
+ <c:otherwise><li></c:otherwise>
+ </c:choose>
+
<c:choose>
<c:when test="${empty item.value}">
<c:set var ="value"><bean:message
key="generic.jsp.none"/></c:set>
@@ -16,11 +35,10 @@
<c:if test="${not empty href && not empty item.id}">
<c:set var ="value"> <a
href="${href}${item.id}">${value}</a></c:set>
</c:if>
- <c:choose>
- <c:when
test="${item.similar}"><strong>${value}</strong></c:when>
- <c:otherwise>${value}</c:otherwise>
- </c:choose><br/>
+ ${value}
+ </li>
</c:forEach>
+ </ul>
</c:when>
<c:otherwise><bean:message
key="generic.jsp.none"/></c:otherwise>
</c:choose>
diff --git
a/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf
index 0980c8d..51a1c68 100644
---
a/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf
+++
b/java/code/webapp/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf
@@ -1,20 +1,33 @@
<%@ taglib
uri="http://java.sun.com/jsp/jstl/core" prefix="c"
%>
- <c:forEach items="${items_list}" var="item">
- <td>
- <c:choose>
+ <td class="first-column"><bean:message
key="${key}"/></td>
+ <c:forEach items="${items_list}" var="item"
varStatus="loop">
+ <c:choose>
+ <c:when test ="${loop.count % 2 == 0}">
+ <c:set var ="style_class" value="list-column-even"/>
+ </c:when>
+ <c:otherwise>
+ <c:set var ="style_class" value="list-column-odd"/>
+ </c:otherwise>
+ </c:choose>
+ <c:if test ="${item.similar}">
+ <c:set var ="style_class" value="${style_class}
inactive"/>
+ </c:if>
+ <c:if test = "${loop.last}">
+ <c:set var ="style_class" value="${style_class}
last-column"/>
+ </c:if>
+
+ <td class="${style_class} ">
+ <c:choose>
<c:when test="${empty item.value}">
<c:set var ="value"><bean:message
key="generic.jsp.none"/></c:set>
</c:when>
<c:otherwise>
<c:set var ="value" value="${item.value}" />
</c:otherwise>
- </c:choose>
+ </c:choose>
<c:if test="${not empty href && not empty item.id}">
<c:set var ="value"> <a
href="${href}${item.id}">${value}</a></c:set>
</c:if>
- <c:choose>
- <c:when
test="${item.similar}"><strong>${value}</strong></c:when>
- <c:otherwise>${value}</c:otherwise>
- </c:choose>
+ ${value}
</td>
</c:forEach>
\ No newline at end of file
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
index 4cdf7f5..0c9b449 100644
--- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
@@ -7,8 +7,27 @@
<html:xhtml/>
<html>
<head>
- <meta name="page-decorator" content="none" />
- <script src="/javascript/tree.js"
type="text/javascript"></script>
+<meta name="page-decorator" content="none" />
+<script type="text/javascript">
+
+ function toggleElement(row) {
+ if (row.style.display == '') {
+ row.style.display = 'none';
+ }
+ else {
+ row.style.display = '';
+ }
+ }
+
+ function pageToggleRows(linkId, ids){
+ for (var i = 0 ; i < ids.length; i++) {
+ toggleElement(document.getElementById(ids[i]));
+ }
+ toggleElement(document.getElementById(linkId + 'Show'));
+ toggleElement(document.getElementById(linkId + 'Hide'));
+ }
+
+</script>
</head>
<body>
<rhn:toolbar base="h1" img="/img/rhn-icon-system.gif"
imgAlt="system.common.systemAlt"
@@ -55,7 +74,7 @@
<br/>
<h2><bean:message key='System Comparison'/></h2>
<c:choose> <c:when test="${requestScope.systems.size > 0}">
-<table cellpadding="0" cellspacing="0" class="list">
+<table cellpadding="0" cellspacing="0" class="list
compare-list">
<thead><tr>
<th> Property</th>
<c:forEach items="${requestScope.systems.servers}"
var="current">
@@ -63,100 +82,118 @@
</c:forEach>
</tr></thead>
<tbody>
- <tr class="list-row-even" >
- <td><%-- Empty --%></td>
- <c:forEach items="${requestScope.systems.systemIds}"
var="current">
- <td><input type="submit" name="btn${current.value}"
value="${rhn:localize('Delete System Profile')}"/></td>
+ <tr class="list-button-row" >
+ <td class="first-column"><%-- Empty --%></td>
+ <c:forEach items="${requestScope.systems.systemIds}"
var="current" varStatus="loop">
+ <c:choose>
+ <c:when test ="${loop.last}">
+ <td class="last-column">
+ </c:when>
+ <c:otherwise><td></c:otherwise>
+ </c:choose>
+ <input type="submit" name="btn${current.value}"
value="${rhn:localize('Delete System Profile')}"/></td>
</c:forEach>
</tr>
<tr>
- <th colspan="${requestScope.systems.size + 1}"><bean:message
key="System Identity Properties"/> <a
href=""><bean:message key="Click Here To Hide"/>
</a></th>
- </tr>
- <tr class="list-row-even" >
- <td><bean:message
key="systemlist.jsp.last_checked_in"/></td>
- <c:forEach items="${requestScope.systems.lastCheckinDates}"
var="current">
- <td>${current}</td>
- </c:forEach>
+ <th colspan="${requestScope.systems.size + 1}"><bean:message
key="System Identity Properties"/>
+ <a id='sysIdHide' href="javascript:pageToggleRows('sysId',
['lastCheckinRow',
'macAddressRow','ipAddressRow','systemGroupsRow'])"><bean:message
key="Click Here To Hide"/> </a>
+ <a style="display:none" id='sysIdShow'
href="javascript:pageToggleRows('sysId', ['lastCheckinRow',
'macAddressRow','ipAddressRow','systemGroupsRow'])"><bean:message
key="Click Here To Show"/> </a>
+ </th>
+ </tr>
+ <tr class="list-row-odd" id="lastCheckinRow">
+ <c:set var ="key" value="systemlist.jsp.last_checked_in"/>
+ <c:set var ="items_list"
value="${requestScope.systems.lastCheckinDates}"/>
+ <c:set var ="href" value=""/>
+ <%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="row.macaddress"/></td>
+ <tr class="list-row-even" id="macAddressRow">
+ <c:set var ="key" value="row.macaddress"/>
<c:set var ="items_list"
value="${requestScope.systems.macAddresses}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="row.ip"/></td>
+ <tr class="list-row-odd" id = "ipAddressRow">
+ <c:set var ="key" value="row.ip"/>
<c:set var ="items_list"
value="${requestScope.systems.ipAddresses}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="System Groups"/></td>
+ <tr class="list-row-even" id = "systemGroupsRow">
+ <c:set var ="key" value="System Groups"/>
<c:set var ="items_list"
value="${requestScope.systems.systemGroups}"/>
<c:set var ="href"
value="/network/systems/groups/details.pxt?sgid="/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
<tr>
- <th colspan="${requestScope.systems.size + 1}"><bean:message
key="Extended System Identity Properties"/> <a
href=""><bean:message key="Click Here To Hide"/>
</a></th>
+ <th colspan="${requestScope.systems.size + 1}"><bean:message
key="Extended System Identity Properties"/>
+ <a id='extendedSysIdHide'
href="javascript:pageToggleRows('extendedSysId',
['registrationDateRow',
'systemIdRow','activationKeysRow'])"><bean:message
key="Click Here To Hide"/> </a>
+ <a style="display:none" id='extendedSysIdShow'
href="javascript:pageToggleRows('sysId', ['registrationDateRow',
'systemIdRow','activationKeysRow'])"><bean:message
key="Click Here To Show"/> </a>
+ </th>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="Registration Date"/></td>
+ <tr class="list-row-odd" id = "registrationDateRow">
+ <c:set var ="key" value="Registration Date"/>
<c:set var ="items_list"
value="${requestScope.systems.registrationDates}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="System ID"/></td>
+ <tr class="list-row-even" id = "systemIdRow">
+ <c:set var ="key" value="System ID"/>
<c:set var ="items_list"
value="${requestScope.systems.systemIds}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="Activation Keys"/></td>
+ <tr class="list-row-odd" id = "activationKeysRow">
+ <c:set var ="key" value="Activation Keys"/>
<c:set var ="items_list"
value="${requestScope.systems.activationKeys}"/>
<c:set var ="href"
value="/rhn/activationkeys/Edit.do?tid="/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
<tr>
- <th colspan="${requestScope.systems.size + 1}"><bean:message
key="System Content And Monitoring"/> <a
href=""><bean:message key="Click Here To Hide"/>
</a></th>
+ <th colspan="${requestScope.systems.size + 1}"><bean:message
key="System Content And Monitoring"/>
+ <a id='sysContentIdHide'
href="javascript:pageToggleRows('sysContentId', ['baseChannelRow',
'childChannelsRow','configChannelsRow','monitoringProbesRow'])"><bean:message
key="Click Here To Hide"/> </a>
+ <a style="display:none" id='sysContentIdShow'
href="javascript:pageToggleRows('sysContentId', ['baseChannelRow',
'childChannelsRow','configChannelsRow','monitoringProbesRow'])"><bean:message
key="Click Here To Show"/> </a>
+ </th>
</tr>
- <tr class="list-row-even">
- <td><bean:message key="kickstart.channel.label.jsp"/></td>
+ <tr class="list-row-odd" id = "baseChannelRow">
+ <c:set var ="key" value="kickstart.channel.label.jsp"/>
<c:set var ="items_list"
value="${requestScope.systems.baseChannels}"/>
<c:set var ="href"
value="/rhn/channels/ChannelDetail.do?cid="/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="Child Software Channels"/></td>
+ <tr class="list-row-even" id="childChannelsRow">
+ <c:set var ="key" value="Child Software Channels"/>
<c:set var ="items_list"
value="${requestScope.systems.childChannels}"/>
<c:set var ="href"
value="/rhn/channels/ChannelDetail.do?cid="/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="org.config.channels.jsp"/></td>
+ <tr class="list-row-odd" id="configChannelsRow">
+ <c:set var ="key" value="org.config.channels.jsp"/>
<c:set var ="items_list"
value="${requestScope.systems.childChannels}"/>
<c:set var ="href"
value="/rhn/configuration/ChannelOverview.do?ccid="/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="Monitoring Probes"/></td>
+ <tr class="list-row-even" id="monitoringProbesRow">
+ <c:set var ="key" value="Monitoring Probes"/>
<c:set var ="items_list"
value="${requestScope.systems.monitoringProbes}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
<tr>
- <th colspan="${requestScope.systems.size + 1}"><bean:message
key="softwareEntitlementDetails.header.entitlementUsage"/> <a
href=""><bean:message key="Click Here To Hide"/>
</a></th>
+ <th colspan="${requestScope.systems.size + 1}"><bean:message
key="softwareEntitlementDetails.header.entitlementUsage"/>
+ <a id='sysEntUsageIdHide'
href="javascript:pageToggleRows('sysEntUsageId',
['systemEntitlementsRow',
'softwareEntitlementsRow'])"><bean:message key="Click Here To
Hide"/> </a>
+ <a style="display:none" id='sysEntUsageIdShow'
href="javascript:pageToggleRows('sysEntUsageId',
['systemEntitlementsRow',
'softwareEntitlementsRow'])"><bean:message key="Click Here To
Show"/> </a>
+ </th>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="System Entitlements"/></td>
+ <tr class="list-row-odd" id = "systemEntitlementsRow">
+ <c:set var ="key" value="System Entitlements"/>
<c:set var ="items_list"
value="${requestScope.systems.systemEntitlements}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
</tr>
- <tr class="list-row-even" >
- <td><bean:message key="Software Entitlements"/></td>
+ <tr class="list-row-even" id="softwareEntitlementsRow">
+ <c:set var ="key" value="Software Entitlements"/>
<c:set var ="items_list"
value="${requestScope.systems.softwareEntitlements}"/>
<c:set var ="href" value=""/>
<%@ include
file="/WEB-INF/pages/common/fragments/systems/duplicates/render-item-list-list.jspf"
%>
commit d152d9402cf1bac5c0b9291f579735e944aef611
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu May 13 13:54:25 2010 -0400
590204 - fixing issue where pagination wasnt working properly on normal user list
page
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/user/BaseUserListSetupAction.java
b/java/code/src/com/redhat/rhn/frontend/action/user/BaseUserListSetupAction.java
deleted file mode 100644
index 062b38f..0000000
--- a/java/code/src/com/redhat/rhn/frontend/action/user/BaseUserListSetupAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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.
- */
-package com.redhat.rhn.frontend.action.user;
-
-import com.redhat.rhn.common.db.datasource.DataResult;
-import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.frontend.listview.PageControl;
-import com.redhat.rhn.frontend.struts.RequestContext;
-import com.redhat.rhn.frontend.struts.RhnListAction;
-
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * BaseUserListSetupAction
- * @version $Rev$
- */
-public abstract class BaseUserListSetupAction extends RhnListAction {
-
- /** {@inheritDoc} */
- public ActionForward execute(ActionMapping mapping,
- ActionForm formIn,
- HttpServletRequest request,
- HttpServletResponse response) {
-
- RequestContext requestContext = new RequestContext(request);
-
- User user = requestContext.getLoggedInUser();
- PageControl pc = new PageControl();
- pc.setIndexData(true);
- pc.setFilterColumn("loginUc");
- pc.setFilter(true);
-
- clampListBounds(pc, request, user);
-
- request.setAttribute("pageList", getDataResult(user, pc));
- request.setAttribute("parentUrl", request.getRequestURI());
- return mapping.findForward("default");
- }
-
- /**
- * Returns the appropriate list of users
- * @param user The logged in user
- * @param pc The PageControl
- * @return list of Users
- */
- protected abstract DataResult getDataResult(User user, PageControl pc);
-
-}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserListSetupAction.java
b/java/code/src/com/redhat/rhn/frontend/action/user/UserListSetupAction.java
index aab6ae0..cc33d84 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserListSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserListSetupAction.java
@@ -16,17 +16,49 @@ package com.redhat.rhn.frontend.action.user;
import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.domain.user.User;
-import com.redhat.rhn.frontend.listview.PageControl;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.struts.RhnHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.user.UserManager;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
/**
* UserListSetupAction
* @version $Rev$
*/
-public class UserListSetupAction extends BaseUserListSetupAction {
+public class UserListSetupAction extends RhnAction implements Listable {
+
+ /**
+ * ${@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping, ActionForm form,
+ HttpServletRequest request, HttpServletResponse response) throws Exception {
+ RequestContext context = new RequestContext(request);
+ User user = context.getLoggedInUser();
+ ListHelper helper = new ListHelper(this, request);
+ helper.execute();
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+
- /** {@inheritDoc} */
- protected DataResult getDataResult(User user, PageControl pc) {
- return UserManager.usersInOrg(user, pc);
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext context) {
+ User user = context.getLoggedInUser();
+ DataResult dr = UserManager.usersInOrg(user, null);
+ dr.elaborate();
+ return dr;
}
}
diff --git a/java/code/webapp/WEB-INF/pages/admin/users/userlist.jsp
b/java/code/webapp/WEB-INF/pages/admin/users/userlist.jsp
index 8e4d350..8148ad9 100644
--- a/java/code/webapp/WEB-INF/pages/admin/users/userlist.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/users/userlist.jsp
@@ -20,7 +20,7 @@
<c:set var="pageList" value="${requestScope.pageList}" />
<rl:listset name="userListSet">
- <rl:list dataset="pageList"
+ <rl:list
width="100%"
name="userList"
styleclass="list"
@@ -28,6 +28,8 @@
emptykey="activelist.jsp.noUsers"
alphabarcolumn="userLogin">
+
+
<rl:column bound="false"
sortable="true"
headerkey="username.nopunc.displayname"
commit 45ad811193b33e995d055a50ae80f82159ea1491
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 13 12:27:26 2010 -0400
Made the default dups compare page preselect a bunch of items
diff --git
a/java/code/src/com/redhat/rhn/frontend/action/systems/duplicate/DuplicateSystemsCompareAction.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/duplicate/DuplicateSystemsCompareAction.java
index 5380e1c..b84c05c 100644
---
a/java/code/src/com/redhat/rhn/frontend/action/systems/duplicate/DuplicateSystemsCompareAction.java
+++
b/java/code/src/com/redhat/rhn/frontend/action/systems/duplicate/DuplicateSystemsCompareAction.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.frontend.action.systems.duplicate;
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.frontend.dto.SystemCompareDto;
+import com.redhat.rhn.frontend.dto.SystemOverview;
import com.redhat.rhn.frontend.struts.RequestContext;
import com.redhat.rhn.frontend.struts.RhnAction;
import com.redhat.rhn.frontend.taglibs.list.helper.ListSessionSetHelper;
@@ -29,10 +30,12 @@ import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -61,6 +64,16 @@ public class DuplicateSystemsCompareAction extends RhnAction implements
Listable
params.put(KEY_TYPE, context.getRequiredParamAsString(KEY_TYPE));
request.setAttribute("maxLimit", MAX_LIMIT);
ListSessionSetHelper helper = new ListSessionSetHelper(this, request, params);
+
+ if (!context.isSubmitted()) {
+ List<SystemOverview> result = getResult(context);
+ Set<String> preSelect = new HashSet<String>();
+ for (int i = 0; i < Math.min(MAX_LIMIT, result.size()); i++) {
+ preSelect.add(result.get(i).getId().toString());
+ }
+ helper.preSelect(preSelect);
+ }
+
helper.execute();
if (context.isSubmitted()) {
boolean resync = false;
@@ -82,26 +95,26 @@ public class DuplicateSystemsCompareAction extends RhnAction
implements Listable
if (resync) {
helper.execute();
}
-
- if (helper.getSet().size() > MAX_LIMIT) {
- LocalizationService ls = LocalizationService.getInstance();
- ActionErrors errors = new ActionErrors();
- getStrutsDelegate().addError(errors,
- "duplicate.compares.max_limit.message",
- String.valueOf(MAX_LIMIT), ls.getMessage("Refresh
Comparison"));
- getStrutsDelegate().saveMessages(request, errors);
- }
- else {
- List<Long> sids = new LinkedList<Long>();
- for (String sid : helper.getSet()) {
- sids.add(Long.valueOf(sid));
- }
- List<Server> systems = SystemManager.
- hydrateServerFromIds(sids, context.getLoggedInUser());
- request.setAttribute("systems",
- new SystemCompareDto(systems, context.getLoggedInUser()));
- }
}
+ if (helper.getSet().size() > MAX_LIMIT) {
+ LocalizationService ls = LocalizationService.getInstance();
+ ActionErrors errors = new ActionErrors();
+ getStrutsDelegate().addError(errors,
+ "duplicate.compares.max_limit.message",
+ String.valueOf(MAX_LIMIT), ls.getMessage("Refresh
Comparison"));
+ getStrutsDelegate().saveMessages(request, errors);
+ }
+ else {
+ List<Long> sids = new LinkedList<Long>();
+ for (String sid : helper.getSet()) {
+ sids.add(Long.valueOf(sid));
+ }
+ List<Server> systems = SystemManager.
+ hydrateServerFromIds(sids, context.getLoggedInUser());
+ request.setAttribute("systems",
+ new SystemCompareDto(systems, context.getLoggedInUser()));
+ }
+
return mapping.findForward("default");
}
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 d8420e7..be532f1 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -2734,7 +2734,7 @@ public class SystemManager extends BaseManager {
* @param ip ip address of the system
* @return List of DuplicateSystemGrouping objects
*/
- public static List listDuplicatesByIP(User user, String ip) {
+ public static List<SystemOverview> listDuplicatesByIP(User user, String ip) {
return listDuplicates(user, "duplicate_system_ids_ip_key", ip);
}
@@ -2758,7 +2758,7 @@ public class SystemManager extends BaseManager {
* @param mac the mac address of the system
* @return List of DuplicateSystemGrouping objects
*/
- public static List listDuplicatesByMac(User user, String mac) {
+ public static List<SystemOverview> listDuplicatesByMac(User user, String mac)
{
return listDuplicates(user, "duplicate_system_ids_mac_key", mac);
}
@@ -2780,7 +2780,8 @@ public class SystemManager extends BaseManager {
* @param hostName host name of the system
* @return List of DuplicateSystemGrouping objects
*/
- public static List listDuplicatesByHostname(User user, String hostName) {
+ public static List<SystemOverview> listDuplicatesByHostname(User user,
+ String hostName) {
return listDuplicates(user, "duplicate_system_ids_hostname_key",
hostName);
}
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
index ad9771a..4cdf7f5 100644
--- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemscompare.jsp
@@ -39,6 +39,7 @@
<rl:column sortattr="lastCheckinDate"
attr="lastCheckin"
bound="true"
+ styleclass="last-column"
headerkey="systemlist.jsp.last_checked_in"/>
</rl:list>
commit ca5749ce7355c0c9e270575a6a5e9a0903c642c1
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 13 12:11:02 2010 -0400
Improved a error message on Dups systems page
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 9082bfc..e55d92f 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
@@ -5784,7 +5784,7 @@ value for this entitlement, excluding the default organization's
consumption.</s
<source>The systems below are potential duplicates of one another. You may
select a combination of <strong>{0} systems at once</strong>
for detailed comparison</source>
</trans-unit>
<trans-unit id="duplicate.compares.max_limit.message">
- <source>You have crossed the maximum limit for system comparison. Select a
combination of at most <strong>{0} systems</strong> to compare
and select <strong>{1}</strong></source>
+ <source>You have selected more than {0} system profiles for comparison.
Please select a combination of <strong>{0} systems or
less</strong> to compare and select
<strong>{1}</strong></source>
</trans-unit>
<trans-unit id="Delete System Profile">
<source>Delete System Profile</source>