Author: sebb
Date: Wed Nov 12 22:08:49 2025
New Revision: 1929692
Log:
Kibble is no more
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
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
Wed Nov 12 21:37:46 2025 (r1929691)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
Wed Nov 12 22:08:49 2025 (r1929692)
@@ -212,7 +212,6 @@ function splash(state, json, all) {
let busiest_html = {};
function health_tips(data) {
- let haskibble = data.kibble && Object.keys(data.kibble) > 0;
let txt = "";
// Mailing list changes
for (let ml in data.delivery[project]) {
@@ -240,222 +239,16 @@ 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 (!haskibble) {
- let jira = data.jira[project];
- if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u
closed in the past quarter.</li>".format(jira[0], jira[1]);
- }
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.jira.change.opened;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.jira.after.opened == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.jira.after.opened == 0)) {
- 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 (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.jira.change.closed;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.jira.after.closed == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.jira.after.closed == 0)) {
- txt += "<li style='color: %s;'>%u issue%s closed in JIRA, past quarter
(%s)</li>".format(color, data.kibble.jira.after.closed, s, ctxt);
- }
- }
-
+ let jira = data.jira[project];
+ if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u closed
in the past quarter.</li>".format(jira[0], jira[1]);
// Commits and contributors
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.commits.change.commits
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.commits.after.commits == 1 ? '' : 's';
- txt += "<li style='color: %s;'>%u commit%s in the past quarter
(%s)</li>".format(color, data.kibble.commits.after.commits, s, ctxt);
- }
-
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.commits.change.authors
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.commits.after.authors == 1 ? '' : 's';
- txt += "<li style='color: %s;'>%u code contributor%s in the past quarter
(%s)</li>".format(color, data.kibble.commits.after.authors, s, ctxt);
- }
// GitHub: PRs
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.prs.change.opened
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.prs.after.opened == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.prs.after.opened == 0)) {
- txt += "<li style='color: %s;'>%u PR%s opened on GitHub, past quarter
(%s)</li>".format(color, data.kibble.prs.after.opened, s, ctxt);
- }
- }
-
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.prs.change.closed
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.prs.after.closed == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.prs.after.closed == 0)) {
- txt += "<li style='color: %s;'>%u PR%s closed on GitHub, past quarter
(%s)</li>".format(color, data.kibble.prs.after.closed, s, ctxt);
- }
- }
// GitHub: Issues
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.issues.change.opened
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.issues.after.opened == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.issues.after.opened == 0)) {
- txt += "<li style='color: %s;'>%u issue%s opened on GitHub, past
quarter (%s)</li>".format(color, data.kibble.issues.after.opened, s, ctxt);
- }
- }
-
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.issues.change.closed
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.issues.after.closed == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.issues.after.closed == 0)) {
- txt += "<li style='color: %s;'>%u issue%s closed on GitHub, past
quarter (%s)</li>".format(color, data.kibble.issues.after.closed, s, ctxt);
- }
- }
-
+
// Busiest topics
- if (haskibble) {
- let showit = false;
- let busiest = new HTML('li', {}, "Busiest topics (click to pop up): ");
- if (data.kibble.busiest.email.length > 0) {
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.email;
- for (let i = 0; i < arr.length; i++) {
- let ml = arr[i].source.split('?')[1];
- let li = new HTML('li', {}, [
- new HTML("kbd", {}, ml),
- new HTML('i', {style: {display:
'inline-block', textIndent: '10px'}}, arr[i].name),
- new HTML('span', { style: {display:
'inline-block', textIndent: '10px'}}, "(%u emails)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- busiest_html['email'] = ul.outerHTML;
- let a = new HTML('a', {href: '#', onclick: 'show_busiest("email");',
style: {marginLeft: '10px'}}, 'email');
- busiest.inject(a);
- }
-
-
- if (data.kibble.busiest.github.length > 0) {
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.github;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {href: arr[i].url},
arr[i].url.replace('https://github.com/apache/', '')),
- new HTML('i', {style: {display:
'inline-block', textIndent: '10px'}}, arr[i].subject),
- new HTML('span', { style: {display:
'inline-block', textIndent: '10px'}}, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- busiest_html['github'] = ul.outerHTML;
- let a = new HTML('a', {href: '#', onclick: 'show_busiest("github");',
style: {marginLeft: '10px'}}, 'GitHub');
- busiest.inject(a);
- }
-
- if (data.kibble.busiest.jira.length > 0) {
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.jira;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {href: arr[i].url},
arr[i].key),
- new HTML('i', {style: {display:
'inline-block', textIndent: '10px'}}, arr[i].subject),
- new HTML('span', { style: {display:
'inline-block', textIndent: '10px'}}, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- busiest_html['jira'] = ul.outerHTML;
- let a = new HTML('a', {href: '#', onclick: 'show_busiest("jira");',
style: {marginLeft: '10px'}}, 'JIRA');
- busiest.inject(a);
- }
-
- if (showit) {
- txt += busiest.outerHTML;
- }
- }
// Append header IF there is data, otherwise nah.
if (txt.length > 0) {
Modified:
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
==============================================================================
---
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
Wed Nov 12 21:37:46 2025 (r1929691)
+++
comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js
Wed Nov 12 22:08:49 2025 (r1929692)
@@ -120,90 +120,7 @@ function statistics_meta(data) {
return txt;
}
-
-function kibble_mailstats(xhtml, timeseries, color) {
-
- let cols = [
- ['x'],
- ['emails'],
- ['threads'],
- ['authors']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- let a = 0;
- for (let n = 0; n < timeseries.length; n++) {
- let el = timeseries[n];
- if (el.date == date.unix()) {
- c = el['emails'];
- o = el['threads'];
- a = el['authors'];
- }
- }
- cols[0].push(date);
- cols[1].push(c);
- cols[2].push(o);
- cols[3].push(a);
- }
- let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(1);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- types: {
- 'emails': 'bar',
- 'authors': 'line',
- 'threads': 'line'
- },
- columns: cols,
- colors: {
- 'emails': color
- },
- color: (color, d) => {
- return d.index < 13 ? '#9639' : color;
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W, YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
-}
-
function statistics_health(data) {
- let haskibble = data.kibble && Object.keys(data.kibble) > 0;
let html = new HTML('div', {
style: {
position: 'relative',
@@ -248,10 +165,7 @@ function statistics_health(data) {
xhtml.innerHTML = txt;
html.inject(xhtml);
- 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)) {
+ if (txt.length > 0) {
let cols = [
['x'],
[ml]
@@ -308,12 +222,7 @@ function statistics_health(data) {
}
});
xhtml.inject(new HTML('br'))
- } else if (hasdevlist) {
- kibble_mailstats(xhtml, data.kibble.timeseries.devlist, color);
- } else if (hasuserlist && txt.length > 0) {
- kibble_mailstats(xhtml, data.kibble.timeseries.userlist, color);
}
-
}
// Bugzilla changes
@@ -332,7 +241,8 @@ function statistics_health(data) {
}
// JIRA changes
- if (haskibble && data.kibble.timeseries.jira.length > 0) {
+ let jira = data.jira[project];
+ if (jira[0] || jira[1]) {
let xhtml = new HTML('div', {
style: {
position: 'relative',
@@ -340,596 +250,18 @@ function statistics_health(data) {
}
});
let txt = "<h5>JIRA activity:</h5>";
- // Opened tickets
- let color = 'black';
- let ctxt = data.kibble.jira.change.opened;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.jira.after.opened == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.jira.after.opened == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s opened in JIRA, past
quarter (%s)</hi>".format(color, data.kibble.jira.after.opened, s, ctxt);
- }
-
- // Closed tickets
- color = 'black';
- ctxt = data.kibble.jira.change.closed;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.jira.after.closed == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.jira.after.closed == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s closed in JIRA, past
quarter (%s)</h6>".format(color, data.kibble.jira.after.closed, s, ctxt);
- }
-
+ txt += "<li>%u JIRA tickets opened and %u closed in the past
quarter.</li>".format(jira[0], jira[1]);
xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (haskibble && data.kibble.timeseries.jira &&
data.kibble.timeseries.jira.length > 0) {
-
- let cols = [
- ['x'],
- ['Tickets opened'],
- ['Tickets closed']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- for (let n = 0; n < data.kibble.timeseries.jira.length; n++) {
- let el = data.kibble.timeseries.jira[n];
- if (el.date == date.unix()) {
- c = el['issues closed']
- o = el['issues opened']
- }
- }
- cols[0].push(date);
- cols[1].push(o);
- cols[2].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
- }
- html.inject(new HTML('hr'));
-
- } else {
- let jira = data.jira[project];
- if (jira[0] || jira[1]) {
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- let txt = "<h5>JIRA activity:</h5>";
- txt += "<li>%u JIRA tickets opened and %u closed in the past
quarter.</li>".format(jira[0], jira[1]);
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- }
+ html.inject(xhtml);
}
- // Commits and contributors
- if (haskibble && data.kibble.commits) {
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- html.inject(xhtml);
- let txt = "<h5>Commit activity:</h5>"
- let color = 'black';
- let ctxt = data.kibble.commits.change.commits
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' decrease';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.commits.after.commits == 1 ? '' : 's';
- txt += "<h6 style='color: %s;'>%u commit%s in the past quarter
(%s)</h6>".format(color, data.kibble.commits.after.commits, s, ctxt);
-
- // committers
- color = 'black';
- ctxt = data.kibble.commits.change.authors;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.commits.after.authors == 1 ? '' : 's';
- txt += "<h6 style='color: %s;'>%u code contributor%s in the past
quarter (%s)</h6>".format(color, data.kibble.commits.after.authors, s, ctxt);
-
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (data.kibble.timeseries.commits &&
data.kibble.timeseries.commits.length > 0) {
-
- let cols = [
- ['x'],
- ['Commits']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- for (let n = 0; n < data.kibble.timeseries.commits.length;
n++) {
- let el = data.kibble.timeseries.commits[n];
- if (el.date == date.unix()) {
- c = el['commits']
- }
- }
- cols[0].push(date);
- cols[1].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'))
- }
- html.inject(new HTML('hr'));
-
- }
-
+ // Commits and contributors
// GitHub: PRs
- if (haskibble && data.kibble.timeseries.github.length > 0) {
-
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- html.inject(xhtml);
- let txt = "<h5>GitHub PR activity:</h5>";
-
- let color = 'black';
- let ctxt = data.kibble.prs.change.opened
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.prs.after.opened == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.prs.after.opened == 0)) {
- txt += "<h6 style='color: %s;'>%u PR%s opened on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.prs.after.opened, s, ctxt);
- }
-
-
- color = 'black';
- ctxt = data.kibble.prs.change.closed;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.prs.after.closed == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.prs.after.closed == 0)) {
- txt += "<h6 style='color: %s;'>%u PR%s closed on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.prs.after.closed, s, ctxt);
- }
-
-
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (data.kibble.timeseries.github &&
data.kibble.timeseries.github.length > 0) {
-
- let cols = [
- ['x'],
- ['PRs opened'],
- ['PRs closed']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- for (let n = 0; n < data.kibble.timeseries.github.length; n++)
{
- let el = data.kibble.timeseries.github[n];
- if (el.date == date.unix()) {
- c = el['pull requests closed']
- o = el['pull requests opened']
- }
- }
- cols[0].push(date);
- cols[1].push(o);
- cols[2].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- colors: {
- 'PRs opened': '#008800',
- 'PRs closed': '#993322'
- },
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
- }
- html.inject(new HTML('hr'));
-
- }
-
// GitHub: issues
- if (haskibble && data.kibble.timeseries.github.length > 0 &&
!(data.kibble.issues.after.opened == 0 && data.kibble.issues.before.opened ==
0) ) {
-
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- html.inject(xhtml);
- let txt = "<h5>GitHub issues:</h5>";
-
- let color = 'black';
- let ctxt = data.kibble.issues.change.opened;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.issues.after.opened == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.issues.after.opened == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s opened on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.issues.after.opened, s, ctxt);
- }
-
-
- color = 'black';
- ctxt = data.kibble.issues.change.closed;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.issues.after.closed == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.issues.after.closed == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s closed on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.issues.after.closed, s, ctxt);
- }
-
-
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (data.kibble.timeseries.github &&
data.kibble.timeseries.github.length > 0) {
-
- let cols = [
- ['x'],
- ['issues opened'],
- ['issues closed']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- for (let n = 0; n < data.kibble.timeseries.github.length; n++)
{
- let el = data.kibble.timeseries.github[n];
- if (el.date == date.unix()) {
- c = el['issues closed']
- o = el['issues opened']
- }
- }
- cols[0].push(date);
- cols[1].push(o);
- cols[2].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- colors: {
- 'issues opened': '#008800',
- 'issues closed': '#993322'
- },
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
- }
- html.inject(new HTML('hr'));
- }
-
// Busiest topics
- if (haskibble) {
- let txt = "";
- let showit = false;
- if (data.kibble.busiest.email.length > 0) {
- txt += "<h5>Busiest email threads:</h5>";
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.email;
- for (let i = 0; i < arr.length; i++) {
- let ml = arr[i].source.split('?')[1];
- let li = new HTML('li', {}, [
- new HTML("kbd", {}, ml),
- new HTML('i', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, arr[i].name),
- new HTML('span', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, "(%u emails)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- txt += ul.outerHTML;
-
- }
-
-
- if (data.kibble.busiest.github.length > 0) {
- showit = true;
- txt += "<h5>Busiest GitHub issues/PRs:</h5>";
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.github;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {
- href: arr[i].url
- }, arr[i].url.replace('https://github.com/apache/', '')),
- new HTML('i', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, arr[i].subject),
- new HTML('span', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- txt += ul.outerHTML;
-
- }
-
- if (data.kibble.busiest.jira.length > 0) {
- showit = true;
- txt += "<h5>Busiest JIRA tickets:</h5>";
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.jira;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {
- href: arr[i].url
- }, arr[i].key),
- new HTML('i', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, arr[i].subject),
- new HTML('span', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- txt += ul.outerHTML;
-
- }
-
- if (txt.length > 0) {
- let twrap = new HTML('div');
- twrap.innerHTML = txt;
- html.inject(twrap);
- }
- }
headers = $(html).find("h5");
let toc = "<ul>";
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Wed Nov 12
21:37:46 2025 (r1929691)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Wed Nov 12
22:08:49 2025 (r1929692)
@@ -1426,7 +1426,6 @@ function splash(state, json, all) {
let busiest_html = {};
function health_tips(data) {
- let haskibble = data.kibble && Object.keys(data.kibble) > 0;
let txt = "";
// Mailing list changes
for (let ml in data.delivery[project]) {
@@ -1454,222 +1453,16 @@ 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 (!haskibble) {
- let jira = data.jira[project];
- if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u
closed in the past quarter.</li>".format(jira[0], jira[1]);
- }
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.jira.change.opened;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.jira.after.opened == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.jira.after.opened == 0)) {
- 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 (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.jira.change.closed;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.jira.after.closed == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.jira.after.closed == 0)) {
- txt += "<li style='color: %s;'>%u issue%s closed in JIRA, past quarter
(%s)</li>".format(color, data.kibble.jira.after.closed, s, ctxt);
- }
- }
-
+ let jira = data.jira[project];
+ if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u closed
in the past quarter.</li>".format(jira[0], jira[1]);
// Commits and contributors
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.commits.change.commits
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.commits.after.commits == 1 ? '' : 's';
- txt += "<li style='color: %s;'>%u commit%s in the past quarter
(%s)</li>".format(color, data.kibble.commits.after.commits, s, ctxt);
- }
-
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.commits.change.authors
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.commits.after.authors == 1 ? '' : 's';
- txt += "<li style='color: %s;'>%u code contributor%s in the past quarter
(%s)</li>".format(color, data.kibble.commits.after.authors, s, ctxt);
- }
// GitHub: PRs
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.prs.change.opened
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.prs.after.opened == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.prs.after.opened == 0)) {
- txt += "<li style='color: %s;'>%u PR%s opened on GitHub, past quarter
(%s)</li>".format(color, data.kibble.prs.after.opened, s, ctxt);
- }
- }
-
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.prs.change.closed
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.prs.after.closed == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.prs.after.closed == 0)) {
- txt += "<li style='color: %s;'>%u PR%s closed on GitHub, past quarter
(%s)</li>".format(color, data.kibble.prs.after.closed, s, ctxt);
- }
- }
// GitHub: Issues
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.issues.change.opened
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.issues.after.opened == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.issues.after.opened == 0)) {
- txt += "<li style='color: %s;'>%u issue%s opened on GitHub, past
quarter (%s)</li>".format(color, data.kibble.issues.after.opened, s, ctxt);
- }
- }
-
- if (haskibble) {
- let color = 'black';
- let ctxt = data.kibble.issues.change.closed
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.issues.after.closed == 1 ? '' : 's';
- if (! (ctxt == 'no change' && data.kibble.issues.after.closed == 0)) {
- txt += "<li style='color: %s;'>%u issue%s closed on GitHub, past
quarter (%s)</li>".format(color, data.kibble.issues.after.closed, s, ctxt);
- }
- }
-
+
// Busiest topics
- if (haskibble) {
- let showit = false;
- let busiest = new HTML('li', {}, "Busiest topics (click to pop up): ");
- if (data.kibble.busiest.email.length > 0) {
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.email;
- for (let i = 0; i < arr.length; i++) {
- let ml = arr[i].source.split('?')[1];
- let li = new HTML('li', {}, [
- new HTML("kbd", {}, ml),
- new HTML('i', {style: {display:
'inline-block', textIndent: '10px'}}, arr[i].name),
- new HTML('span', { style: {display:
'inline-block', textIndent: '10px'}}, "(%u emails)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- busiest_html['email'] = ul.outerHTML;
- let a = new HTML('a', {href: '#', onclick: 'show_busiest("email");',
style: {marginLeft: '10px'}}, 'email');
- busiest.inject(a);
- }
-
-
- if (data.kibble.busiest.github.length > 0) {
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.github;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {href: arr[i].url},
arr[i].url.replace('https://github.com/apache/', '')),
- new HTML('i', {style: {display:
'inline-block', textIndent: '10px'}}, arr[i].subject),
- new HTML('span', { style: {display:
'inline-block', textIndent: '10px'}}, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- busiest_html['github'] = ul.outerHTML;
- let a = new HTML('a', {href: '#', onclick: 'show_busiest("github");',
style: {marginLeft: '10px'}}, 'GitHub');
- busiest.inject(a);
- }
-
- if (data.kibble.busiest.jira.length > 0) {
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.jira;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {href: arr[i].url},
arr[i].key),
- new HTML('i', {style: {display:
'inline-block', textIndent: '10px'}}, arr[i].subject),
- new HTML('span', { style: {display:
'inline-block', textIndent: '10px'}}, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- busiest_html['jira'] = ul.outerHTML;
- let a = new HTML('a', {href: '#', onclick: 'show_busiest("jira");',
style: {marginLeft: '10px'}}, 'JIRA');
- busiest.inject(a);
- }
-
- if (showit) {
- txt += busiest.outerHTML;
- }
- }
// Append header IF there is data, otherwise nah.
if (txt.length > 0) {
@@ -2273,90 +2066,7 @@ function statistics_meta(data) {
return txt;
}
-
-function kibble_mailstats(xhtml, timeseries, color) {
-
- let cols = [
- ['x'],
- ['emails'],
- ['threads'],
- ['authors']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- let a = 0;
- for (let n = 0; n < timeseries.length; n++) {
- let el = timeseries[n];
- if (el.date == date.unix()) {
- c = el['emails'];
- o = el['threads'];
- a = el['authors'];
- }
- }
- cols[0].push(date);
- cols[1].push(c);
- cols[2].push(o);
- cols[3].push(a);
- }
- let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(1);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- types: {
- 'emails': 'bar',
- 'authors': 'line',
- 'threads': 'line'
- },
- columns: cols,
- colors: {
- 'emails': color
- },
- color: (color, d) => {
- return d.index < 13 ? '#9639' : color;
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W, YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
-}
-
function statistics_health(data) {
- let haskibble = data.kibble && Object.keys(data.kibble) > 0;
let html = new HTML('div', {
style: {
position: 'relative',
@@ -2401,10 +2111,7 @@ function statistics_health(data) {
xhtml.innerHTML = txt;
html.inject(xhtml);
- 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)) {
+ if (txt.length > 0) {
let cols = [
['x'],
[ml]
@@ -2461,12 +2168,7 @@ function statistics_health(data) {
}
});
xhtml.inject(new HTML('br'))
- } else if (hasdevlist) {
- kibble_mailstats(xhtml, data.kibble.timeseries.devlist, color);
- } else if (hasuserlist && txt.length > 0) {
- kibble_mailstats(xhtml, data.kibble.timeseries.userlist, color);
}
-
}
// Bugzilla changes
@@ -2485,7 +2187,8 @@ function statistics_health(data) {
}
// JIRA changes
- if (haskibble && data.kibble.timeseries.jira.length > 0) {
+ let jira = data.jira[project];
+ if (jira[0] || jira[1]) {
let xhtml = new HTML('div', {
style: {
position: 'relative',
@@ -2493,596 +2196,18 @@ function statistics_health(data) {
}
});
let txt = "<h5>JIRA activity:</h5>";
- // Opened tickets
- let color = 'black';
- let ctxt = data.kibble.jira.change.opened;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.jira.after.opened == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.jira.after.opened == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s opened in JIRA, past
quarter (%s)</hi>".format(color, data.kibble.jira.after.opened, s, ctxt);
- }
-
- // Closed tickets
- color = 'black';
- ctxt = data.kibble.jira.change.closed;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.jira.after.closed == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.jira.after.closed == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s closed in JIRA, past
quarter (%s)</h6>".format(color, data.kibble.jira.after.closed, s, ctxt);
- }
-
+ txt += "<li>%u JIRA tickets opened and %u closed in the past
quarter.</li>".format(jira[0], jira[1]);
xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (haskibble && data.kibble.timeseries.jira &&
data.kibble.timeseries.jira.length > 0) {
-
- let cols = [
- ['x'],
- ['Tickets opened'],
- ['Tickets closed']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- for (let n = 0; n < data.kibble.timeseries.jira.length; n++) {
- let el = data.kibble.timeseries.jira[n];
- if (el.date == date.unix()) {
- c = el['issues closed']
- o = el['issues opened']
- }
- }
- cols[0].push(date);
- cols[1].push(o);
- cols[2].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
- }
- html.inject(new HTML('hr'));
-
- } else {
- let jira = data.jira[project];
- if (jira[0] || jira[1]) {
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- let txt = "<h5>JIRA activity:</h5>";
- txt += "<li>%u JIRA tickets opened and %u closed in the past
quarter.</li>".format(jira[0], jira[1]);
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- }
+ html.inject(xhtml);
}
- // Commits and contributors
- if (haskibble && data.kibble.commits) {
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- html.inject(xhtml);
- let txt = "<h5>Commit activity:</h5>"
- let color = 'black';
- let ctxt = data.kibble.commits.change.commits
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' decrease';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.commits.after.commits == 1 ? '' : 's';
- txt += "<h6 style='color: %s;'>%u commit%s in the past quarter
(%s)</h6>".format(color, data.kibble.commits.after.commits, s, ctxt);
-
- // committers
- color = 'black';
- ctxt = data.kibble.commits.change.authors;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.commits.after.authors == 1 ? '' : 's';
- txt += "<h6 style='color: %s;'>%u code contributor%s in the past
quarter (%s)</h6>".format(color, data.kibble.commits.after.authors, s, ctxt);
-
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (data.kibble.timeseries.commits &&
data.kibble.timeseries.commits.length > 0) {
-
- let cols = [
- ['x'],
- ['Commits']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- for (let n = 0; n < data.kibble.timeseries.commits.length;
n++) {
- let el = data.kibble.timeseries.commits[n];
- if (el.date == date.unix()) {
- c = el['commits']
- }
- }
- cols[0].push(date);
- cols[1].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'))
- }
- html.inject(new HTML('hr'));
-
- }
-
+ // Commits and contributors
// GitHub: PRs
- if (haskibble && data.kibble.timeseries.github.length > 0) {
-
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- html.inject(xhtml);
- let txt = "<h5>GitHub PR activity:</h5>";
-
- let color = 'black';
- let ctxt = data.kibble.prs.change.opened
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.prs.after.opened == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.prs.after.opened == 0)) {
- txt += "<h6 style='color: %s;'>%u PR%s opened on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.prs.after.opened, s, ctxt);
- }
-
-
- color = 'black';
- ctxt = data.kibble.prs.change.closed;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.prs.after.closed == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.prs.after.closed == 0)) {
- txt += "<h6 style='color: %s;'>%u PR%s closed on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.prs.after.closed, s, ctxt);
- }
-
-
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (data.kibble.timeseries.github &&
data.kibble.timeseries.github.length > 0) {
-
- let cols = [
- ['x'],
- ['PRs opened'],
- ['PRs closed']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- for (let n = 0; n < data.kibble.timeseries.github.length; n++)
{
- let el = data.kibble.timeseries.github[n];
- if (el.date == date.unix()) {
- c = el['pull requests closed']
- o = el['pull requests opened']
- }
- }
- cols[0].push(date);
- cols[1].push(o);
- cols[2].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- colors: {
- 'PRs opened': '#008800',
- 'PRs closed': '#993322'
- },
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
- }
- html.inject(new HTML('hr'));
-
- }
-
// GitHub: issues
- if (haskibble && data.kibble.timeseries.github.length > 0 &&
!(data.kibble.issues.after.opened == 0 && data.kibble.issues.before.opened ==
0) ) {
-
- let xhtml = new HTML('div', {
- style: {
- position: 'relative',
- clear: 'both'
- }
- });
- html.inject(xhtml);
- let txt = "<h5>GitHub issues:</h5>";
-
- let color = 'black';
- let ctxt = data.kibble.issues.change.opened;
- let pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- let s = data.kibble.issues.after.opened == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.issues.after.opened == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s opened on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.issues.after.opened, s, ctxt);
- }
-
-
- color = 'black';
- ctxt = data.kibble.issues.change.closed;
- pct = parseInt(ctxt);
- if (pct > 0) {
- if (pct > 10) color = 'green';
- ctxt += ' increase';
- } else if (pct < 0) {
- if (pct < -10) color = 'maroon';
- ctxt += ' change';
- } else {
- ctxt = 'no change';
- }
- s = data.kibble.issues.after.closed == 1 ? '' : 's';
- if (!(ctxt == 'no change' && data.kibble.issues.after.closed == 0)) {
- txt += "<h6 style='color: %s;'>%u issue%s closed on GitHub, past
quarter (%s)</h6>".format(color, data.kibble.issues.after.closed, s, ctxt);
- }
-
-
- xhtml.innerHTML = txt;
- html.inject(xhtml);
- if (data.kibble.timeseries.github &&
data.kibble.timeseries.github.length > 0) {
-
- let cols = [
- ['x'],
- ['issues opened'],
- ['issues closed']
- ];
- for (let i = 0; i < 27; i++) {
- let date = moment.utc().subtract(i,
'weeks').startOf('week').weekday(1);
- let c = 0;
- let o = 0;
- for (let n = 0; n < data.kibble.timeseries.github.length; n++)
{
- let el = data.kibble.timeseries.github[n];
- if (el.date == date.unix()) {
- c = el['issues closed']
- o = el['issues opened']
- }
- }
- cols[0].push(date);
- cols[1].push(o);
- cols[2].push(c);
- }
- let cutoff = moment.utc().subtract(13,
'weeks').startOf('week').weekday(4);
- let chartdiv = new HTML('div', {
- style: {
- clear: 'both',
- width: '620px',
- height: '220px',
- position: 'relative',
- background: '#FFF',
- borderRadius: '5px',
- border: '0.75px solid #333'
- }
- });
- xhtml.inject(chartdiv);
- let chart = c3.generate({
- bindto: chartdiv,
- axis: {
- x: {
- type: 'timeseries',
- tick: {
- count: 13,
- format: (x) => {
- return moment(x).format('MMM D, YYYY');
- }
- }
- }
- },
- data: {
- x: 'x',
- type: 'bar',
- columns: cols,
- colors: {
- 'issues opened': '#008800',
- 'issues closed': '#993322'
- },
- color: (color, d) => {
- return (d.index < 13 ? color + '44': color +'FF');
- }
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- tooltip: {
- format: {
- title: (x) => 'Week %s'.format(moment(x).format('W,
YYYY'))
- }
- }
- });
- xhtml.inject(new HTML('br'));
- }
- html.inject(new HTML('hr'));
- }
-
// Busiest topics
- if (haskibble) {
- let txt = "";
- let showit = false;
- if (data.kibble.busiest.email.length > 0) {
- txt += "<h5>Busiest email threads:</h5>";
- showit = true;
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.email;
- for (let i = 0; i < arr.length; i++) {
- let ml = arr[i].source.split('?')[1];
- let li = new HTML('li', {}, [
- new HTML("kbd", {}, ml),
- new HTML('i', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, arr[i].name),
- new HTML('span', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, "(%u emails)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- txt += ul.outerHTML;
-
- }
-
-
- if (data.kibble.busiest.github.length > 0) {
- showit = true;
- txt += "<h5>Busiest GitHub issues/PRs:</h5>";
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.github;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {
- href: arr[i].url
- }, arr[i].url.replace('https://github.com/apache/', '')),
- new HTML('i', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, arr[i].subject),
- new HTML('span', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- txt += ul.outerHTML;
-
- }
-
- if (data.kibble.busiest.jira.length > 0) {
- showit = true;
- txt += "<h5>Busiest JIRA tickets:</h5>";
- let ul = new HTML('ul');
- let arr = data.kibble.busiest.jira;
- for (let i = 0; i < arr.length; i++) {
- let li = new HTML('li', {}, [
- new HTML("a", {
- href: arr[i].url
- }, arr[i].key),
- new HTML('i', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, arr[i].subject),
- new HTML('span', {
- style: {
- display: 'inline-block',
- textIndent: '10px'
- }
- }, "(%u comments)".format(arr[i].count))
- ]);
- ul.inject(li);
- }
- txt += ul.outerHTML;
-
- }
-
- if (txt.length > 0) {
- let twrap = new HTML('div');
- twrap.innerHTML = txt;
- html.inject(twrap);
- }
- }
headers = $(html).find("h5");
let toc = "<ul>";