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.
haproxy-wi/app/templates/runtimeapi.html

59 lines
1.9 KiB

{% extends "base.html" %}
{% block content %}
{% from 'include/input_macros.html' import input, checkbox %}
<table class="overview">
<tr class="overviewHead">
<td class="padding10 first-collumn">Server</td>
<td>Disable/Enable server or output any information</td>
<td>Command</td>
<td class="checkbox-head">Save change</td>
<td></td>
</tr>
<tr>
<td class="padding10 first-collumn" style="width: 25%;">
<form action="{{ action }}" method="post" id="runtimeapiform">
{% include 'include/select.html' %}
</td>
<td style="width: 30%;">
<select required name="servaction" id="servaction">
<option disabled>Choose action</option>
{% if role <= 2 %}
<option value="disable">Disable</option>
<option value="enable">Enable</option>
<option value="set">Set</option>
{% endif %}
<option value="show" selected>Show</option>
</select>
</td>
<td>
{{ input('servbackend', value=servbackend, title='Frontend, backend/server, show: info, pools or help', required='required') }}
</td>
<td class="checkbox">
{% if role <= 2 %}
{{ checkbox('save', value='123') }}
{% endif %}
</td>
<td>
<button type="submit" name="Enter" value="Enter" id="enter">Enter</button>
</td>
</form>
</tr>
</table>
<script>
if($('#servbackend').val()) {
window.onload = {{ onclick }}
}
if (window.matchMedia('(max-width: 786px)').matches || window.matchMedia('(max-width: 1024px)').matches || window.matchMedia('(max-width: 667px)').matches) {
$( "#servaction" ).selectmenu({
width: 150
});
$( "#serv" ).selectmenu({
width: 150
});
}
</script>
<div id="ajaxruntime"></div>
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
You can read the description of all Run Time API <a href="https://haproxy-wi.org/description.py?description=runtimeapi" title="Run Time API description" target="_blank">here</a>
</div>
{% endblock %}