Fixed restoration of the panel divider position.
[psensor.git] / www / details.html
index 52725b5..68656a0 100644 (file)
@@ -1,17 +1,11 @@
 <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"/>  
 
-<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->
-
     <script src="jquery.js" type="text/javascript"></script>
     <script src="jqplot.js" type="text/javascript"></script>
     <script src="jqplot.dateAxisRenderer.js" type="text/javascript"></script>
@@ -20,34 +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><em><a href="monitor.html">All</a></em></li>
+         <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>