From c832c0000377224f2c690087263a70e1f92e0bd8 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Mon, 25 Nov 2019 18:49:07 +0400 Subject: [PATCH] add button for download report in excel --- bin/monit-dashboard.py | 5 +++-- static/monit-dashboard.css | 25 +++++++++++++++++++++++-- templates/index.html | 7 +++++-- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/bin/monit-dashboard.py b/bin/monit-dashboard.py index 546e8a3..daf3755 100755 --- a/bin/monit-dashboard.py +++ b/bin/monit-dashboard.py @@ -86,8 +86,9 @@ class monitDashboard(web.application): class index(object): def GET(self): - return render.index(output=getMonit(), now=datetime.datetime.now()) - + return render.index(output=getMonit(), + now=datetime.datetime.now(), + download_api=os.environ['DOWNLOAD_API_URL']) class help(object): def GET(self): diff --git a/static/monit-dashboard.css b/static/monit-dashboard.css index 839a91c..24aad8c 100644 --- a/static/monit-dashboard.css +++ b/static/monit-dashboard.css @@ -41,7 +41,28 @@ button.accordion { border: none; outline: none; transition: 0.4s; - margin: 0.6rem; + margin: 0.6rem 0; +} + +button.download-button { + color: white; + background-color: orange; + cursor: pointer; + padding: 18px; + text-align: center; + border: none; + outline: none; + transition: 0.4s; + float: right; + margin: auto 0; +} + +div.download-header { + height: 10%; + background-color: black; + display: flex; + justify-content: flex-end; + padding-right: 20px; } div.panel { @@ -73,7 +94,7 @@ div.panel.show { } .canvas-container { - height: 40%; + height: 35%; margin: auto; width: 24%; } diff --git a/templates/index.html b/templates/index.html index 03f4885..f26f323 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,10 +1,13 @@ -$def with (output, now) +$def with (output, now, download_api) $ errors = 0 $ color = "green"
-
+
+ +
+
$for server in range(len(output)): $code: errors = 0