mirror of https://github.com/Aidaho12/haproxy-wi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.3 KiB
67 lines
2.3 KiB
7 years ago
|
{% extends "base.html" %}
|
||
|
{% block content %}
|
||
|
<center>
|
||
|
<h3>Choose server</h3>
|
||
|
<p>
|
||
|
<form action="{{ action }}" method="get">
|
||
|
<select autofocus required name="serv" id="{{ select_id }}">
|
||
|
<option disabled>Choose server</option>
|
||
|
{% for select in selects %}
|
||
|
{% if keepalived %}
|
||
|
{% if select.1 == serv %}
|
||
|
<option value="{{ select.1 }}" selected>{{ select.0 }}</option>
|
||
|
{% else %}
|
||
|
<option value="{{ select.1 }}">{{ select.0 }}</option>
|
||
|
{% endif %}
|
||
|
{% if select.3 == serv %}
|
||
|
<option value="{{ select.3 }}" selected>{{ select.2 }}</option>
|
||
|
{% else %}
|
||
|
<option value="{{ select.3 }}">{{ select.2 }}</option>
|
||
|
{% endif %}
|
||
|
{% else %}
|
||
|
{% if select.2 == serv %}
|
||
|
<option value="{{ select.2 }}" selected>{{ select.1 }}</option>
|
||
|
{% else %}
|
||
|
<option value="{{ select.2 }}">{{ select.1 }}</option>
|
||
|
{% endif %}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
{% if onclick %}
|
||
|
<a class="ui-button ui-widget ui-corner-all" id="show" title="Show config" onclick="{{ onclick }}">Show</a>
|
||
|
{% else %}
|
||
|
<button type="submit" value="open" name="open" class="btn btn-default">Open</button>
|
||
|
{% endif %}
|
||
|
</form>
|
||
|
</p>
|
||
|
{% if note %}
|
||
|
<div class="alert alert-info"><b>Note:</b> If you reconfigure Master server, Slave will reconfigured automatically</div>
|
||
|
{% endif %}
|
||
|
{% if config %}
|
||
|
<h3>Config from {{ serv }}</h3>
|
||
|
<form action="{{ action }}" name="saveconfig" method="get">
|
||
|
<input type="hidden" value="{{ serv }}" name="serv">
|
||
|
<input type="hidden" value="{{ cfg }}.old" name="oldconfig">
|
||
|
<textarea name="config" class="config" rows="35" cols="100">{{ config }}</textarea>
|
||
|
<p>
|
||
|
<button type="submit" value="save" name="save" class="btn btn-default">Just save</button>
|
||
|
<button type="submit" value="" name="" class="btn btn-default">Save and restart</button>
|
||
|
</p>
|
||
|
</form>
|
||
|
{% endif %}
|
||
|
{% if aftersave %}
|
||
|
<div class="alert alert-info">New config was saved as: {{ cfg }} </div>
|
||
|
<br><a href="viewsttats.py?serv={{ serv }}" target="_blank" title="View stats">Go to view stats</a>
|
||
|
{% if stderr %}
|
||
|
<div class="alert alert-danger">
|
||
|
Some errors:
|
||
|
<br>
|
||
|
<br>
|
||
|
{{stderr}}
|
||
|
</div>
|
||
|
{% else %}
|
||
|
<div class="alert alert-success">Config ok</div>
|
||
|
{% endif %}
|
||
|
{% endif %}
|
||
|
</center>
|
||
|
{% endblock %}
|