mirror of https://github.com/Aidaho12/haproxy-wi
55 lines
2.8 KiB
HTML
55 lines
2.8 KiB
HTML
{% for b in backups %}
|
|
{% for s in servers %}
|
|
{% if b.server_id|string() == s.0|string() %}
|
|
<tr id="backup-table-{{b.id}}">
|
|
<td class="padding10 first-collumn">
|
|
{% set id = 'backup-server-' + b.id|string() %}
|
|
{{ input('backup-server-id-'+b.id|string(), value=s.0, type='hidden') }}
|
|
{{ copy_to_clipboard(id=id, value=s.1) }}
|
|
</td>
|
|
<td>
|
|
{{ input('backup-rserver-'+b.id|string(), value=b.rhost, size='14') }}
|
|
</td>
|
|
<td>
|
|
{{ input('backup-rpath-'+b.id|string(), value=b.rpath) }}
|
|
</td>
|
|
<td>
|
|
{% set values = {'backup':'backup','synchronization':'synchronization'} %}
|
|
{{ select('backup-type-'+b.id|string(), values=values, selected=b.type, required='required', class='force_close') }}
|
|
</td>
|
|
<td>
|
|
{% set values = {'hourly':'hourly','daily':'daily','weekly':'weekly', 'monthly':'monthly'} %}
|
|
{{ select('backup-time-'+b.id|string(), values=values, selected=b.time, required='required', class='force_close') }}
|
|
</td>
|
|
<td>
|
|
<select id="backup-credentials-{{b.id}}" required>
|
|
<option disabled selected>------</option>
|
|
{% for ssh in sshs %}
|
|
{% if ssh.key_enabled == 1 %}
|
|
{% if ssh.id == b.cred_id %}
|
|
<option value="{{ssh.id}}" selected="selected">{{ssh.name}}</option>
|
|
{% else %}
|
|
<option value="{{ssh.id}}">{{ssh.name}}</option>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</td>
|
|
<td>
|
|
{% if b.description is not none %}
|
|
{{ input('backup-description-'+b.id|string(), value=b.description.replace("'", "")) }}
|
|
{% else %}
|
|
{{ input('backup-description-'+b.id|string()) }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a class="add" onclick="cloneBackup({{b.id}})" id="clone-backup{{b.id}}" title="{{lang.words.clone|title()}} {{b.server_id}}" style="cursor: pointer;"></a>
|
|
</td>
|
|
<td>
|
|
<a class="delete" onclick="confirmDeleteBackup({{b.id}})" title="{{lang.words.delete|title()}} {{lang.words.backup}} {{b.server_id}}" style="cursor: pointer;"></a>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|