haproxy-wi/app/diff.py

28 lines
620 B
Python
Raw Normal View History

2018-01-15 06:16:04 +00:00
#!/usr/bin/env python3
import html
import cgi
import funct
2018-04-11 09:27:57 +00:00
import ovw
2018-01-15 06:16:04 +00:00
form = cgi.FieldStorage()
serv = form.getvalue('serv')
left = form.getvalue('left')
right = form.getvalue('right')
funct.head("Compare HAproxy configs")
funct.check_config()
funct.check_login()
2018-04-11 09:27:57 +00:00
funct.chooseServer("diff.py#diff", "Compare HAproxy configs", "n", onclick="showCompareConfigs()")
2018-01-15 06:16:04 +00:00
2018-04-11 09:27:57 +00:00
print('<div id="ajax-compare">')
2018-01-15 06:16:04 +00:00
2018-04-11 09:27:57 +00:00
if serv is not None and form.getvalue('open') is not None :
ovw.show_compare_configs(serv)
2018-01-15 06:16:04 +00:00
2018-04-11 09:27:57 +00:00
print('</div><div id=ajax>')
2018-01-15 06:16:04 +00:00
if serv is not None and right is not None:
2018-04-11 09:27:57 +00:00
ovw.comapre_show()
2018-04-10 06:10:07 +00:00
print('</div>')
2018-01-15 06:16:04 +00:00
funct.footer()