You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2015/07/07 03:12:50 UTC
svn commit: r1689548 - in
/comdev/reporter.apache.org/branches/deployed/site: addrelease.html
addrelease.py render.js
Author: sebb
Date: Tue Jul 7 01:12:50 2015
New Revision: 1689548
URL: http://svn.apache.org/r1689548
Log:
The word project is ambiguous; could mean a software project.
Replace with committee (which may be in charge of several projects)
Modified:
comdev/reporter.apache.org/branches/deployed/site/addrelease.html
comdev/reporter.apache.org/branches/deployed/site/addrelease.py
comdev/reporter.apache.org/branches/deployed/site/render.js
Modified: comdev/reporter.apache.org/branches/deployed/site/addrelease.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/deployed/site/addrelease.html?rev=1689548&r1=1689547&r2=1689548&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/deployed/site/addrelease.html (original)
+++ comdev/reporter.apache.org/branches/deployed/site/addrelease.html Tue Jul 7 01:12:50 2015
@@ -12,13 +12,13 @@
</head>
<body onload='GetAsyncJSON("/releases/" + project + ".json?now=" + Math.random(), null, listReleaseData)'>
-<div id="contents" class="row-12" style="text-align: center; margin: 0 auto; width: 1000px; ">
- <h2>Apache Project Report Helper: Add a release</h2>
- <p>Please fill out the fields below to add a release to our report database. This is not a requirement, but a help to those that use the Apache Reporter System to gauge the project's development.</p>
+<div id="contents" class="row-12" style="margin: 0 auto; width: 1000px; ">
+ <h2 style="text-align: center;">Apache Committee Report Helper: Add a release</h2>
+ <p>Please fill out the fields below to add a release to our report database. This is not a requirement, but a help to those that use the Apache Reporter System to gauge the committee's development.</p>
<form action="addrelease.py" method="post" id="form" onsubmit="return validate(this)">
<input type="hidden" name="date" value="" id="date"/>
- <b>Project:</b></b><input type="text" name="project" value="" readonly="readonly" id="project"/><br/>
+ <b>Committee:</b></b><input type="text" name="committee" value="" readonly="readonly" id="committee"/><br/>
<b>Full version name:</b></b><input type="text" name="version" value="" placeholder="1.2.0" id="version"/><br/>
<b>Date of release (YYYY-MM-DD):</b></b><input type="text" name="xdate" value="" placeholder="YYYY-MM-DD" id="xdate"/><br/>
<input type="submit" value="Add release data"/><br>
@@ -26,14 +26,14 @@
</form>
</div>
<div id="footer">
- Copyright© 2015, the Apache Software Foundation. Licensed under the Apache License v/2.0<br/>
+ Copyright© 2015, the Apache Software Foundation. Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a><br/>
For inquiries, contact <a href="mailto:dev@community.apache.org">dev@community.apache.org</a>.
</div>
<script src="js/foundation.min.js"></script>
<script>
- var project = document.location.search.substr(1);
- document.getElementById('project').value = project;
+ var committee = document.location.search.substr(1);
+ document.getElementById('committee').value = committee;
var date = new Date();
var xdate = document.getElementById('xdate');
var done = false;
@@ -69,7 +69,7 @@
if (x == 0) {
obj.innerHTML += "No releases registered yet"
}
- document.getElementById('project').value = project;
+ document.getElementById('committee').value = committee;
}
</script>
Modified: comdev/reporter.apache.org/branches/deployed/site/addrelease.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/deployed/site/addrelease.py?rev=1689548&r1=1689547&r2=1689548&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/deployed/site/addrelease.py (original)
+++ comdev/reporter.apache.org/branches/deployed/site/addrelease.py Tue Jul 7 01:12:50 2015
@@ -6,7 +6,7 @@ form = cgi.FieldStorage();
user = os.environ['HTTP_X_AUTHENTICATED_USER'] if 'HTTP_X_AUTHENTICATED_USER' in os.environ else "nobody"
date = int(form['date'].value) if ('date' in form and len(form['date'].value) > 0) else None
version = form['version'].value if ('version' in form and len(form['version'].value) > 0) else None
-project = form['project'].value if 'project' in form else None
+committee = form['committee'].value if 'committee' in form else None
dojson = form['json'].value if 'json' in form else None
def getPMCs(uid):
@@ -16,7 +16,6 @@ def getPMCs(uid):
for match in re.finditer(r"dn: cn=([a-zA-Z0-9]+),ou=pmc,ou=committees,ou=groups,dc=apache,dc=org", ldapdata):
group = match.group(1)
if group != "incubator":
-
groups.append(group)
return groups
@@ -31,9 +30,9 @@ def isMember(uid):
return True
return False
-def getReleaseData(project):
+def getReleaseData(committee):
try:
- with open("/var/www/reporter.apache.org/data/releases/%s.json" % project, "r") as f:
+ with open("/var/www/reporter.apache.org/data/releases/%s.json" % committee, "r") as f:
x = json.loads(f.read())
f.close()
return x;
@@ -41,12 +40,12 @@ def getReleaseData(project):
return {}
saved = False
-projects = getPMCs(user)
-if date and version and project:
- if project in projects or isMember(user):
- rdata = getReleaseData(project)
+committees = getPMCs(user)
+if date and version and committee:
+ if committee in committees or isMember(user):
+ rdata = getReleaseData(committee)
rdata[version] = date
- with open("/var/www/reporter.apache.org/data/releases/%s.json" % project, "w") as f:
+ with open("/var/www/reporter.apache.org/data/releases/%s.json" % committee, "w") as f:
f.write(json.dumps(rdata))
f.close()
saved = True
@@ -54,11 +53,11 @@ if date and version and project:
print("Content-Type: application/json\r\n\r\n")
print(json.dumps({'versions': rdata}))
else:
- print("Content-Type: text/html\r\n\r\n<h3>Data submitted!</h3>You may see the updated project data at: <a href='https://reporter.apache.org/?%s'>https://reporter.apache.org/?%s</a>." % (project, project))
+ print("Content-Type: text/html\r\n\r\n<h3>Data submitted!</h3>You may see the updated committee data at: <a href='https://reporter.apache.org/?%s'>https://reporter.apache.org/?%s</a>." % (committee, committee))
if not saved:
if dojson:
print("Content-Type: application/json\r\n\r\n{\"error\": \"Not saved\"}")
else:
- print("Content-Type: text/plain\r\n\r\nCould not save. Make sure you have filled out all fields and have access to this projects data! For further inquiries, please contact dev@community.apache.org")
+ print("Content-Type: text/plain\r\n\r\nCould not save. Make sure you have filled out all fields and have access to this committee data! For further inquiries, please contact dev@community.apache.org")
\ No newline at end of file
Modified: comdev/reporter.apache.org/branches/deployed/site/render.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/deployed/site/render.js?rev=1689548&r1=1689547&r2=1689548&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/deployed/site/render.js (original)
+++ comdev/reporter.apache.org/branches/deployed/site/render.js Tue Jul 7 01:12:50 2015
@@ -175,7 +175,7 @@ function addLine(pmc, line) {
function renderFrontPage(json) {
jsdata = json
var container = document.getElementById('contents')
- container.innerHTML = "<h2 style='text-align: center; margin-bottom: 10px;' class='hide-for-small-only'>Apache Project Report Helper</h2>Click on a project name to view statistics:"
+ container.innerHTML = "<h2 style='text-align: center; margin-bottom: 10px;' class='hide-for-small-only'>Apache Committee Report Helper</h2>Click on a committee name to view statistics:"
var top = document.createElement('div');
container.appendChild(top)
@@ -202,7 +202,7 @@ function renderFrontPage(json) {
for (i in json.pmcs) {
var pmc = json.pmcs[i]
- templates[pmc] = "Report from the " + (json.pdata[pmc].name ? json.pdata[pmc].name : pmc) + " project [" + (json.pdata[pmc].chair ? json.pdata[pmc].chair : "Put your name here") + "]\n\n"
+ templates[pmc] = "Report from the " + (json.pdata[pmc].name ? json.pdata[pmc].name : pmc) + " committee [" + (json.pdata[pmc].chair ? json.pdata[pmc].chair : "Put your name here") + "]\n\n"
addLine(pmc, "## Description:")
if (json.pdata[pmc].shortdesc) {
@@ -230,7 +230,7 @@ function renderFrontPage(json) {
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']] + "'>" + (6.33+(json.health[pmc]['score']*-1.00*(20/12.25))).toFixed(2) + " (" + hvalues[json.health[pmc]['cscore']] + ")</u></font></a>"
+ health.innerHTML = "<b>Committee Health score:</b> <a href='/chi.py#"+pmc+"'><u><font color='" + hcolors[json.health[pmc]['cscore']] + "'>" + (6.33+(json.health[pmc]['score']*-1.00*(20/12.25))).toFixed(2) + " (" + hvalues[json.health[pmc]['cscore']] + ")</u></font></a>"
obj.appendChild(health)
}
pcontainer.appendChild(obj)
@@ -242,7 +242,7 @@ function renderFrontPage(json) {
var mo = new Date().getMonth();
var reportdate = buildPanel(pmc, "Report date")
if (json.pdata[pmc].chair) {
- reportdate.innerHTML += "<b>Project Chair: </b>" + json.pdata[pmc].chair + "<br/>"
+ reportdate.innerHTML += "<b>Committee Chair: </b>" + json.pdata[pmc].chair + "<br/>"
}
GetAsyncJSON("reportingcycles.json?" + Math.random(), [pmc, reportdate, json.pdata[pmc].name], setReportDate)
@@ -253,7 +253,7 @@ function renderFrontPage(json) {
var after = new Date();
after.setMonth(mo);
- var changes = buildPanel(pmc, "PMC/Committership changes");
+ var changes = buildPanel(pmc, "LDAP committee/Committership changes");
var c = 0;
for (i in json.changes[pmc].committer) c++;
@@ -262,12 +262,12 @@ function renderFrontPage(json) {
var np = 0;
var ncn = null;
var npn = null;
- addLine(pmc, "## PMC/Committership changes:")
+ addLine(pmc, "## LDAP committee/Committership changes:")
addLine(pmc)
- addLine(pmc, " - Currently " + json.count[pmc][1] + " committers and " + json.count[pmc][0] + " PMC members in the project.")
+ addLine(pmc, " - Currently " + json.count[pmc][1] + " committers and " + json.count[pmc][0] + " LDAP committee members.")
if (c == 0) {
- changes.innerHTML += "<font color='red'><b>No new changes to the PMC or committer base detected - (LDAP error or no changes for >2 years)</b></font>"
- addLine(pmc, " - No new changes to the PMC or committership since last report.")
+ changes.innerHTML += "<font color='red'><b>No new changes to the LDAP committee or committer base detected - (LDAP error or no changes for >2 years)</b></font>"
+ addLine(pmc, " - No new changes to the LDAP committee or committership since last report.")
addLine(pmc)
} else {
changes.innerHTML += "<h5>Changes within the last 3 months:</h5>"
@@ -282,7 +282,7 @@ function renderFrontPage(json) {
}
}
if (npmc > 1) {
- addLine(pmc, " - New PMC members:")
+ addLine(pmc, " - New LDAP committee members:")
}
@@ -294,19 +294,19 @@ function renderFrontPage(json) {
}
if (entry[1] > after.getTime() / 1000) {
l++;
- changes.innerHTML += "→ " + entry[0] + " was added to the PMC on " + new Date(entry[1] * 1000).toDateString() + "<br/>";
- addLine(pmc, (npmc>1? " " : "") + " - " + entry[0] + " was added to the PMC on " + new Date(entry[1] * 1000).toDateString())
+ changes.innerHTML += "→ " + entry[0] + " was added to the LDAP committee on " + new Date(entry[1] * 1000).toDateString() + "<br/>";
+ addLine(pmc, (npmc>1? " " : "") + " - " + entry[0] + " was added to the LDAP committee on " + new Date(entry[1] * 1000).toDateString())
}
}
if (l == 0) {
addLine(pmc, " - No new PMC members added in the last 3 months")
- changes.innerHTML += "→ <font color='red'><b>No new PMC members in the last 3 months.</b></font><br/>";
+ changes.innerHTML += "→ <font color='red'><b>No new LDAP committee members in the last 3 months.</b></font><br/>";
}
if (npn) {
if (np < after.getTime() / 1000) {
addLine(pmc, " - Last PMC addition was " + npn + " at " + new Date(np * 1000).toDateString())
}
- changes.innerHTML += "→ " + "<b>Latest PMC addition: </b>" + new Date(np * 1000).toDateString() + " (" + npn + ")<br/>"
+ changes.innerHTML += "→ " + "<b>Latest LDAP committee addition: </b>" + new Date(np * 1000).toDateString() + " (" + npn + ")<br/>"
}
@@ -555,7 +555,7 @@ function renderFrontPage(json) {
}
if (json.pmcs.length == 0) {
- container.innerHTML = "You are not a member of any top level project PMC, sorry!"
+ container.innerHTML = "You are not a member of any PMC, sorry!"
}
$("#tabcontents").find("[id^='tab']").hide();