community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1664413 - /comdev/reporter.apache.org/site/render.js
Date Thu, 05 Mar 2015 17:00:30 GMT
Author: humbedooh
Date: Thu Mar  5 17:00:30 2015
New Revision: 1664413

URL: http://svn.apache.org/r1664413
Log:
- bit more emphasis
- Be better at turning version numbers into floats for the release chart

Modified:
    comdev/reporter.apache.org/site/render.js

Modified: comdev/reporter.apache.org/site/render.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/render.js?rev=1664413&r1=1664412&r2=1664413&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/render.js (original)
+++ comdev/reporter.apache.org/site/render.js Thu Mar  5 17:00:30 2015
@@ -209,7 +209,7 @@ function renderFrontPage(json) {
 	addLine(pmc)
 	
 	addLine(pmc, "## Activity:")
-	addLine(pmc, " - <font color='red'>TODO - the PMC MUST provide this information</font>")
+	addLine(pmc, " - <font color='red'>TODO - the PMC <b><u>MUST</u></b>
provide this information</font>")
 	addLine(pmc)
 
 	addLine(pmc, "## Issues:")
@@ -652,12 +652,20 @@ function renderReleaseChart(releases, na
     var chartDiv = document.createElement('div')
     chartDiv.setAttribute("id", name + "_releasechart")
     var narr = []
+	var maxLen = 1;
+	for (version in releases) {
+		var x = version.match(/(\d+)\.(\d+)/)
+		if (x && x[2].length > maxLen) {
+			maxLen = x[2].length;
+		}
+	}
     for (version in releases) {
 		if (new Date(releases[version]*1000).getFullYear() >= 1999 ) {
 			var major = parseFloat(version) ? parseFloat(version) : 1
-			var x = version.match(/(\d+\.\d+)\.\d+/)
+			var x = version.match(/(\d+)\.(\d+)/)
 			if (x) {
-				major = parseFloat(x[1])
+				while (x[2].length < maxLen) { x[2] = "0" + x[2] }
+				major = parseFloat(x[1] + "." + x[2])
 			}
 			narr.push([new Date(releases[version]*1000), major , version + " - " + new Date(releases[version]*1000).toDateString()])
 		}



Mime
View raw message