community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1679375 - /comdev/projects.apache.org/site/js/projects.js
Date Thu, 14 May 2015 14:07:24 GMT
Author: hboutemy
Date: Thu May 14 14:07:24 2015
New Revision: 1679375

URL: http://svn.apache.org/r1679375
Log:
use tlps.json instead of pmcs.json

Modified:
    comdev/projects.apache.org/site/js/projects.js

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1679375&r1=1679374&r2=1679375&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Thu May 14 14:07:24 2015
@@ -19,12 +19,12 @@
 
 var people = {}; // committer -> name lookups
 var unixgroups = {}; // unix (ldap) groups (project -> committers lookup)
+var tlps = {}; // id -> tlp info (chair, established, group, homepage, id, name, reporting,
shortdesc)
 var chairs = {}; // chair-people of various TLPs
 var cycles = {}; // Reporting cycles
 var projects = {}; // Projects (sub + tlp)
 var committees = {}; // TLP committees for TLP evolution charts et al
 var committees_raw = {}; // TLP committees, sorted by date founded
-var pmcs = {}; // pmc -> project name lookups
 var evolution = {}; // Podling evolution
 var accounts = {}; // Account creation lookups
 var releases = {}; // Release data
@@ -278,7 +278,7 @@ function renderProjectPage(json, state)
 
     // Title + description
     var pt = "Top Level Project";
-    if ((!committees[json.name] && pmcs[json.pmc]) || json.name.match("Incubating",
"i")) {
+    if ((!committees[json.name] && tlps[json.pmc]) || json.name.match("Incubating",
"i")) {
 	pt = (json.pmc == "attic") ? "in the Attic" : "Sub-project"
     } else {
 	isTLP = true
@@ -339,8 +339,8 @@ function renderProjectPage(json, state)
     } else {
 	json.pmc = state;
     }
-    if (!committees[json.name] && pmcs[json.pmc]) {
-	appendLiInnerHTML(ul, "<b>Sub-project of:</b> <a href='/project.html?" +
json.pmc + "'>" + pmcs[json.pmc].name + "</a>");
+    if (!committees[json.name] && tlps[json.pmc]) {
+	appendLiInnerHTML(ul, "<b>Sub-project of:</b> <a href='/project.html?" +
json.pmc + "'>" + tlps[json.pmc].name + "</a>");
     }
 
     if (isTLP) {
@@ -687,7 +687,7 @@ function renderProjectsList(cat) {
 	    if (i.name.match("incubating", "i")) {
 		i.pmc = 'incubator'
 	    }
-	    if (pmcs[i.pmc]) {
+	    if (tlps[i.pmc]) {
 		var lpmc = i.pmc
 	    
 		if (lpmcs.indexOf(lpmc) < 0) {
@@ -706,7 +706,7 @@ function renderProjectsList(cat) {
 	for (l in lpmcs) {
 	    var lpmc = lpmcs[l];
 	    var li = document.createElement('li');
-	    li.innerHTML = "<h3><a id='" + lpmc + "'>" + pmcs[lpmc].name + " (" + dcount[lpmc]
+ ")</a>:</h3>";
+	    li.innerHTML = "<h3><a id='" + lpmc + "'>" + tlps[lpmc].name + " (" + dcount[lpmc]
+ ")</a>:</h3>";
 	    var cul = document.createElement('ul');
 	    for (i in projectsSorted) {
 		i = projectsSorted[i];
@@ -715,7 +715,7 @@ function renderProjectsList(cat) {
 		if (project.name.match("incubating", "i")) {
 		    project.pmc = 'incubator'
 		}
-		 if (pmcs[project.pmc]) {
+		 if (tlps[project.pmc]) {
 		    xlpmc = project.pmc;
 		    if (xlpmc == lpmc) {
 			appendLiInnerHTML(cul,projectIcon(project.name) + projectLink(i));
@@ -751,14 +751,14 @@ function buildProjectListAsTable(json) {
 	var project = projects[p];
 	
 	// Get name of PMC
-	var pmc = pmcs[project.pmc] ? pmcs[project.pmc].name : "Unknown";
+	var pmc = tlps[project.pmc] ? tlps[project.pmc].name : "Unknown";
 	
 	// Get project type
 	var type = "Sub-Project";
 	var shortp = p.split("-")[0];
 	if (unixgroups[shortp]) {
 	    type = "TLP";
-	    if ((!committees[project.name] && pmcs[project.pmc]) || project.name.match(/incubating/i))
{
+	    if ((!committees[project.name] && tlps[project.pmc]) || project.name.match(/incubating/i))
{
 		type = "Sub-project";
 	    }
 	} else {
@@ -1258,7 +1258,7 @@ function buildReleases() {
 
 function preloadEverything(callback) {
     GetAsyncJSONArray([
-	    ["/json/foundation/pmcs.json", function(json) { pmcs = json; }],
+	    ["/json/foundation/tlps.json", function(json) { for(p in json) { p = json[p]; tlps[p.id]=p;
}; }],
 	    ["/json/foundation/groups.json", function(json) { unixgroups = json; }],
 	    ["/json/foundation/people_name.json", function(json) { people = json; }],
 	    ["/json/foundation/cycles.json", function(json) { cycles = json; }],



Mime
View raw message