You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2019/08/06 14:56:52 UTC
svn commit: r1864522 - in /comdev/reporter.apache.org/trunk/site/wizard/js:
source/statistics_generator.js wizard.js
Author: humbedooh
Date: Tue Aug 6 14:56:52 2019
New Revision: 1864522
URL: http://svn.apache.org/viewvc?rev=1864522&view=rev
Log:
quarters have 13 weeks
Modified:
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/statistics_generator.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/statistics_generator.js?rev=1864522&r1=1864521&r2=1864522&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 Tue Aug 6 14:56:52 2019
@@ -167,12 +167,12 @@ function statistics_health(data) {
['x'],
[ml]
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(4);
cols[0].push(date);
cols[1].push(mldata.weekly[date.unix()] || 0);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -191,7 +191,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -203,7 +203,7 @@ function statistics_health(data) {
type: 'bar',
columns: cols,
color: (color, d) => {
- return d.index < 12 ? '#9639' : (pct_change < 0 ? '#900' : '#090');
+ return d.index < 13 ? '#9639' : (pct_change < 0 ? '#900' : '#090');
}
},
bar: {
@@ -282,7 +282,7 @@ function statistics_health(data) {
['Tickets opened'],
['Tickets closed']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
let o = 0;
@@ -297,7 +297,7 @@ function statistics_health(data) {
cols[1].push(c);
cols[2].push(o);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -316,7 +316,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -328,7 +328,7 @@ function statistics_health(data) {
type: 'bar',
columns: cols,
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
@@ -397,7 +397,7 @@ function statistics_health(data) {
['x'],
['Commits']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
for (var n = 0; n < data.kibble.timeseries.commits.length; n++) {
@@ -409,7 +409,7 @@ function statistics_health(data) {
cols[0].push(date);
cols[1].push(c);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -428,7 +428,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -440,7 +440,7 @@ function statistics_health(data) {
type: 'bar',
columns: cols,
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
@@ -518,7 +518,7 @@ function statistics_health(data) {
['PRs opened'],
['PRs closed']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
let o = 0;
@@ -533,7 +533,7 @@ function statistics_health(data) {
cols[1].push(c);
cols[2].push(o);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -552,7 +552,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -568,7 +568,7 @@ function statistics_health(data) {
'PRs closed': '#993322'
},
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
@@ -646,7 +646,7 @@ function statistics_health(data) {
['issues opened'],
['issues closed']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
let o = 0;
@@ -661,7 +661,7 @@ function statistics_health(data) {
cols[1].push(c);
cols[2].push(o);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -680,7 +680,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -696,7 +696,7 @@ function statistics_health(data) {
'issues closed': '#993322'
},
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
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=1864522&r1=1864521&r2=1864522&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Tue Aug 6 14:56:52 2019
@@ -2266,12 +2266,12 @@ function statistics_health(data) {
['x'],
[ml]
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(4);
cols[0].push(date);
cols[1].push(mldata.weekly[date.unix()] || 0);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -2290,7 +2290,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -2302,7 +2302,7 @@ function statistics_health(data) {
type: 'bar',
columns: cols,
color: (color, d) => {
- return d.index < 12 ? '#9639' : (pct_change < 0 ? '#900' : '#090');
+ return d.index < 13 ? '#9639' : (pct_change < 0 ? '#900' : '#090');
}
},
bar: {
@@ -2381,7 +2381,7 @@ function statistics_health(data) {
['Tickets opened'],
['Tickets closed']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
let o = 0;
@@ -2396,7 +2396,7 @@ function statistics_health(data) {
cols[1].push(c);
cols[2].push(o);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -2415,7 +2415,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -2427,7 +2427,7 @@ function statistics_health(data) {
type: 'bar',
columns: cols,
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
@@ -2496,7 +2496,7 @@ function statistics_health(data) {
['x'],
['Commits']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
for (var n = 0; n < data.kibble.timeseries.commits.length; n++) {
@@ -2508,7 +2508,7 @@ function statistics_health(data) {
cols[0].push(date);
cols[1].push(c);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -2527,7 +2527,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -2539,7 +2539,7 @@ function statistics_health(data) {
type: 'bar',
columns: cols,
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
@@ -2617,7 +2617,7 @@ function statistics_health(data) {
['PRs opened'],
['PRs closed']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
let o = 0;
@@ -2632,7 +2632,7 @@ function statistics_health(data) {
cols[1].push(c);
cols[2].push(o);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -2651,7 +2651,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -2667,7 +2667,7 @@ function statistics_health(data) {
'PRs closed': '#993322'
},
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {
@@ -2745,7 +2745,7 @@ function statistics_health(data) {
['issues opened'],
['issues closed']
];
- for (var i = 0; i < 24; i++) {
+ for (var i = 0; i < 26; i++) {
let date = moment.utc().subtract(i, 'weeks').startOf('week').weekday(1);
let c = 0;
let o = 0;
@@ -2760,7 +2760,7 @@ function statistics_health(data) {
cols[1].push(c);
cols[2].push(o);
}
- let cutoff = moment.utc().subtract(12, 'weeks').startOf('week').weekday(4);
+ let cutoff = moment.utc().subtract(13, 'weeks').startOf('week').weekday(4);
let chartdiv = new HTML('div', {
style: {
clear: 'both',
@@ -2779,7 +2779,7 @@ function statistics_health(data) {
x: {
type: 'timeseries',
tick: {
- count: 12,
+ count: 13,
format: (x) => {
return moment(x).format('MMM D, YYYY');
}
@@ -2795,7 +2795,7 @@ function statistics_health(data) {
'issues closed': '#993322'
},
color: (color, d) => {
- return (d.index < 12 ? color + '44': color +'FF');
+ return (d.index < 13 ? color + '44': color +'FF');
}
},
bar: {