mirror of https://github.com/Aidaho12/haproxy-wi
parent
0544d0f8a8
commit
c79b0dbfaf
|
@ -23,7 +23,9 @@ funct.chooseServer("delver.py#conf", "Delete Versions HAproxy config", "n")
|
|||
if serv is not None and form.getvalue('open') is not None:
|
||||
|
||||
print('<center><h3>Choose old version</h3>')
|
||||
print('<form action="delver.py#conf" method="post">')
|
||||
print('<form action="delver.py#conf" method="post">'
|
||||
'<label for="select_all" id="label_select_all"><b>Select all</b></label>'
|
||||
'<input type="checkbox" id="select_all"><br />')
|
||||
|
||||
import glob
|
||||
|
||||
|
|
|
@ -21,12 +21,14 @@ try:
|
|||
except IOError:
|
||||
print("Can't load users DB")
|
||||
|
||||
print('<h2>Quick Status </h2><table class="overview">')
|
||||
print('<h2>Quick Status </h2>'
|
||||
'<table class="overview">')
|
||||
|
||||
commands = [ "ps -Af |grep [h]aproxy |wc -l" ]
|
||||
|
||||
print('<tr class="overviewHead">'
|
||||
'<td class="padding10">User name</td>'
|
||||
'<td>Login name</td>'
|
||||
'<td class="padding10">'
|
||||
'Role'
|
||||
'<span style="float: right; margin-left: 80&;">'
|
||||
|
@ -44,6 +46,7 @@ for f in open(USERS, 'r'):
|
|||
if i is 4:
|
||||
style = 'style="display: none;" class="show-users"'
|
||||
print('<tr ' + style + '><td class="padding10">' + users['firstName'] + ' ' + users['lastName'] +'</td><td>')
|
||||
print(users['login']+'</td><td>')
|
||||
print(users['role'])
|
||||
print('</td></tr>')
|
||||
|
||||
|
@ -51,17 +54,25 @@ print('<tr class="overviewHead">'
|
|||
'<td class="padding10">Server</td>'
|
||||
'<td class="padding10">'
|
||||
'HAproxy status'
|
||||
'</td>'
|
||||
'<td>'
|
||||
'Action'
|
||||
'<span style="float: right; margin-left: 80&;">'
|
||||
'<a href="" title="Update status" id="update">'
|
||||
'<img alt="Update" src="/image/pic/update.png" style="max-width: 20px;">'
|
||||
'<img alt="Update" src="/image/pic/update.png" class="icon">'
|
||||
'</a>'
|
||||
'</td>'
|
||||
'</tr>')
|
||||
for i in sorted(listhap.listhap):
|
||||
print('<tr><td class="padding10">' + i + '</td><td>')
|
||||
funct.ssh_command(listhap.listhap.get(i), commands, server_status="1")
|
||||
print('</td><td>')
|
||||
print('<a href="/cgi-bin/configshow.py?serv=%s&open=open#conf" title="Show config"><img src=/image/pic/show.png alt="show" class="icon"></a>' % listhap.listhap.get(i))
|
||||
print('<a href="/cgi-bin/config.py?serv=%s&open=open#conf" title="Edit config"><img src=/image/pic/edit.png alt="edit" class="icon"></a>' % listhap.listhap.get(i))
|
||||
print('<a href="/cgi-bin/diff.py?serv=%s&open=open#diff" title="Compare config"><img src=/image/pic/compare.png alt="compare" class="icon"></a>' % listhap.listhap.get(i))
|
||||
print('<a href="/cgi-bin/map.py?serv=%s&open=open#map" title="Map listen/frontend/backend"><img src=/image/pic/map.png alt="map" class="icon"></a>' % listhap.listhap.get(i))
|
||||
print('</td></tr>')
|
||||
print('<tr class="overviewHead">'
|
||||
print('</table><table><tr class="overviewHead">'
|
||||
'<td class="padding10">Server</td>'
|
||||
'<td class="padding10">'
|
||||
'Server status'
|
||||
|
@ -79,9 +90,5 @@ for i in sorted(listhap.listhap):
|
|||
funct.ssh_command(listhap.listhap.get(i), commands)
|
||||
print('</pre></td></tr>')
|
||||
|
||||
print('<tr>'
|
||||
'<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>'
|
||||
'</tr></table>')
|
||||
print('<tr></table>')
|
||||
funct.footer()
|
BIN
image/7.jpeg
BIN
image/7.jpeg
Binary file not shown.
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 397 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 832 B |
Binary file not shown.
After Width: | Height: | Size: 722 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 847 B |
|
@ -24,7 +24,7 @@
|
|||
<a href="cgi-bin/configver.py" title="Upload old config">Upload old config</a> <br />
|
||||
<a href="cgi-bin/delver.py" title="Upload old config">Delete old config</a> <br />
|
||||
<div class="copyright">
|
||||
HAproxy Web Interface v1.8
|
||||
HAproxy Web Interface v1.8.1
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
16
script.js
16
script.js
|
@ -20,12 +20,16 @@ $( function() {
|
|||
heightStyle: "content",
|
||||
icons: { "header": "ui-icon-plus", "activeHeader": "ui-icon-minus" }
|
||||
});
|
||||
/*$( "dropdown_selector" ).change(function() {
|
||||
var $option = $(this).find('option:selected');
|
||||
if ($option == "tcp") {
|
||||
$("#https-listen").hide();
|
||||
}
|
||||
}); */
|
||||
$('#select_all').click(function(){
|
||||
var checkboxes = $(this).closest('form').find(':checkbox');
|
||||
if($(this).prop('checked')) {
|
||||
$("form input[type='checkbox']").attr("checked",true).change();
|
||||
$("#label_select_all").text("Unselect all");
|
||||
} else {
|
||||
$("form input[type='checkbox']").attr("checked",false).change();
|
||||
$("#label_select_all").text("Select all");
|
||||
}
|
||||
});
|
||||
$ ( "#show-all-users" ).click( function() {
|
||||
if($( "#show-all-users" ).text() == "Show all") {
|
||||
$( ".show-users" ).show("fast");
|
||||
|
|
17
style.css
17
style.css
|
@ -30,8 +30,10 @@ form {
|
|||
iframe {
|
||||
width: 33%;
|
||||
}
|
||||
.top-menu {
|
||||
background-color: #222;
|
||||
.icon {
|
||||
max-width: 20px;
|
||||
}
|
||||
.top-menu {
|
||||
box-shadow: 1px 1px 5px grey;
|
||||
min-height: 50px;
|
||||
margin-bottom: 20px;
|
||||
|
@ -41,8 +43,11 @@ iframe {
|
|||
left: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
.top-menu, .footer {
|
||||
background-color: #33414E;
|
||||
}
|
||||
.logoText {
|
||||
color: #fff;
|
||||
color: #EBF1F1;
|
||||
font-size: 30px;
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
|
@ -110,7 +115,6 @@ iframe {
|
|||
}
|
||||
.param {
|
||||
font-weight: bold;
|
||||
//background-color: #DCDCDC;
|
||||
padding-left: 13px;
|
||||
}
|
||||
.numRow {
|
||||
|
@ -172,7 +176,6 @@ iframe {
|
|||
padding-top: 10px;
|
||||
}
|
||||
.footer {
|
||||
background-color: #222;
|
||||
box-shadow: 1px 1px 5px grey;
|
||||
min-height: 50px;
|
||||
top: 0;
|
||||
|
@ -232,7 +235,7 @@ iframe {
|
|||
padding: 10px;
|
||||
}
|
||||
.menu ul > li:hover{
|
||||
background-color: #333;
|
||||
background-color: #3a4a4a;
|
||||
}
|
||||
.menu ul ul > li:hover{
|
||||
background-color: #69e;
|
||||
|
@ -245,7 +248,7 @@ iframe {
|
|||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #222222;
|
||||
background-color: #33414E;
|
||||
}
|
||||
.menu ul ul{
|
||||
display: none;
|
||||
|
|
Loading…
Reference in New Issue