Revision 43c4bd72
Added by Marek Hulán over 9 years ago
app/views/nic/_base_form.html.erb | ||
---|---|---|
<%= selectable_f f, :type, interfaces_types, {},
|
||
:class => 'interface_type', :disabled => !f.object.new_record? %>
|
||
|
||
|
||
<%= text_f f, :mac, :class => :interface_mac %>
|
||
<%= text_f f, :identifier, :disabled => !f.object.new_record?,
|
||
:help_inline => _("Device identifier, i.e.: eth0 or eth1.1"),
|
||
:class => :interface_identifier %>
|
||
<%= text_f f, :name, :label => _("DNS name") %>
|
||
<%= text_f f, :name, :label => _("DNS name"), :value => f.object.shortname,
|
||
:help_inline => _("Primary interface's DNS name and domain define host's FQDN"),
|
||
:class => :interface_name %>
|
||
<%= select_f f, :domain_id, accessible_domains, :id, :to_label,
|
||
{ :include_blank => accessible_domains.any? ? true : _("No domains")},
|
||
{ :disabled => accessible_domains.empty? ? true : false,
|
||
:help_inline => :indicator,
|
||
:class => 'interface_domain', :'data-url' => domain_selected_hosts_path } %>
|
||
:class => :interface_domain, :'data-url' => domain_selected_hosts_path } %>
|
||
<%= select_f f, :subnet_id, accessible_subnets, :id, :to_label,
|
||
{ :include_blank => accessible_subnets.any? ? true : _("No subnets")},
|
||
{ :disabled => accessible_subnets.empty? ? true : false,
|
||
:help_inline => :indicator,
|
||
:class => 'interface_subnet', :'data-url' => freeip_subnets_path } %>
|
||
<%= text_f f, :ip %>
|
||
:class => :interface_subnet, :'data-url' => freeip_subnets_path } %>
|
||
<%= text_f f, :ip,
|
||
:class => :interface_ip,
|
||
:autocomplete => 'off',
|
||
:help_block => link_to(_("Suggest new"), '#', :class => 'suggest_new_ip'),
|
||
:help_inline => popover(
|
||
_("IP address auto-suggest"),
|
||
_("An IP address will be auto-suggested if you have a DHCP-enabled Smart Proxy on the subnet selected above.<br/><br/>The IP address can be left blank when:<br/><ul><li>provisioning tokens are enabled</li><li>the domain does not manage DNS</li><li>the subnet does not manage reverse DNS</li><li>and the subnet does not manage DHCP reservations</li></ul>"),
|
||
:rel => 'popover-modal',
|
||
:'data-placement' => "top"
|
||
).html_safe %>
|
||
|
||
<%= checkbox_f f, :managed,
|
||
:help_inline => _("Should this interface be managed via DHCP and DNS smart proxy and should it be configured during provisioning?") %>
|
||
<%= checkbox_f f, :primary,
|
||
:help_inline => _("The Primary interface is used for constructing the FQDN of the host"),
|
||
:class => :interface_primary %>
|
||
<%= checkbox_f f, :provision,
|
||
:help_inline => _("The Provisioning interface is used for TFTP of PXELinux (or SSH for image-based hosts)"),
|
||
:class => :interface_provision %>
|
Also available in: Unified diff
Fixes #7456 - Extract primary interface from host
Contributions from:All host must have at least one primary interface and one provision (can
be the same interface). Primary interface gives host a name so even
unamanaged host have primary interface (we skip validations of other
attributes for unamanged hosts though).
Host still have name attribute which is a cache of primary interface name.
Therefore we can use the host name in SQL queries, as a friendly_id etc.
- realm moved to the primary tab
- fqdn in nics table
- flags in nics table
- checkboxes for provision and primary flags
- modal resize fix
- original fields for primary NIC removed
- skipping validation for new resources
- warnings before switching flags and table update
- host name and primary interface name connected
- host domain name in the page title
- nics on host show page
- clearing modal window on cancel
- fixed domain validation in NIC::Base
- ip suggestion for all interfaces
- flags switchable from the overview table
- use icons instead of text for primary/provision on NICs overview tab
- attempt to fix sending NIC template
- fix fqdn algorithm
- ip addres in the overview table
- fix for class name collision
- better behavior of host name <-> primary name sync
- fix for subnet combobox values
- fix for modal poping up on form submission
- network partial for CRs moved from VM tab to modal
- fix ip suggestion race for ipam=db