commit
b136bbeb5a
|
@ -27,6 +27,7 @@ output = []
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
|
||||||
def calculate_count(data):
|
def calculate_count(data):
|
||||||
count = {}
|
count = {}
|
||||||
ls = data.values()
|
ls = data.values()
|
||||||
|
@ -78,6 +79,7 @@ def getMonit():
|
||||||
|
|
||||||
# Classes
|
# Classes
|
||||||
|
|
||||||
|
|
||||||
class monitDashboard(web.application):
|
class monitDashboard(web.application):
|
||||||
def run(self, port=8080, *middleware):
|
def run(self, port=8080, *middleware):
|
||||||
func = self.wsgifunc(*middleware)
|
func = self.wsgifunc(*middleware)
|
||||||
|
@ -89,10 +91,12 @@ class index(object):
|
||||||
return render.index(output=getMonit(),
|
return render.index(output=getMonit(),
|
||||||
now=datetime.datetime.now())
|
now=datetime.datetime.now())
|
||||||
|
|
||||||
|
|
||||||
class help(object):
|
class help(object):
|
||||||
def GET(self):
|
def GET(self):
|
||||||
return render.help()
|
return render.help()
|
||||||
|
|
||||||
|
|
||||||
class download(object):
|
class download(object):
|
||||||
def GET(self):
|
def GET(self):
|
||||||
filename = 'health_report.xlsx'
|
filename = 'health_report.xlsx'
|
||||||
|
@ -104,6 +108,7 @@ class download(object):
|
||||||
web.header('Cache-Control', 'no-cache')
|
web.header('Cache-Control', 'no-cache')
|
||||||
return open(filename, 'rb').read()
|
return open(filename, 'rb').read()
|
||||||
|
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = monitDashboard(urls, globals())
|
app = monitDashboard(urls, globals())
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import xlsxwriter
|
import xlsxwriter
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def generate_report_excel(output, filename):
|
def generate_report_excel(output, filename):
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
|
|
@ -84,7 +84,9 @@ $for server in range(len(output)):
|
||||||
|
|
||||||
<div class="canvas-container">
|
<div class="canvas-container">
|
||||||
<div class="canvas-graph">
|
<div class="canvas-graph">
|
||||||
<div class="canvas-header"><h2 style="margin: 0">Hosts status</h2></div>
|
<div class="canvas-header">
|
||||||
|
<h2 style="margin: 0">Hosts status</h2>
|
||||||
|
</div>
|
||||||
<canvas id="canvas" width="400" height="400"></canvas>
|
<canvas id="canvas" width="400" height="400"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue