community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1687393 - in /comdev/reporter.apache.org/site: addrelease.html addrelease.py
Date Wed, 24 Jun 2015 22:56:14 GMT
Author: hboutemy
Date: Wed Jun 24 22:56:14 2015
New Revision: 1687393

URL: http://svn.apache.org/r1687393
Log:
s/project/committee/ where accurate

Modified:
    comdev/reporter.apache.org/site/addrelease.html
    comdev/reporter.apache.org/site/addrelease.py

Modified: comdev/reporter.apache.org/site/addrelease.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/addrelease.html?rev=1687393&r1=1687392&r2=1687393&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/addrelease.html (original)
+++ comdev/reporter.apache.org/site/addrelease.html Wed Jun 24 22:56:14 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&copy; 2015, the Apache Software Foundation. Licensed under the Apache License
v/2.0<br/>
+   Copyright&copy; 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/site/addrelease.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/addrelease.py?rev=1687393&r1=1687392&r2=1687393&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/addrelease.py (original)
+++ comdev/reporter.apache.org/site/addrelease.py Wed Jun 24 22:56:14 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



Mime
View raw message