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

[tor-commits] [atlas/master] Add contact information and link to bug reporting in footer



commit 33dbb90e26926a7c08f7cd85c8d5197eb27d6b03
Author: Arturo Filastò <art@xxxxxxxxxx>
Date:   Sun Jun 10 20:30:59 2012 +0200

    Add contact information and link to bug reporting in footer
    Fixes #6122
---
 index.html               |    5 ++++-
 js/main.js               |    3 ++-
 js/router.js             |   22 ++++++++++++++++++++--
 js/views/details/main.js |    6 ++++--
 4 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/index.html b/index.html
index 5d5b044..6d583f1 100644
--- a/index.html
+++ b/index.html
@@ -62,7 +62,10 @@
       </div>
       <hr/>
       <footer>
-        The Tor Project - 2012
+      The Tor Project - 2012<br/>
+      <a href="https://gitweb.torproject.org/atlas.git";>Source code</a> -
+          <a href="https://trac.torproject.org/projects/tor/newticket?component=Atlas";>Report a bug</a>
+          - <a href="mailto:art@xxxxxxxxxxxxxx";>Contact</a>
       </footer>
 
     </div> <!-- /container -->
diff --git a/js/main.js b/js/main.js
index 0a37d0d..31e1aea 100644
--- a/js/main.js
+++ b/js/main.js
@@ -16,7 +16,8 @@ require.config({
     collapse: 'libs/bootstrap/bootstrap-collapse',
     flot: 'libs/flot/jquery.flot',
     canvas2img: 'libs/flot/canvas2image',
-    templates: '../templates'
+    templates: '../templates',
+    d3: 'libs/d3/d3.v2.js'
   }
 
 });
diff --git a/js/router.js b/js/router.js
index 3dd9ba8..ad58917 100644
--- a/js/router.js
+++ b/js/router.js
@@ -7,14 +7,16 @@ define([
   'views/search/main',
   'views/search/do',
   'views/about/main',
-], function($, _, Backbone, mainDetailsView, mainSearchView, doSearchView, aboutView){
+  'views/details/graph'
+], function($, _, Backbone, mainDetailsView, mainSearchView,
+            doSearchView, aboutView, showGraphView){
   var AppRouter = Backbone.Router.extend({
     routes: {
     	// Define the routes for the actions in Tor Status
     	'details/:fingerprint': 'mainDetails',
     	'search/:query': 'doSearch',
     	'about': 'showAbout',
-
+        'graph/:fingerprint': 'showGraph',
     	// Default
     	'*actions': 'defaultAction'
     },
@@ -38,6 +40,22 @@ define([
         });
     },
 
+    // Display the bandwidth graph
+    showGraph: function(fingerprint){
+        console.log("starting it..");
+        $("#home").removeClass("active");
+        $("#about").removeClass("active");
+
+        $("#loading").show();
+        $("#content").hide();
+        showGraphView.graph.fingerprint = fingerprint;
+        $("#content").show();
+        showGraphView.render();
+        $("#loading").hide();
+
+    },
+
+
     // Perform a search on Tor Status
     doSearch: function(query){
         $("#home").removeClass("active");
diff --git a/js/views/details/main.js b/js/views/details/main.js
index 8c6b9b4..142a713 100644
--- a/js/views/details/main.js
+++ b/js/views/details/main.js
@@ -47,9 +47,10 @@ define([
                     graphs = ['days', 'week', 'month',
                             'months', 'year', 'years'];
                     _.each(graphs, function(g) {
+                        var plot_data = [{data: graph.get(g).write, label: 'write'},
+                                         {data: graph.get(g).read, label: 'read'}];
                         $.plot($("#"+g),
-                            [{data: graph.get(g).write, label: 'write'},
-                              {data: graph.get(g).read, label: 'read'}], {
+                            plot_data, {
                                 series: {
                                     lines: {show: true},
                                     points: {show: true},
@@ -57,6 +58,7 @@ define([
                                 grid: { hoverable: true, clickable: true },
                                 xaxis: {mode: 'time', tickLength: 5},
                         });
+                        console.log(plot_data);
                         $("#"+g).resize();
 
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits