fix the canvas func onload issue
This commit is contained in:
parent
bce596438f
commit
ff76401ecd
|
@ -25,7 +25,6 @@ output = []
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
|
||||||
def getMonit():
|
def getMonit():
|
||||||
output = []
|
output = []
|
||||||
xmlQuery = "/_status?format=xml"
|
xmlQuery = "/_status?format=xml"
|
||||||
|
@ -61,7 +60,6 @@ def getMonit():
|
||||||
|
|
||||||
# Classes
|
# Classes
|
||||||
|
|
||||||
|
|
||||||
class monitDashboard(web.application):
|
class monitDashboard(web.application):
|
||||||
|
|
||||||
def run(self, port=8080, *middleware):
|
def run(self, port=8080, *middleware):
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
$def with (output, now)
|
$def with (output, now)
|
||||||
$ data = 0.5
|
$ data = 0.4
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="static/monit-dashboard.js" type="text/javascript"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body onload='draw($data);'>
|
<body onload="draw($data);">
|
||||||
$ errors = 0
|
$ errors = 0
|
||||||
$ color = "green"
|
$ color = "green"
|
||||||
$for server in range(len(output)):
|
$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>
|
<br><br>
|
||||||
|
|
||||||
<canvas id="canvas" width="400" height="400"></canvas>
|
<canvas id="canvas" width="400" height="400"></canvas>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
|
<script src="static/monit-dashboard.js" type="text/javascript"></script>
|
||||||
|
|
Loading…
Reference in a new issue