in site/js/projects.js [389:519]
function renderCommitteePage(committeeId) {
var obj = document.getElementById('contents');
if (!committees[committeeId]) {
obj.innerHTML = "<h2>Sorry, I don't have any information available about this committee</h2>";
return;
}
var unixgroup = committeeId; // there are probably a few exceptions...
var committee = committees[committeeId];
obj.innerHTML = "<h1>" + committee.name + " Committee <font size='-2'>(also called PMC or Top Level Project)</font></h1>";
var description;
if (!_.isEmpty(committee.shortdesc)) {
description = committee.shortdesc;
} else {
description = "Missing from https://www.apache.org/#projects-list";
}
appendElementWithInnerHTML(obj, 'h4', "Description <font size='-2'>(from <a href='https://www.apache.org/#projects-list'>projects list</a>)</a>:");
appendElementWithInnerHTML(obj,'p',description.replace(/([^\r\n]+)\r?\n\r?\n/g,function(a) { return "<p>"+a+"</p>"}));
appendElementWithInnerHTML(obj, 'h4', "Charter <font size='-2'>(from PMC data file)</a>:");
var charter;
if (!_.isEmpty(committee.charter)) {
charter = committee.charter;
} else {
charter = "Missing";
}
appendElementWithInnerHTML(obj,'p',charter.replace(/([^\r\n]+)\r?\n\r?\n/g,function(a) { return "<p>"+a+"</p>"}));
var ul = document.createElement('ul');
appendElementWithInnerHTML(obj, 'h4', "Committee data:");
appendLiInnerHTML(ul, "<b>Website:</b> <a href='" + committee.homepage + "' target='_blank'>" + committee.homepage + "</a>");
appendLiInnerHTML(ul, "<b>Committee established:</b> " + committee.established);
// VP
appendLiInnerHTML(ul, "<b>PMC Chair:</b> " + linkCommitterIndex(committee.chair));
// Reporting cycle
var cycles = ["every month", "January, April, July, October", "February, May, August, November", "March, June, September, December"];
var minutes = committee.name.substr("Apache ".length).replace(/ /g, '_');
// does not work for APR and Logging Services currently
if (committeeId == 'apr') {
minutes = 'Apr';
} else if (committeeId == 'logging') {
minutes = 'Logging';
}
appendLiInnerHTML(ul, "<b>Reporting cycle:</b> " + cycles[committee.reporting] + ", see <a href='https://whimsy.apache.org/board/minutes/" + minutes + ".html'>minutes</a>");
// PMC
if (committee.roster) { // check we have the data
var pmcl = [];
for (i in committee.roster) {
pmcl.push(linkCommitterIndex(i));
}
if (pmcl.length > 0) {
appendLiInnerHTML(ul, "<b>PMC Roster <font size='-1'>(from committee-info.txt; updated daily)</font> (" + pmcl.length + "):</b> <blockquote>" + pmcl.join(", ") + "</blockquote>");
} else {
appendLiInnerHTML(ul, "<b>PMC Roster not found in committee-info.txt (check that Section 3 has been updated)</b>");
}
}
// Committers
if (unixgroups[unixgroup]) {
var commitl = [];
var commitgroup = unixgroups[unixgroup];
for (i in commitgroup) {
commitl.push(linkCommitterIndex(commitgroup[i]));
}
appendLiInnerHTML(ul, "<b>Committers; updated daily (" + commitgroup.length + "):</b> <blockquote>" + commitl.join(", ") + "</blockquote>");
}
// rdf
if (committee.rdf) {
appendLiInnerHTML(ul, "<b>PMC data file:</b> <a href='" + committee.rdf + "' target='_blank'>RDF Source</a>");
}
obj.appendChild(ul);
var subprojects = [];
for (p in projects) {
if (projects[p].pmc == committeeId) {
subprojects.push(p);
}
}
if (subprojects.length == 0) {
if (committeeId != 'labs') {
// if a committee did not declare any project, consider there is a default one with the id of the committee
// only Labs doesn't manage projects
subprojects.push({ 'id': committeeId, 'name': committee.name, 'pmc': committeeId });
}
} else {
appendElementWithInnerHTML(obj, 'h4', "Projects managed by this Committee:");
ul = document.createElement('ul');
for (var p in subprojects.sort()) {
p = subprojects[p];
appendLiInnerHTML(ul, projectLink(p));
}
obj.appendChild(ul);
}
var repos = [];
for (var r in repositories) {
if (committeeId == repoToCommittee(r)) {
repos.push(r);
}
}
if (repos.length > 0) {
appendElementWithInnerHTML(obj, 'h4',
"Repositories managed by this Committee <font size='-2'>" +
"(from <a href='https://gitbox.apache.org/repositories.json'>ASF Git repos</a>" +
" and <a href='https://svn.apache.org/repos/asf/'>ASF SVN repos</a>)</font>:");
ul = document.createElement('ul');
for (var r in repos.sort()) {
r = repos[r];
var url = repositories[r];
appendLiInnerHTML(ul, r + ": <a href='" + url + "'>" + url + "</a>");
}
obj.appendChild(ul);
}
}