pull/19/head
Aidaho12 2018-02-19 12:11:14 +06:00
parent c79b0dbfaf
commit 6dc28eb2c8
2 changed files with 23 additions and 7 deletions

View File

@ -22,6 +22,9 @@ except IOError:
print("Can't load users DB") print("Can't load users DB")
print('<h2>Quick Status </h2>' print('<h2>Quick Status </h2>'
'<iframe src="http://172.28.5.106:3000/d-solo/000000002/haproxy?refresh=1m&orgId=1&panelId=1&theme=light" height="200" frameborder="0"></iframe>'
'<iframe src="http://172.28.5.106:3000/d-solo/000000002/haproxy?refresh=1m&orgId=1&panelId=2&theme=light" height="200" frameborder="0"></iframe>'
'<iframe src="http://172.28.5.106:3000/d-solo/000000002/haproxy?refresh=1m&orgId=1&panelId=3&theme=light" height="200" frameborder="0"></iframe>'
'<table class="overview">') '<table class="overview">')
commands = [ "ps -Af |grep [h]aproxy |wc -l" ] commands = [ "ps -Af |grep [h]aproxy |wc -l" ]
@ -31,10 +34,12 @@ print('<tr class="overviewHead">'
'<td>Login name</td>' '<td>Login name</td>'
'<td class="padding10">' '<td class="padding10">'
'Role' 'Role'
'<span style="float: right; margin-left: 80&;">' '<!--<span class="add-button" title="Just a button, do nothing )">+ Add </span>-->'
'<a href="#" title="Show all users" id="show-all-users">' '<span class="add-button">'
'<a href="#" title="Show all users" id="show-all-users" style="color: #fff">'
'Show all' 'Show all'
'</a>' '</a>'
'</span>'
'</td>' '</td>'
'</tr>') '</tr>')
@ -55,12 +60,12 @@ print('<tr class="overviewHead">'
'<td class="padding10">' '<td class="padding10">'
'HAproxy status' 'HAproxy status'
'</td>' '</td>'
'<td>' '<td class="padding10">'
'Action' 'Action'
'<span style="float: right; margin-left: 80&;">' '<!--<span class="add-button" title="Just a button, do nothing )">+ Add</span>-->'
'<a href="" title="Update status" id="update">' '<a href="" title="Update status" id="update">'
'<img alt="Update" src="/image/pic/update.png" class="icon">' '<img alt="Update" src="/image/pic/update.png" class="icon" style="margin-left: 20px; float: right">'
'</a>' '</a></span>'
'</td>' '</td>'
'</tr>') '</tr>')
for i in sorted(listhap.listhap): for i in sorted(listhap.listhap):

View File

@ -32,6 +32,7 @@ iframe {
} }
.icon { .icon {
max-width: 20px; max-width: 20px;
margin-left: 2px;
} }
.top-menu { .top-menu {
box-shadow: 1px 1px 5px grey; box-shadow: 1px 1px 5px grey;
@ -213,7 +214,17 @@ iframe {
font-weight: bold; font-weight: bold;
} }
.serverUp { .serverUp {
background-color: green; background-color: #5CB85C;
}
.add-button {
background-color: #5CB85C;
border-radius: 5px;
margin-left: 20px;
color: #fff;
padding: 5px;
padding-right: 10px;
padding-left: 10px;
float: right;
} }
.serverDown { .serverDown {
background-color: red; background-color: red;