mirror of https://github.com/Aidaho12/haproxy-wi
parent
cc52ec7779
commit
6a4c597ab8
23
app/add.py
23
app/add.py
|
@ -4,7 +4,7 @@ import cgi
|
||||||
import os
|
import os
|
||||||
import funct
|
import funct
|
||||||
import sql
|
import sql
|
||||||
import http
|
import http.cookies
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
env = Environment(loader=FileSystemLoader('templates/'))
|
env = Environment(loader=FileSystemLoader('templates/'))
|
||||||
template = env.get_template('add.html')
|
template = env.get_template('add.html')
|
||||||
|
@ -45,19 +45,21 @@ if form.getvalue('mode') is not None:
|
||||||
haproxy_dir = sql.get_setting('haproxy_dir')
|
haproxy_dir = sql.get_setting('haproxy_dir')
|
||||||
serv = form.getvalue('serv')
|
serv = form.getvalue('serv')
|
||||||
port = form.getvalue('port')
|
port = form.getvalue('port')
|
||||||
|
bind = ""
|
||||||
|
ip = ""
|
||||||
force_close = form.getvalue('force_close')
|
force_close = form.getvalue('force_close')
|
||||||
mode = " mode " + form.getvalue('mode')
|
balance = ""
|
||||||
|
mode = " mode " + form.getvalue('mode') + "\n"
|
||||||
|
maxconn = " maxconn " + form.getvalue('maxconn') + "\n"
|
||||||
|
options_split = ""
|
||||||
ssl = ""
|
ssl = ""
|
||||||
|
ssl_check = ""
|
||||||
|
|
||||||
if form.getvalue('balance') is not None:
|
if form.getvalue('balance') is not None:
|
||||||
balance = " balance " + form.getvalue('balance') + "\n"
|
balance = " balance " + form.getvalue('balance') + "\n"
|
||||||
else:
|
|
||||||
balance = ""
|
|
||||||
|
|
||||||
if form.getvalue('ip') is not None:
|
if form.getvalue('ip') is not None:
|
||||||
ip = form.getvalue('ip')
|
ip = form.getvalue('ip')
|
||||||
else:
|
|
||||||
ip = ""
|
|
||||||
|
|
||||||
if form.getvalue('listner') is not None:
|
if form.getvalue('listner') is not None:
|
||||||
name = "\nlisten " + form.getvalue('listner')
|
name = "\nlisten " + form.getvalue('listner')
|
||||||
|
@ -78,15 +80,11 @@ if form.getvalue('mode') is not None:
|
||||||
ssl_check = " ssl verify none"
|
ssl_check = " ssl verify none"
|
||||||
else:
|
else:
|
||||||
ssl_check = " ssl verify"
|
ssl_check = " ssl verify"
|
||||||
else:
|
|
||||||
ssl_check = ""
|
|
||||||
|
|
||||||
if not ip and port is not None:
|
if not ip and port is not None:
|
||||||
bind = " bind *:"+ port + " " + ssl + "\n"
|
bind = " bind *:"+ port + " " + ssl + "\n"
|
||||||
elif port is not None:
|
elif port is not None:
|
||||||
bind = " bind " + ip + ":" + port + " " + ssl + "\n"
|
bind = " bind " + ip + ":" + port + " " + ssl + "\n"
|
||||||
else:
|
|
||||||
bind = ""
|
|
||||||
|
|
||||||
if form.getvalue('default-check') == "1":
|
if form.getvalue('default-check') == "1":
|
||||||
if form.getvalue('check-servers') == "1":
|
if form.getvalue('check-servers') == "1":
|
||||||
|
@ -102,11 +100,8 @@ if form.getvalue('mode') is not None:
|
||||||
if form.getvalue('option') is not None:
|
if form.getvalue('option') is not None:
|
||||||
options = form.getvalue('option')
|
options = form.getvalue('option')
|
||||||
i = options.split("\n")
|
i = options.split("\n")
|
||||||
options_split = ""
|
|
||||||
for j in i:
|
for j in i:
|
||||||
options_split += " " + j + "\n"
|
options_split += " " + j + "\n"
|
||||||
else:
|
|
||||||
options_split = ""
|
|
||||||
|
|
||||||
if force_close == "1":
|
if force_close == "1":
|
||||||
options_split += " option http-server-close\n"
|
options_split += " option http-server-close\n"
|
||||||
|
@ -175,7 +170,7 @@ if form.getvalue('mode') is not None:
|
||||||
waf = " filter spoe engine modsecurity config "+haproxy_dir+"/waf.conf\n"
|
waf = " filter spoe engine modsecurity config "+haproxy_dir+"/waf.conf\n"
|
||||||
waf += " http-request deny if { var(txn.modsec.code) -m int gt 0 }\n"
|
waf += " http-request deny if { var(txn.modsec.code) -m int gt 0 }\n"
|
||||||
|
|
||||||
config_add = name + "\n" + bind + mode + "\n" + balance + options_split + filter + compression_s + cache_s + waf + backend + servers_split + "\n" + cache_set
|
config_add = name + "\n" + bind + mode + maxconn + balance + options_split + filter + compression_s + cache_s + waf + backend + servers_split + "\n" + cache_set
|
||||||
cfg = hap_configs_dir + serv + "-" + funct.get_data('config') + ".cfg"
|
cfg = hap_configs_dir + serv + "-" + funct.get_data('config') + ".cfg"
|
||||||
|
|
||||||
funct.get_config(serv, cfg)
|
funct.get_config(serv, cfg)
|
||||||
|
|
64
app/funct.py
64
app/funct.py
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-"
|
# -*- coding: utf-8 -*-"
|
||||||
import cgi
|
import cgi
|
||||||
import os, sys
|
import os, sys
|
||||||
import http.cookies
|
|
||||||
|
|
||||||
form = cgi.FieldStorage()
|
form = cgi.FieldStorage()
|
||||||
serv = form.getvalue('serv')
|
serv = form.getvalue('serv')
|
||||||
|
@ -42,6 +41,7 @@ def get_data(type):
|
||||||
|
|
||||||
def logging(serv, action, **kwargs):
|
def logging(serv, action, **kwargs):
|
||||||
import sql
|
import sql
|
||||||
|
import http.cookies
|
||||||
log_path = get_config_var('main', 'log_path')
|
log_path = get_config_var('main', 'log_path')
|
||||||
|
|
||||||
if not os.path.exists(log_path):
|
if not os.path.exists(log_path):
|
||||||
|
@ -64,12 +64,11 @@ def logging(serv, action, **kwargs):
|
||||||
else:
|
else:
|
||||||
mess = get_data('date_in_log') + " from " + IP + " user: " + login + " " + action + " for: " + serv + "\n"
|
mess = get_data('date_in_log') + " from " + IP + " user: " + login + " " + action + " for: " + serv + "\n"
|
||||||
log = open(log_path + "/config_edit-"+get_data('logs')+".log", "a")
|
log = open(log_path + "/config_edit-"+get_data('logs')+".log", "a")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
log.write(mess)
|
log.write(mess)
|
||||||
log.close
|
log.close
|
||||||
except IOError:
|
except IOError as e:
|
||||||
print('<center><div class="alert alert-danger">Can\'t read write log. Please chech log_path in config</div></center>')
|
print('<center><div class="alert alert-danger">Can\'t write log. Please check log_path in config %e</div></center>' % e)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def telegram_send_mess(mess, **kwargs):
|
def telegram_send_mess(mess, **kwargs):
|
||||||
|
@ -95,6 +94,7 @@ def telegram_send_mess(mess, **kwargs):
|
||||||
|
|
||||||
def check_login(**kwargs):
|
def check_login(**kwargs):
|
||||||
import sql
|
import sql
|
||||||
|
import http.cookies
|
||||||
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
|
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
|
||||||
user_uuid = cookie.get('uuid')
|
user_uuid = cookie.get('uuid')
|
||||||
ref = os.environ.get("SCRIPT_NAME")
|
ref = os.environ.get("SCRIPT_NAME")
|
||||||
|
@ -110,6 +110,7 @@ def check_login(**kwargs):
|
||||||
|
|
||||||
def is_admin(**kwargs):
|
def is_admin(**kwargs):
|
||||||
import sql
|
import sql
|
||||||
|
import http.cookies
|
||||||
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
|
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
|
||||||
user_id = cookie.get('uuid')
|
user_id = cookie.get('uuid')
|
||||||
try:
|
try:
|
||||||
|
@ -134,7 +135,7 @@ def page_for_admin(**kwargs):
|
||||||
|
|
||||||
if not is_admin(level = give_level):
|
if not is_admin(level = give_level):
|
||||||
print('<center><h3 style="color: red">How did you get here?! O_o You do not have need permissions</h>')
|
print('<center><h3 style="color: red">How did you get here?! O_o You do not have need permissions</h>')
|
||||||
print('<meta http-equiv="refresh" content="10; url=/">')
|
print('<meta http-equiv="refresh" content="5; url=/">')
|
||||||
import sys
|
import sys
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
@ -233,7 +234,10 @@ def install_haproxy(serv, **kwargs):
|
||||||
" SOCK_PORT="+haproxy_sock_port+" STAT_PORT="+stats_port+" STAT_FILE="+server_state_file+
|
" SOCK_PORT="+haproxy_sock_port+" STAT_PORT="+stats_port+" STAT_FILE="+server_state_file+
|
||||||
" STATS_USER="+stats_user+" STATS_PASS="+stats_password ]
|
" STATS_USER="+stats_user+" STATS_PASS="+stats_password ]
|
||||||
|
|
||||||
upload(serv, tmp_config_path, script)
|
error = str(upload(serv, tmp_config_path, script))
|
||||||
|
if error:
|
||||||
|
print('error: '+error)
|
||||||
|
|
||||||
os.system("rm -f %s" % script)
|
os.system("rm -f %s" % script)
|
||||||
ssh_command(serv, commands, print_out="1")
|
ssh_command(serv, commands, print_out="1")
|
||||||
|
|
||||||
|
@ -251,7 +255,9 @@ def syn_flood_protect(serv, **kwargs):
|
||||||
|
|
||||||
commands = [ "sudo chmod +x "+tmp_config_path+script, tmp_config_path+script+ " "+enable ]
|
commands = [ "sudo chmod +x "+tmp_config_path+script, tmp_config_path+script+ " "+enable ]
|
||||||
|
|
||||||
upload(serv, tmp_config_path, script)
|
error = str(upload(serv, tmp_config_path, script))
|
||||||
|
if error:
|
||||||
|
print('error: '+error)
|
||||||
os.system("rm -f %s" % script)
|
os.system("rm -f %s" % script)
|
||||||
ssh_command(serv, commands, print_out="1")
|
ssh_command(serv, commands, print_out="1")
|
||||||
|
|
||||||
|
@ -268,7 +274,9 @@ def waf_install(serv, **kwargs):
|
||||||
commands = [ "sudo chmod +x "+tmp_config_path+script+" && " +tmp_config_path+script +" PROXY=" + proxy+
|
commands = [ "sudo chmod +x "+tmp_config_path+script+" && " +tmp_config_path+script +" PROXY=" + proxy+
|
||||||
" HAPROXY_PATH="+haproxy_dir +" VERSION="+ver ]
|
" HAPROXY_PATH="+haproxy_dir +" VERSION="+ver ]
|
||||||
|
|
||||||
upload(serv, tmp_config_path, script)
|
error = str(upload(serv, tmp_config_path, script))
|
||||||
|
if error:
|
||||||
|
print('error: '+error)
|
||||||
os.system("rm -f %s" % script)
|
os.system("rm -f %s" % script)
|
||||||
|
|
||||||
stderr = ssh_command(serv, commands, print_out="1")
|
stderr = ssh_command(serv, commands, print_out="1")
|
||||||
|
@ -286,19 +294,27 @@ def check_haproxy_version(serv):
|
||||||
return ver
|
return ver
|
||||||
|
|
||||||
def upload(serv, path, file, **kwargs):
|
def upload(serv, path, file, **kwargs):
|
||||||
|
error = ""
|
||||||
full_path = path + file
|
full_path = path + file
|
||||||
|
|
||||||
|
if kwargs.get('dir') == "fullpath":
|
||||||
|
full_path = path
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ssh = ssh_connect(serv)
|
ssh = ssh_connect(serv)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('<div class="alert alert-danger">Connect fail: %s</div>' % e)
|
error = e
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
sftp = ssh.open_sftp()
|
sftp = ssh.open_sftp()
|
||||||
file = sftp.put(file, full_path)
|
file = sftp.put(file, full_path)
|
||||||
sftp.close()
|
sftp.close()
|
||||||
ssh.close()
|
ssh.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('<div class="alert alert-danger">Upload fail: %s</div>' % e)
|
error = e
|
||||||
|
pass
|
||||||
|
|
||||||
|
return error
|
||||||
|
|
||||||
def upload_and_restart(serv, cfg, **kwargs):
|
def upload_and_restart(serv, cfg, **kwargs):
|
||||||
import sql
|
import sql
|
||||||
|
@ -311,13 +327,6 @@ def upload_and_restart(serv, cfg, **kwargs):
|
||||||
return 'Please install dos2unix'
|
return 'Please install dos2unix'
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
|
||||||
ssh = ssh_connect(serv)
|
|
||||||
except:
|
|
||||||
return 'Connect fail'
|
|
||||||
sftp = ssh.open_sftp()
|
|
||||||
sftp.put(cfg, tmp_file)
|
|
||||||
sftp.close()
|
|
||||||
if kwargs.get("keepalived") == 1:
|
if kwargs.get("keepalived") == 1:
|
||||||
if kwargs.get("just_save") == "save":
|
if kwargs.get("just_save") == "save":
|
||||||
commands = [ "sudo mv -f " + tmp_file + " /etc/keepalived/keepalived.conf" ]
|
commands = [ "sudo mv -f " + tmp_file + " /etc/keepalived/keepalived.conf" ]
|
||||||
|
@ -332,13 +341,16 @@ def upload_and_restart(serv, cfg, **kwargs):
|
||||||
if sql.get_setting('firewall_enable') == "1":
|
if sql.get_setting('firewall_enable') == "1":
|
||||||
commands.extend(open_port_firewalld(cfg))
|
commands.extend(open_port_firewalld(cfg))
|
||||||
except:
|
except:
|
||||||
return 'Please check the config for the presence of the parameter - "firewall_enable". Mast be: "0" or "1". Firewalld configure not working now'
|
error = 'Please check the config for the presence of the parameter - "firewall_enable". Mast be: "0" or "1". Firewalld configure not working now'
|
||||||
|
|
||||||
for command in commands:
|
error += str(upload(serv, tmp_file, cfg, dir='fullpath'))
|
||||||
stdin, stdout, stderr = ssh.exec_command(command)
|
|
||||||
|
|
||||||
return stderr.read()
|
try:
|
||||||
ssh.close()
|
error += ssh_command(serv, commands, retunr_err=1)
|
||||||
|
except Exception as e:
|
||||||
|
error += e
|
||||||
|
if error:
|
||||||
|
return error
|
||||||
|
|
||||||
def open_port_firewalld(cfg):
|
def open_port_firewalld(cfg):
|
||||||
try:
|
try:
|
||||||
|
@ -373,7 +385,6 @@ def check_haproxy_config(serv):
|
||||||
|
|
||||||
def show_log(stdout):
|
def show_log(stdout):
|
||||||
i = 0
|
i = 0
|
||||||
|
|
||||||
for line in stdout:
|
for line in stdout:
|
||||||
i = i + 1
|
i = i + 1
|
||||||
line_class = "line3" if i % 2 == 0 else "line"
|
line_class = "line3" if i % 2 == 0 else "line"
|
||||||
|
@ -412,6 +423,8 @@ def ssh_command(serv, commands, **kwargs):
|
||||||
elif kwargs.get('print_out'):
|
elif kwargs.get('print_out'):
|
||||||
print(stdout.read().decode(encoding='UTF-8'))
|
print(stdout.read().decode(encoding='UTF-8'))
|
||||||
return stdout.read().decode(encoding='UTF-8')
|
return stdout.read().decode(encoding='UTF-8')
|
||||||
|
elif kwargs.get('retunr_err'):
|
||||||
|
return stderr.read().decode(encoding='UTF-8')
|
||||||
else:
|
else:
|
||||||
return stdout.read().decode(encoding='UTF-8')
|
return stdout.read().decode(encoding='UTF-8')
|
||||||
|
|
||||||
|
@ -421,8 +434,7 @@ def ssh_command(serv, commands, **kwargs):
|
||||||
try:
|
try:
|
||||||
ssh.close()
|
ssh.close()
|
||||||
except:
|
except:
|
||||||
ssh = str(ssh)
|
print("<div class='alert alert-danger' style='margin: 0;'>"+str(ssh)+"</div>")
|
||||||
print("<div class='alert alert-danger' style='margin: 0;'>"+ssh+"</div>")
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def escape_html(text):
|
def escape_html(text):
|
||||||
|
@ -452,7 +464,7 @@ def show_backends(serv, **kwargs):
|
||||||
ret += back[1]
|
ret += back[1]
|
||||||
ret += "<br />"
|
ret += "<br />"
|
||||||
else:
|
else:
|
||||||
print(back[1]+"<br>")
|
print(back[1], end="<br>")
|
||||||
|
|
||||||
if kwargs.get('ret'):
|
if kwargs.get('ret'):
|
||||||
return ret
|
return ret
|
||||||
|
|
|
@ -307,7 +307,6 @@ if act == "showCompareConfigs":
|
||||||
print(output_from_parsed_template)
|
print(output_from_parsed_template)
|
||||||
|
|
||||||
if serv is not None and form.getvalue('right') is not None:
|
if serv is not None and form.getvalue('right') is not None:
|
||||||
import subprocess
|
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
left = form.getvalue('left')
|
left = form.getvalue('left')
|
||||||
right = form.getvalue('right')
|
right = form.getvalue('right')
|
||||||
|
@ -370,7 +369,10 @@ if form.getvalue('master'):
|
||||||
|
|
||||||
os.system("cp scripts/%s ." % script)
|
os.system("cp scripts/%s ." % script)
|
||||||
|
|
||||||
funct.upload(master, tmp_config_path, script)
|
error = str(funct.upload(master, tmp_config_path, script))
|
||||||
|
if error:
|
||||||
|
print('error: '+error)
|
||||||
|
sys.exit()
|
||||||
funct.upload(slave, tmp_config_path, script)
|
funct.upload(slave, tmp_config_path, script)
|
||||||
|
|
||||||
commands = [ "sudo chmod +x "+tmp_config_path+script, tmp_config_path+script+" MASTER "+interface+" "+vrrpip ]
|
commands = [ "sudo chmod +x "+tmp_config_path+script, tmp_config_path+script+" MASTER "+interface+" "+vrrpip ]
|
||||||
|
@ -393,7 +395,10 @@ if form.getvalue('masteradd'):
|
||||||
|
|
||||||
os.system("cp scripts/%s ." % script)
|
os.system("cp scripts/%s ." % script)
|
||||||
|
|
||||||
funct.upload(master, tmp_config_path, script)
|
error = str(funct.upload(master, tmp_config_path, script))
|
||||||
|
if error:
|
||||||
|
print('error: '+error)
|
||||||
|
sys.exit()
|
||||||
funct.upload(slave, tmp_config_path, script)
|
funct.upload(slave, tmp_config_path, script)
|
||||||
|
|
||||||
commands = [ "sudo chmod +x "+tmp_config_path+script, tmp_config_path+script+" MASTER "+interface+" "+vrrpip+" "+kp]
|
commands = [ "sudo chmod +x "+tmp_config_path+script, tmp_config_path+script+" MASTER "+interface+" "+vrrpip+" "+kp]
|
||||||
|
|
|
@ -3,7 +3,7 @@ import os
|
||||||
import sql
|
import sql
|
||||||
import http.cookies
|
import http.cookies
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
env = Environment(loader=FileSystemLoader('templates/ajax'))
|
env = Environment(loader=FileSystemLoader('templates/ajax'),extensions=['jinja2.ext.loopcontrols', 'jinja2.ext.do'])
|
||||||
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
|
cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
|
||||||
user_id = cookie.get('uuid')
|
user_id = cookie.get('uuid')
|
||||||
haproxy_sock_port = sql.get_setting('haproxy_sock_port')
|
haproxy_sock_port = sql.get_setting('haproxy_sock_port')
|
||||||
|
@ -42,7 +42,6 @@ def get_overviewWaf(url):
|
||||||
|
|
||||||
def get_overviewServers():
|
def get_overviewServers():
|
||||||
template = env.get_template('overviewServers.html')
|
template = env.get_template('overviewServers.html')
|
||||||
|
|
||||||
commands = [ "top -u haproxy -b -n 1" ]
|
commands = [ "top -u haproxy -b -n 1" ]
|
||||||
|
|
||||||
for server in sorted(listhap):
|
for server in sorted(listhap):
|
||||||
|
|
|
@ -73,6 +73,13 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="advance">
|
||||||
|
<td class="addName">Maxconn: </td>
|
||||||
|
<td class="addOption">
|
||||||
|
<input type="number" name="maxconn" required title="Fix the maximum number of concurrent connections on a frontend" size="5" value="2000" class="form-control">
|
||||||
|
<div class="tooltip tooltipTop">This value should not exceed the global maxconn. Default global maxconn value: 2000</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr class="advance">
|
<tr class="advance">
|
||||||
<td class="addName">Balance: </td>
|
<td class="addName">Balance: </td>
|
||||||
<td class="addOption">
|
<td class="addOption">
|
||||||
|
@ -287,6 +294,13 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="advance">
|
||||||
|
<td class="addName">Maxconn: </td>
|
||||||
|
<td class="addOption">
|
||||||
|
<input type="number" name="maxconn" required title="Fix the maximum number of concurrent connections on a frontend" size="5" value="2000" class="form-control">
|
||||||
|
<div class="tooltip tooltipTop">This value should not exceed the global maxconn. Default global maxconn value: 2000</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr class="advance">
|
<tr class="advance">
|
||||||
<td class="addName"><span title="Cache support start 1.8 and latter">Web acceleration(?):</span></td>
|
<td class="addName"><span title="Cache support start 1.8 and latter">Web acceleration(?):</span></td>
|
||||||
<td class="addOption">
|
<td class="addOption">
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
<div class="lineDiff">{{ line }}</div>
|
<div class="lineDiff">{{ line }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% set total_change = minus + plus %}
|
|
||||||
|
|
||||||
|
{% set total_change = minus + plus %}
|
||||||
<div class="diffHead">Total change: {{ total_change|length }}, additions: {{ plus|length }} & deletions: {{ minus|length }} </div>
|
<div class="diffHead">Total change: {{ total_change|length }}, additions: {{ plus|length }} & deletions: {{ minus|length }} </div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
{% set waf_servers = [] %}
|
||||||
{% for service in service_status %}
|
{% for service in service_status %}
|
||||||
{% if service.3 or url == "waf.py" %}
|
{% if service.3 or url == "waf.py" %}
|
||||||
|
{% do waf_servers.append(1) %}
|
||||||
<tr class="{{ loop.cycle('odd', 'even') }}">
|
<tr class="{{ loop.cycle('odd', 'even') }}">
|
||||||
<td class="padding10 first-collumn">
|
<td class="padding10 first-collumn">
|
||||||
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000">{{ service.0 }}</a>
|
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000">{{ service.0 }}</a>
|
||||||
|
@ -46,3 +48,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if waf_servers|count == 0 and url != "waf.py" %}
|
||||||
|
<tr>
|
||||||
|
<td class="padding10 first-collumn">
|
||||||
|
You have not installed the WAF server yet
|
||||||
|
{{ waf_servers|length }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
|
@ -101,7 +101,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="copyright-menu">
|
<div class="copyright-menu">
|
||||||
HAproxy-WI v3.2.5
|
HAproxy-WI v3.2.6
|
||||||
<br>
|
<br>
|
||||||
<a href="https://www.patreon.com/haproxy_wi" title="Donate" target="_blank" style="color: #fff; margin-left: 30px; color: red;" class="patreon"> Patreon</a>
|
<a href="https://www.patreon.com/haproxy_wi" title="Donate" target="_blank" style="color: #fff; margin-left: 30px; color: red;" class="patreon"> Patreon</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="padding10 first-collumn" style="width: 10%;">
|
<td class="padding10 first-collumn" style="width: 10%;">
|
||||||
<form action="logs.py" method="get">
|
<form action="" method="get">
|
||||||
<select autofocus required name="serv" id="{{ select_id }}">
|
<select autofocus required name="serv" id="{{ select_id }}">
|
||||||
{% if onclick == 'viewLogs()' %}
|
{% if onclick == 'viewLogs()' %}
|
||||||
<option disabled selected>Choose log</option>
|
<option disabled selected>Choose log</option>
|
||||||
|
|
Loading…
Reference in New Issue