commit 49562bf3eb21833381ae4dc0341f4cfc540bdbb2 Author: Iain R. Learmonth irl@fsfe.org Date: Thu Jan 26 22:54:18 2017 +0000
Removes graphs that no longer have Onionoo data to back them (Fixes: #19553)
This removes the 3 days and 1 week bandwidth charts and also removes references to the 3 days clients chart as the Onionoo specification doesn't claim to provide this chart either.
In the future we may attempt to produce these graphs from the data provided by Onionoo, but this will require more than simply putting the right data on the screen and I'd like to keep Atlas as thin a layer as possible on top of Onionoo. --- js/models/graph.js | 6 ------ js/views/details/main.js | 2 +- templates/details/bridge.html | 28 ---------------------------- templates/details/router.html | 28 ---------------------------- 4 files changed, 1 insertion(+), 63 deletions(-)
diff --git a/js/models/graph.js b/js/models/graph.js index 36f9e49..d4368a4 100644 --- a/js/models/graph.js +++ b/js/models/graph.js @@ -87,13 +87,10 @@ define([ baseurl: 'https://onionoo.torproject.org', initialize: function() { this.set({ - bw_days: {write: [], read: []}, - bw_week: {write: [], read: []}, bw_month: {write: [], read: []}, bw_months: {write: [], read: []}, bw_year: {write: [], read: []}, bw_years: {write: [], read: []}, - clients_days: {average: []}, clients_week: {average: []}, clients_month: {average: []}, clients_months: {average: []}, @@ -111,8 +108,6 @@ define([ var success = options.success; // Clear the model this.set({ - bw_days: {write: [], read: []}, - bw_week: {write: [], read: []}, bw_month: {write: [], read: []}, bw_months: {write: [], read: []}, bw_year: {write: [], read: []}, @@ -185,7 +180,6 @@ define([ var success = options.success; // Clear the model this.set({ - clients_days: {average: []}, clients_week: {average: []}, clients_month: {average: []}, clients_months: {average: []}, diff --git a/js/views/details/main.js b/js/views/details/main.js index e958e6e..e73ac4a 100644 --- a/js/views/details/main.js +++ b/js/views/details/main.js @@ -192,7 +192,7 @@ define([ this.graph.lookup_bw(this.model.fingerprint, { success: function() { graph.parse_bw_data(graph.data); - graphs = ['bw_days', 'bw_week', 'bw_month', + graphs = ['bw_month', 'bw_months', 'bw_year', 'bw_years']; _.each(graphs, function(g) { var data = [graph.get(g).write, graph.get(g).read]; diff --git a/templates/details/bridge.html b/templates/details/bridge.html index 2cbd24a..33f606c 100644 --- a/templates/details/bridge.html +++ b/templates/details/bridge.html @@ -82,34 +82,6 @@ <div class="row"> <h2>Graphs <small>Pretty graphs</small></h2> <hr/> - <ul class="thumbnails"> - <li class="span8"> - <div class="thumbnail"> - <div id="bw_days" class="graph"> - <img src="img/no-data-available.png" alt=""> - </div> - <div class="caption"> - <h5>3 Days graph</h5> - <a id="save_bw_days" href="">Save Graph</a> - </div> - </div> - </li> - </ul> -</div><div class="row"> - <ul class="thumbnails"> - <li class="span8"> - <div class="thumbnail"> - - <div id="bw_week" class="graph"> - <img src="img/no-data-available.png" alt=""> - </div> - <div class="caption"> - <h5>1 Week graph</h5> - <a id="save_bw_week" href="">Save Graph</a> - </div> - </div> - </li> - </ul> </div>
<div class="row"> diff --git a/templates/details/router.html b/templates/details/router.html index 505f8c1..7215b05 100644 --- a/templates/details/router.html +++ b/templates/details/router.html @@ -132,34 +132,6 @@ <div class="row"> <h2>Graphs <small>Pretty graphs</small></h2> <hr/> - <ul class="thumbnails"> - <li class="span8"> - <div class="thumbnail"> - <div id="bw_days" class="graph"> - <img src="img/no-data-available.png" alt=""> - </div> - <div class="caption"> - <h5>3 Days graph</h5> - <a id="save_bw_days" href="">Save Graph</a> - </div> - </div> - </li> - </ul> -</div><div class="row"> - <ul class="thumbnails"> - <li class="span8"> - <div class="thumbnail"> - - <div id="bw_week" class="graph"> - <img src="img/no-data-available.png" alt=""> - </div> - <div class="caption"> - <h5>1 Week graph</h5> - <a id="save_bw_week" href="">Save Graph</a> - </div> - </div> - </li> - </ul> </div>
<div class="row">
tor-commits@lists.torproject.org