|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
<script src="/inc/codemirror/codemirror.js"></script>
|
|
|
|
|
<script src="/inc/codemirror/nginx.js"></script>
|
|
|
|
|
<script src="/inc/codemirror/haproxy.js"></script>
|
|
|
|
|
<script src="/inc/configshow.js"></script>
|
|
|
|
|
<center>
|
|
|
|
|
{% if selects|length == 0 %}
|
|
|
|
|
{% include 'include/getstarted.html' %}
|
|
|
|
@ -42,45 +43,36 @@
|
|
|
|
|
</form>
|
|
|
|
|
</p>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if not aftersave %}
|
|
|
|
|
{% if stderr or error %}
|
|
|
|
|
{% include 'include/errors.html' %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if stderr or error %}
|
|
|
|
|
{% include 'include/errors.html' %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if config %}
|
|
|
|
|
{% if role <= 3 %}
|
|
|
|
|
<h4>Config from {{ serv }}</h4>
|
|
|
|
|
</center>
|
|
|
|
|
<form action="{{ action }}" name="saveconfig" id="saveconfig" method="post">
|
|
|
|
|
<input type="hidden" value="{{ serv }}" name="serv">
|
|
|
|
|
<input type="hidden" value="{{ cfg }}.old" name="oldconfig">
|
|
|
|
|
<div style="margin-left: 23%;width: 60%;">
|
|
|
|
|
<textarea name="config" id="config_text_area" class="config" rows="35" cols="100">{{ config }}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<p>
|
|
|
|
|
<center>
|
|
|
|
|
{% if service == 'haproxy' %}
|
|
|
|
|
<button type="submit" value="test" name="save" class="btn btn-default">Just test</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<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>
|
|
|
|
|
{% if service != 'keepalived' %}
|
|
|
|
|
<button type="submit" value="reload" name="save" class="btn btn-default">Save and reload</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
{% if note %}
|
|
|
|
|
<div class="alert alert-info"><b>Note:</b> When reconfiguring the master server, the slave will be reconfigured automatically</div>
|
|
|
|
|
<h4>Config from {{ serv }}</h4>
|
|
|
|
|
</center>
|
|
|
|
|
<form action="config.py" name="saveconfig" id="saveconfig" method="post">
|
|
|
|
|
<input type="hidden" value="{{ serv }}" name="serv">
|
|
|
|
|
<input type="hidden" value="{{ cfg }}.old" name="oldconfig">
|
|
|
|
|
<input type="hidden" value="{{ token }}" name="token">
|
|
|
|
|
<input type="hidden" value="{{ service }}" name="service">
|
|
|
|
|
<div style="margin-left: 23%;width: 60%;">
|
|
|
|
|
<textarea name="config" id="config_text_area" class="config" rows="35" cols="100">{{ config }}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<p>
|
|
|
|
|
<center>
|
|
|
|
|
{% if service == 'haproxy' %}
|
|
|
|
|
<button type="submit" value="test" name="save" class="btn btn-default">Just test</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if aftersave %}
|
|
|
|
|
<div class="alert alert-info">New config was saved as: {{ cfg }} </div>
|
|
|
|
|
{% if stderr or error %}
|
|
|
|
|
{% include 'include/errors.html' %}
|
|
|
|
|
{% else %}
|
|
|
|
|
<div class="alert alert-success">Config is ok</div>
|
|
|
|
|
<a href="viewsttats.py?serv={{ serv }}" target="_blank" title="View stats">Go to stats</a>
|
|
|
|
|
<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>
|
|
|
|
|
{% if service != 'keepalived' %}
|
|
|
|
|
<button type="submit" value="reload" name="save" class="btn btn-default">Save and reload</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="alert alert-info"><b>Note:</b> When reconfiguring the master server, the slave will be reconfigured automatically</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</center>
|
|
|
|
|