add button for download report in excel

This commit is contained in:
saravanan30erd 2019-11-25 18:49:07 +04:00
parent 3aa7835802
commit c832c00003
3 changed files with 31 additions and 6 deletions

View File

@ -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):

View File

@ -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%;
}

View File

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