Browse Source

changes based on feedback

pull/11/head
saravanan30erd 1 year ago
parent
commit
a242b42d30
  1. 1
      .gitignore
  2. 1
      README.md
  3. 3
      bin/monit-dashboard.py
  4. 4
      templates/index.html

1
.gitignore

@ -1,3 +1,4 @@
*.pyc
.*.swp
conf/servers.json
*.xlsx

1
README.md

@ -37,6 +37,7 @@ thanks to the built-in web server, it is displayed in a single HTML page.
#### Python libaries
- `yum install python-requests python-xmltodict python-simplejson`
- `pip install xlsxwriter`
## Requisites

3
bin/monit-dashboard.py

@ -87,8 +87,7 @@ class monitDashboard(web.application):
class index(object):
def GET(self):
return render.index(output=getMonit(),
now=datetime.datetime.now(),
download_api=os.environ['DOWNLOAD_API_URL'])
now=datetime.datetime.now())
class help(object):
def GET(self):

4
templates/index.html

@ -1,11 +1,11 @@
$def with (output, now, download_api)
$def with (output, now)
<body onload="draw($output[0]['s_rate']);">
$ errors = 0
$ color = "green"
<div>
<div class="download-header">
<button class="download-button" onclick="window.location.href = '$download_api';">Download Report</button>
<button class="download-button" onclick="window.location.href = 'download';">Download Report</button>
</div>
<div style="height: 38%; overflow-y: scroll; overflow-x: hidden;">
$for server in range(len(output)):

Loading…
Cancel
Save