admin@glassfish.java.net

Code review : Sailfin Bug 892

From: Irfan Ahmed <irfan_at_sun.com>
Date: Thu, 22 May 2008 13:24:18 +0530

Hi Anissa,

Please review the code changes for Sailfin bug 892.

We have a new name for Sailfin and we need to reflect the name the
logout message. The changes are similar to the ones I have done for name
changes. Also I have changed the code to pick up the upselling URLs from
the Strings.properties so that we can have different URLs for Sailfin
without changing the GF code.

Diffs are attached.

Thanks and Warm Rgds
Irfan.
-- 
Irfan Ahmed
Staff Engineer, Sun Microsystems Inc., Bangalore, India.
(0) 9180-66927726, email: irfan_at_sun.com


Index: glassfish/admin-gui/src/docroot/header.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/header.jsf,v
retrieving revision 1.12.2.2
diff -u -r1.12.2.2 header.jsf
--- glassfish/admin-gui/src/docroot/header.jsf 11 Jan 2008 01:07:11 -0000 1.12.2.2
+++ glassfish/admin-gui/src/docroot/header.jsf 22 May 2008 07:50:39 -0000
@@ -83,7 +83,7 @@
                    </facet>
                     <!facet logoutLink>
                         <sun:hyperlink id="logoutLink" toolTip="$resource{i18n.logoutTooltip}" target="_top" text="$resource{i18n.masthead.Logout}"
- onClick="if (!confirm('$resource{i18n.msg.JS.confirmLogout}')) return false;" onKeyPress="javascript: return true;" >
+ onClick="if (!confirm('#{logoutConfirmMsg}')) return false;" onKeyPress="javascript: return true;" >
                             <!command
                                 navigate("/index.jsf");
                                 logout();
Index: glassfish/admin-gui/src/docroot/homePage.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/homePage.jsf,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 homePage.jsf
--- glassfish/admin-gui/src/docroot/homePage.jsf 18 Dec 2007 06:19:12 -0000 1.5.2.1
+++ glassfish/admin-gui/src/docroot/homePage.jsf 22 May 2008 07:50:39 -0000
@@ -63,11 +63,11 @@
                    />
                 <!if !#{supportCluster}>
                 <sun:frame name="home" title="$resource{i18n.display.contentArea}" scrolling="auto" url="/commonTask.jsf" marginHeight="$int{10}" marginWidth="$int{20}" longdesc="" />
- <sun:frame name="upselling" title="$resource{i18n.display.contentArea}" scrolling="auto" url="http://www.sun.com/software/products/appsrvr/promotions/appserver9_1pe.html" marginHeight="$int{10}" marginWidth="$int{20}" longdesc=""/>
+ <sun:frame name="upselling" title="$resource{i18n.display.contentArea}" scrolling="auto" url="#{upsellingURLPE}" marginHeight="$int{10}" marginWidth="$int{20}" longdesc=""/>
                 </!if>
         <!if #{supportCluster}>
                 <sun:frame name="home" title="$resource{i18n.display.contentArea}" scrolling="auto" url="/clusterCommonTask.jsf" marginHeight="$int{10}" marginWidth="$int{20}" longdesc="" />
- <sun:frame name="upselling" title="$resource{i18n.display.contentArea}" scrolling="auto" url="http://www.sun.com/software/products/appsrvr/promotions/appserver9_1ee.html" marginHeight="$int{10}" marginWidth="$int{20}" longdesc="" />
+ <sun:frame name="upselling" title="$resource{i18n.display.contentArea}" scrolling="auto" url="#{upsellingURLEE}" marginHeight="$int{10}" marginWidth="$int{20}" longdesc="" />
                 </!if>
         </sun:frameSet>
 
Index: glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/handlers/CommonHandlers.java
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/handlers/CommonHandlers.java,v
retrieving revision 1.16.6.5
diff -u -r1.16.6.5 CommonHandlers.java
--- glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/handlers/CommonHandlers.java 16 Jan 2008 21:51:52 -0000 1.16.6.5
+++ glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/handlers/CommonHandlers.java 22 May 2008 07:50:40 -0000
@@ -233,7 +233,10 @@
         sessionMap.put("fullProductName", GuiUtil.getMessage("versionImage.description"));
         sessionMap.put("loginButtonTooltip", GuiUtil.getMessage("loginButtonTooltip"));
         sessionMap.put("mastHeadDescription", GuiUtil.getMessage("mastHeadDescription"));
-
+ sessionMap.put("logoutConfirmMsg", GuiUtil.getMessage("msg.JS.confirmLogout"));
+ sessionMap.put("upsellingURLPE", GuiUtil.getMessage("upselling.url.pe"));
+ sessionMap.put("upsellingURLEE", GuiUtil.getMessage("upselling.url.ee"));
+
         // showLoadBalancer is a Sailfin specific attribute. Sailfin uses Converged LB instead
         // of HTTP LB. It is true for GF and false for Sailfin. In sailfin this is set in
         // com.sun.extensions.comms.SipUtilities.initProductInfoAttributes() called for Sailfin in login.jsf
Index: glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/resources/Strings.properties
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/resources/Strings.properties,v
retrieving revision 1.132.2.7
diff -u -r1.132.2.7 Strings.properties
--- glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/resources/Strings.properties 14 May 2008 04:49:19 -0000 1.132.2.7
+++ glassfish/admin-gui/src/java/com/sun/enterprise/tools/admingui/resources/Strings.properties 22 May 2008 07:50:45 -0000
@@ -53,6 +53,8 @@
 shutdown.RestartStep1=login to the machine where domain is installed.
 shutdown.RestartStep2=run <tt>&lt;appserver-installation-directory&gt;/bin/asadmin list-domains</tt> to ensure that the domain shutdown process is complete
 shutdown.RestartStep3=run <tt>&lt;appserver-installation-directory&gt;/bin/asadmin start-domain</tt> command with appropriate parameters.
+upselling.url.pe=http://www.sun.com/software/products/appsrvr/promotions/appserver9_1pe.html
+upselling.url.ee=http://www.sun.com/software/products/appsrvr/promotions/appserver9_1ee.html
 
 # Tree Node Name
 peTree=Developer Profile Tree
Index: glassfish/admin-gui/src/java/com/sun/extensions/comms/SipUtilities.java
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/java/com/sun/extensions/comms/Attic/SipUtilities.java,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 SipUtilities.java
--- glassfish/admin-gui/src/java/com/sun/extensions/comms/SipUtilities.java 10 Apr 2008 05:07:50 -0000 1.1.2.6
+++ glassfish/admin-gui/src/java/com/sun/extensions/comms/SipUtilities.java 22 May 2008 07:50:45 -0000
@@ -146,7 +146,12 @@
         sessionMap.put("mastHeadDescription", msgUtil.getMessage(SIP_RESOURCE_BUNDLE, "mastHeadDescription"));
         
         sessionMap.put("showLoadBalancer", false);
-
+ sessionMap.put("logoutConfirmMsg", msgUtil.getMessage(SIP_RESOURCE_BUNDLE,
+ "logoutConfirmMsg"));
+ sessionMap.put("upsellingURLPE", msgUtil.getMessage(SIP_RESOURCE_BUNDLE,
+ "upselling.comms.url.pe"));
+ sessionMap.put("upsellingURLEE", msgUtil.getMessage(SIP_RESOURCE_BUNDLE,
+ "upselling.comms.url.ee"));
         sessionMap.put("_SIP_INFO_SESSION_INITIALIZED", "TRUE");
     }