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/07/31 19:09:38 UTC
svn commit: r1864098 - in /comdev/reporter.apache.org/trunk/site/wizard:
js/source/generators.js js/wizard.js steps.json
Author: humbedooh
Date: Wed Jul 31 19:09:38 2019
New Revision: 1864098
URL: http://svn.apache.org/viewvc?rev=1864098&view=rev
Log:
Start working on activity tips (such as releases found)
Modified:
comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
comdev/reporter.apache.org/trunk/site/wizard/steps.json
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=1864098&r1=1864097&r2=1864098&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 Wed Jul 31 19:09:38 2019
@@ -232,3 +232,25 @@ function compile_report(data, okay) {
return rep;
}
+function activity_tips(data) {
+ let three_months_ago = moment().subtract(3, 'months');
+ let txt = "";
+
+ // Releases
+ let rtxt = "";
+ for (var rel in data.releases[project]) {
+ let reldate = moment(data.releases[project][rel] * 1000.0);
+ if (reldate > three_months_ago) {
+ rtxt += "<li>%s was released on %s.</li>".format(rel, reldate.format('YYYY-MM-DD'));
+ }
+ }
+ if (rtxt != '') {
+ rtxt = "<h6>Releases this quarter: </h6><ul>" + rtxt + "</ul>";
+ }
+
+
+ // Put it all together
+ txt += rtxt;
+ if (txt) txt = "<h5>Potentially useful data I found:</h5>" + txt
+ return txt;
+}
\ No newline at end of file
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=1864098&r1=1864097&r2=1864098&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Wed Jul 31 19:09:38 2019
@@ -1220,7 +1220,28 @@ function compile_report(data, okay) {
return rep;
}
-
+function activity_tips(data) {
+ let three_months_ago = moment().subtract(3, 'months');
+ let txt = "";
+
+ // Releases
+ let rtxt = "";
+ for (var rel in data.releases[project]) {
+ let reldate = moment(data.releases[project][rel] * 1000.0);
+ if (reldate > three_months_ago) {
+ rtxt += "<li>%s was released on %s.</li>".format(rel, reldate.format('YYYY-MM-DD'));
+ }
+ }
+ if (rtxt != '') {
+ rtxt = "<h6>Releases this quarter: </h6><ul>" + rtxt + "</ul>";
+ }
+
+
+ // Put it all together
+ txt += rtxt;
+ if (txt) txt = "<h5>Potentially useful data I found:</h5>" + txt
+ return txt;
+}
/******************************************
Fetched from source/init.js
Modified: comdev/reporter.apache.org/trunk/site/wizard/steps.json
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/steps.json?rev=1864098&r1=1864097&r2=1864098&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/steps.json (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/steps.json Wed Jul 31 19:09:38 2019
@@ -27,7 +27,8 @@
"icon": "skiing",
"description": "Project Activity",
"help": "Please write a few lines (or more!) about the recent activity in the project and the community. This could be new software releases, new features, or community activity such as conferences and meetups.",
- "placeholder": "Example activity entries:\n\n- Apache Foo 1.2.3 Was released on 2019-04-05\n- Project members attended FooCon, it was a resounding success!\n- Added support for FooLib 2 and Async Gnoming."
+ "placeholder": "Example activity entries:\n\n- Apache Foo 1.2.3 Was released on 2019-04-05\n- Project members attended FooCon, it was a resounding success!\n- Added support for FooLib 2 and Async Gnoming.",
+ "tipgenerator": "activity_tips"
},
{
"id": "health",