[tor-commits] [globe/master] Remove advertised bandwidth fraction graph.

isis at torproject.org isis at torproject.org
Thu May 21 08:39:23 UTC 2015


commit f46b3702582b4be3094240f0bda5a17ec2526b03
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Nov 18 06:52:36 2014 +0100

    Remove advertised bandwidth fraction graph.
    
    This graph is going to be removed from Onionoo as part of #13674.
    Replace it with the middle probability graph.
    
    Signed-off-by: Isis Lovecruft <isis at torproject.org>
---
 src/js/components/BandwidthStatsComponent.js |    4 ++--
 src/js/models/OnionooWeightsHistory.js       |    8 ++++----
 src/js/templates/components/weight-stats.hbs |   14 +++++++-------
 src/js/views/HistoryGraphView.js             |    6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/js/components/BandwidthStatsComponent.js b/src/js/components/BandwidthStatsComponent.js
index d856b46..a3aa732 100644
--- a/src/js/components/BandwidthStatsComponent.js
+++ b/src/js/components/BandwidthStatsComponent.js
@@ -31,9 +31,9 @@ GLOBE.UptimeStatsComponent = GLOBE.GraphStatsComponent.extend({
 });
 GLOBE.WeightStatsComponent = GLOBE.GraphStatsComponent.extend({
     avgFields: [
-        'advertisedBandwidth',
         'consensusWeightFraction',
         'exitProbability',
+        'middleProbability',
         'guardProbability'
     ]
 });
@@ -41,4 +41,4 @@ GLOBE.ClientsStatsComponent = GLOBE.GraphStatsComponent.extend({
     avgFields: [
         'averageClients'
     ]
-});
\ No newline at end of file
+});
diff --git a/src/js/models/OnionooWeightsHistory.js b/src/js/models/OnionooWeightsHistory.js
index a285283..87be542 100644
--- a/src/js/models/OnionooWeightsHistory.js
+++ b/src/js/models/OnionooWeightsHistory.js
@@ -22,11 +22,11 @@ GLOBE.OnionooWeightsHistory.reopenClass({
 
         return GLOBE.getJSON(url).then(function(result){
             return GLOBE.Util.compute3DaysHistory(GLOBE.Util.processHistoryResponse({
-                advertisedBandwidth: 'advertised_bandwidth_fraction',
                 consensusWeightFraction: 'consensus_weight_fraction',
-                exitProbability: 'exit_probability',
-                guardProbability: 'guard_probability'
+                guardProbability: 'guard_probability',
+                middleProbability: 'middle_probability',
+                exitProbability: 'exit_probability'
             }, result));
         });
     }
-});
\ No newline at end of file
+});
diff --git a/src/js/templates/components/weight-stats.hbs b/src/js/templates/components/weight-stats.hbs
index fcf7a2e..3f2c772 100644
--- a/src/js/templates/components/weight-stats.hbs
+++ b/src/js/templates/components/weight-stats.hbs
@@ -1,20 +1,20 @@
 <div class="pure-g-r">
     <div class="pure-u-1-3">
         <h3>Weights</h3>
-        <p>mean advertised bandwidth fraction</p>
+        <p>mean consensus weight fraction</p>
         <strong>
             <span class="d3-col block-0"></span>
-            {{percent advertisedBandwidthAvg 4}}
+            {{percent consensusWeightFractionAvg 4}}
         </strong>
-        <p>mean consensus weight fraction</p>
+        <p>mean guard probability fraction</p>
         <strong>
             <span class="d3-col block-1"></span>
-            {{percent consensusWeightFractionAvg 4}}
+            {{percent guardProbabilityAvg 4}}
         </strong>
-        <p>mean guard probability fraction</p>
+        <p>mean middle probability fraction</p>
         <strong>
             <span class="d3-col block-2"></span>
-            {{percent guardProbabilityAvg 4}}
+            {{percent middleProbabilityAvg 4}}
         </strong>
         <p>mean exit probability fraction</p>
         <strong>
@@ -29,4 +29,4 @@
             data=data
             timePeriods=timePeriods }}
     </div>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/js/views/HistoryGraphView.js b/src/js/views/HistoryGraphView.js
index 4ba492b..169a5b4 100644
--- a/src/js/views/HistoryGraphView.js
+++ b/src/js/views/HistoryGraphView.js
@@ -160,8 +160,8 @@ GLOBE.HistoryGraphView = Em.View.extend({
 
 GLOBE.RelayWeightView = GLOBE.HistoryGraphView.extend({
     title: 'Weights',
-    graphs: ['advertisedBandwidth', 'consensusWeightFraction', 'guardProbability', 'exitProbability'],
-    labels: ['advertised bandwidth fraction', 'consensus weight fraction','guard probability', 'exit probability'],
+    graphs: ['consensusWeightFraction', 'guardProbability', 'middleProbability', 'exitProbability'],
+    labels: ['consensus weight fraction','guard probability', 'middle probability', 'exit probability'],
     legendPos: [{x:80,y:35},{x:80,y:15},{x:270,y:15}, {x:270,y:35}]
 });
 
@@ -209,4 +209,4 @@ GLOBE.BridgeBandwidthView = GLOBE.HistoryGraphView.extend({
     },
     title: 'Bandwidth',
     graphs: []
-});
\ No newline at end of file
+});



More information about the tor-commits mailing list