incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r811829 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/ content/download/test/download_new_dl.js content/download/test/globalvars_new_dl.js content/download/test/index_new_dl.html
Date Sat, 07 Apr 2012 13:58:33 GMT
Author: buildbot
Date: Sat Apr  7 13:58:33 2012
New Revision: 811829

Log:
Staging update by buildbot for openofficeorg

Added:
    websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js
    websites/staging/ooo-site/trunk/content/download/test/globalvars_new_dl.js
    websites/staging/ooo-site/trunk/content/download/test/index_new_dl.html
Modified:
    websites/staging/ooo-site/trunk/cgi-bin/   (props changed)
    websites/staging/ooo-site/trunk/content/   (props changed)

Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Apr  7 13:58:33 2012
@@ -1 +1 @@
-1310764
+1310774

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Apr  7 13:58:33 2012
@@ -1 +1 @@
-1310764
+1310774

Added: websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js (added)
+++ websites/staging/ooo-site/trunk/content/download/test/download_new_dl.js Sat Apr  7 13:58:33
2012
@@ -0,0 +1,112 @@
+/*
+ * get mirror host
+ * depends on which mirror is ready to receive load
+ */
+
+function getMirrorHost() {
+	var mirrorHost   = "";
+	var randVal      = ( Math.random() * 100 );
+	var MIRROR_RATIO = MIRROR_RATIO_1;
+
+	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/>" );
+
+	// Are Apache mirrors working?
+	if ( MIRROR_ASF_ACTIVE > 0 ) {
+		// If random value is lower than ratio
+        	if ( randVal < MIRROR_RATIO ) {
+			mirrorHost = "Apache";
+		}
+	}
+	// Are SourceForge mirrors working?
+	if ( MIRROR_SF_ACTIVE > 0 ) {
+		// If random value is higher than ratio
+        	if ( randVal > MIRROR_RATIO ) {
+			mirrorHost = "SourceForge";
+		}
+	}
+
+	document.write( "Regular download goes to: " + mirrorHost + "<br/><br/>" );
+
+	// Defining fall back mirror host
+	if ( mirrorHost == "" ) {
+		// Are Apache mirrors working?
+		if ( MIRROR_ASF_ACTIVE > 0 ) {
+			mirrorHost = "Apache";
+
+		// Else are SourceForge mirrors working?
+		} else if ( MIRROR_SF_ACTIVE > 0 ) {
+			mirrorHost = "SourceForge";
+
+		// None is working, we have a problem
+		} else {
+			mirrorHost = "No mirror host active, what to do?";
+		}
+
+		document.write( "Fall back download goes to: " + mirrorHost + "<br/><br/>"
);
+	}
+
+	return mirrorHost;
+}
+
+function getMirrorHost_asf_sf_mb() {
+	var mirrorHost = "";
+	var randVal    = ( Math.random() * 100 );
+	var MIRROR_RATIO = MIRROR_RATIO_2;
+
+	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/>" );
+
+	// Are Apache mirrors working?
+	if ( MIRROR_ASF_ACTIVE > 0 ) {
+		// If random value is lower than ratio
+        	if ( randVal < MIRROR_RATIO ) {
+			mirrorHost = "Apache";
+		}
+	}
+	// Are SourceForge mirrors working?
+	if ( MIRROR_SF_ACTIVE > 0 ) {
+		// If random value is higher than ratio and lower than ratio * 2
+        	if ( ( randVal > MIRROR_RATIO ) && ( randVal < ( MIRROR_RATIO * 2
) ) ) {
+			mirrorHost = "SourceForge";
+		}
+	}
+
+	// Are Mirrorbrain mirrors working?
+	if ( MIRROR_MB_ACTIVE > 0 ) {
+		// If random value is higher than ratio * 2
+        	if ( randVal > ( MIRROR_RATIO * 2 ) ) {
+			mirrorHost = "MirrorBrain";
+		}
+	}
+	document.write( "Regular download goes to: " + mirrorHost + "<br/><br/>" );
+
+	// Defining fall back mirror host
+	if ( mirrorHost == "" ) {
+		// Are Apache mirrors working?
+		if ( MIRROR_ASF_ACTIVE > 0 ) {
+			mirrorHost = "Apache";
+
+		// Else are SourceForge mirrors working?
+		} else if ( MIRROR_SF_ACTIVE > 0 ) {
+			mirrorHost = "SourceForge";
+
+		// Else are MirrorBrain mirrors working?
+		} else if ( MIRROR_MB_ACTIVE > 0 ) {
+			mirrorHost = "MirrorBrain";
+
+		// None is working, we have a problem
+		} else {
+			mirrorHost = "None, what to do?";
+		}
+
+		document.write( "Fall back download goes to: " + mirrorHost + "<br/><br/>"
);
+	}
+
+	return mirrorHost;
+}

