Revision 01fde835
Added by Marek Hulán about 8 years ago
app/views/compute_resources_vms/form/libvirt/_network.html.erb | ||
---|---|---|
|
||
<% nat = compute_resource.networks %>
|
||
<% bridge = compute_resource.interfaces %>
|
||
<% nat = compute_resource.networks %>
|
||
<% bridges = compute_resource.bridges %>
|
||
|
||
<%= selectable_f f, :type, libvirt_networks(compute_resource), {},
|
||
{ :label => _('Network type'),
|
||
... | ... | |
</div>
|
||
|
||
<div id='bridge' class='<%= 'hide' if f.object.type && (f.object.type != 'bridge') %>'>
|
||
<% if bridge.any? %>
|
||
<%= selectable_f f, :bridge, bridge.map(&:name),
|
||
{ :include_blank => bridge.any? ? false : _("No bridges") },
|
||
{ :class => "libvirt_bridge without_select2", :label => _("Network"), :disabled => ((f.object.type && (f.object.type != 'bridge')) || !new_host), :label_size => "col-md-3" } %>
|
||
<% if bridges.any? %>
|
||
<%= selectable_f f, :bridge, bridges.map(&:name),
|
||
{ :include_blank => bridges.any? ? false : _("No bridges") },
|
||
{ :class => "libvirt_bridge without_select2", :label => _("Network"), :disabled => !new_host, :label_size => "col-md-3" } %>
|
||
<% else %>
|
||
<%= text_f f, :bridge,
|
||
:class => "libvirt_bridge",
|
||
:label => _("Network"),
|
||
:help_inline => popover(
|
||
'',
|
||
_("Your libvirt host does not support interface listing, please enter here the bridge name (e.g. br0)"),
|
||
_('There was no active bridge interface found in libvirt, if it does not support listing, you can enter the bridge name manually (e.g. br0)'),
|
||
:rel => 'popover-modal'
|
||
),
|
||
:disabled => !new_host,
|
Also available in: Unified diff
Fixes #14204 - list only bridges for bridged networking