Show when data was last modified

parent 842dbe75
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
</p> </p>
<div id="bridge_reachability" style="margin-top:1em; width:98%;"></div> <div id="bridge_reachability" style="margin-top:1em; width:98%;"></div>
<p class="last-modified">
Last Modified: <span id="last-modified"></span>
</p>
</div> </div>
<script type="text/javascript" src="js/bridges.js"></script> <script type="text/javascript" src="js/bridges.js"></script>
</body> </body>
......
...@@ -32,3 +32,7 @@ button { ...@@ -32,3 +32,7 @@ button {
#vanilla_tor, #tor-metrics, p { #vanilla_tor, #tor-metrics, p {
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
} }
.last-modified {
margin-top: 4em;
}
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
<p style="margin-top:2em;"> <p style="margin-top:2em;">
<a href="bridges.html">What about blocked bridges?</a> <a href="bridges.html">What about blocked bridges?</a>
</p> </p>
<p class="last-modified">
Last Modified: <span id="last-modified"></span>
</p>
</div> </div>
<script type="text/javascript" src="js/index.js"></script> <script type="text/javascript" src="js/index.js"></script>
</body> </body>
......
...@@ -53,7 +53,8 @@ var bridgeFilter = {field:"type", type:"in", value:["TB", "B"]} ...@@ -53,7 +53,8 @@ var bridgeFilter = {field:"type", type:"in", value:["TB", "B"]}
var ctrlFilter = {field:"ctrl", type:">=", value:80} var ctrlFilter = {field:"ctrl", type:">=", value:80}
$.getJSON("countries-bridges.json") $.getJSON("countries-bridges.json")
.done(function( json ) { .done(function( json, textStatus, jqXHR ) {
$("#last-modified").html(jqXHR.getResponseHeader("Last-Modified"));
$("#bridge_reachability").tabulator("setData", json); $("#bridge_reachability").tabulator("setData", json);
applyFilter(); applyFilter();
}) })
......
...@@ -20,7 +20,8 @@ $("#vanilla_tor").tabulator({ ...@@ -20,7 +20,8 @@ $("#vanilla_tor").tabulator({
}); });
$.getJSON("countries.json") $.getJSON("countries.json")
.done(function( json ) { .done(function( json, textStatus, jqXHR ) {
$("#last-modified").html(jqXHR.getResponseHeader("Last-Modified"));
$("#vanilla_tor").tabulator("setData", json); $("#vanilla_tor").tabulator("setData", json);
showOoniBlocking(); showOoniBlocking();
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment