fix the canvas func onload issue

This commit is contained in:
saravanan30erd 2019-08-16 19:29:41 +04:00
parent bce596438f
commit ff76401ecd
3 changed files with 6 additions and 10 deletions

View File

@ -25,7 +25,6 @@ output = []
# Functions
def getMonit():
output = []
xmlQuery = "/_status?format=xml"
@ -61,7 +60,6 @@ def getMonit():
# Classes
class monitDashboard(web.application):
def run(self, port=8080, *middleware):

View File

@ -1,11 +1,7 @@
$def with (output, now)
$ data = 0.5
<html>
<head>
<script src="static/monit-dashboard.js" type="text/javascript"></script>
</head>
$ data = 0.4
<body onload='draw($data);'>
<body onload="draw($data);">
$ errors = 0
$ color = "green"
$for server in range(len(output)):
@ -86,5 +82,7 @@ Latest update: $now.day/$now.month/$now.year, $now.hour:$now.minute:$now.second
<br><br>
<canvas id="canvas" width="400" height="400"></canvas>
</body>
</html>
<script src="static/monit-dashboard.js" type="text/javascript"></script>

View File

@ -15,4 +15,4 @@ $def with (content)
<a href="/">Home</a> | <a href="/help">Help</a>
</body>
</html>
</html>