[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Link to Statistics and Reproducible Metrics from more places.
commit 2fc1f3c757a44d1f15efbda1883429fee23437a7
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue Sep 11 16:09:05 2018 +0200
Link to Statistics and Reproducible Metrics from more places.
Still part of #26857.
---
src/main/java/org/torproject/metrics/web/GraphServlet.java | 1 +
src/main/resources/web/json/categories.json | 2 +-
src/main/resources/web/jsps/graph.jsp | 2 ++
src/main/resources/web/jsps/sources.jsp | 1 +
4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/torproject/metrics/web/GraphServlet.java b/src/main/java/org/torproject/metrics/web/GraphServlet.java
index 73aaec7..2f35320 100644
--- a/src/main/java/org/torproject/metrics/web/GraphServlet.java
+++ b/src/main/java/org/torproject/metrics/web/GraphServlet.java
@@ -141,6 +141,7 @@ public class GraphServlet extends MetricServlet {
request.setAttribute("title", this.titles.get(requestedId));
if (this.categoriesById.containsKey(requestedId)) {
Category category = this.categoriesById.get(requestedId);
+ request.setAttribute("categoryId", category.getId());
request.setAttribute("categoryHeader", category.getHeader());
request.setAttribute("categoryDescription", category.getDescription());
List<String[]> categoryTabs = new ArrayList<>();
diff --git a/src/main/resources/web/json/categories.json b/src/main/resources/web/json/categories.json
index a5a4fcf..af05085 100644
--- a/src/main/resources/web/json/categories.json
+++ b/src/main/resources/web/json/categories.json
@@ -1,6 +1,6 @@
[
{
- "id": "clients",
+ "id": "users",
"icon": "fa-users",
"header": "Users",
"summary": "Where Tor users are from and how they connect to Tor.",
diff --git a/src/main/resources/web/jsps/graph.jsp b/src/main/resources/web/jsps/graph.jsp
index 06582ab..c30481f 100644
--- a/src/main/resources/web/jsps/graph.jsp
+++ b/src/main/resources/web/jsps/graph.jsp
@@ -161,6 +161,8 @@
<p>Download data as
<a href="${id}.csv${parameters}">CSV</a>.</p>
+<p>Learn more about the CSV data <a href="/stats.html#${id}">format</a> or how to <a href="/reproducible-metrics.html#${categoryId}">reproduce</a> the graph data.</p>
+
</div><!-- col-md-4 -->
</div><!-- row -->
diff --git a/src/main/resources/web/jsps/sources.jsp b/src/main/resources/web/jsps/sources.jsp
index f8f9e07..a43d681 100644
--- a/src/main/resources/web/jsps/sources.jsp
+++ b/src/main/resources/web/jsps/sources.jsp
@@ -24,6 +24,7 @@
<li><a href="collector.html">CollecTor</a> collects and archives data from various nodes and services in the public Tor network.</li>
<li><a href="stats.html">Statistics</a> used for visualizations on this site are available in the CSV format.</li>
<li><a href="onionoo.html">Onionoo</a> provides current and historical data about relays and bridges via a web-based API.</li>
+ <li><a href="reproducible-metrics.html">Reproducible Metrics</a> specifies how to reproduce the data behind the graphs on this site.</li>
</ul>
</div>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits