From 57514f875a16604491ec73c3a8bfbfe6370121bf Mon Sep 17 00:00:00 2001 From: Shireesh Anjal Date: Sun, 7 Aug 2011 17:07:22 +0530 Subject: Modified the html to correctly redirect to 32 bit windows url in case the browser is running in wow64 (32 bit windows running on 64 bit windows) mode. --- .../storage/management/console/GlusterDataModelManager.java | 4 ++-- src/com.gluster.storage.management.gateway/WebContent/index.html | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterDataModelManager.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterDataModelManager.java index f9474ab4..cd7639f6 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterDataModelManager.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterDataModelManager.java @@ -102,10 +102,10 @@ public class GlusterDataModelManager { public void initializeModel(String clusterName, IProgressMonitor monitor) { setClusterName(clusterName); - model = fetchData(clusterName, monitor); + model = fetchData(monitor); } - private GlusterDataModel fetchData(String clusterName, IProgressMonitor monitor) { + private GlusterDataModel fetchData(IProgressMonitor monitor) { GlusterDataModel model = fetchModel(monitor); initializeAlerts(model.getCluster()); diff --git a/src/com.gluster.storage.management.gateway/WebContent/index.html b/src/com.gluster.storage.management.gateway/WebContent/index.html index 4343d66c..9b7e28cd 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/index.html +++ b/src/com.gluster.storage.management.gateway/WebContent/index.html @@ -54,7 +54,12 @@ // following code verifies this by looking at text WOW64/Win64 in userAgent if ( navigator.userAgent != null ) { var userAgent = navigator.userAgent.toLowerCase(); - if( userAgent.indexOf ( "wow64" ) != -1 || userAgent.indexOf ( "win64" ) != -1 || userAgent.indexOf ( "x64" ) != -1 ) { + if( userAgent.indexOf ( "wow64" ) != -1 ) { + // browser running in compatibility mode (32 bit) inside a 64 bit Windows OS + // In such cases, we should re-direct to the 32 bit URL as the java webstart + // plug-in in the browser will also be 32 bit. + arch = "x86"; + } else if ( userAgent.indexOf ( "win64" ) != -1 || userAgent.indexOf ( "x64" ) != -1 ) { arch = "x86_64"; } } -- cgit