Author: sebb
Date: Sat Jun 14 22:12:41 2025
New Revision: 1926428
URL: http://svn.apache.org/viewvc?rev=1926428&view=rev
Log:
Check if data.kibble is an empty dict
Modified:
comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js?rev=1926428&r1=1926427&r2=1926428&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
(original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js Sat
Jun 14 22:12:41 2025
@@ -212,6 +212,7 @@ function splash(state, json, all) {
let busiest_html = {};
function health_tips(data) {
+ let haskibble = data.kibble && Object.keys(haskibble) > 0;
let txt = "";
// Mailing list changes
for (var ml in data.delivery[project]) {
@@ -239,7 +240,7 @@ function health_tips(data) {
if (bz[0] || bz[1]) txt += "<li>%u BugZilla tickets opened and %u closed
in the past quarter.</li>".format(bz[0], bz[1]);
// JIRA changes
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.jira.change.opened;
let pct = parseInt(ctxt);
@@ -257,7 +258,7 @@ function health_tips(data) {
txt += "<li style='color: %s;'>%u issue%s opened in JIRA, past quarter
(%s)</li>".format(color, data.kibble.jira.after.opened, s, ctxt);
}
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.jira.change.closed;
let pct = parseInt(ctxt);
@@ -278,7 +279,7 @@ function health_tips(data) {
// Commits and contributors
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.commits.change.commits
let pct = parseInt(ctxt);
@@ -295,7 +296,7 @@ function health_tips(data) {
txt += "<li style='color: %s;'>%u commit%s in the past quarter
(%s)</li>".format(color, data.kibble.commits.after.commits, s, ctxt);
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.commits.change.authors
let pct = parseInt(ctxt);
@@ -313,7 +314,7 @@ function health_tips(data) {
}
// GitHub: PRs
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.prs.change.opened
let pct = parseInt(ctxt);
@@ -332,7 +333,7 @@ function health_tips(data) {
}
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.prs.change.closed
let pct = parseInt(ctxt);
@@ -352,7 +353,7 @@ function health_tips(data) {
}
// GitHub: Issues
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.issues.change.opened
let pct = parseInt(ctxt);
@@ -371,7 +372,7 @@ function health_tips(data) {
}
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.issues.change.closed
let pct = parseInt(ctxt);
@@ -391,7 +392,7 @@ function health_tips(data) {
}
// Busiest topics
- if (data.kibble) {
+ if (haskibble) {
let showit = false;
let busiest = new HTML('li', {}, "Busiest topics (click to pop up): ");
if (data.kibble.busiest.email.length > 0) {
Modified:
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js?rev=1926428&r1=1926427&r2=1926428&view=diff
==============================================================================
---
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
(original)
+++
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
Sat Jun 14 22:12:41 2025
@@ -203,6 +203,7 @@ function kibble_mailstats(xhtml, timeser
}
function statistics_health(data) {
+ let haskibble = data.kibble && Object.keys(haskibble) > 0;
let html = new HTML('div', {
style: {
position: 'relative',
@@ -246,8 +247,8 @@ function statistics_health(data) {
xhtml.innerHTML = txt;
html.inject(xhtml);
- let hasdevlist = (a[2] == 'dev' && data.kibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
- let hasuserlist = (a[2].match(/^users?$/) && data.kibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
+ let hasdevlist = (a[2] == 'dev' && haskibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
+ let hasuserlist = (a[2].match(/^users?$/) && haskibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
if (txt.length > 0 && !(hasdevlist||hasuserlist)) {
let cols = [
@@ -330,7 +331,7 @@ function statistics_health(data) {
}
// JIRA changes
- if (data.kibble && data.kibble.timeseries.jira.length > 0) {
+ if (haskibble && data.kibble.timeseries.jira.length > 0) {
let xhtml = new HTML('div', {
style: {
position: 'relative',
@@ -376,7 +377,7 @@ function statistics_health(data) {
xhtml.innerHTML = txt;
html.inject(xhtml);
- if (data.kibble && data.kibble.timeseries.jira &&
data.kibble.timeseries.jira.length > 0) {
+ if (haskibble && data.kibble.timeseries.jira &&
data.kibble.timeseries.jira.length > 0) {
let cols = [
['x'],
@@ -450,7 +451,7 @@ function statistics_health(data) {
}
// Commits and contributors
- if (data.kibble && data.kibble.commits) {
+ if (haskibble && data.kibble.commits) {
let xhtml = new HTML('div', {
style: {
position: 'relative',
@@ -818,7 +819,7 @@ function statistics_health(data) {
// Busiest topics
- if (data.kibble) {
+ if (haskibble) {
let txt = "";
let showit = false;
if (data.kibble.busiest.email.length > 0) {
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1926428&r1=1926427&r2=1926428&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sat Jun 14
22:12:41 2025
@@ -1426,6 +1426,7 @@ function splash(state, json, all) {
let busiest_html = {};
function health_tips(data) {
+ let haskibble = data.kibble && Object.keys(haskibble) > 0;
let txt = "";
// Mailing list changes
for (var ml in data.delivery[project]) {
@@ -1453,7 +1454,7 @@ function health_tips(data) {
if (bz[0] || bz[1]) txt += "<li>%u BugZilla tickets opened and %u closed
in the past quarter.</li>".format(bz[0], bz[1]);
// JIRA changes
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.jira.change.opened;
let pct = parseInt(ctxt);
@@ -1471,7 +1472,7 @@ function health_tips(data) {
txt += "<li style='color: %s;'>%u issue%s opened in JIRA, past quarter
(%s)</li>".format(color, data.kibble.jira.after.opened, s, ctxt);
}
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.jira.change.closed;
let pct = parseInt(ctxt);
@@ -1492,7 +1493,7 @@ function health_tips(data) {
// Commits and contributors
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.commits.change.commits
let pct = parseInt(ctxt);
@@ -1509,7 +1510,7 @@ function health_tips(data) {
txt += "<li style='color: %s;'>%u commit%s in the past quarter
(%s)</li>".format(color, data.kibble.commits.after.commits, s, ctxt);
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.commits.change.authors
let pct = parseInt(ctxt);
@@ -1527,7 +1528,7 @@ function health_tips(data) {
}
// GitHub: PRs
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.prs.change.opened
let pct = parseInt(ctxt);
@@ -1546,7 +1547,7 @@ function health_tips(data) {
}
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.prs.change.closed
let pct = parseInt(ctxt);
@@ -1566,7 +1567,7 @@ function health_tips(data) {
}
// GitHub: Issues
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.issues.change.opened
let pct = parseInt(ctxt);
@@ -1585,7 +1586,7 @@ function health_tips(data) {
}
}
- if (data.kibble) {
+ if (haskibble) {
let color = 'black';
let ctxt = data.kibble.issues.change.closed
let pct = parseInt(ctxt);
@@ -1605,7 +1606,7 @@ function health_tips(data) {
}
// Busiest topics
- if (data.kibble) {
+ if (haskibble) {
let showit = false;
let busiest = new HTML('li', {}, "Busiest topics (click to pop up): ");
if (data.kibble.busiest.email.length > 0) {
@@ -2421,6 +2422,7 @@ function kibble_mailstats(xhtml, timeser
}
function statistics_health(data) {
+ let haskibble = data.kibble && Object.keys(haskibble) > 0;
let html = new HTML('div', {
style: {
position: 'relative',
@@ -2464,8 +2466,8 @@ function statistics_health(data) {
xhtml.innerHTML = txt;
html.inject(xhtml);
- let hasdevlist = (a[2] == 'dev' && data.kibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
- let hasuserlist = (a[2].match(/^users?$/) && data.kibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
+ let hasdevlist = (a[2] == 'dev' && haskibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
+ let hasuserlist = (a[2].match(/^users?$/) && haskibble &&
data.kibble.timeseries.devlist && data.kibble.timeseries.devlist.length);
if (txt.length > 0 && !(hasdevlist||hasuserlist)) {
let cols = [
@@ -2548,7 +2550,7 @@ function statistics_health(data) {
}
// JIRA changes
- if (data.kibble && data.kibble.timeseries.jira.length > 0) {
+ if (haskibble && data.kibble.timeseries.jira.length > 0) {
let xhtml = new HTML('div', {
style: {
position: 'relative',
@@ -2594,7 +2596,7 @@ function statistics_health(data) {
xhtml.innerHTML = txt;
html.inject(xhtml);
- if (data.kibble && data.kibble.timeseries.jira &&
data.kibble.timeseries.jira.length > 0) {
+ if (haskibble && data.kibble.timeseries.jira &&
data.kibble.timeseries.jira.length > 0) {
let cols = [
['x'],
@@ -2668,7 +2670,7 @@ function statistics_health(data) {
}
// Commits and contributors
- if (data.kibble && data.kibble.commits) {
+ if (haskibble && data.kibble.commits) {
let xhtml = new HTML('div', {
style: {
position: 'relative',
@@ -3036,7 +3038,7 @@ function statistics_health(data) {
// Busiest topics
- if (data.kibble) {
+ if (haskibble) {
let txt = "";
let showit = false;
if (data.kibble.busiest.email.length > 0) {