Fixed restoration of the panel divider position.
[psensor.git] / www / details.html
index c4734ef..68656a0 100644 (file)
@@ -1,11 +1,7 @@
 <html>
   <head>
     <meta charset="utf-8">
-    <title>Sensor </title>
-
-    <link type="text/css"
-         rel="stylesheet"
-href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
+    <title id="title">Sensor </title>
 
     <link href="jqplot.css" rel="stylesheet" type="text/css"/> 
     <link href="style.css" rel="stylesheet" type="text/css"/>  
@@ -18,33 +14,47 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
 
     <script>
       $(document).ready(function() {
-          var url_id;
+               var url_id;
 
-         url_id = get_url_params()["id"];
+               url_id = get_url_params()["id"];
+
+               update_menu();
+               $.getJSON(url_id, function(data) {
+                               update_chart("chart", type_to_str(data["type"]), data);
+               });
+
+               setInterval(function() {
+                       $.getJSON(url_id, function(data) {
+                               update_chart("chart", type_to_str(data["type"]), data);
+                       });
+               }, 5000);
+
+               // reload page in order to workaround memory-leak in JQPlot
+               setInterval(function() {
+                       location.reload();
+               }, 60000);
 
-      update_menu();
-      
-          $.getJSON(url_id, function(data) {
-               update_chart("chart", type_to_str(data["type"]), data);
-         });
       });
     </script>
   </head>
   <body>
+
+    <div id="page">
       <div id="menu">
        <ul id="menu-list">
+         <li><a href="index.html">Summary</a></li>
        </ul>
       </div>
       
       <div id="main">
        <h1></h1>
        
-       <div class="chart" id="chart"></div>
-       
+       <div class="chart" id="chart"></div>    
       </div>
       
       <div id="footer">
        Generated by <a href='http://wpitchoune.net/psensor'>psensor-server</a>
       </div>
+    </div>
   </body>
 </html>