[tor-commits] [metrics-web/master] Change consensus-health page to simple redirect.

karsten at torproject.org karsten at torproject.org
Tue Jun 3 08:08:25 UTC 2014


commit 9fe40cd6d1a7ae94ddbe273ce8c841beac097ddb
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Jun 3 09:58:47 2014 +0200

    Change consensus-health page to simple redirect.
---
 .../metrics/web/status/ConsensusHealthServlet.java |    5 ++--
 website/web/WEB-INF/banner.jsp                     |    6 +----
 website/web/WEB-INF/consensus-health.jsp           |   26 --------------------
 website/web/WEB-INF/error.jsp                      |    1 -
 website/web/WEB-INF/status.jsp                     |    6 ++---
 website/web/robots.txt                             |    1 -
 6 files changed, 5 insertions(+), 40 deletions(-)

diff --git a/website/src/org/torproject/metrics/web/status/ConsensusHealthServlet.java b/website/src/org/torproject/metrics/web/status/ConsensusHealthServlet.java
index 3bed511..3c74acd 100644
--- a/website/src/org/torproject/metrics/web/status/ConsensusHealthServlet.java
+++ b/website/src/org/torproject/metrics/web/status/ConsensusHealthServlet.java
@@ -16,9 +16,8 @@ public class ConsensusHealthServlet extends HttpServlet {
   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/consensus-health.jsp").forward(
-        request, response);
+    /* Forward to the actual consensus-health service. */
+    response.sendRedirect("https://consensus-health.torproject.org");
   }
 }
 
diff --git a/website/web/WEB-INF/banner.jsp b/website/web/WEB-INF/banner.jsp
index 0633351..ef0798c 100644
--- a/website/web/WEB-INF/banner.jsp
+++ b/website/web/WEB-INF/banner.jsp
@@ -36,8 +36,7 @@
       </font>
     <%} else if (currentPage.endsWith("status.jsp") ||
                  currentPage.endsWith("exonerator.jsp") ||
-                 currentPage.endsWith("relay-search.jsp") ||
-                 currentPage.endsWith("consensus-health.jsp")) {
+                 currentPage.endsWith("relay-search.jsp")) {
      %><br>
       <font size="2">
         <a <%if (currentPage.endsWith("exonerator.jsp")){
@@ -46,9 +45,6 @@
         <a <%if (currentPage.endsWith("relay-search.jsp")){
             %>class="current"<%} else {%>href="/relay-search.html"<%}
             %>>Relay Search</a>
-        <a <%if (currentPage.endsWith("consensus-health.jsp")){
-            %>class="current"<%} else {%>href="/consensus-health.html"<%}
-            %>>Consensus Health</a>
       </font>
     <%} else if (currentPage.endsWith("research.jsp") ||
                  currentPage.endsWith("data.jsp") ||
diff --git a/website/web/WEB-INF/consensus-health.jsp b/website/web/WEB-INF/consensus-health.jsp
deleted file mode 100644
index d802b65..0000000
--- a/website/web/WEB-INF/consensus-health.jsp
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-  <title>Tor Metrics Portal: Consensus health</title>
-  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-  <link href="/css/stylesheet-ltr.css" type="text/css" rel="stylesheet">
-  <link href="/images/favicon.ico" type="image/x-icon" rel="shortcut icon">
-</head>
-<body>
-  <div class="center">
-    <%@ include file="banner.jsp"%>
-  <div class="main-column" style="margin:5; Padding:0;">
-    <h2>Tor Metrics Portal: Consensus Health</h2>
-    <br>
-    <p>This page shows statistics about the current consensus and votes to
-    facilitate debugging of the directory consensus process.</p>
-    <br>
-    <p><font color="red"><b>Notice:</b> This service has moved to:
-    <a href="https://consensus-health.torproject.org/">https://consensus-health.torproject.org/</a></font></p>
-  </div>
-  </div>
-  <div class="bottom" id="bottom">
-    <%@ include file="footer.jsp"%>
-  </div>
-</body>
-</html>
diff --git a/website/web/WEB-INF/error.jsp b/website/web/WEB-INF/error.jsp
index 28065e9..3a65ed6 100644
--- a/website/web/WEB-INF/error.jsp
+++ b/website/web/WEB-INF/error.jsp
@@ -59,7 +59,6 @@ Maybe you find what you're looking for on our sitemap:
 <ul>
 <li><a href="exonerator.html">ExoneraTor</a></li>
 <li><a href="relay-search.html">Relay Search</a></li>
-<li><a href="consensus-health.html">Consensus Health</a></li>
 </ul></li>
 </ul>
 </p>
diff --git a/website/web/WEB-INF/status.jsp b/website/web/WEB-INF/status.jsp
index d6b565e..504d9f4 100644
--- a/website/web/WEB-INF/status.jsp
+++ b/website/web/WEB-INF/status.jsp
@@ -16,11 +16,9 @@
         used to analyze the Tor network status from a few years ago until
         an hour ago. There are currently two applications for this data:
         The <a href="exonerator.html">ExoneraTor</a> tells you whether
-        some IP address was a Tor relay at a given time, the
+        some IP address was a Tor relay at a given time, and the
         <a href="relay-search.html">Relay Search</a> lets you search the
-        descriptor archive for a relay, and the
-        <a href="consensus-health.html">Consensus Health</a> summarizes
-        information about the latest network consensus voting process.
+        descriptor archive for a relay.
     </div>
   </div>
   <div class="bottom" id="bottom">
diff --git a/website/web/robots.txt b/website/web/robots.txt
index c59aca1..99c6c29 100644
--- a/website/web/robots.txt
+++ b/website/web/robots.txt
@@ -1,5 +1,4 @@
 User-agent: *
 Disallow: /relay.html
 Disallow: /csv/
-Disallow: /consensus-health.html
 





More information about the tor-commits mailing list