forked from theforeman/foreman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_network.html.erb
27 lines (25 loc) · 1.56 KB
/
_network.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<div class="fields">
<% nat = compute_resource.networks %>
<% bridge = compute_resource.interfaces %>
<%= selectable_f f, :type, libvirt_networks(compute_resource), {},
{ :label => _('Network type'), :help_inline =>
remove_child_link('X', f, { :method => :'_delete', :title => _('remove network interface'),
:class => 'label label-important disable-unsupported' }),
:onchange => 'libvirt_network_selected(this)' } %>
<div id='nat' class='<%= 'hide' if f.object.type != 'network' %>'>
<%= selectable_f f, :network, nat.map(&:name),
{ :include_blank => nat.any? ? false : _("No networks") },
{ :class => "span2", :label => _("Network"), :disabled => f.object.type != 'network' } %>
</div>
<div id='bridge' class='<%= 'hide' if f.object.type != 'bridge' %>'>
<% if bridge.any? %>
<%= selectable_f f, :bridge, bridge.map(&:name),
{ :include_blank => bridge.any? ? false : _("No bridges") },
{ :class => "span2", :label => _("Network"), :disabled => f.object.type != 'bridge' } %>
<% else %>
<%= text_f f, :bridge, :class => "span2", :label => _("Network"), :help_block => _("your libvirt host does not support interface listing, please enter here the bridge name (e.g. br0)") %>
<% end %>
</div>
<%= selectable_f f, :model, %w(virtio rtl8139 ne2k_pci pcnet e1000), {},
{ :label => _('NIC type'), :class => 'span2' } %>
</div>