commit 2daa7fd497d812caeff624f0c051affca4c0a429
Author: Karsten Loesing <karsten.loesing(a)gmx.net>
Date: Mon Jul 29 11:59:54 2013 +0200
Add Lunar's bubble graphs to navigation bar.
---
etc/web.xml | 11 +++++++++
.../ernie/web/graphs/BubblesServlet.java | 24 ++++++++++++++++++++
web/WEB-INF/banner.jsp | 4 ++++
web/WEB-INF/error.jsp | 1 +
4 files changed, 40 insertions(+)
diff --git a/etc/web.xml b/etc/web.xml
index 630af3e..e499eca 100644
--- a/etc/web.xml
+++ b/etc/web.xml
@@ -56,6 +56,17 @@
</servlet-mapping>
<servlet>
+ <servlet-name>Bubbles</servlet-name>
+ <servlet-class>
+ org.torproject.ernie.web.graphs.BubblesServlet
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Bubbles</servlet-name>
+ <url-pattern>/bubbles.html</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
<servlet-name>Research</servlet-name>
<servlet-class>
org.torproject.ernie.web.ResearchServlet
diff --git a/src/org/torproject/ernie/web/graphs/BubblesServlet.java b/src/org/torproject/ernie/web/graphs/BubblesServlet.java
new file mode 100644
index 0000000..6f66413
--- /dev/null
+++ b/src/org/torproject/ernie/web/graphs/BubblesServlet.java
@@ -0,0 +1,24 @@
+/* Copyright 2013 The Tor Project
+ * See LICENSE for licensing information */
+package org.torproject.ernie.web.graphs;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class BubblesServlet extends HttpServlet {
+
+ private static final long serialVersionUID = -6011833075497881033L;
+
+ public void doGet(HttpServletRequest request,
+ HttpServletResponse response) throws IOException, ServletException {
+
+ /* Forward the request to the JSP that does all the hard work. */
+ request.getRequestDispatcher("WEB-INF/bubbles.jsp").forward(request,
+ response);
+ }
+}
+
diff --git a/web/WEB-INF/banner.jsp b/web/WEB-INF/banner.jsp
index 3ddc868..8c3c33a 100644
--- a/web/WEB-INF/banner.jsp
+++ b/web/WEB-INF/banner.jsp
@@ -16,6 +16,7 @@
%>class="current"<%} else {%>href="/status.html"<%}%>>Status</a>
<%if (currentPage.endsWith("graphs.jsp") ||
currentPage.endsWith("network.jsp") ||
+ currentPage.endsWith("bubbles.jsp") ||
currentPage.endsWith("fast-exits.jsp") ||
currentPage.endsWith("users.jsp") ||
currentPage.endsWith("performance.jsp")) {
@@ -27,6 +28,9 @@
<a <%if (currentPage.endsWith("fast-exits.jsp")){
%>class="current"<%} else {%>href="/fast-exits.html"<%}
%>>Fast Exits</a>
+ <a <%if (currentPage.endsWith("bubbles.jsp")){
+ %>class="current"<%} else {%>href="/bubbles.html"<%}
+ %>>Bubbles</a>
<a <%if (currentPage.endsWith("users.jsp")) {
%>class="current"<%} else {%>href="/users.html"<%}
%>>Users</a>
diff --git a/web/WEB-INF/error.jsp b/web/WEB-INF/error.jsp
index 49a0324..a010309 100644
--- a/web/WEB-INF/error.jsp
+++ b/web/WEB-INF/error.jsp
@@ -45,6 +45,7 @@ Maybe you find what you're looking for on our sitemap:
<ul>
<li><a href="network.html">Network</a></li>
<li><a href="fast-exits.html">Fast Exits</a></li>
+<li><a href="bubbles.html">Bubbles</a></li>
<li><a href="users.html">Users</a></li>
<li><a href="performance.html">Performance</a></li>
</ul></li>