switched to streaming graphs in old webif packaging

Thu, 27 Nov 2014 00:14:05 +0100

author
Malte Bayer <mbayer@neo-soft.org>
date
Thu, 27 Nov 2014 00:14:05 +0100
branch
packaging
changeset 58
3dc5adcf2195
parent 57
0737dd84fed7
child 59
ca29af300a23

switched to streaming graphs in old webif

victrond/http/graphs.html file | annotate | diff | comparison | revisions
victrond/http/graphs.tmpl file | annotate | diff | comparison | revisions
victrond/http/header.inc file | annotate | diff | comparison | revisions
victrond/tools.py file | annotate | diff | comparison | revisions
victrond/victrond.py file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/victrond/http/graphs.html	Thu Nov 27 00:14:05 2014 +0100
@@ -0,0 +1,53 @@
+<html>
+	    <head>
+		<title>GE/IMV/Victron NetPro UPS maintenance</title>
+		<style type="text/css">
+		    table { width:100% }
+		    td    { border: thin solid grey; }
+		    th    { font-weight:bold; }
+		    .menu {  list-type:none; padding: 0px; margin: 0px; margin-bottom:10px;}
+		    .menu li { padding: 0px 10px 0px 10px; text-align:center; display:block; float:left; 
+				height:30px; line-height:30px; background-color:#aaaaaa; border:1px solid #000000; }
+		    .menu li:hover { background-color:#cccccc; }
+		    .menu li a { color:#ffffff; text-decoration:none; font-weight:bold; }
+		    .clearer { clear:both; }
+		    #main { width: auto; }
+		    .infobox { width: 400px; border:1px solid black; padding:5px;}
+		    .fl { float:left; }
+		    .fr { float:right; }
+		    .btn { width:200px; }
+		    .btn_switch { width:98px; }
+		    .graphs { width: auto; }
+		    .graphs img { float: left; }
+		    .fixedbox { width: 840px }
+		</style>
+	    </head>
+	    
+<script type="text/javascript">
+    function submit_yesno(frm,msg) {
+      if (window.confirm(msg)==true) {
+        document.forms[frm].submit()
+      }
+    }
+</script>
+
+<body>
+
+<div id="main">
+
+    <UL class="menu">
+	<li><a href="status.tmpl">UPS Status</a></li>
+	<li><a href="graphs.html">System Graphs</a></li>
+	<li><a href="maintenance.tmpl">UPS Maintenance</a></li>
+    </UL>
+
+    <div class="clearer"></div>
+
+	<div class="graphs">
+	    <img src="img/ups-24h.png" />
+	    <img src="img/ups-30d.png" />
+	    <img src="img/ups-365d.png" />
+	</div>
+</div>
+        </body>
+    </body>
--- a/victrond/http/graphs.tmpl	Thu Nov 27 00:02:24 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-	<div class="graphs">
-	    <img src="img/ups-24h.png" />
-	    <img src="img/ups-30d.png" />
-	    <img src="img/ups-365d.png" />
-	</div>
\ No newline at end of file
--- a/victrond/http/header.inc	Thu Nov 27 00:02:24 2014 +0100
+++ b/victrond/http/header.inc	Thu Nov 27 00:14:05 2014 +0100
@@ -37,7 +37,7 @@
 
     <UL class="menu">
 	<li><a href="status.tmpl">UPS Status</a></li>
-	<li><a href="graphs.tmpl">System Graphs</a></li>
+	<li><a href="graphs.html">System Graphs</a></li>
 	<li><a href="maintenance.tmpl">UPS Maintenance</a></li>
     </UL>
 
--- a/victrond/tools.py	Thu Nov 27 00:02:24 2014 +0100
+++ b/victrond/tools.py	Thu Nov 27 00:14:05 2014 +0100
@@ -142,14 +142,6 @@
                   "GPRINT:dTbat:MAX:-  %2.0lf °C")
 
 
-def rrd_generategraphs():
-    """
-    Generate all available graph images
-    """
-    rrd_graph_24h("http/img/ups-24h.png")
-    rrd_graph_30d("http/img/ups-30d.png")
-    rrd_graph_365d("http/img/ups-365d.png")
-
 def rrd_streamgraph(basename):
     """
     Generate selected Graph and return the png data using temporary file
--- a/victrond/victrond.py	Thu Nov 27 00:02:24 2014 +0100
+++ b/victrond/victrond.py	Thu Nov 27 00:14:05 2014 +0100
@@ -826,9 +826,6 @@
                 return
 
             if self.path.endswith(".tmpl"):
-                if self.path.endswith("graphs.tmpl"):
-                    # execute graph updater
-                    tools.rrd_generategraphs()
                 self.send_response(200)
                 self.send_header("Content-type", "text/html")
                 self.end_headers()

mercurial