spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject svn commit: r1624639 - in /spark: downloads.md js/downloads.js site/downloads.html site/js/downloads.js
Date Fri, 12 Sep 2014 20:36:11 GMT
Author: pwendell
Date: Fri Sep 12 20:36:11 2014
New Revision: 1624639

URL: http://svn.apache.org/r1624639
Log:
Adding pretty titles for download links.


Modified:
    spark/downloads.md
    spark/js/downloads.js
    spark/site/downloads.html
    spark/site/js/downloads.js

Modified: spark/downloads.md
URL: http://svn.apache.org/viewvc/spark/downloads.md?rev=1624639&r1=1624638&r2=1624639&view=diff
==============================================================================
--- spark/downloads.md (original)
+++ spark/downloads.md Fri Sep 12 20:36:11 2014
@@ -24,10 +24,7 @@ The latest release of Spark is Spark 1.1
   <select id="sparkVersionSelect" onChange="javascript:onVersionSelect();"></select><br>
 
 2. Chose a package type:
-  <select id="sparkPackageSelect" onChange="javascript:onPackageSelect();"></select>
-  <br><em>Note: Spark can be <a href="{{site.url}}docs/latest/building-with-maven.html">

-  built from source</a> for many other Hadoop versions.</em>
-  <br>
+  <select id="sparkPackageSelect" onChange="javascript:onPackageSelect();"></select><br>
 
 3. Chose a download type:
   <select id="sparkDownloadSelect" onChange="javascript:onDownloadSelect()"></select><br>

Modified: spark/js/downloads.js
URL: http://svn.apache.org/viewvc/spark/js/downloads.js?rev=1624639&r1=1624638&r2=1624639&view=diff
==============================================================================
--- spark/js/downloads.js (original)
+++ spark/js/downloads.js Fri Sep 12 20:36:11 2014
@@ -7,15 +7,24 @@ function addRelease(version, releaseDate
   releases[version] = {released: releaseDate, packages: packages, downloadable: downloadable};
 }
 
-var sources = ["sources"];
+var sources = {pretty: "Source Code [can build several Hadoop versions]", tag: "sources"};
+var hadoop1 = {pretty: "Pre-built for Hadoop 1.X", tag: "hadoop1"};
+var cdh4 = {pretty: "Pre-built for CDH 4", tag: "cdh4"};
+var hadoop2 = {pretty: "Pre-built for Hadoop 2.2", tag: "hadoop2"};
+var hadoop2p3 = {pretty: "Pre-built for Hadoop 2.3", tag: "hadoop2.3"};
+var hadoop2p4 = {pretty: "Pre-built for Hadoop 2.4", tag: "hadoop2.4"};
+var mapr3 = {pretty: "Pre-built for MapR 3.X", tag: "mapr3"};
+var mapr4 = {pretty: "Pre-built for MapR 4.X", tag: "mapr4"};
+
+var sourcePackage = [sources];
 // 0.7+
-var packagesV1 = sources.concat(["hadoop1", "cdh4"]);
+var packagesV1 = sourcePackage.concat([hadoop1, cdh4]);
 // 0.8.1+
-var packagesV2 = packagesV1.concat(["hadoop2"]);
+var packagesV2 = packagesV1.concat([hadoop2]);
 // 1.0.1+
-var packagesV3 = packagesV2.concat(["mapr3", "mapr4"]);
+var packagesV3 = packagesV2.concat([mapr3, mapr4]);
 // 1.1.0+
-var packagesV4 = packagesV1.concat(["hadoop2.3", "hadoop2.4", "mapr3", "mapr4"]);
+var packagesV4 = packagesV1.concat([hadoop2p3, hadoop2p4, mapr3, mapr4]);
 
 addRelease("1.1.0", new Date("9/11/2014"), packagesV4, true);
 addRelease("1.0.2", new Date("8/5/2014"), packagesV3, true);
