mirror of https://github.com/Aidaho12/haproxy-wi
parent
2558528a40
commit
f87ec83348
|
@ -180,8 +180,16 @@ elif form.getvalue('mode') is not None:
|
||||||
try:
|
try:
|
||||||
if a == '1':
|
if a == '1':
|
||||||
acl_if_word = 'hdr_beg(host) -i '
|
acl_if_word = 'hdr_beg(host) -i '
|
||||||
|
if form.getvalue('ssl') == "https" and form.getvalue('mode') != "tcp":
|
||||||
|
acl_if_word = 'ssl_fc_sni -i '
|
||||||
|
if form.getvalue('mode') == "tcp":
|
||||||
|
acl_if_word = 'req.ssl_sni -i '
|
||||||
elif a == '2':
|
elif a == '2':
|
||||||
acl_if_word = 'hdr_end(host) -i '
|
acl_if_word = 'hdr_end(host) -i '
|
||||||
|
if form.getvalue('ssl') == "https" and form.getvalue('mode') != "tcp":
|
||||||
|
acl_if_word = 'ssl_fc_sni -i '
|
||||||
|
if form.getvalue('mode') == "tcp":
|
||||||
|
acl_if_word = 'req.ssl_sni -i '
|
||||||
elif a == '3':
|
elif a == '3':
|
||||||
acl_if_word = 'path_beg -i '
|
acl_if_word = 'path_beg -i '
|
||||||
elif a == '4':
|
elif a == '4':
|
||||||
|
|
|
@ -1046,6 +1046,25 @@ def update_db_v_4_5_8_2(**kwargs):
|
||||||
con.close()
|
con.close()
|
||||||
|
|
||||||
|
|
||||||
|
def update_db_v_4_5_9(**kwargs):
|
||||||
|
con, cur = get_cur()
|
||||||
|
sql = list()
|
||||||
|
sql.append("INSERT INTO settings (param, value, section, `desc`) values('smon_check_interval', '1', 'monitoring', 'SMON check interval, in minutes')")
|
||||||
|
sql.append("INSERT INTO settings (param, value, section, `desc`) values('checker_check_interval', '1', 'monitoring', 'Checker check interval, in minutes')")
|
||||||
|
for i in sql:
|
||||||
|
try:
|
||||||
|
cur.execute(i)
|
||||||
|
con.commit()
|
||||||
|
except sqltool.Error as e:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
if kwargs.get('silent') != 1:
|
||||||
|
print('Updating... DB has been updated to version 4.5.9')
|
||||||
|
cur.close()
|
||||||
|
con.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def update_ver(**kwargs):
|
def update_ver(**kwargs):
|
||||||
con, cur = get_cur()
|
con, cur = get_cur()
|
||||||
sql = """update version set version = '4.5.8.0'; """
|
sql = """update version set version = '4.5.8.0'; """
|
||||||
|
@ -1087,6 +1106,7 @@ def update_all():
|
||||||
update_db_v_4_5_8()
|
update_db_v_4_5_8()
|
||||||
update_db_v_4_5_8_1()
|
update_db_v_4_5_8_1()
|
||||||
update_db_v_4_5_8_2()
|
update_db_v_4_5_8_2()
|
||||||
|
update_db_v_4_5_9()
|
||||||
update_ver()
|
update_ver()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1119,6 +1139,7 @@ def update_all_silent():
|
||||||
update_db_v_4_5_8(silent=1)
|
update_db_v_4_5_8(silent=1)
|
||||||
update_db_v_4_5_8_1(silent=1)
|
update_db_v_4_5_8_1(silent=1)
|
||||||
update_db_v_4_5_8_2(silent=1)
|
update_db_v_4_5_8_2(silent=1)
|
||||||
|
update_db_v_4_5_9(silent=1)
|
||||||
update_ver()
|
update_ver()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -244,6 +244,18 @@
|
||||||
<a href="https://haproxy-wi.org/cabinet.py" class="footer-link" target="_blank" title="Private cabinet">Cabinet</a>
|
<a href="https://haproxy-wi.org/cabinet.py" class="footer-link" target="_blank" title="Private cabinet">Cabinet</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="show-user-settings">
|
||||||
|
<table class="overview">
|
||||||
|
<tr>
|
||||||
|
<td class="padding20" style="width: 60%">Disable alerting for this tab</td>
|
||||||
|
<td><label for="disable_alert_for_tab"></label><input type="checkbox" id="disable_alert_for_tab" />
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td class="padding20" style="width: 60%">Disable alerting for all tabs</td>
|
||||||
|
<td><label for="disable_alert_for_all"></label><input type="checkbox" id="disable_alert_for_all" />
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
<div id="current-user-groups-dialog" style="display: none;">
|
<div id="current-user-groups-dialog" style="display: none;">
|
||||||
<div id="current-user-groups-form"></div>
|
<div id="current-user-groups-form"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,11 +8,14 @@
|
||||||
<input type="{{ type }}" name="{{name}}" value="{{ value|e }}" id="{{ id }}" size="{{size}}" style="{{style}}" {{readonly}} {{required}} {{autofocus}} placeholder="{{placeholder}}" title="{{title}}" class="{{class}}" autocomplete="off" />
|
<input type="{{ type }}" name="{{name}}" value="{{ value|e }}" id="{{ id }}" size="{{size}}" style="{{style}}" {{readonly}} {{required}} {{autofocus}} placeholder="{{placeholder}}" title="{{title}}" class="{{class}}" autocomplete="off" />
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro checkbox(id, name='', checked='', title='', value='', desc='') -%}
|
{%- macro checkbox(id, name='', checked='', title='', value='', desc='', disabled='') -%}
|
||||||
{% if name == '' %}
|
{% if name == '' %}
|
||||||
{% set name = id %}
|
{% set name = id %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<label for="{{id}}" title="{{title}}" class="{{id}}">{{desc}}</label><input name="{{name}}" type="checkbox" id="{{id}}" value="{{value|e}}" {{checked}} />
|
{% if disabled == 'true' %}
|
||||||
|
{% set disabled = 'disabled' %}
|
||||||
|
{% endif %}
|
||||||
|
<label for="{{id}}" title="{{title}}" class="{{id}}">{{desc}}</label><input name="{{name}}" type="checkbox" id="{{id}}" value="{{value|e}}" {{checked}} {{disabled}} />
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro select(id, values, name='', required='', first='', class='', selected='', disabled='true') -%}
|
{%- macro select(id, values, name='', required='', first='', class='', selected='', disabled='true') -%}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% if user %}
|
{% if user %}
|
||||||
<span id="changeCurrentGroup" class="menu-bar login" title="Change current group" style="margin-top: 7px;margin-left: -10px;cursor: pointer;"></span>
|
<span id="show-user-settings-button" class="menu-bar login" title="User settings" style="margin-top: 7px;margin-left: -10px;cursor: pointer;"></span>
|
||||||
<a href=/app/login.py?logout=logout title="Logout, user name: {{ user }}" class="login"> Logout</a>
|
<a href=/app/login.py?logout=logout title="Logout, user name: {{ user }}" class="login"> Logout</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href=/app/login.py title="Login" class="login"> Login</a>
|
<a href=/app/login.py title="Login" class="login"> Login</a>
|
||||||
|
|
Loading…
Reference in New Issue