small corrections
parent
a3e53f3bf4
commit
2d1674b0bd
|
@ -4,7 +4,7 @@
|
||||||
<title>Verlauf</title>
|
<title>Verlauf</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="http://localhost:8081/ids">Übersicht</a>
|
<a href="/ids">Übersicht</a>
|
||||||
<img src="/svg/cpu.svg" style="width:100%;height=auto" />
|
<img src="/svg/cpu.svg" style="width:100%;height=auto" />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
2
ids.tpl
2
ids.tpl
|
@ -7,7 +7,7 @@
|
||||||
<p>Aktuelle Variablen:
|
<p>Aktuelle Variablen:
|
||||||
<ul>
|
<ul>
|
||||||
%for item in measdata:
|
%for item in measdata:
|
||||||
<li><a href="http://localhost:8081/graph/{{item['id']}}">{{item['id']}}</a>: {{item['device']}} {{item['varname']}} {{item['sensor']}}, Anzahl: {{item['count']}}, letzter Wert: {{item['value']}}</li>
|
<li><a href="/graph/{{item['id']}}">{{item['id']}}</a>: {{item['device']}} {{item['varname']}} {{item['sensor']}}, Anzahl: {{item['count']}}, letzter Wert: {{item['value']}}</li>
|
||||||
%end
|
%end
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
|
|
6
pyweb.py
6
pyweb.py
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from bottle import get,post,request,Bottle,run,template,static_file
|
from bottle import get,post,request,Bottle,run,template,static_file
|
||||||
import threading,time,json,zlib,gnupg,socket,psutil,os,sys,pymysql,queue,_thread,svgwrite,matplotlib.pyplot as plt,matplotlib.cm as cm,numpy
|
import threading,time,json,zlib,gnupg,socket,psutil,os,sys,pymysql,queue,_thread,matplotlib.pyplot as plt,matplotlib.cm as cm,numpy
|
||||||
|
|
||||||
payload_haus=["wasser","gas","kwh_haus","kwh_herd"]
|
payload_haus=["wasser","gas","kwh_haus","kwh_herd"]
|
||||||
payload_kfz=["km","volumen","preis"]
|
payload_kfz=["km","volumen","preis"]
|
||||||
|
@ -246,10 +246,6 @@ def show_graph(mid):
|
||||||
row=mycursor.fetchall()
|
row=mycursor.fetchall()
|
||||||
mycursor.close()
|
mycursor.close()
|
||||||
mydb.close()
|
mydb.close()
|
||||||
# svo=svgwrite.drawing.Drawing(filename=mid+".svg",size=(svgwidth,svgheight))
|
|
||||||
# for i in row:
|
|
||||||
# svo.add(svo.circle(center=(float(i['time']),float(i['value']))))
|
|
||||||
# svo.save()
|
|
||||||
plt.figure(figsize=[6,8])
|
plt.figure(figsize=[6,8])
|
||||||
svg_x=[]
|
svg_x=[]
|
||||||
svg_y=[]
|
svg_y=[]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>Verlauf</title>
|
<title>Verlauf</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="http://localhost:8081/ids">Übersicht</a></br>
|
<a href="/ids">Übersicht</a></br>
|
||||||
<img src="/svg/{{mid}}.svg" style="width:100%;height=auto" />
|
<img src="/svg/{{mid}}.svg" style="width:100%;height=auto" />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue