community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864065 - in /comdev/reporter.apache.org/trunk/site/wizard: css/wizard.css index.html js/source/generators.js js/source/primer.js js/source/reportdate.js js/wizard.js steps.json
Date Wed, 31 Jul 2019 14:28:42 GMT
Author: humbedooh
Date: Wed Jul 31 14:28:42 2019
New Revision: 1864065

URL: http://svn.apache.org/viewvc?rev=1864065&view=rev
Log:
Add some tips from the metrics we have, for health section.

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/css/wizard.css
    comdev/reporter.apache.org/trunk/site/wizard/index.html
    comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
    comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js
    comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.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/css/wizard.css
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/css/wizard.css?rev=1864065&r1=1864064&r2=1864065&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/css/wizard.css (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/css/wizard.css Wed Jul 31 14:28:42 2019
@@ -97,6 +97,16 @@
     margin-bottom: 10px !important;
 }
 
+.wizard-tip {
+    width: 720px;
+    border: 1.5px solid #3339;
+    background: #FEF;
+    border-radius: 10px;
+    margin: 10px auto;
+    padding: 10px;
+    font-size: 0.85rem;
+}
+
 
 .loader,
 .loader:before,

Modified: comdev/reporter.apache.org/trunk/site/wizard/index.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/index.html?rev=1864065&r1=1864064&r2=1864065&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/index.html (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/index.html Wed Jul 31 14:28:42 2019
@@ -45,6 +45,8 @@ placeholder="Example activity:
 <button id="step_next" onclick="build_steps(current_step+1);" class="btn btn-success"
style="float: right;">&#x203A;&#x203A; Next step</button>
 </p>
     </div>
+    
+    <div id="tips" class="wizard-tip"></div>
     </div>
    
    

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=1864065&r1=1864064&r2=1864065&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 14:28:42
2019
@@ -88,4 +88,34 @@ function splash(state, json) {
     }
     html.inject(tbl);
     
+}
+
+function health_tips(data) {
+    let txt = "";
+    txt += "<h5>Potentially useful observations for your health metrics:</h5>";
+    
+    // Mailing list changes
+    for (var ml in data.delivery[project]) {
+        let mldata = data.delivery[project][ml];
+        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) ));
+        if (pct_change > 25) {
+            txt += "<span style='color: #080'>- %s had a %u% increase in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change,
mldata.quarterly[0], mldata.quarterly[1]);
+        }
+        else if (pct_change < -25) {
+            pct_change = Math.abs(pct_change)
+            txt += "<span style='color: #800'>- %s had a %u% decrease in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change,
mldata.quarterly[0], mldata.quarterly[1]);
+        }
+    }
+    
+    // Bugzilla changes
+    let bz = data.bugzilla[project];
+    if (bz[0] || bz[1]) txt += "- %u BugZilla tickets opened and %u closed in the past quarter.".format(bz[0],
bz[1]);
+    
+    // JIRA changes
+    let jira = data.jira[project];
+    if (jira[0] || jira[1]) txt += "- %u JIRA tickets opened and %u closed in the past quarter.".format(jira[0],
jira[1]);
+    
+    return txt;
 }
\ No newline at end of file

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js?rev=1864065&r1=1864064&r2=1864065&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/primer.js Wed Jul 31 14:28:42 2019
@@ -104,6 +104,18 @@ function build_steps(s, start) {
             } else {
                 text.value = '';
             }
