[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [metrics-web/master] Add North Korea, Lebanon, and Qatar to list of countries.



commit 675eafee1505b25f1e4ec2014c3a8c5beedb1a3b
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Thu Jan 27 09:30:32 2011 +0100

    Add North Korea, Lebanon, and Qatar to list of countries.
---
 rserve/graphs.R                                    |   24 +++++++++++--------
 .../ernie/web/GraphParameterChecker.java           |    3 +-
 web/WEB-INF/users.jsp                              |    6 +++++
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/rserve/graphs.R b/rserve/graphs.R
index 097fb3c..929e1be 100644
--- a/rserve/graphs.R
+++ b/rserve/graphs.R
@@ -235,13 +235,15 @@ plot_direct_users <- function(start, end, country, path) {
         data.frame(date = as.Date(missing, origin = "1970-01-01"),
         users = NA))
   peoples <- data.frame(country = c("au", "bh", "br", "ca", "cn", "cu",
-    "de", "eg", "et", "fr", "gb", "ir", "it", "jp", "kr", "mm", "pl",
-    "ru", "sa", "se", "sy", "tn", "tm", "us", "uz", "vn", "ye"),
+    "de", "eg", "et", "fr", "gb", "ir", "it", "jp", "kp", "kr", "lb",
+    "mm", "pl", "qa", "ru", "sa", "se", "sy", "tn", "tm", "us", "uz",
+    "vn", "ye"),
     people = c("Australian", "Bahraini", "Brazilian", "Canadian",
     "Chinese", "Cuban", "German", "Egyptian", "Ethiopian", "French",
-    "U.K.", "Iranian", "Italian", "Japanese", "South Korean", "Burmese",
-    "Polish", "Russian", "Saudi", "Swedish", "Syrian", "Tunisian",
-    "Turkmen", "U.S.", "Uzbek", "Vietnamese", "Yemeni"),
+    "U.K.", "Iranian", "Italian", "Japanese", "North Korean",
+    "South Korean", "Lebanese", "Burmese", "Polish", "Qatari", "Russian",
+    "Saudi", "Swedish", "Syrian", "Tunisian", "Turkmen", "U.S.", "Uzbek",
+    "Vietnamese", "Yemeni"),
     stringsAsFactors = FALSE)
   title <- ifelse(country == "all",
     "Total directly connecting Tor users (all data)\n",
@@ -278,13 +280,15 @@ plot_bridge_users <- function(start, end, country, path) {
         data.frame(date = as.Date(missing, origin = "1970-01-01"),
         users = NA))
   peoples <- data.frame(country = c("au", "bh", "br", "ca", "cn", "cu",
-    "de", "eg", "et", "fr", "gb", "ir", "it", "jp", "kr", "mm", "pl",
-    "ru", "sa", "se", "sy", "tn", "tm", "us", "uz", "vn", "ye"),
+    "de", "eg", "et", "fr", "gb", "ir", "it", "jp", "kp", "kr", "lb",
+    "mm", "pl", "qa", "ru", "sa", "se", "sy", "tn", "tm", "us", "uz",
+    "vn", "ye"),
     people = c("Australian", "Bahraini", "Brazilian", "Canadian",
     "Chinese", "Cuban", "German", "Egyptian", "Ethiopian", "French",
-    "U.K.", "Iranian", "Italian", "Japanese", "South Korean", "Burmese",
-    "Polish", "Russian", "Saudi", "Swedish", "Syrian", "Tunisian",
-    "Turkmen", "U.S.", "Uzbek", "Vietnamese", "Yemeni"),
+    "U.K.", "Iranian", "Italian", "Japanese", "North Korean",
+    "South Korean", "Lebanese", "Burmese", "Polish", "Qatari", "Russian",
+    "Saudi", "Swedish", "Syrian", "Tunisian", "Turkmen", "U.S.", "Uzbek",
+    "Vietnamese", "Yemeni"),
     stringsAsFactors = FALSE)
   title <- ifelse(country == "all",
     "Total users via bridges (all data)\n",
diff --git a/src/org/torproject/ernie/web/GraphParameterChecker.java b/src/org/torproject/ernie/web/GraphParameterChecker.java
index ad9f0a7..188c6fa 100644
--- a/src/org/torproject/ernie/web/GraphParameterChecker.java
+++ b/src/org/torproject/ernie/web/GraphParameterChecker.java
@@ -61,7 +61,8 @@ public class GraphParameterChecker {
     this.knownParameterValues.put("flag",
         "Running,Exit,Guard,Fast,Stable");
     this.knownParameterValues.put("country", "all,au,bh,br,ca,cn,cu,de,"
-        + "eg,et,fr,gb,ir,it,jp,kr,mm,pl,ru,sa,se,sy,tn,tm,us,uz,vn,ye");
+        + "eg,et,fr,gb,ir,it,jp,kp,kr,lb,mm,pl,qa,ru,sa,se,sy,tn,tm,us,"
+        + "uz,vn,ye");
     this.knownParameterValues.put("bundle", "all,en,zh_CN,fa");
     this.knownParameterValues.put("source", "all,siv,moria,torperf");
     this.knownParameterValues.put("filesize", "50kb,1mb,5mb");
diff --git a/web/WEB-INF/users.jsp b/web/WEB-INF/users.jsp
index da0d6e6..092b98d 100644
--- a/web/WEB-INF/users.jsp
+++ b/web/WEB-INF/users.jsp
@@ -51,9 +51,12 @@ based on the requests seen by a few dozen directory mirrors.</p>
         <option value="ir">Iran</option>
         <option value="it">Italy</option>
         <option value="jp">Japan</option>
+        <option value="kp">North Korea</option>
         <option value="kr">South Korea</option>
+        <option value="lb">Lebanon</option>
         <option value="mm">Burma</option>
         <option value="pl">Poland</option>
+        <option value="qa">Qatar</option>
         <option value="ru">Russia</option>
         <option value="sa">Saudi Arabia</option>
         <option value="se">Sweden</option>
@@ -113,9 +116,12 @@ by a few hundred bridges.</p>
         <option value="ir">Iran</option>
         <option value="it">Italy</option>
         <option value="jp">Japan</option>
+        <option value="kp">North Korea</option>
         <option value="kr">South Korea</option>
+        <option value="lb">Lebanon</option>
         <option value="mm">Burma</option>
         <option value="pl">Poland</option>
+        <option value="qa">Qatar</option>
         <option value="ru">Russia</option>
         <option value="sa">Saudi Arabia</option>
         <option value="se">Sweden</option>