mirror of https://github.com/Aidaho12/haproxy-wi
190 lines
6.9 KiB
HTML
190 lines
6.9 KiB
HTML
{% from 'include/input_macros.html' import input, select, checkbox %}
|
|
{% from 'include/provisioning/variables.html' import get_nice_name, generate_opt_options %}
|
|
{% for s in server %}
|
|
{% set region_name = [] %}
|
|
<div id="do_edit" style="display: none; padding: 0 2px 0 0; margin-left: 1px; margin-right: -4px;">
|
|
<table class="overview provisioning_table">
|
|
{% include 'include/tr_validate_tips.html' %}
|
|
<tr>
|
|
<td colspan="2" class="headers">
|
|
<b>General information</b>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding20">
|
|
Server name
|
|
</td>
|
|
<td>
|
|
<span id="do_edit_server_name">{{s.name}}</span>
|
|
</td>
|
|
</tr>
|
|
{{input('do_edit_group', value=s.group_id, type='hidden')}}
|
|
{{input('do_edit_id', value=s.id, type='hidden')}}
|
|
<tr>
|
|
<td class="padding20">
|
|
Provider credentials
|
|
<span class="need-field">*</span>
|
|
</td>
|
|
<td>
|
|
<select id="do_edit_id_provider">
|
|
{% for p in providers %}
|
|
{% if p.type == 'do' %}
|
|
{% if s.provider_id|int() == p.id|int() %}
|
|
<option value="{{ p.id }}" selected>{{ p.name }}</option>
|
|
{% else %}
|
|
<option value="{{ p.id }}">{{ p.name }}</option>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding20 padding-top20">
|
|
Region
|
|
</td>
|
|
<td>
|
|
{% set id = 'do_edit_regions-' + id|string() %}
|
|
{{ get_nice_name(id, 'do', 'region', params) }}
|
|
<span id="do_edit_regions" style="display: none;">{{s.region}}</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="headers">
|
|
<b>Instance</b>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding20">
|
|
Size
|
|
<span class="need-field">*</span>
|
|
</td>
|
|
<td>{{ generate_opt_options('do_edit_size', 'do', 'size', params, first=s.instance_type) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding20">
|
|
OS
|
|
<span class="need-field">*</span>
|
|
</td>
|
|
<td>
|
|
{{ generate_opt_options('do_edit_oss', 'do', 'image', params, first=s.os) }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding20">
|
|
SSH
|
|
<span class="need-field">*</span>
|
|
</td>
|
|
<td>
|
|
<select id="do_edit_ssh_choose">
|
|
{% if s.ssh_key_name != none %}
|
|
<option value="ssh_name" selected>Set SSH key name</option>
|
|
{% else %}
|
|
<option value="ssh_name">Set SSH key name</option>
|
|
{% endif %}
|
|
{% if s.ssh_ids != none %}
|
|
<option value="ssh_ids" selected>Set SSH key ids</option>
|
|
{% else %}
|
|
<option value="ssh_ids">Set SSH key ids</option>
|
|
{% endif %}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr id="do_edit_ssh_ids_tr" {% if s.ssh_ids == none %}style="display: none;"{% endif %}>
|
|
<td class="padding20 padding-top20">
|
|
SSH key ids
|
|
<span class="need-field">*</span>
|
|
</td>
|
|
<td>
|
|
{{input('do_edit_ssh_ids', size='30', value=s.ssh_ids)}}
|
|
<div class="tooltip tooltipTop tooltipTd">List comma separated. Required if SSH key name is empty</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="do_edit_ssh_name_tr" {% if s.ssh_key_name is none %}style="display: none;"{% endif %}>
|
|
<td class="padding20 padding-top20">
|
|
SSH key name
|
|
<span class="need-field">*</span>
|
|
</td>
|
|
<td>
|
|
{{input('do_edit_ssh_name', size='30', value=s.ssh_key_name)}}
|
|
<div class="tooltip tooltipTop tooltipTd">Required if SSH key ids is empty</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
{% set checked='checked' %}
|
|
{% if s.monitoring == 0 %}
|
|
{% set checked='' %}
|
|
{% endif %}
|
|
<td class="padding20">Monitoring</td>
|
|
<td>
|
|
{{checkbox('do_edit_monitoring', checked=checked)}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
{% set checked='checked' %}
|
|
{% if s.backup == 0 %}
|
|
{% set checked='' %}
|
|
{% endif %}
|
|
<td class="padding20">Backup</td>
|
|
<td>
|
|
{{checkbox('do_edit_backup', checked=checked)}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="headers">
|
|
<b>Network</b>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
{% set checked='checked' %}
|
|
{% if s.private_networking == 0 %}
|
|
{% set checked='' %}
|
|
{% endif %}
|
|
<td class="padding20">Private IP</td>
|
|
<td>
|
|
{{checkbox('do_edit_private_networking', checked=checked)}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
{% set checked='checked' %}
|
|
{% if s.floating_ip == 0 %}
|
|
{% set checked='' %}
|
|
{% endif %}
|
|
<td class="padding20">Floating Ip</td>
|
|
<td>
|
|
{{checkbox('do_edit_floating_ip', checked=checked)}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
{% set checked='checked' %}
|
|
{% if s.firewall == 0 %}
|
|
{% set checked='' %}
|
|
{% endif %}
|
|
<td class="padding20" style="padding-bottom: 25px;padding-top: 25px;">Firewall</td>
|
|
<td>
|
|
{{checkbox('do_edit_firewall', checked=checked)}}
|
|
<div class="tooltip tooltipTop tooltipTd">Roxy-WI will create Security group and open 22, 443, 1999, 8085, 8086 ports. Otherwise all ports will be closed</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<p class="validateTips alert alert-warning">Be aware: some changes may cause server re-creation. And all your data will be lost</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<script>
|
|
$( function() {
|
|
$('#do_edit_ssh_choose').on('selectmenuchange', function (){
|
|
if ($('#do_edit_ssh_choose option:selected').val() == 'ssh_name') {
|
|
$('#do_edit_ssh_name_tr').show();
|
|
$('#do_edit_ssh_ids_tr').hide();
|
|
} else if ($('#do_edit_ssh_choose option:selected').val() == 'ssh_ids') {
|
|
$('#do_edit_ssh_name_tr').hide();
|
|
$('#do_edit_ssh_ids_tr').show();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</div>
|
|
{% endfor %}
|