haproxy-wi/app/templates/ajax/config_show.html

135 lines
4.0 KiB
HTML
Raw Normal View History

<center>
<h4>Config from {{serv}}</h4>
<p class="accordion-expand-holder">
2019-09-20 16:24:45 +00:00
{% if role %}
<a class="ui-button ui-widget ui-corner-all" title="Edit this run config" href="config.py?serv={{serv}}&open=open">Edit</a>
{% endif %}
<a class="accordion-expand-all ui-button ui-widget ui-corner-all" href="#">Expand all</a>
<button id="raw">Raw</button>
<button id="according" style="display: none;">According</button>
</p>
</center>
<div style="margin-left: 16%" class="configShow">
{% set i = 0 -%}
{% for line in conf %}
{% 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') %}
<span class="param">{{ line }}
2019-09-20 16:24:45 +00:00
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
</span>
{% endif %}
</span><div>
{% continue %}
{% endif %}
{% if line.startswith('defaults') %}
</div><span class="param">{{ line }}
2019-09-20 16:24:45 +00:00
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
</span>
{% endif %}
</span><div>
{% continue %}
{% endif %}
{% if line.startswith('listen') %}
</div><span class="param">{{ line }}
2019-09-20 16:24:45 +00:00
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
</span>
{% endif %}
{% set backend = line.split(' ') %}
<span class="accordion-link">
<a href="/app/viewsttats.py?serv={{serv}}#{{ backend[1]}}">Stats</a>
</span>
</span><div>
{% continue %}
{% endif %}
{% if line.startswith('frontend') %}
</div><span class="param">{{ line }}
2019-09-20 16:24:45 +00:00
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
</span>
{% endif %}
{% set backend = line.split(' ') %}
<span class="accordion-link">
<a href="/app/viewsttats.py?serv={{serv}}#{{ backend[1]}}">Stats</a>
</span>
</span><div>
{% continue %}
{% endif %}
{% if line.startswith('backend') %}
</div><span class="param"> {{ line }}
2019-09-20 16:24:45 +00:00
{% if role %}
<span class="accordion-link">
<a href="/app/sections.py?serv={{serv}}&section={{ line }}">Edit</a>
</span>
{% endif %}
{% set backend = line.split(' ') %}
<span class="accordion-link">
<a href="/app/viewsttats.py?serv={{serv}}#{{ backend[1]}}">Stats</a>
</span>
</span><div>
{% continue %}
{% endif %}
{% if line.startswith('cache') %}
2018-08-14 09:54:39 +00:00
</div><span class="param"> {{ line }} </span><div>
{% continue %}
{% endif %}
{% if "acl" in line or "option" in line or "server" in line %}
{% if "timeout" not in line and "default-server" not in line and "#use_backend" not in line and "#" not in line%}
<span class="paramInSec">
<span class="numRow">
{{ i }}
</span>
{{ line }}
</span><br />
{% continue %}
{% endif %}
{% endif %}
2018-08-14 09:54:39 +00:00
{% if line.startswith("#") %}
<span class="comment">
<span class="numRow">
{{ i }}
</span>
{{ line }}
</span><br />
{% continue %}
{% endif %}
{% if line|length > 1 %}
<span class="configLine">
<span class="numRow">{{ i }}</span>
{{ line }}
</span><br />
{% endif %}
{% endfor %}
2018-08-14 09:54:39 +00:00
</div>
</div>
{% if configver %}
<br>
<center>
<form action="versions.py#conf" method="get">
<input type="hidden" value="{{serv}}" name="serv">
<input type="hidden" value="{{configver}}" name="configver">
<input type="hidden" value="1" name="config">
<button type='submit' value='save' name='save' class='btn btn-default'>Just save</button>
<button type='submit' value='' name='' class='btn btn-default'>Upload and restart</button>
</form>
<div class="alert alert-info"><b>Note:</b> If you reconfigure Master server, Slave will reconfigured automatically</div>
</center>
{% endif %}