Author: akm
Date: Tue Mar 19 17:30:05 2024
New Revision: 1916425

URL: http://svn.apache.org/viewvc?rev=1916425&view=rev
Log:
Adding updated information about what code is running behind the scenes for the 
reporter page (kibble)

Modified:
    comdev/reporter.apache.org/trunk/README.txt
    comdev/reporter.apache.org/trunk/site/js/addrelease.js

Modified: comdev/reporter.apache.org/trunk/README.txt
URL: 
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/README.txt?rev=1916425&r1=1916424&r2=1916425&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/README.txt (original)
+++ comdev/reporter.apache.org/trunk/README.txt Tue Mar 19 17:30:05 2024
@@ -2,6 +2,10 @@ This file is an attempt to start to docu
 
 It is currently very rudimentary.
 
+NOTE: Most of the stats reported on the reporter page come from a running 
instance of Apache Kibble at https://demo.kibble.apache.org.
+
+Code for Kibble is available at https://kibble.apache.org/docs/downloads.html
+
 
 Original version:
   Javascript and CSS are Foundation

Modified: comdev/reporter.apache.org/trunk/site/js/addrelease.js
URL: 
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/js/addrelease.js?rev=1916425&r1=1916424&r2=1916425&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/js/addrelease.js (original)
+++ comdev/reporter.apache.org/trunk/site/js/addrelease.js Tue Mar 19 17:30:05 
2024
@@ -1,6 +1,8 @@
 // location may have appended ;yyyy for debugging purposes
+// limit param can be passed as query param in URL to limit # of releases 
written to the page
+// This URL-handling section could use clean-up
  var srch = document.location.search.substr(1).split(';'); // drop ? from the 
search and split at semicolon
- var committee = srch[0]; // before the semi (if any)
+ var committee = srch[0].split('&')[0]; // before the semi (if any) and amp 
(if any)
  var baseyear = 1999;
  if (srch.length > 1) {
      baseyear = parseInt(srch[1]); // grab trailing start year
@@ -8,6 +10,9 @@
          baseyear=1999; // ensure sensible default value
      }
  }
+ const queryString = document.location.search;
+ const params = new URLSearchParams(queryString);
+ const limit = parseInt(params.get("limit"));
  document.getElementById('committee').value = committee;
  var xdate = document.getElementById('xdate');
  var done = false;
@@ -47,6 +52,9 @@
   var basedate = bd.getTime()/1000 // value as stored in the database
   var recent = new Array();
   for (version in json) {
+    if (limit && x == limit) {
+      break;
+    }
     if (json[version] > basedate) {
       recent.push(new Release(version, json[version]));
       x++;
@@ -69,4 +77,3 @@
   }
   document.getElementById('committee').value = committee;
  }
- 


Reply via email to