Author: humbedooh
Date: Sat Aug 3 04:36:58 2019
New Revision: 1864303
URL: http://svn.apache.org/viewvc?rev=1864303&view=rev
Log:
discard the double negative here, and nix unused code
Modified:
comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.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=1864303&r1=1864302&r2=1864303&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 Aug 3 04:36:58
2019
@@ -196,7 +196,7 @@ function health_tips(data) {
let a = ml.split('-', 2);
ml = "%s@%s.apache.org".format(a[1], a[0]);
let pct_change =Math.floor( 100 * ( (mldata.quarterly[0] - mldata.quarterly[1]) /
(mldata.quarterly[1]*1.0) ));
- let pct_change_txt = "%u%".format(pct_change);
+ let pct_change_txt = "%u%".format(Math.abs(pct_change));
if (isNaN(pct_change) || !isFinite(pct_change)) {
pct_change_txt = 'big';
}
@@ -204,7 +204,6 @@ function health_tips(data) {
txt += "<li style='color: #080'>%s had a %s increase in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
}
else if (pct_change < -25 && mldata.quarterly[1] > 5) {
- pct_change = Math.abs(pct_change)
txt += "<li style='color: #800'>%s had a %s decrease in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
}
}
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=1864303&r1=1864302&r2=1864303&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sat Aug 3 04:36:58 2019
@@ -1365,7 +1365,7 @@ function health_tips(data) {
let a = ml.split('-', 2);
ml = "%s@%s.apache.org".format(a[1], a[0]);
let pct_change =Math.floor( 100 * ( (mldata.quarterly[0] - mldata.quarterly[1]) /
(mldata.quarterly[1]*1.0) ));
- let pct_change_txt = "%u%".format(pct_change);
+ let pct_change_txt = "%u%".format(Math.abs(pct_change));
if (isNaN(pct_change) || !isFinite(pct_change)) {
pct_change_txt = 'big';
}
@@ -1373,7 +1373,6 @@ function health_tips(data) {
txt += "<li style='color: #080'>%s had a %s increase in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
}
else if (pct_change < -25 && mldata.quarterly[1] > 5) {
- pct_change = Math.abs(pct_change)
txt += "<li style='color: #800'>%s had a %s decrease in traffic in the
past quarter (%u emails compared to %u)</li>".format(ml, pct_change_txt, mldata.quarterly[0],
mldata.quarterly[1]);
}
}
|