You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2015/04/02 11:54:13 UTC

svn commit: r1670871 - /comdev/reporter.apache.org/site/render.js

Author: humbedooh
Date: Thu Apr  2 09:54:12 2015
New Revision: 1670871

URL: http://svn.apache.org/r1670871
Log:
sync with disk

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=1670871&r1=1670870&r2=1670871&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/render.js (original)
+++ comdev/reporter.apache.org/site/render.js Thu Apr  2 09:54:12 2015
@@ -115,6 +115,11 @@ function setReportDate(json, x) {
 		nextdate = dates.shift();
 	}
 	reportdate.innerHTML += "<b>Next report date: " + (nextdate ? nextdate.toDateString() : "Unknown(?)") + "</b>"
+	if (nextdate) {
+		var link = "https://svn.apache.org/repos/private/foundation/board/board_agenda_" +  nextdate.getFullYear() + "_" + (nextdate.getMonth() < 9 ? "0" : "") + (nextdate.getMonth() +1) + "_" + nextdate.getDate() + ".txt"
+		reportdate.innerHTML += "<br/>File your report in <a href='"+link+"'>"+link+"</a> when it has been seeded."
+	}
+	
 }
 
 function buildPanel(pmc, title) {
@@ -192,6 +197,8 @@ function renderFrontPage(json) {
 	container.appendChild(pcontainer)
 
 	var sproject = document.location.search.substr(1);
+	var hcolors = ["#000070", "#007000", "#407000", "#70500", "#700000", "#A00000"]
+	var hvalues = ["Super Healthy", "Healthy", "Mostly Okay", "Unhealthy", "Action required!", "URGENT ACTION REQUIRED!"]
 	for (i in json.pmcs) {
 
 		var pmc = json.pmcs[i]
@@ -220,7 +227,12 @@ function renderFrontPage(json) {
 		var title = document.createElement('h2')
 		title.innerHTML = json.pdata[pmc].name ? json.pdata[pmc].name : pmc
 		obj.appendChild(title)
-
+		var health = document.createElement('p');
+		if (json.health[pmc] && !isNaN(json.health[pmc]['cscore'])) {
+			health.style.marginTop = "10px"
+			health.innerHTML = "<b>Project Health score:</b> <a href='/chi.py#"+pmc+"'><u><font color='" + hcolors[json.health[pmc]['cscore']] + "'>" + (json.health[pmc]['score']*-1.00).toFixed(2) + " (" + hvalues[json.health[pmc]['cscore']] + ")</u></font></a>"
+			obj.appendChild(health)
+		}
 		pcontainer.appendChild(obj)
 
 
@@ -254,7 +266,7 @@ function renderFrontPage(json) {
 		addLine(pmc)
 		addLine(pmc, " - Currently " + json.count[pmc][1] + " committers and " + json.count[pmc][0] + " PMC members in the project.")
 		if (c == 0) {
-			changes.innerHTML += "<font color='red'><b>No new changes to the PMC or committer base detected</b></font>"
+			changes.innerHTML += "<font color='red'><b>No new changes to the PMC or committer base detected - (LDAP error or no changes for &gt;2 years)</b></font>"
 			addLine(pmc, " - No new changes to the PMC or committership since last report.")
 			addLine(pmc)
 		} else {
@@ -331,6 +343,9 @@ function renderFrontPage(json) {
 					addLine(pmc, " - Last committer addition was " + ncn + " at " + new Date(nc * 1000).toDateString())
 				}
 				changes.innerHTML += "&rarr; " + "<b>Latest committer addition: </b>" + new Date(nc * 1000).toDateString() + " (" + ncn + ")<br/>"
+			} else {
+				addLine(pmc, " - Last committer addition was more than 2 years ago")
+				changes.innerHTML += "&rarr; " + "<b>Latest committer addition: </b><font color='red'>more than two years ago (not in the archive!)</font><br/>"
 			}
 			changes.innerHTML += "&rarr; " + "<b>Currently " + json.count[pmc][1] + " committers and " + json.count[pmc][0] + " PMC members."
 			addLine(pmc)
@@ -602,7 +617,7 @@ function mergeData(json, pmc) {
 		}
 	}
 	
-	var todo = new Array('count', 'mail', 'delivery', 'jira', 'changes', 'pdata', 'releases', 'keys')
+	var todo = new Array('count', 'mail', 'delivery', 'jira', 'changes', 'pdata', 'releases', 'keys', 'health')
 	for (i in todo) {
 		var key = todo[i]
 		jsdata[key][pmc] = json[key][pmc];
@@ -652,9 +667,6 @@ function renderChart(json, name, contain
 
 	var odp = new Date();
 	odp.setMonth(odp.getMonth() - 6);
-	if (dp.getMonth() - 6 < 0) {
-		odp.setYear(odp.getYear() - 1)
-	}
 
 	difference = 0
 	for (i in dates) {