Return-Path: X-Original-To: apmail-community-commits-archive@minotaur.apache.org Delivered-To: apmail-community-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D71C177B3 for ; Tue, 3 Mar 2015 14:14:50 +0000 (UTC) Received: (qmail 99544 invoked by uid 500); 3 Mar 2015 14:14:50 -0000 Delivered-To: apmail-community-commits-archive@community.apache.org Received: (qmail 99514 invoked by uid 500); 3 Mar 2015 14:14:50 -0000 Mailing-List: contact commits-help@community.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@community.apache.org Delivered-To: mailing list commits@community.apache.org Received: (qmail 99505 invoked by uid 99); 3 Mar 2015 14:14:50 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 14:14:50 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id E4225AC0044 for ; Tue, 3 Mar 2015 14:14:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1663707 - /comdev/reporter.apache.org/site/render.js Date: Tue, 03 Mar 2015 14:14:49 -0000 To: commits@community.apache.org From: humbedooh@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150303141449.E4225AC0044@hades.apache.org> Author: humbedooh Date: Tue Mar 3 14:14:49 2015 New Revision: 1663707 URL: http://svn.apache.org/r1663707 Log: prefer certain mailing lists before the rest in the list 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=1663707&r1=1663706&r2=1663707&view=diff ============================================================================== --- comdev/reporter.apache.org/site/render.js (original) +++ comdev/reporter.apache.org/site/render.js Tue Mar 3 14:14:49 2015 @@ -344,42 +344,94 @@ function renderFrontPage(json) { var f = 0 addLine(pmc, "Mailing list activity:") addLine(pmc) - for (ml in json.mail[pmc]) { + var first = ['users', 'dev', 'commits', 'private', 'bugs', 'modules-dev']; + + + for (i in first) { f++; - if (ml != prev && ml.search("infra") < 0) { - prev = ml - var x = renderChart(json.mail[pmc], ml, obj) - var total = x[0] - var diff = x[1] - var div = x[2] - var d = ml.split(".org-"); - var mlname = d[1] + "@" + d[0] + ".org" - var lookup = d[0].split(/\./)[0] + "-" + d[1] - add = "" - if (json.delivery[pmc][lookup]) { - add = ":\n " + json.delivery[pmc][lookup][0] + " emails sent to list (" + json.delivery[pmc][lookup][1] + " in previous quarter)"; - } - var text = "Currently: " + total + " subscribers (up " + diff + " in the last 3 months)" - if (diff < 0) { - text = "Currently: " + total + " subscribers (down " + diff + " in the last 3 months)" - if (d[1] != "private" && d[1] != "security" && d[1] != "commits") { - addLine(pmc, " - " + mlname + ": " + total + " subscribers (down " + diff + " in the last 3 months)" + add) - } - } else { - if (d[1] != "private" && d[1] != "security" && d[1] != "commits") { - addLine(pmc, " - " + mlname + ": " + total + " subscribers (up " + diff + " in the last 3 months)" + add) - } + ml = pmc + ".apache.org-" + first[i] + if (ml != prev && ml.search("infra") < 0 && json.mail[pmc] && json.mail[pmc][ml]) { + prev = ml + var x = renderChart(json.mail[pmc], ml, obj) + var total = x[0] + var diff = x[1] + var div = x[2] + var d = ml.split(".org-"); + var mlname = d[1] + "@" + d[0] + ".org" + var lookup = d[0].split(/\./)[0] + "-" + d[1] + add = "" + if (json.delivery[pmc][lookup]) { + add = ":\n " + json.delivery[pmc][lookup][0] + " emails sent to list (" + json.delivery[pmc][lookup][1] + " in previous quarter)"; + } + var text = "Currently: " + total + " subscribers (up " + diff + " in the last 3 months)" + if (diff < 0) { + text = "Currently: " + total + " subscribers (down " + diff + " in the last 3 months)" + if (d[1] != "private" && d[1] != "security" && d[1] != "commits") { + addLine(pmc, " - " + mlname + ": " + total + " subscribers (down " + diff + " in the last 3 months)" + add) + } + } else { + if (d[1] != "private" && d[1] != "security" && d[1] != "commits") { + addLine(pmc, " - " + mlname + ": " + total + " subscribers (up " + diff + " in the last 3 months)" + add) + } + } + + if (json.delivery[pmc][lookup]) { + text += " (" + json.delivery[pmc][lookup][0] + " emails sent in the past 3 months, " + json.delivery[pmc][lookup][1] + " in the previous cycle)" + } + + var p = document.createElement('li'); + p.innerHTML = "
" + mlname + ":
" + text + p.appendChild(div) + ul.appendChild(p) + } + } + + for (ml in json.mail[pmc]) { + var skip = false + for (i in first) { + xml = pmc + ".apache.org-" + first[i] + if (ml.search(xml) == 0) { + skip = true + } } - - if (json.delivery[pmc][lookup]) { - text += " (" + json.delivery[pmc][lookup][0] + " emails sent in the past 3 months, " + json.delivery[pmc][lookup][1] + " in the previous cycle)" + if (!skip) { + + f++; + if (ml != prev && ml.search("infra") < 0) { + prev = ml + var x = renderChart(json.mail[pmc], ml, obj) + var total = x[0] + var diff = x[1] + var div = x[2] + var d = ml.split(".org-"); + var mlname = d[1] + "@" + d[0] + ".org" + var lookup = d[0].split(/\./)[0] + "-" + d[1] + add = "" + if (json.delivery[pmc][lookup]) { + add = ":\n " + json.delivery[pmc][lookup][0] + " emails sent to list (" + json.delivery[pmc][lookup][1] + " in previous quarter)"; + } + var text = "Currently: " + total + " subscribers (up " + diff + " in the last 3 months)" + if (diff < 0) { + text = "Currently: " + total + " subscribers (down " + diff + " in the last 3 months)" + if (d[1] != "private" && d[1] != "security" && d[1] != "commits") { + addLine(pmc, " - " + mlname + ": " + total + " subscribers (down " + diff + " in the last 3 months)" + add) + } + } else { + if (d[1] != "private" && d[1] != "security" && d[1] != "commits") { + addLine(pmc, " - " + mlname + ": " + total + " subscribers (up " + diff + " in the last 3 months)" + add) + } + } + + if (json.delivery[pmc][lookup]) { + text += " (" + json.delivery[pmc][lookup][0] + " emails sent in the past 3 months, " + json.delivery[pmc][lookup][1] + " in the previous cycle)" + } + + var p = document.createElement('li'); + p.innerHTML = "
" + mlname + ":
" + text + p.appendChild(div) + ul.appendChild(p) + } } - - var p = document.createElement('li'); - p.innerHTML = "
" + mlname + ":
" + text - p.appendChild(div) - ul.appendChild(p) - } } addLine(pmc)