Author: humbedooh
Date: Wed Mar 4 10:49:47 2015
New Revision: 1663929
URL: http://svn.apache.org/r1663929
Log:
few additional variable checks
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=1663929&r1=1663928&r2=1663929&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/render.js (original)
+++ comdev/reporter.apache.org/site/render.js Wed Mar 4 10:49:47 2015
@@ -375,13 +375,13 @@ function renderFrontPage(json) {
var mlname = d[1] + "@" + d[0] + ".org"
var lookup = d[0].split(/\./)[0] + "-" + d[1]
- var x = renderChart(json.mail[pmc], ml, obj,
json.delivery[pmc][lookup] ? json.delivery[pmc][lookup].weekly : {})
+ var x = renderChart(json.mail[pmc], ml, obj,
(json.delivery[pmc] && json.delivery[pmc][lookup]) ?
json.delivery[pmc][lookup].weekly : {})
var total = x[0]
var diff = x[1]
var div = x[2]
add = ""
- if (json.delivery[pmc][lookup]) {
+ 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)";
}
var text = "Currently: " + total + " subscribers <font
color='green'>(up " + diff + " in the last 3 months)</font>"
@@ -396,7 +396,7 @@ function renderFrontPage(json) {
}
}
- if (json.delivery[pmc][lookup]) {
+ if (json.delivery[pmc] && json.delivery[pmc][lookup]) {
text += " (" +
json.delivery[pmc][lookup].quarterly[0] + " emails sent in the past 3 months, "
+ json.delivery[pmc][lookup].quarterly[1] + " in the previous cycle)"
}
@@ -423,13 +423,13 @@ function renderFrontPage(json) {
var d = ml.split(".org-");
var mlname = d[1] + "@" + d[0] + ".org"
var lookup = d[0].split(/\./)[0] + "-" + d[1]
- var x = renderChart(json.mail[pmc], ml, obj,
json.delivery[pmc][lookup] ? json.delivery[pmc][lookup].weekly : {})
+ var x = renderChart(json.mail[pmc], ml, obj,
(json.delivery[pmc] && json.delivery[pmc][lookup]) ?
json.delivery[pmc][lookup].weekly : {})
var total = x[0]
var diff = x[1]
var div = x[2]
add = ""
- if (json.delivery[pmc][lookup]) {
+ 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)";
}
var text = "Currently: " + total + " subscribers <font
color='green'>(up " + diff + " in the last 3 months)</font>"
@@ -444,7 +444,7 @@ function renderFrontPage(json) {
}
}
- if (json.delivery[pmc][lookup]) {
+ if (json.delivery[pmc] && json.delivery[pmc][lookup]) {
text += " (" +
json.delivery[pmc][lookup].quarterly[0] + " emails sent in the past 3 months, "
+ json.delivery[pmc][lookup].quarterly[1] + " in the previous cycle)"
}
@@ -503,8 +503,8 @@ function renderJIRA(pmc, project) {
addLine(pmc)
obj.innerHTML += jsdata.jira[pmc][0] + " JIRA tickets created in the last
3 months<br/>";
obj.innerHTML += jsdata.jira[pmc][1] + " JIRA tickets closed/resolved in
the last 3 months<br/>";
- if (jsdata.keys) {
- obj.innerHTML += "Keys used: <kbd>" + jsdata.keys.join(", ") +
"</kbd>"
+ if (jsdata.keys[pmc]) {
+ obj.innerHTML += "Keys used: <kbd>" + jsdata.keys[pmc].join(",
") + "</kbd>"
}
}