27. Ability to hide part of the config tags: "#HideBlockStart" and "#HideBlockEnd"
pull/145/head
Pavel Loginov 2019-05-13 23:07:32 +03:00
parent 47120eba06
commit 5c416a3bfc
4 changed files with 17 additions and 6 deletions

View File

@ -42,6 +42,7 @@ Began to lead a [Twitter](https://twitter.com/haproxy_wi), subscribe! I will wri
24. Web application firewall 24. Web application firewall
25. LDAP support 25. LDAP support
26. Keep active HAProxy service 26. Keep active HAProxy service
27. Ability to hide part of the config tags: "#HideBlockStart" and "#HideBlockEnd"
![alt text](image/haproxy-wi-metrics.jpeg "Merics") ![alt text](image/haproxy-wi-metrics.jpeg "Merics")

View File

@ -78,10 +78,10 @@ if serv is not None and form.getvalue('config') is not None:
funct.diff_config(oldcfg, cfg) funct.diff_config(oldcfg, cfg)
if save: #if save:
c = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE")) # c = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE"))
c["restart"] = form.getvalue('serv') # c["restart"] = form.getvalue('serv')
print(c) # print(c)
os.system("/bin/rm -f " + hap_configs_dir + "*.old") os.system("/bin/rm -f " + hap_configs_dir + "*.old")

View File

@ -13,6 +13,16 @@
{% set i = 0 -%} {% set i = 0 -%}
{% for line in conf %} {% for line in conf %}
{% set i = i + loop.index0 %} {% set i = i + loop.index0 %}
{% if not role %}
{% if line.startswith('#HideBlockStart') %}
<!--{{line}}
{% continue %}
{% endif %}
{% if line.startswith('#HideBlockEnd') %}
{{line}}-->
{% continue %}
{% endif %}
{% endif %}
{% if line.startswith('global') %} {% if line.startswith('global') %}
<span class="param"> {{ line }} </span><div> <span class="param"> {{ line }} </span><div>
{% continue %} {% continue %}

View File

@ -115,7 +115,7 @@
</ul> </ul>
</nav> </nav>
<div class="copyright-menu"> <div class="copyright-menu">
<a href="https://github.com/aidaho12/haproxy-wi/" title="Github repo" target="_blank" style="color: #fff">HAproxy-WI v3.4.4</a> <a href="https://github.com/aidaho12/haproxy-wi/" title="Github repo" target="_blank" style="color: #fff">HAproxy-WI v3.4.4.1</a>
<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>