[tor-commits] [metrics-web/master] Add (disabled) metrics category for applications.

karsten at torproject.org karsten at torproject.org
Mon Jan 9 17:03:42 UTC 2017


commit 893a56b5848a50be9f006463393921b4dc4cee24
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Fri Dec 23 09:50:55 2016 +0100

    Add (disabled) metrics category for applications.
---
 website/etc/categories.json   | 7 +++++++
 website/web/WEB-INF/index.jsp | 2 +-
 website/web/WEB-INF/top.jsp   | 4 ++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/website/etc/categories.json b/website/etc/categories.json
index 766108a..832f3c0 100644
--- a/website/etc/categories.json
+++ b/website/etc/categories.json
@@ -72,5 +72,12 @@
       "hidserv-rend-relayed-cells",
       "hidserv-frac-reporting"
     ]
+  },
+  {
+    "id": "applications",
+    "icon": "fa-download",
+    "header": "Applications",
+    "summary": "How many Tor applications, like Tor Browser, have been downloaded or updated (coming soon).",
+    "metrics": []
   }
 ]
diff --git a/website/web/WEB-INF/index.jsp b/website/web/WEB-INF/index.jsp
index c6535fb..5aff746 100644
--- a/website/web/WEB-INF/index.jsp
+++ b/website/web/WEB-INF/index.jsp
@@ -23,7 +23,7 @@
     <div class="row">
       <c:forEach var="category" items="${categories}">
       <div class="col-sm-4">
-        <a href="${category[0]}.html"><i class="fa ${category[3]} fa-fw fa-4x" aria-hidden="true"></i> <h2>${category[1]}</h2> <p>${category[2]}</p></a>
+        <a<c:if test="${fn:length(category[0]) > 0}"> href="${category[0]}.html"</c:if>><i class="fa ${category[3]} fa-fw fa-4x" aria-hidden="true"></i> <h2>${category[1]}</h2> <p>${category[2]}</p></a>
       </div>
       </c:forEach>
     </div>
diff --git a/website/web/WEB-INF/top.jsp b/website/web/WEB-INF/top.jsp
index 7074eb7..2d07351 100644
--- a/website/web/WEB-INF/top.jsp
+++ b/website/web/WEB-INF/top.jsp
@@ -76,7 +76,7 @@ document.write('<div class="topButton" style="display:none;"><a href="#top"><i c
         <li class="visible-xs section-header">Metrics</li>
         <li class="visible-xs<c:if test="${'Home'.equals(param.navActive)}"> active</c:if>"><a href="index.html"><i class="fa fa-home fa-fw" aria-hidden="true"></i> Home</a></li>
         <c:forEach var="category" items="${categories}">
-        <li class="visible-xs<c:if test="${category[1].equals(param.navActive)}"> active</c:if>"><a href="${category[0]}.html"><i class="fa ${category[3]} fa-fw" aria-hidden="true"></i> ${category[1]}</a></li>
+        <li class="visible-xs<c:if test="${category[1].equals(param.navActive)}"> active</c:if><c:if test="${fn:length(category[0]) == 0}"> disabled</c:if>"><a<c:if test="${fn:length(category[0]) > 0}"> href="${category[0]}.html"</c:if>><i class="fa ${category[3]} fa-fw" aria-hidden="true"></i> ${category[1]}</a></li>
         </c:forEach>
         <!-- /end of primary copy -->
 
@@ -116,7 +116,7 @@ document.write('<div class="topButton" style="display:none;"><a href="#top"><i c
       <ul class="nav navbar-nav">
         <li <c:if test="${'Home'.equals(param.navActive)}"> class="active"</c:if>><a href="index.html"><i class="fa fa-home fa-fw hidden-sm" aria-hidden="true"></i> Home</a></li>
         <c:forEach var="category" items="${categories}">
-        <li <c:if test="${category[1].equals(param.navActive)}"> class="active"</c:if>><a href="${category[0]}.html"><i class="fa ${category[3]} fa-fw hidden-sm" aria-hidden="true"></i> ${category[1]}</a></li>
+        <li class="<c:if test="${category[1].equals(param.navActive)}"> active</c:if><c:if test="${fn:length(category[0]) == 0}"> disabled</c:if>"><a<c:if test="${fn:length(category[0]) > 0}"> href="${category[0]}.html"</c:if>><i class="fa ${category[3]} fa-fw hidden-sm" aria-hidden="true"></i> ${category[1]}</a></li>
         </c:forEach>
       </ul>
     </div><!-- /.navbar-collapse -->





More information about the tor-commits mailing list