mirror of https://github.com/Aidaho12/haproxy-wi
parent
4a2c6c520e
commit
fbdae839e4
|
@ -9,7 +9,7 @@ from jinja2 import Environment, FileSystemLoader
|
||||||
env = Environment(loader=FileSystemLoader('templates/'))
|
env = Environment(loader=FileSystemLoader('templates/'))
|
||||||
template = env.get_template('config.html')
|
template = env.get_template('config.html')
|
||||||
|
|
||||||
|
print('Content-type: text/html\n')
|
||||||
funct.check_login()
|
funct.check_login()
|
||||||
|
|
||||||
form = cgi.FieldStorage()
|
form = cgi.FieldStorage()
|
||||||
|
@ -26,6 +26,7 @@ try:
|
||||||
user = sql.get_user_name_by_uuid(user_id.value)
|
user = sql.get_user_name_by_uuid(user_id.value)
|
||||||
servers = sql.get_dick_permit()
|
servers = sql.get_dick_permit()
|
||||||
token = sql.get_token(user_id.value)
|
token = sql.get_token(user_id.value)
|
||||||
|
role = sql.get_user_role_by_uuid(user_id.value)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -84,9 +85,9 @@ if serv is not None and form.getvalue('config') is not None:
|
||||||
|
|
||||||
os.system("/bin/rm -f " + hap_configs_dir + "*.old")
|
os.system("/bin/rm -f " + hap_configs_dir + "*.old")
|
||||||
|
|
||||||
print('Content-type: text/html\n')
|
|
||||||
template = template.render(h2 = 1, title = "Working with HAProxy configs",
|
template = template.render(h2 = 1, title = "Working with HAProxy configs",
|
||||||
role = sql.get_user_role_by_uuid(user_id.value),
|
role = role,
|
||||||
action = "config.py",
|
action = "config.py",
|
||||||
user = user,
|
user = user,
|
||||||
select_id = "serv",
|
select_id = "serv",
|
||||||
|
|
Loading…
Reference in New Issue