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 14:36:50 UTC

svn commit: r1864067 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/generators.js wizard.js

Author: humbedooh
Date: Wed Jul 31 14:36:50 2019
New Revision: 1864067

URL: http://svn.apache.org/viewvc?rev=1864067&view=rev
Log:
Only return hints if there are any, otherwise just hide the div

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=1864067&r1=1864066&r2=1864067&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:36:50 2019
@@ -91,9 +91,7 @@ function splash(state, json) {
 }
 
 function health_tips(data) {
-    let txt = "";
-    txt += "<h5>Potentially useful observations for your health metrics:</h5>";
-    
+    let txt = "";    
     // Mailing list changes
     for (var ml in data.delivery[project]) {
         let mldata = data.delivery[project][ml];
@@ -117,5 +115,7 @@ function health_tips(data) {
     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]);
     
+    // Append header IF there is data, otherwise nah.
+    if (txt.length > 0) txt = "<h5>Potentially useful observations for your health metrics:</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=1864067&r1=1864066&r2=1864067&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:36:50 2019
@@ -1079,9 +1079,7 @@ function splash(state, json) {
 }
 
 function health_tips(data) {
-    let txt = "";
-    txt += "<h5>Potentially useful observations for your health metrics:</h5>";
-    
+    let txt = "";    
     // Mailing list changes
     for (var ml in data.delivery[project]) {
         let mldata = data.delivery[project][ml];
@@ -1105,6 +1103,8 @@ function health_tips(data) {
     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]);
     
+    // Append header IF there is data, otherwise nah.
+    if (txt.length > 0) txt = "<h5>Potentially useful observations for your health metrics:</h5>" + txt;
     return txt;
 }