From tsegismont at fedoraproject.org Thu Aug 20 10:57:49 2015 Content-Type: multipart/mixed; boundary="===============0104199481902371152==" MIME-Version: 1.0 From: Thomas Segismont To: rhq-commits at lists.fedorahosted.org Subject: [rhq] modules/enterprise Date: Mon, 30 Sep 2013 14:23:18 +0000 Message-ID: <20130930142318.6A30B61386@fedorahosted.org> --===============0104199481902371152== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregu= i/client/admin/DownloadsView.java | 12 +++--- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregu= i/server/gwt/SystemGWTServiceImpl.java | 18 +++++----- 2 files changed, 17 insertions(+), 13 deletions(-) New commits: commit 12317968d83d7ca408b01e7b9715364215fd5907 Author: Thomas Segismont Date: Mon Sep 30 16:23:01 2013 +0200 Bug 1013489 - It is not possible to download an agent from RHQ server (= HTTP Status 404) = Fixed 'Downloads' page broken links diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterpris= e/gui/coregui/client/admin/DownloadsView.java b/modules/enterprise/gui/core= gui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/DownloadsView= .java index 950b57d..5f3b9b6 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/c= oregui/client/admin/DownloadsView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/c= oregui/client/admin/DownloadsView.java @@ -1,6 +1,6 @@ /* * RHQ Management Platform - * Copyright (C) 2005-2009 Red Hat, Inc. + * Copyright (C) 2005-2013 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -13,8 +13,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program; if not, write to the Free Software Foundation,= Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ = package org.rhq.enterprise.gui.coregui.client.admin; @@ -53,6 +53,8 @@ public class DownloadsView extends EnhancedVLayout { public static final String VIEW_PATH =3D AdministrationView.VIEW_ID + = "/" + AdministrationView.SECTION_CONFIGURATION_VIEW_ID + "/" + VIEW_ID; = + private static final String PORTAL_WAR_CONTEXT =3D "/portal"; + private final SystemGWTServiceAsync systemManager =3D GWTServiceLookup= .getSystemService(); = private SectionStack sectionStack; @@ -143,7 +145,7 @@ public class DownloadsView extends EnhancedVLayout { = StaticTextItem linkItem =3D new StaticTextItem("agentLink"= ); linkItem.setTitle(MSG.common_label_link()); - linkItem.setValue("" + linkItem.setValue("" + MSG.view_admin_downloads_agent_link_value(version, b= uild) + ""); = SpacerItem spacerItem =3D new SpacerItem("agentSpacer"); @@ -194,7 +196,7 @@ public class DownloadsView extends EnhancedVLayout { = StaticTextItem linkItem =3D new StaticTextItem("cliLink"); linkItem.setTitle(MSG.common_label_link()); - linkItem.setValue("" + linkItem.setValue("" + MSG.view_admin_downloads_cli_link_value(version, bui= ld) + ""); = SpacerItem spacerItem =3D new SpacerItem("clientSpacer"); diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterpris= e/gui/coregui/server/gwt/SystemGWTServiceImpl.java b/modules/enterprise/gui= /coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SystemGWTS= erviceImpl.java index 168522d..9792b5f 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/c= oregui/server/gwt/SystemGWTServiceImpl.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/c= oregui/server/gwt/SystemGWTServiceImpl.java @@ -1,6 +1,6 @@ /* * RHQ Management Platform - * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2005-2013 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -13,8 +13,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program; if not, write to the Free Software Foundation,= Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package org.rhq.enterprise.gui.coregui.server.gwt; = @@ -48,6 +48,8 @@ public class SystemGWTServiceImpl extends AbstractGWTServ= iceImpl implements Syst = private static final long serialVersionUID =3D 1L; = + private static final String PORTAL_WAR_CONTEXT =3D "/portal"; + private SystemManagerLocal systemManager =3D LookupUtil.getSystemManag= er(); private AgentManagerLocal agentManager =3D LookupUtil.getAgentManager(= ); private RemoteClientManagerLocal remoteClientManager =3D LookupUtil.ge= tRemoteClientManager(); @@ -136,7 +138,7 @@ public class SystemGWTServiceImpl extends AbstractGWTSe= rviceImpl implements Syst HashMap map =3D new HashMap(fi= les.size()); for (File file : files) { // key is the filename, value is the relative URL to downl= oad the file from the server - map.put(file.getName(), "/downloads/connectors/" + file.ge= tName()); + map.put(file.getName(), PORTAL_WAR_CONTEXT + "/downloads/c= onnectors/" + file.getName()); } return map; } catch (Throwable t) { @@ -156,7 +158,7 @@ public class SystemGWTServiceImpl extends AbstractGWTSe= rviceImpl implements Syst HashMap ret =3D new HashMap(files.size()); = for (File file : files) { - ret.put(file.getName(), "/downloads/cli-alert-scripts/= " + file.getName()); + ret.put(file.getName(), PORTAL_WAR_CONTEXT + "/downloa= ds/cli-alert-scripts/" + file.getName()); } return ret; } @@ -176,7 +178,7 @@ public class SystemGWTServiceImpl extends AbstractGWTSe= rviceImpl implements Syst HashMap ret =3D new HashMap(files.size()); = for (File file : files) { - ret.put(file.getName(), "/downloads/script-modules/" += file.getName()); + ret.put(file.getName(), PORTAL_WAR_CONTEXT + "/downloa= ds/script-modules/" + file.getName()); } return ret; } @@ -205,7 +207,7 @@ public class SystemGWTServiceImpl extends AbstractGWTSe= rviceImpl implements Syst } File file =3D files.get(0); HashMap ret =3D new HashMap(1); - ret.put(file.getName(), "/downloads/bundle-deployer/" + file.g= etName()); + ret.put(file.getName(), PORTAL_WAR_CONTEXT + "/downloads/bundl= e-deployer/" + file.getName()); return ret; } catch (Throwable t) { throw getExceptionToThrowToClient(t); @@ -297,4 +299,4 @@ public class SystemGWTServiceImpl extends AbstractGWTSe= rviceImpl implements Syst } return map; } -} \ No newline at end of file +} --===============0104199481902371152==--