You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hb...@apache.org on 2015/05/10 18:16:58 UTC
svn commit: r1678576 - /comdev/projects.apache.org/site/js/projects.js
Author: hboutemy
Date: Sun May 10 16:16:57 2015
New Revision: 1678576
URL: http://svn.apache.org/r1678576
Log:
add TLP names in TLPs evolution bars tooltips
Modified:
comdev/projects.apache.org/site/js/projects.js
Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1678576&r1=1678575&r2=1678576&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Sun May 10 16:16:57 2015
@@ -886,43 +886,47 @@ function renderFrontPage() {
obj.innerHTML = "<h2>Welcome to the Apache Projects Directory</h2>"
obj.innerHTML += "<p>This site is a catalog of Apache Software Foundation projects. It is designed to help you find specific projects that meet your interests and to gain a broader understanding of the wide variety of work currently underway in the Apache community.</p>"
var p = document.createElement('p');
- p.innerHTML = "<h3 style='text-align: center;'>There are currently <span style='color: #269;'>" + initiatives + "+</span> open source initatives at the ASF:</h3>"
+ p.innerHTML = "<h3 style='text-align: center;'>There are currently <span style='color: #269;'>" + initiatives + "+</span> open source initatives at the ASF:</h3>";
p.innerHTML += "<ul style='width: 300px; margin: 0 auto; font-size: 18px; color: #269; font-weight: bold;'><li>" + numchairs + " top level software projects</li><li>" + nsubs + " sub-projects</li><li>5 special committees*</li><li>" + cur + " incubating podlings</li></ul><p><small>*Infrastructure, Travel Assistance, Security Team, Legal Affairs and Brand Management</small></p>"
obj.appendChild(p);
var parr = [];
var cur = 0;
- var karr = []
+ var karr = [];
for (i in committees_raw) {
karr.push(i);
}
karr.sort();
for (j in karr) {
- var i = karr[j]
- var changes = committees_raw[i]
- var newTlps = []
- var retiredTlps = []
- for (k in changes) {
- var change = changes[k]
- if (change.match(/retired: /)) {
- retiredTlps.push(change.substring(9))
- } else {
- newTlps.push(change)
- }
- }
- cur += newTlps.length - retiredTlps.length
- var evo = '' + i + " (" + cur + "): " + ((newTlps.length == 0) ? "No new Top Level Project" : newTlps.join(", "))
- if (retiredTlps.length>0) {
- evo += ", retired " + retiredTlps.join(", ")
- }
- parr.push([i, newTlps.length, retiredTlps.length, cur, evo]);
+ var i = karr[j];
+ var changes = committees_raw[i];
+ var newTlps = [];
+ var retiredTlps = [];
+ for (k in changes) {
+ var change = changes[k];
+ if (change.match(/retired: /)) {
+ retiredTlps.push(change.substring(9))
+ } else {
+ newTlps.push(change)
+ }
+ }
+ cur += newTlps.length - retiredTlps.length;
+ var evo = '' + i + " (" + cur + "): " + ((newTlps.length == 0) ? "No new Top Level Project" : newTlps.join(", "));
+ if (retiredTlps.length>0) {
+ evo += ", retired " + retiredTlps.join(", ")
+ }
+ var newTooltip = 'New TLPs: <b>' + newTlps.length + '</b>' + ((newTlps.length > 0) ? '<br/>- '+newTlps.join('<br/>- '):'');
+ var retiredTooltip = 'Retired TLPs: <b>' + retiredTlps.length + '</b>' + ((retiredTlps.length > 0) ? '<br/>- '+retiredTlps.join('<br/>- '):'');
+ parr.push([i, newTlps.length, newTooltip, retiredTlps.length, retiredTooltip, cur, evo]);
}
//narr.sort(function(a,b) { return (b[1] - a[1]) });
var data1 = new google.visualization.DataTable();
data1.addColumn('string', 'Month');
data1.addColumn('number', "New TLPs");
- data1.addColumn('number', "Retired TLPs");
+ data1.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
+ data1.addColumn('number', "Retired TLPs");
+ data1.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
data1.addColumn('number', 'Current TLPs');
data1.addColumn({type: 'string', role: 'tooltip'});
@@ -936,6 +940,7 @@ function renderFrontPage() {
seriesType: "bars",
backgroundColor: 'transparent',
series: {2: {type: "line", targetAxisIndex: 1}},
+ tooltip: {isHtml: true},
vAxes:[
{title: 'Change in states'},
{title: 'Current number of TLPs'},