You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ks...@apache.org on 2012/04/29 22:34:57 UTC

svn commit: r1331990 - /incubator/ooo/ooo-site/trunk/content/download/test/download_new_dl.js

Author: kschenk
Date: Sun Apr 29 20:34:57 2012
New Revision: 1331990

URL: http://svn.apache.org/viewvc?rev=1331990&view=rev
Log:
kls -- commented out doc.writes in Marcus's new mirror selection routines. We won't be using them now but just in case.

Modified:
    incubator/ooo/ooo-site/trunk/content/download/test/download_new_dl.js

Modified: incubator/ooo/ooo-site/trunk/content/download/test/download_new_dl.js
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/test/download_new_dl.js?rev=1331990&r1=1331989&r2=1331990&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/content/download/test/download_new_dl.js (original)
+++ incubator/ooo/ooo-site/trunk/content/download/test/download_new_dl.js Sun Apr 29 20:34:57 2012
@@ -8,17 +8,17 @@ function getMirrorHost() {
 	var randVal      = ( Math.random() * 100 );
 	var MIRROR_RATIO = MIRROR_RATIO_1;
 
-	document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
+	/*document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
 	document.write( "SF is active: "  + MIRROR_SF_ACTIVE  + "<br/>" );
 	document.write( "Mirror ratio: "  + MIRROR_RATIO      + " % <br/>" );
-	document.write( "Random value: "  + randVal           + "<br/><br/>" );
+	document.write( "Random value: "  + randVal           + "<br/><br/>" );*/
 
 	// Are Apache mirrors working?
 	if ( MIRROR_ASF_ACTIVE > 0 ) {
 		// If random value is lower than ratio
         	if ( randVal < MIRROR_RATIO ) {
 			mirrorHost = "Apache";
-			document.write ("Apache wins <br/>");
+			//document.write ("Apache wins <br/>");
 			return MIRROR_APACHE_URL;
 		}
 	}
@@ -27,7 +27,7 @@ function getMirrorHost() {
 		// If random value is higher than ratio
         	if ( randVal > MIRROR_RATIO ) {
 			mirrorHost = "SourceForge";
-			document.write ("SourceForge wins <br />");
+			//document.write ("SourceForge wins <br />");
 			return MIRROR_SOURCEFORGE_URL;
 		}
 	}
@@ -51,8 +51,8 @@ function getMirrorHost() {
 			mirrorHost = "No mirror host active, what to do?";
 		}
 
-		document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
-		document.write( "<br/>" );
+		//document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+		//document.write( "<br/>" );
 	}
 
 	return mirrorHost;
@@ -63,11 +63,11 @@ function getMirrorHost_asf_sf_mb_percent
 	var randVal      = ( Math.random() * 100 );
 	var MIRROR_RATIO = MIRROR_RATIO_2;
 
-	document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
+	/*document.write( "ASF is active: " + MIRROR_ASF_ACTIVE + "<br/>" );
 	document.write( "SF is active: "  + MIRROR_SF_ACTIVE  + "<br/>" );
 	document.write( "MB is active: "  + MIRROR_MB_ACTIVE  + "<br/>" );
 	document.write( "Mirror ratio: "  + MIRROR_RATIO      + " % <br/>" );
-	document.write( "Random value: "  + randVal           + "<br/><br/>" );
+	document.write( "Random value: "  + randVal           + "<br/><br/>" );*/
 
 	// Are Apache mirrors working?
 	if ( MIRROR_ASF_ACTIVE > 0 ) {
@@ -116,8 +116,8 @@ function getMirrorHost_asf_sf_mb_percent
 			mirrorHost = "None, what to do?";
 		}
 
-		document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
-		document.write( "<br/>" );
+		//document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+		//document.write( "<br/>" );
 	}
 
 	return mirrorHost;
@@ -132,7 +132,7 @@ function getMirrorHost_asf_sf_mb_weighte
 	// Assign the random position of the weighted array
 	var mirrorHost = MIRROR_HOSTS_WEIGHTED [ randVal ];
 
-	document.write( "ASF is active: " + MIRROR_ASF_ACTIVE        + "<br/>" );
+	/*document.write( "ASF is active: " + MIRROR_ASF_ACTIVE        + "<br/>" );
 	document.write( "MB is active: "  + MIRROR_MB_ACTIVE         + "<br/>" );
 	document.write( "SF is active: "  + MIRROR_SF_ACTIVE         + "<br/>" );
 	document.write( "ASF weight: "    + MIRROR_HOSTS_WEIGHT[ 0 ] + "<br/>" );
@@ -145,6 +145,7 @@ function getMirrorHost_asf_sf_mb_weighte
 	document.write( "<br/>" );
 
 	document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
+	*/
 
 	// Defining fall back mirror host
 
@@ -177,8 +178,8 @@ function getMirrorHost_asf_sf_mb_weighte
 	&& ( MIRROR_SF_ACTIVE < 1 ) )
 		mirrorHost = "None, what to do?";
 
-	document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
-	document.write( "<br/>" );
+	//document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+	//document.write( "<br/>" );
 
 	return mirrorHost;
 }
@@ -187,7 +188,7 @@ function getMirrorHost_asf_sf_mb_weighte
 	var mirrorHost = "";
 	var weight     = MIRROR_ASF_WEIGHT + MIRROR_MB_WEIGHT + MIRROR_SF_WEIGHT;
 	var randVal    = Math.random();
-
+/*
 	document.write( "ASF is active: "  + MIRROR_ASF_ACTIVE              + "<br/>" );
 	document.write( "MB is active: "   + MIRROR_MB_ACTIVE               + "<br/>" );
 	document.write( "SF is active: "   + MIRROR_SF_ACTIVE               + "<br/>" );
@@ -200,6 +201,7 @@ function getMirrorHost_asf_sf_mb_weighte
 	document.write( "Total weight: "   + weight                         + "<br/>" );
 	document.write( "Random value: "   + randVal                        + "<br/>" );
 	document.write( "<br/>" );
+	*/
 
 	// Are Apache mirrors working?
 	if ( MIRROR_ASF_ACTIVE > 0 ) {
@@ -227,7 +229,7 @@ function getMirrorHost_asf_sf_mb_weighte
 		}
 	}
 
-	document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
+	//document.write( "Regular download goes to: " + mirrorHost + "<br/>" );
 
 	// Defining fall back mirror host
 	if ( mirrorHost == "" ) {
@@ -248,8 +250,8 @@ function getMirrorHost_asf_sf_mb_weighte
 			mirrorHost = "None, what to do?";
 		}
 
-		document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
-		document.write( "<br/>" );
+		//document.write( "Fall back download goes to: " + mirrorHost + "<br/>" );
+		//document.write( "<br/>" );
 	}
 
 	return mirrorHost;