svn commit: r1665071 - in /comdev/reporter.apache.org/site: getjson.py render.js
Author: humbedooh Date: Sun Mar 8 20:01:58 2015 New Revision: 1665071 URL: http://svn.apache.org/r1665071 Log: Allow for members to do a drop-in addition of a project in their view instead of having to reload everything. Modified: comdev/reporter.apache.org/site/getjson.py comdev/reporter.apache.org/site/render.js Modified: comdev/reporter.apache.org/site/getjson.py URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/getjson.py?rev=1665071r1=1665070r2=1665071view=diff == --- comdev/reporter.apache.org/site/getjson.py (original) +++ comdev/reporter.apache.org/site/getjson.py Sun Mar 8 20:01:58 2015 @@ -1,6 +1,10 @@ #!/usr/bin/env python import os, sys, re, json, subprocess, urllib, time -import base64, urllib2 +import base64, urllib2, cgi + +form = cgi.FieldStorage(); +oproject = form['only'].value if ('only' in form and len(form['only'].value) 0) else None + jmap = { 'trafficserver': ['TS'], @@ -186,6 +190,8 @@ if m: include = os.environ['QUERY_STRING'] if 'QUERY_STRING' in os.environ else None if include and isMember(uid) and not include in groups and len(include) 1: groups.append(include) +if oproject and len(oproject) 0 and isMember(uid): +groups = [oproject] mlstats = {} with open(/var/www/reporter.apache.org/data/mailinglists.json, r) as f: ml = json.loads(f.read()) Modified: comdev/reporter.apache.org/site/render.js URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/render.js?rev=1665071r1=1665070r2=1665071view=diff == --- comdev/reporter.apache.org/site/render.js (original) +++ comdev/reporter.apache.org/site/render.js Sun Mar 8 20:01:58 2015 @@ -571,12 +571,15 @@ function renderFrontPage(json) { btn.setAttribute(id, btn_all) btn.setAttribute(class, tab-title) json.all.sort() - json.all.unshift(---) - json.all.unshift(Members-only Quick-nav:) + if (json.all.indexOf(---) == -1) { + json.all.unshift(---) + json.all.unshift(Members-only Quick-nav:) + } + var sel = makeSelect(project, json.all, []) sel.setAttribute(style, height: 32px !important; padding: 0px !important; margin: 0px !important; margin-left: 32px !important;) sel.style = break-before: never; break-after: never; float: left - sel.setAttribute(onchange, location.href = '/?' + this.value;) + sel.setAttribute(onchange, GetAsyncJSON('/getjson.py?only='+ this.value, this.value, mergeData);) btn.appendChild(sel) panellist.appendChild(btn) @@ -586,6 +589,25 @@ function renderFrontPage(json) { } +function mergeData(json, pmc) { + if (nproject nproject.length 0) { + for (i in jsdata.pmcs) { + if (jsdata.pmcs[i] == nproject) { + jsdata.pmcs.splice(i,1); + break + } + } + } + var todo = new Array('count', 'mail', 'delivery', 'jira', 'changes', 'pdata', 'releases', 'keys') + for (i in todo) { + var key = todo[i] + jsdata[key][pmc] = json[key][pmc]; + } + jsdata.pmcs.push(pmc) + nproject = pmc + renderFrontPage(jsdata) +} + function renderJIRA(pmc) { var obj = buildPanel(pmc, JIRA Statistics)
svn commit: r1665073 - /comdev/reporter.apache.org/site/render.js
Author: humbedooh Date: Sun Mar 8 20:03:07 2015 New Revision: 1665073 URL: http://svn.apache.org/r1665073 Log: fix sorting so it doesn't resort after unshift 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=1665073r1=1665072r2=1665073view=diff == --- comdev/reporter.apache.org/site/render.js (original) +++ comdev/reporter.apache.org/site/render.js Sun Mar 8 20:03:07 2015 @@ -570,8 +570,8 @@ function renderFrontPage(json) { btn.setAttribute(style, margin-left: 48px;) btn.setAttribute(id, btn_all) btn.setAttribute(class, tab-title) - json.all.sort() if (json.all.indexOf(---) == -1) { + json.all.sort() json.all.unshift(---) json.all.unshift(Members-only Quick-nav:) }
svn commit: r1664967 - /comdev/reporter.apache.org/site/render.js
Author: humbedooh Date: Sun Mar 8 11:19:44 2015 New Revision: 1664967 URL: http://svn.apache.org/r1664967 Log: scrap old jira mapping, replaced on the backend 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=1664967r1=1664966r2=1664967view=diff == --- comdev/reporter.apache.org/site/render.js (original) +++ comdev/reporter.apache.org/site/render.js Sun Mar 8 11:19:44 2015 @@ -1,9 +1,4 @@ var jsdata = {} -var map = { -'trafficserver': 'TS', -'couchdb': 'COUCHDB', -'comdev': 'COMDEV' -} var templates = {} var nproject = null; @@ -483,7 +478,7 @@ function renderFrontPage(json) { if (json.jira[pmc][0] 0 || json.jira[pmc][1] 0) { - renderJIRA(pmc, map[pmc]) + renderJIRA(pmc) } @@ -549,7 +544,7 @@ function renderFrontPage(json) { } -function renderJIRA(pmc, project) { +function renderJIRA(pmc) { var obj = buildPanel(pmc, JIRA Statistics) addLine(pmc, ## JIRA activity:)
svn commit: r1665016 - /comdev/reporter.apache.org/site/render.js
Author: humbedooh Date: Sun Mar 8 15:12:56 2015 New Revision: 1665016 URL: http://svn.apache.org/r1665016 Log: Reflow report template if 1 new committer or pmc member this time around, for easier overview of things 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=1665016r1=1665015r2=1665016view=diff == --- comdev/reporter.apache.org/site/render.js (original) +++ comdev/reporter.apache.org/site/render.js Sun Mar 8 15:12:56 2015 @@ -260,6 +260,20 @@ function renderFrontPage(json) { } else { changes.innerHTML += h5Changes within the last 3 months:/h5 var l = 0; + + // pre-flight check + var npmc = 0; + for (i in json.changes[pmc].pmc) { + var entry = json.changes[pmc].pmc[i]; + if (entry[1] after.getTime() / 1000) { + npmc++; + } + } + if (npmc 1) { + addLine(pmc, - New PMC members:) + } + + for (i in json.changes[pmc].pmc) { var entry = json.changes[pmc].pmc[i]; if (entry[1] np) { @@ -269,13 +283,32 @@ function renderFrontPage(json) { if (entry[1] after.getTime() / 1000) { l++; changes.innerHTML += rarr; + entry[0] + was added to the PMC on + new Date(entry[1] * 1000).toDateString() + br/; - addLine(pmc, - + entry[0] + was added to the PMC on + new Date(entry[1] * 1000).toDateString()) + addLine(pmc, (npmc1? : ) + - + entry[0] + was added to the PMC on + new Date(entry[1] * 1000).toDateString()) } } if (l == 0) { addLine(pmc, - No new PMC members added in the last 3 months) changes.innerHTML += rarr; font color='red'bNo new PMC members in the last 3 months./b/fontbr/; } + if (npn) { + if (np after.getTime() / 1000) { + addLine(pmc, - Last PMC addition was + npn + at + new Date(np * 1000).toDateString()) + } + changes.innerHTML += rarr; + bLatest PMC addition: /b + new Date(np * 1000).toDateString() + ( + npn + )br/ + } + + + // pre-flight check + var ncom = 0; + for (i in json.changes[pmc].committer) { + var entry = json.changes[pmc].committer[i]; + if (entry[1] after.getTime() / 1000) { + ncom++; + } + } + if (ncom 1) { + addLine(pmc, - New commmitters:) + } for (i in json.changes[pmc].committer) { var entry = json.changes[pmc].committer[i]; if (entry[1] nc) { @@ -285,19 +318,14 @@ function renderFrontPage(json) { if (entry[1] after.getTime() / 1000) { l++; changes.innerHTML += rarr; + entry[0] + was added as a committer on + new Date(entry[1] * 1000).toDateString() + br/; - addLine(pmc, - + entry[0] + was added as a committer on + new Date(entry[1] * 1000).toDateString()) + addLine(pmc, (ncom1? : ) + - + entry[0] + was added as a committer on + new Date(entry[1] * 1000).toDateString()) } } if (l == 0) { changes.innerHTML += rarr; font color='red'bNo new committers in the last 3 months./b/fontbr/; addLine(pmc, - No new committers added in the last 3 months) } - if (npn) { - if (np after.getTime() / 1000) { - addLine(pmc, - Last PMC addition was +
svn commit: r1665048 - /comdev/reporter.apache.org/site/render.js
Author: humbedooh Date: Sun Mar 8 16:24:36 2015 New Revision: 1665048 URL: http://svn.apache.org/r1665048 Log: - wrap to 77 chars - better formatting for ML statistics 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=1665048r1=1665047r2=1665048view=diff == --- comdev/reporter.apache.org/site/render.js (original) +++ comdev/reporter.apache.org/site/render.js Sun Mar 8 16:24:36 2015 @@ -157,7 +157,7 @@ function addLine(pmc, line) { var out = for (i in words) { len += words[i].replace(/.+?/, ).length + (i == words.length - 1 ? 0 : 1) - if (len = 80) { + if (len = 78) { out += \n len = words[i].replace(/.+?/, ).length + (i == words.length - 1 ? 0 : 1) } @@ -412,17 +412,21 @@ function renderFrontPage(json) { add = if (json.delivery[pmc] json.delivery[pmc][lookup]) { - add = :\n + json.delivery[pmc][lookup].quarterly[0] + emails sent to list ( + json.delivery[pmc][lookup].quarterly[1] + in previous quarter); + add = :\n- + json.delivery[pmc][lookup].quarterly[0] + emails sent to list ( + json.delivery[pmc][lookup].quarterly[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) + addLine(pmc, - + mlname + : ) + addLine(pmc, - + total + subscribers (down + diff + in the last 3 months) + add) + addLine(pmc) } } else { if (d[1] != private d[1] != security d[1] != commits) { - addLine(pmc, - + mlname + : + total + subscribers (up + diff + in the last 3 months) + add) + addLine(pmc, - + mlname + : ) + addLine(pmc, - + total + subscribers (up + diff + in the last 3 months) + add) + addLine(pmc) } } @@ -460,17 +464,21 @@ function renderFrontPage(json) { add = if (json.delivery[pmc] json.delivery[pmc][lookup]) { - add = :\n + json.delivery[pmc][lookup].quarterly[0] + emails sent to list ( + json.delivery[pmc][lookup].quarterly[1] + in previous quarter); + add = :\n- + json.delivery[pmc][lookup].quarterly[0] + emails sent to list ( + json.delivery[pmc][lookup].quarterly[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) + addLine(pmc, - + mlname + : ) + addLine(pmc, - + total + subscribers (down + diff + in the last 3 months) + add) + addLine(pmc) } } else { if (d[1] != private d[1] != security d[1] != commits) { -
svn commit: r1665050 - /comdev/reporter.apache.org/data/parsepmcs.py
Author: humbedooh Date: Sun Mar 8 16:50:36 2015 New Revision: 1665050 URL: http://svn.apache.org/r1665050 Log: scrap retired committers/pmc members from the list when updating Modified: comdev/reporter.apache.org/data/parsepmcs.py Modified: comdev/reporter.apache.org/data/parsepmcs.py URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/data/parsepmcs.py?rev=1665050r1=1665049r2=1665050view=diff == Binary files - no diff available.