community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1663707 - /comdev/reporter.apache.org/site/render.js
Date Tue, 03 Mar 2015 14:14:49 GMT
Author: humbedooh
Date: Tue Mar  3 14:14:49 2015
New Revision: 1663707

URL: http://svn.apache.org/r1663707
Log:
prefer certain mailing lists before the rest in the list

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=1663707&r1=1663706&r2=1663707&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/render.js (original)
+++ comdev/reporter.apache.org/site/render.js Tue Mar  3 14:14:49 2015
@@ -344,42 +344,94 @@ function renderFrontPage(json) {
 	var f = 0
 	addLine(pmc, "Mailing list activity:")
 	addLine(pmc)
-	for (ml in json.mail[pmc]) {
+	var first = ['users', 'dev', 'commits', 'private', 'bugs', 'modules-dev'];
+	
+	
+	for (i in first) {
 	    f++;
-	    if (ml != prev && ml.search("infra") < 0) {
-		prev = ml
-		var x = renderChart(json.mail[pmc], ml, obj)
-		var total = x[0]
-		var diff = x[1]
-		var div = x[2]
-		var d = ml.split(".org-");
-		var mlname = d[1] + "@" + d[0] + ".org"
-		var lookup = d[0].split(/\./)[0] + "-" + d[1]
-		add = ""
-		if (json.delivery[pmc][lookup]) {
-			add = ":\n    " + json.delivery[pmc][lookup][0] + " emails sent to list (" + json.delivery[pmc][lookup][1]
+ " in previous quarter)";
-		}
-		var text = "Currently: " + total + " subscribers <font color='green'>(up " + diff
+ " in the last 3 months)</font>"
-		if (diff < 0) {
-		    text = "Currently: " + total + " subscribers <font color='red'>(down " + diff
+ " in the last 3 months)</font>"
-		    if (d[1] != "private" && d[1] != "security" && d[1] != "commits") {
-			addLine(pmc, " - " + mlname + ": " + total + " subscribers (down " + diff + " in the last
3 months)" + add)
-		    }
-		} else {
-		    if (d[1] != "private" && d[1] != "security" && d[1] != "commits") {
-			addLine(pmc, " - " + mlname + ": " + total + " subscribers (up " + diff + " in the last
3 months)" + add)
-		    }
+		ml = pmc + ".apache.org-" + first[i]
+	    if (ml != prev && ml.search("infra") < 0 && json.mail[pmc] &&
json.mail[pmc][ml]) {
+			prev = ml
+			var x = renderChart(json.mail[pmc], ml, obj)
+			var total = x[0]
+			var diff = x[1]
+			var div = x[2]
+			var d = ml.split(".org-");
+			var mlname = d[1] + "@" + d[0] + ".org"
+			var lookup = d[0].split(/\./)[0] + "-" + d[1]
+			add = ""
+			if (json.delivery[pmc][lookup]) {
+				add = ":\n    " + json.delivery[pmc][lookup][0] + " emails sent to list (" + json.delivery[pmc][lookup][1]
+ " in previous quarter)";
+			}
+			var text = "Currently: " + total + " subscribers <font color='green'>(up " + diff
+ " in the last 3 months)</font>"
+			if (diff < 0) {
+				text = "Currently: " + total + " subscribers <font color='red'>(down " + diff +
" in the last 3 months)</font>"
+				if (d[1] != "private" && d[1] != "security" && d[1] != "commits") {
+				addLine(pmc, " - " + mlname + ": " + total + " subscribers (down " + diff + " in the
last 3 months)" + add)
+				}
+			} else {
+				if (d[1] != "private" && d[1] != "security" && d[1] != "commits") {
+				addLine(pmc, " - " + mlname + ": " + total + " subscribers (up " + diff + " in the last
3 months)" + add)
+				}
+			}
+			
+			if (json.delivery[pmc][lookup]) {
+				text += " (" + json.delivery[pmc][lookup][0] + " emails sent in the past 3 months, "
+ json.delivery[pmc][lookup][1] + " in the previous cycle)"
+			}
+			
+			var p = document.createElement('li');
+			p.innerHTML = "<h5>" + mlname + ":</h5>" + text
+			p.appendChild(div)
+			ul.appendChild(p)
+	    }
+	}
+	
+	for (ml in json.mail[pmc]) {
+		var skip = false
+		for (i in first) {
+			xml = pmc + ".apache.org-" + first[i]
+			if (ml.search(xml) == 0) {
+				skip = true
+			}
 		}
-		
-		if (json.delivery[pmc][lookup]) {
-			text += " (" + json.delivery[pmc][lookup][0] + " emails sent in the past 3 months, " +
json.delivery[pmc][lookup][1] + " in the previous cycle)"
+		if (!skip) {
+				
+			f++;
+			if (ml != prev && ml.search("infra") < 0) {
+			prev = ml
+			var x = renderChart(json.mail[pmc], ml, obj)
+			var total = x[0]
+			var diff = x[1]
+			var div = x[2]
+			var d = ml.split(".org-");
+			var mlname = d[1] + "@" + d[0] + ".org"
+			var lookup = d[0].split(/\./)[0] + "-" + d[1]
+			add = ""
+			if (json.delivery[pmc][lookup]) {
+				add = ":\n    " + json.delivery[pmc][lookup][0] + " emails sent to list (" + json.delivery[pmc][lookup][1]
+ " in previous quarter)";
+			}
+			var text = "Currently: " + total + " subscribers <font color='green'>(up " + diff
+ " in the last 3 months)</font>"
+			if (diff < 0) {
+				text = "Currently: " + total + " subscribers <font color='red'>(down " + diff +
" in the last 3 months)</font>"
+				if (d[1] != "private" && d[1] != "security" && d[1] != "commits") {
+				addLine(pmc, " - " + mlname + ": " + total + " subscribers (down " + diff + " in the
last 3 months)" + add)
+				}
+			} else {
+				if (d[1] != "private" && d[1] != "security" && d[1] != "commits") {
+				addLine(pmc, " - " + mlname + ": " + total + " subscribers (up " + diff + " in the last
3 months)" + add)
+				}
+			}
+			
+			if (json.delivery[pmc][lookup]) {
+				text += " (" + json.delivery[pmc][lookup][0] + " emails sent in the past 3 months, "
+ json.delivery[pmc][lookup][1] + " in the previous cycle)"
+			}
+			
+			var p = document.createElement('li');
+			p.innerHTML = "<h5>" + mlname + ":</h5>" + text
+			p.appendChild(div)
+			ul.appendChild(p)
+			}
 		}
-		
-		var p = document.createElement('li');
-		p.innerHTML = "<h5>" + mlname + ":</h5>" + text
-		p.appendChild(div)
-		ul.appendChild(p)
-	    }
 	}
 	addLine(pmc)
 	



Mime
View raw message