@@ -87,7 +96,10 @@ function onVersionSelect() {
   var version = getSelectedValue(versionSelect);
   var packages = releases[version]["packages"];
   for (var idx in packages) {
-    append(packageSelect, "<option>" + packages[idx] + "</option>")
+    var option = "<option value=$tag> $pretty </option>"
+      .replace(/\$tag/, packages[idx].tag)
+      .replace(/\$pretty/, packages[idx].pretty);
+    append(packageSelect, option);
   }
 
   var href = "http://www.apache.org/dist/spark/spark-" + version + "/";

Modified: spark/site/downloads.html
URL: http://svn.apache.org/viewvc/spark/site/downloads.html?rev=1624639&r1=1624638&r2=1624639&view=diff
==============================================================================
--- spark/site/downloads.html (original)
+++ spark/site/downloads.html Fri Sep 12 20:36:11 2014
@@ -182,10 +182,7 @@ $(document).ready(function() {
   </li>
   <li>
     <p>Chose a package type:
-  <select id="sparkPackageSelect" onchange="javascript:onPackageSelect();"></select>
-  <br /><em>Note: Spark can be <a href="/docs/latest/building-with-maven.html">

-  built from source</a> for many other Hadoop versions.</em>
-  <br /></p>
+  <select id="sparkPackageSelect" onchange="javascript:onPackageSelect();"></select><br
/></p>
   </li>
   <li>
     <p>Chose a download type:

Modified: spark/site/js/downloads.js
URL: http://svn.apache.org/viewvc/spark/site/js/downloads.js?rev=1624639&r1=1624638&r2=1624639&view=diff
==============================================================================
--- spark/site/js/downloads.js (original)
+++ spark/site/js/downloads.js Fri Sep 12 20:36:11 2014
@@ -7,15 +7,24 @@ function addRelease(version, releaseDate
   releases[version] = {released: releaseDate, packages: packages, downloadable: downloadable};
 }
 
-var sources = ["sources"];
+var sources = {pretty: "Source Code [can build several Hadoop versions]", tag: "sources"};
+var hadoop1 = {pretty: "Pre-built for Hadoop 1.X", tag: "hadoop1"};
+var cdh4 = {pretty: "Pre-built for CDH 4", tag: "cdh4"};
+var hadoop2 = {pretty: "Pre-built for Hadoop 2.2", tag: "hadoop2"};
+var hadoop2p3 = {pretty: "Pre-built for Hadoop 2.3", tag: "hadoop2.3"};
+var hadoop2p4 = {pretty: "Pre-built for Hadoop 2.4", tag: "hadoop2.4"};
+var mapr3 = {pretty: "Pre-built for MapR 3.X", tag: "mapr3"};
+var mapr4 = {pretty: "Pre-built for MapR 4.X", tag: "mapr4"};
+
+var sourcePackage = [sources];
 // 0.7+
-var packagesV1 = sources.concat(["hadoop1", "cdh4"]);
+var packagesV1 = sourcePackage.concat([hadoop1, cdh4]);
 // 0.8.1+
-var packagesV2 = packagesV1.concat(["hadoop2"]);
+var packagesV2 = packagesV1.concat([hadoop2]);
 // 1.0.1+
-var packagesV3 = packagesV2.concat(["mapr3", "mapr4"]);
+var packagesV3 = packagesV2.concat([mapr3, mapr4]);
 // 1.1.0+
-var packagesV4 = packagesV1.concat(["hadoop2.3", "hadoop2.4", "mapr3", "mapr4"]);
+var packagesV4 = packagesV1.concat([hadoop2p3, hadoop2p4, mapr3, mapr4]);
 
 addRelease("1.1.0", new Date("9/11/2014"), packagesV4, true);
 addRelease("1.0.2", new Date("8/5/2014"), packagesV3, true);
@@ -87,7 +96,10 @@ function onVersionSelect() {
   var version = getSelectedValue(versionSelect);
   var packages = releases[version]["packages"];
   for (var idx in packages) {
-    append(packageSelect, "<option>" + packages[idx] + "</option>")
+    var option = "<option value=$tag> $pretty </option>"
+      .replace(/\$tag/, packages[idx].tag)
+      .replace(/\$pretty/, packages[idx].pretty);
+    append(packageSelect, option);
   }
 
   var href = "http://www.apache.org/dist/spark/spark-" + version + "/";



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message