aboutsummaryrefslogtreecommitdiffstats
path: root/root/html/pages/report/index.tt
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mageia.org>2010-10-03 15:36:00 +0000
committerOlivier Thauvin <nanardon@mageia.org>2010-10-03 15:36:00 +0000
commitddcf19029c7b58b2ea236bd14e6c1456949f0fc0 (patch)
tree725f066cac991b43163f1e08a5954b6071634f3d /root/html/pages/report/index.tt
parent114b46067622cc0c68d007711cf58f74e25411b8 (diff)
downloadmgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar
mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar.gz
mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar.bz2
mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar.xz
mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.zip
- use google maps for location, improve messages
Diffstat (limited to 'root/html/pages/report/index.tt')
-rw-r--r--root/html/pages/report/index.tt35
1 files changed, 35 insertions, 0 deletions
diff --git a/root/html/pages/report/index.tt b/root/html/pages/report/index.tt
new file mode 100644
index 0000000..b360813
--- /dev/null
+++ b/root/html/pages/report/index.tt
@@ -0,0 +1,35 @@
+<!-- $Id$ -->
+<script type="text/javascript"
+ src="http://maps.google.com/maps/api/js?sensor=false">
+</script>
+<script type="text/javascript">
+ function initialize() {
+ var latlng = new google.maps.LatLng(20,0);
+ var myOptions = {
+ zoom: 2,
+ center: latlng,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ };
+ var map = new google.maps.Map(document.getElementById("map_canvas"),
+ myOptions);
+[% FOREACH m = c.model('Mirrors').find_mirrors %]
+[% IF m.latitude %]
+ var myLatlng = new google.maps.LatLng([% m.latitude %],[% m.longitude %]);
+ var marker = new google.maps.Marker({
+ position: myLatlng,
+ map: map,
+ title:"[% m.hostname %]"
+ });
+[% END %]
+[% END %]
+ }
+
+</script>
+<div id="map_canvas" style="width:75%; height:500px"></div>
+
+<script type="text/javascript">
+ initialize();
+</script>
+
+<h2>Synchronisation tree</h2>
+<img src="[% c.uri_for('/graph') %]">