+            
+            // tips??
+            let tip = document.getElementById('tips');
+            if (element.tipgenerator) {
+                let data = eval("%s(pdata);".format(element.tipgenerator));
+                if (data && data.length > 0) {
+                    tip.innerHTML = data;
+                    tip.style.display = 'block';
+                }
+            } else {
+                tip.style.display = 'none';
+            }
         }
     }
     

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js?rev=1864065&r1=1864064&r2=1864065&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js Wed Jul 31 14:28:42
2019
@@ -1,4 +1,4 @@
-
+// Grabbed from old reporter.a.o
 
 // return all the Wednesdays in the month
 function getWednesdays(mo, y) {

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=1864065&r1=1864064&r2=1864065&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 14:28:42 2019
@@ -1078,6 +1078,36 @@ function splash(state, json) {
     
 }
 
+function health_tips(data) {
+    let txt = "";
+    txt += "<h5>Potentially useful observations for your health metrics:</h5>";
+    
+    // Mailing list changes
+    for (var ml in data.delivery[project]) {
+        let mldata = data.delivery[project][ml];
+        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) ));
+        if (pct_change > 25) {
+            txt += "<span style='color: #080'>- %s had a %u% increase in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change,
mldata.quarterly[0], mldata.quarterly[1]);
+        }
+        else if (pct_change < -25) {
+            pct_change = Math.abs(pct_change)
+            txt += "<span style='color: #800'>- %s had a %u% decrease in traffic in
the past quarter (%u emails compared to %u)</span><br/>".format(ml, pct_change,
mldata.quarterly[0], mldata.quarterly[1]);
+        }
+    }
+    
+    // Bugzilla changes
+    let bz = data.bugzilla[project];
+    if (bz[0] || bz[1]) txt += "- %u BugZilla tickets opened and %u closed in the past quarter.".format(bz[0],
bz[1]);
+    
+    // JIRA changes
+    let jira = data.jira[project];
+    if (jira[0] || jira[1]) txt += "- %u JIRA tickets opened and %u closed in the past quarter.".format(jira[0],
jira[1]);
+    
+    return txt;
+}
+
 /******************************************
  Fetched from source/init.js
 ******************************************/
@@ -1211,6 +1241,18 @@ function build_steps(s, start) {
             } else {
                 text.value = '';
             }
+            
+            // tips??
+            let tip = document.getElementById('tips');
+            if (element.tipgenerator) {
+                let data = eval("%s(pdata);".format(element.tipgenerator));
+                if (data && data.length > 0) {
+                    tip.innerHTML = data;
+                    tip.style.display = 'block';
+                }
+            } else {
+                tip.style.display = 'none';
+            }
         }
     }
     
@@ -1245,7 +1287,7 @@ function compile_report() {
  Fetched from source/reportdate.js
 ******************************************/
 
-
+// Grabbed from old reporter.a.o
 
 // return all the Wednesdays in the month
 function getWednesdays(mo, y) {

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=1864065&r1=1864064&r2=1864065&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/steps.json (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/steps.json Wed Jul 31 14:28:42 2019
@@ -34,7 +34,8 @@
         "icon": "heartbeat",
         "description": "Community Health",
         "help": "Tell us how your community is doing. Is there an influx of new contributors,
is there a good flow of email on the mailing lists, or are things in decline? Are there any
community metrics you'd like to showcase or make note of?",
-        "placeholder": "Example health entries: \n\nWe had 25 contributors this quarter -
including several new ones - in addition\nto the existing PMC and committers, and more activity
on our issue tracker.\nNotably, there have been very promising contributions from some new
developers\nto help with technical debt, particularly to remove uses of an internal\npackage
that makes it impossible to use Apache Foo in an Splorg environment with\nnewer versions of
Gson.\n\nHealth of the community remains strong with many active release lines,\nfeature development,
active user and developer base including new\nparticipants and continued participants."
+        "placeholder": "Example health entries: \n\nWe had 25 contributors this quarter -
including several new ones - in addition\nto the existing PMC and committers, and more activity
on our issue tracker.\nNotably, there have been very promising contributions from some new
developers\nto help with technical debt, particularly to remove uses of an internal\npackage
that makes it impossible to use Apache Foo in an Splorg environment with\nnewer versions of
Gson.\n\nHealth of the community remains strong with many active release lines,\nfeature development,
active user and developer base including new\nparticipants and continued participants.",
+        "tipgenerator": "health_tips"
     },
     {
         "id": "review",



Mime
View raw message