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

30 lines
1.0 KiB
HTML

{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% from 'languages/languages.html' import languages %}
<style>
.div-backends {
height: auto !important;
}
</style>
{% if backends == 'Cannot get backends' %}
{{backends}}
{% else %}
{% if service == 'nginx' or service == 'apache' %}
{% set backends = backends.split('\n') %}
{% endif %}
{% for b in backends %}
{% if service == 'haproxy' %}
<a href="/app/config/section/haproxy/{{serv}}/{{b}}" title="{{lang.words.edit|title()}} {{lang.words.backend}} {{b}}" target="_blank" style="padding-right: 10px;">
{{b}}
</a>
{% elif service == 'nginx' or service == 'apache' %}
{% set full_file = b.split(' ')[0] | replace ('/', '92') %}
{% set full_file = full_file.replace(':', '') %}
<a href="/app/config/{{ service }}/{{serv}}/{{full_file}}" title="{{lang.words.edit|title()}} {{lang.words.config}} {{b.split(' ')[0]}}" target="_blank" style="padding-right: 10px;">
{{b.split(' ')[1] | replace(';', '')}}
</a>
{% else %}
{{b}}
{% endif %}
{% endfor %}
{% endif %}