Added: websites/staging/ooo-site/trunk/content/download/test/globalvars_new_dl.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/globalvars_new_dl.js (added)
+++ websites/staging/ooo-site/trunk/content/download/test/globalvars_new_dl.js Sat Apr  7
13:58:33 2012
@@ -0,0 +1,36 @@
+/* This file is to maintain version information that can be used
+   on all websites via JavaScript when including this file.
+
+   Instead of hard coded version data please use these variables.
+   Example:
+
+   Wrong:   "We are proud to announce the availability of our new
+             OpenOffice.org 3.0.0 release."
+   Correct: "We are proud to announce the availability of our new
+             OpenOffice.org " + VERSION + " release."
+
+   MIRROR:  should be "bouncer" or "mirrorbrain"
+   SCHEMA:  reflects the download-set naming-schema with "old" or "new"
+*/
+
+// The supported mirror hosts, 0 means not ready to receive load
+// The mirror ratio in percent
+var MIRROR_ASF_ACTIVE = 0;
+var MIRROR_SF_ACTIVE  = 1;
+var MIRROR_MB_ACTIVE  = 1;
+var MIRROR_RATIO_1    = 75;
+var MIRROR_RATIO_2    = 33;
+
+// Exchange the variables resp. its content to switch the MirrorBrain server
+var MIRROR_BOUNCER_URL      = "http://openoffice.bouncer.osuosl.org/";
+var MIRROR_MIRRORBRAIN_URL  = "http://openoffice.mirrorbrain.org/";
+// var MIRROR_MIRRORBRAIN_URL = "http://download.services.openoffice.org/";
+var MIRROR_SOURCEFORGE_URL  = "http://sourceforge.net/projects/openofficeorg.mirror/";
+
+// Variables to shortcut long URLs
+var MIRROR_MAC_PPC_URL      = "http://ooopackages.good-day.net/pub/OpenOffice.org/contrib/macosppc/";
+var MIRROR_FREEBSD32_URL    = "http://ooopackages.good-day.net/pub/OpenOffice.org/contrib/freebsdx86/";
+var MIRROR_FREEBSD64_URL    = "http://ooopackages.good-day.net/pub/OpenOffice.org/contrib/freebsdx86-64/";
+var MIRROR_EXT_URL          = MIRROR_MIRRORBRAIN_URL + "files/extended/";
+var MIRROR_LOC_URL          = MIRROR_MIRRORBRAIN_URL + "files/localized/";
+var MIRROR_STABLE_URL       = MIRROR_MIRRORBRAIN_URL + "files/stable/";

Added: websites/staging/ooo-site/trunk/content/download/test/index_new_dl.html
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/index_new_dl.html (added)
+++ websites/staging/ooo-site/trunk/content/download/test/index_new_dl.html Sat Apr  7 13:58:33
2012
@@ -0,0 +1,51 @@
+<!--#include virtual="/doctype.html" -->
+<html>
+<head>
+<link href="/css/ooo.css" rel="stylesheet" type="text/css">
+
+
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <title>Apache OpenOffice Downloads</title>
+  <script type="text/javascript" src="globalvars_new_dl.js"></script>
+  <script type="text/javascript" src="download_new_dl.js"></script>
+
+</head>
+<body>
+<!--#include virtual="/brand.html" -->
+  <div id="topbara">
+    <!--#include virtual="/topnav.html" -->
+    <div id="breadcrumbsa"><a href="/">home</a>&nbsp;&raquo;&nbsp;<a
href="/download/">download</a>&nbsp;&raquo;&nbsp;<a href="/download/test/">test</a></div>
+  </div>
+  <div id="clear"></div>
+  
+  
+  <div id="content">
+    
+    
+    
+
+<div class="optionset">
+
+  <script type="text/javascript">
+  <!--
+  document.write ( "<h2>This page is to test how to get download requests to more than
one mirror hosts:</h2>" );
+  document.write ( "<h3>1. Mirror hosts are: Apache, SourceForge</h3>" );
+
+  getMirrorHost();
+
+  document.write ( "<h3>2. Mirror hosts are: Apache, SourceForge, MirrorBrain</h3>"
);
+
+  getMirrorHost_asf_sf_mb();
+
+  //-->
+  </script>
+
+</div>
+
+
+  </div>
+
+<!--#include virtual="/footer.html" -->
+
+</body>
+</html>



Mime
View raw message